/* Treizeci de centimetri de cianură — warm paper, river accent. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF;
}
:root {
  --bg: #f6f1e4; --bg-2: #efe7d3; --surface: #fffdf6;
  --text: #211c12; --text-2: #4a4232; --muted: #6e6350;
  --line: #d8cdb2; --accent: #0e5a57; --accent-ink: #f4efe1;
  --accent-soft: #dfe9e2; --warn: #a33b1f; --warn-soft: #f3ddd2;
  --mark: #f2d06b; --shadow: rgba(33, 28, 18, 0.14);
  --display: "Fraunces", Georgia, serif; --body: "Source Serif 4", Georgia, serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #16130d; --bg-2: #1e1912; --surface: #221c13;
  --text: #f0e8d6; --text-2: #cfc4ab; --muted: #a99d83;
  --line: #453b2a; --accent: #7fc4bd; --accent-ink: #10201e;
  --accent-soft: #1d3230; --warn: #e89a7d; --warn-soft: #3a241c;
  --mark: #8a6d1c; --shadow: rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 1.125rem; line-height: 1.65;
  overflow-x:clip;
}
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 60; background: var(--accent);
  color: var(--accent-ink); padding: 0.5rem 1rem; border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.15s;
}
.skip:focus { top: 0; color: var(--accent-ink); }

/* ---- sticky bar (house pattern) ---- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 0.75rem;
  max-width: 72rem; margin: 0 auto; padding: 0.45rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  font-size: 0.95rem; min-height: 2.9rem;
}
.topbar .home { font-family: var(--display); font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.topnav { display: flex; gap: 0.9rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--text-2); text-decoration: none; }
.topnav a:hover { color: var(--accent); text-decoration: underline; }
.topbar .spacer { flex: 1 1 auto; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.7rem;
  color: var(--text-2); text-decoration: none; white-space: nowrap; font-size: 0.85rem;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  cursor: pointer; flex: none;
}
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
section { scroll-margin-top: 4rem; }

/* ---- hero ---- */
.hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: end;
  padding: 3.5rem 0 2.5rem; border-bottom: 2px solid var(--text);
}
.eyebrow {
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--warn); margin: 0 0 1rem; font-weight: 600;
}
h1 {
  font-family: var(--display); font-weight: 600; line-height: 1.02;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem); margin: 0 0 1.25rem;
  text-wrap: balance;
}
.deck { font-size: 1.25rem; line-height: 1.55; color: var(--text-2); max-width: 34rem; margin: 0 0 1.25rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--muted); }
.hero-meta strong { color: var(--text); }
.hero-buoy { justify-self: end; text-align: center; }
.hero-buoy svg { width: clamp(120px, 14vw, 190px); height: auto; }
.hero-buoy figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }

/* ---- prose ---- */
main { max-width: 46rem; }
main > section { padding: 2.75rem 0 0; }
main > section.wide { max-width: none; }
.kicker { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 0.4rem; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.12; margin: 0 0 1rem; text-wrap: balance; }
h3 { font-family: var(--display); font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.plink { font-size: 0.7em; text-decoration: none; color: var(--muted); margin-left: 0.35rem; }
.scene-lede::first-letter {
  font-family: var(--display); font-weight: 600; font-size: 3.4em; line-height: 0.9;
  float: left; padding: 0.08em 0.12em 0 0; color: var(--warn);
}
.pull { border-left: 3px solid var(--warn); padding: 0.2rem 0 0.2rem 1rem; margin: 1.5rem 0; font-size: 1.15rem; color: var(--text-2); }
.pull cite { display: block; font-style: normal; font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; }
blockquote p { margin: 0 0 0.5rem; }
blockquote footer, blockquote cite { font-size: 0.9rem; color: var(--muted); font-style: normal; }
.fine { font-size: 0.95rem; color: var(--muted); }
ul.sources { list-style: none; margin: 1rem 0; padding: 0; }
ul.sources li { margin: 0 0 0.6rem; padding-left: 1.1rem; position: relative; font-size: 1rem; }
ul.sources li::before { content: "›"; position: absolute; left: 0; color: var(--warn); font-weight: 700; }
figure.panel { margin: 1.5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1.25rem 1.25rem 1rem; }
figure.panel figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; }

/* ---- data moments ---- */
.moment {
  margin: 2.5rem calc(50% - 50vw); padding: 4.5rem 1.25rem; text-align: center;
  background: var(--text); color: var(--bg);
}
[data-theme="dark"] .moment { background: #0d0b07; color: #f0e8d6; }
.moment .kicker { color: var(--mark); }
.moment .giant {
  font-family: var(--display); font-weight: 600; line-height: 1;
  font-size: clamp(3rem, 11vw, 7.5rem); margin: 0.5rem 0;
  font-variant-numeric: tabular-nums;
}
.moment .human { font-size: 1.2rem; max-width: 36rem; margin: 0 auto; color: inherit; opacity: 0.92; }
.moment .src { font-size: 0.85rem; opacity: 0.7; margin: 1rem 0 0; }
.moment .src a { color: inherit; }

/* ---- journey strip ---- */
.journey { list-style: none; margin: 1.5rem 0 0; padding: 0; position: relative; }
.journey::before {
  content: ""; position: absolute; left: 0.62rem; top: 0.5rem; bottom: 0.5rem; width: 3px;
  background: var(--line); border-radius: 2px;
}
.journey-progress {
  position: absolute; left: 0.62rem; top: 0.5rem; width: 3px; height: 0;
  background: var(--accent); border-radius: 2px;
}
.journey-progress[data-level="1"] { height: 10%; }
.journey-progress[data-level="2"] { height: 20%; }
.journey-progress[data-level="3"] { height: 30%; }
.journey-progress[data-level="4"] { height: 40%; }
.journey-progress[data-level="5"] { height: 50%; }
.journey-progress[data-level="6"] { height: 60%; }
.journey-progress[data-level="7"] { height: 70%; }
.journey-progress[data-level="8"] { height: 80%; }
.journey-progress[data-level="9"] { height: 90%; }
.journey-progress[data-level="10"] { height: calc(100% - 1rem); }
.journey li { position: relative; padding: 0 0 1.1rem 2.25rem; }
.journey .dot {
  position: absolute; left: 0.28rem; top: 0.45rem; width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.journey li.done .dot { background: var(--accent); }
.journey time { font-weight: 600; color: var(--warn); font-size: 0.95rem; display: block; }
.journey .place { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.journey .val {
  display: inline-block; font-variant-numeric: tabular-nums; background: var(--accent-soft);
  border-radius: 0.35rem; padding: 0 0.5rem; margin-left: 0.5rem; font-size: 1rem;
}
.journey p { margin: 0.15rem 0 0; font-size: 1rem; color: var(--text-2); }

/* ---- map ---- */
.map-frame { background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem; overflow-x: auto; }
.map-frame svg { min-width: 560px; width: 100%; height: auto; display: block; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; margin: 0.75rem 0 0; padding: 0; font-size: 0.9rem; color: var(--muted); }
.map-legend .sw { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: baseline; }
.sw-r { background: #b3402a; } .sw-o { background: #c96a1e; }
.sw-y { background: #d29a1e; } .sw-g { background: var(--accent); }

/* ---- quotes panel ---- */
.quotes { display: grid; gap: 1rem; margin: 1.25rem 0; }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; padding: 1rem 1.2rem; border-top: 4px solid var(--warn); }
.quote-card p { font-family: var(--display); font-size: 1.2rem; line-height: 1.4; margin: 0 0 0.5rem; }
.quote-card cite { font-style: normal; font-size: 0.9rem; color: var(--muted); }
.measured { background: var(--accent-soft); border-radius: 0.6rem; padding: 1rem 1.2rem; margin: 1.25rem 0; }
.measured h3 { margin-top: 0; }
.measured ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.measured li { margin-bottom: 0.35rem; }

/* ---- case file ---- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.25rem; }
.filters button {
  font: inherit; font-size: 0.95rem; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); border-radius: 999px; padding: 0.3rem 1rem; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cases { display: grid; gap: 1rem; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; padding: 1rem 1.2rem; }
.case.spotlight { border: 2px solid var(--accent); }
.case .tag { display: inline-block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.case .tag.pending { color: var(--warn); }
.case h3 { margin: 0.25rem 0 0.4rem; }
.case p { margin: 0 0 0.5rem; font-size: 1.02rem; }
.case .verdict { font-weight: 600; }
.case details { margin-top: 0.5rem; }
.case summary { cursor: pointer; color: var(--accent); font-size: 0.95rem; }

/* ---- game ---- */
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1.5rem; margin: 1.25rem 0; }
.game-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.game-head svg { width: 54px; height: auto; flex: none; }
.game-head p { margin: 0; font-size: 1rem; color: var(--text-2); }
.game fieldset { border: 1px solid var(--line); border-radius: 0.6rem; margin: 0 0 1rem; padding: 1rem; }
.game legend { font-family: var(--display); font-weight: 600; font-size: 1.15rem; padding: 0 0.5rem; }
.game .opts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.game .opts button {
  font: inherit; font-size: 1rem; border: 1px solid var(--line); background: var(--bg);
  border-radius: 0.5rem; padding: 0.4rem 0.9rem; cursor: pointer; color: var(--text);
}
.game .opts button:hover:not(:disabled) { border-color: var(--accent); }
.game .opts button:disabled { cursor: default; opacity: 0.75; }
.game .opts button.picked-right { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); opacity: 1; }
.game .opts button.picked-wrong { background: var(--warn-soft); border-color: var(--warn); opacity: 1; }
.game .payoff { margin: 0.75rem 0 0; font-size: 1rem; border-left: 3px solid var(--accent); padding-left: 0.75rem; }
.game .payoff strong { color: var(--accent); }
[data-theme="dark"] .game .payoff strong { color: var(--accent); }
.verdict { text-align: center; padding: 1.5rem 1rem 0.5rem; }
.verdict .score { font-family: var(--display); font-size: 2.5rem; font-weight: 600; margin: 0; }
.verdict p { color: var(--text-2); }
.answers { width: 100%; border-collapse: collapse; font-size: 0.98rem; margin-top: 1rem; }
.answers caption { text-align: left; font-weight: 600; padding-bottom: 0.5rem; }
.answers th, .answers td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; }
.answers th { background: var(--bg-2); }

/* ---- share / footer ---- */
.share { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 0.55rem; padding: 0.55rem 1.2rem; font-weight: 600;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn:hover { text-decoration: underline; }
footer.site { border-top: 2px solid var(--text); margin-top: 3rem; padding-top: 1.25rem; font-size: 0.95rem; color: var(--muted); }
footer.site .totop { font-weight: 600; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.data caption { text-align: left; padding-bottom: 0.5rem; color: var(--text-2); }
table.data th, table.data td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; font-variant-numeric: tabular-nums; }
table.data th { background: var(--bg-2); }
table.data td.n { text-align: right; }

@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; align-items: start; gap: 1rem; padding-top: 2.25rem; }
  .hero-buoy { justify-self: start; display: flex; align-items: center; gap: 1rem; text-align: left; }
  .hero-buoy svg { width: 84px; }
}
@media (max-width: 30rem) {
  body { font-size: 1.05rem; }
  .wrap { padding: 0 1rem 3rem; }
  .topbar { padding: 0.45rem 1rem; gap: 0.6rem; }
  .moment { padding: 3.25rem 1rem; }
  .game { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
