/* Fonts hosted on the site (OFL licence; latin subset from Google Fonts, 18/11/2026): faster, and no visitor IP sent to Google */
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700 900; font-display: optional; src: url("../fonts/big-shoulders-display.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: optional; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: optional; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: optional; src: url("../fonts/source-serif-4.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: optional; src: url("../fonts/source-serif-4-italic.woff2") format("woff2"); }

/* Ironhorse Files · The Wreck Map
   Light theme (18/11/2026): cream page, dark type. The names keep their role, not their colour:
   --ink = page background (cream), --paper = main text (near black).
   .case, .a-sheet and .lightbox restore the dark set locally (see .on-dark). */
:root {
  --amber: #c9731f;
  --ink: #ece3cf;
  --ink-2: #e3d7bd;
  --ink-3: #cdbd9c;
  --paper: #1a1814;
  --paper-dim: #4b443a;
  --paper-faint: #645a4a;
  --brass: #6f4f1d;
  --brass-dim: #b39a72;
  --red: #b5332a;
  --red-glow: rgba(192, 57, 43, .45);

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-serif: "Source Serif 4", Georgia, serif;

  --top-h: 64px;
  --wrap: 1880px; --gut: clamp(16px, 2.6vw, 44px);
  --panel-w: min(460px, 100vw);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Film grain over everything; pointer-events off so it never blocks the map. */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none;
  z-index: 50;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .15 0 0 0 0 .08 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 36px);
  z-index: 30;
  background: rgba(236, 227, 207, .94); backdrop-filter: blur(8px); /* solid: the home page scrolls now */
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand-name {
  font-family: var(--f-display); font-weight: 900; font-size: 22px;
  letter-spacing: .06em; text-transform: uppercase;
}
.brand-name b { color: var(--brass); font-weight: 900; margin-left: .28em; }
.top-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.top-nav a {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: var(--paper-dim);
}
.top-nav a.is-current { color: var(--paper); }
.top-nav a:not(.btn-yt):hover { color: var(--paper); }
.btn-yt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--red); color: var(--paper) !important;
  background: rgba(192, 57, 43, .12);
  transition: background .25s var(--ease-out);
}
.btn-yt:hover { background: var(--red); color: var(--ink) !important; }
.btn-yt svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Stage + map ---------- */
.stage {
  position: relative; height: 100vh; height: 100dvh; min-height: 560px; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 55% 52%, #f6efdf 0%, var(--ink) 70%),
    var(--ink);
}
.stage::before { /* vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 75% 75% at 55% 52%, transparent 55%, rgba(110, 80, 40, .2) 100%);
}
/* The old wooden board the map is carved into (js/map.js places it). */
.board {
  position: absolute; z-index: 1; pointer-events: none;
  background: url("../img/board.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 16px 24px rgba(70, 40, 10, .34)) drop-shadow(0 2px 3px rgba(40, 20, 5, .35));
  transition-property: left, top, width, height; transition-timing-function: cubic-bezier(.65, 0, .35, 1); /* = d3.easeCubicInOut, same as the clip */
}
.board.is-tall { background-image: url("../img/board-tall.webp"); }
#map {
  position: absolute; inset: var(--top-h) 0 0 0;
  width: 100%; height: calc(100% - var(--top-h));
  cursor: grab; touch-action: none;
  z-index: 2;
}
#map:active { cursor: grabbing; }
#map.is-home { touch-action: pan-y; } /* one finger scrolls the page on the whole-country view */

#map .nation-glow { display: none; }
#map .nation { fill: none; stroke: #3a1f07; stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#map .state {
  fill: rgba(255, 236, 200, 0); stroke: none;
  transition: fill .35s var(--ease-out), opacity .6s var(--ease-out);
  cursor: pointer;
}
#map .state.has-files { fill: rgba(150, 70, 15, .1); }
#map .state:hover { fill: rgba(255, 236, 200, .2); }
#map .state.has-files:hover { fill: rgba(255, 228, 180, .26); }
#map .state.has-soon { fill: rgba(150, 90, 30, .04); }
#map .state.has-soon:hover { fill: rgba(255, 236, 200, .2); }
/* Coming soon = hollow cream ring (documentaries are filled cream stars): empty = file still to make */
#map .pin.is-upcoming .core { fill: none; stroke: #fbf3df; stroke-width: 1.6; filter: drop-shadow(0 0 .7px #241002) drop-shadow(0 0 .7px #241002); }
#map .pin.is-upcoming .pin-year { fill: #fbf3df; stroke: rgba(36, 16, 2, .9); font-weight: 500; }
#map .pin.is-upcoming .pin-label { font-size: 11px; }
#map .pin.is-upcoming.label-hidden .pin-label, #map .pin.is-upcoming.label-hidden .pin-year { opacity: 0 !important; }
#map .pin.is-upcoming.is-open .core { fill: #fbf3df; stroke: #fbf3df; stroke-width: 2.5; }
#map .state.is-dim { fill: rgba(40, 18, 4, .26); }
#map .state.is-active { fill: rgba(255, 236, 200, .1); cursor: default; }
#map .borders { fill: none; stroke: #3a1f07; stroke-width: 1.3; opacity: .85; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; transition: opacity .6s; }
#map.is-zoomed .borders { opacity: .45; }
#map .county { fill: none; stroke: #4a2a0c; stroke-width: .8; opacity: .55; vector-effect: non-scaling-stroke; pointer-events: none; }
#map .state-outline { fill: none; stroke: #2a1404; stroke-width: 2.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
#map .rail { fill: none; pointer-events: none; transition: opacity .8s; }
#map .rail-line { stroke: #3a1f07; stroke-width: 1; opacity: .42; vector-effect: non-scaling-stroke; }
#map .rail-ties { stroke: #3a1f07; stroke-width: 3.2; stroke-dasharray: .9 5; opacity: 0; vector-effect: non-scaling-stroke; transition: opacity .8s; }
#map.is-zoomed .rail-line { opacity: .6; }
#map.is-zoomed .rail-ties { opacity: .38; }

/* Fixed-size marks (cities and case pins live outside the zoom transform) */
#map .city { cursor: pointer; }
#map .city circle { fill: var(--paper-dim); stroke: #fbf7ee; stroke-width: 1.5; }
#map .city.is-capital circle { fill: none; stroke: var(--paper-dim); stroke-width: 1.4; }
#map .city.is-capital .cap-core { fill: var(--paper-dim); stroke: none; }
#map .city text, #map .pin text {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em;
  fill: var(--paper-dim);
  paint-order: stroke; stroke: rgba(246, 239, 223, .92); stroke-width: 3.5px; stroke-linejoin: round;
}
#map .city:hover text { fill: var(--paper); }
#map .city:hover circle { fill: var(--paper); }
#map .city .hit, #map .pin .hit { fill: transparent; stroke: none; }

#map .pin { cursor: pointer; }
#map .pin .core { fill: var(--red); stroke: #fbf7ee; stroke-width: 1.5; }
#map .pin .ring {
  fill: none; stroke: var(--red); stroke-width: 1.5;
  transform-box: fill-box; transform-origin: center;
  animation: ping 2.4s var(--ease-out) infinite;
}
#map .pin .ring.r2 { animation-delay: 1.2s; }
#map .pin .ring { stroke: #fbf3df; stroke-width: 1.8; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }
#map .pin text.pin-label { fill: var(--paper); font-weight: 500; font-size: 12px; }
#map .pin text.pin-year { fill: var(--red); font-size: 10.5px; letter-spacing: .1em; }
#map .pin .pin-label, #map .pin .pin-year { opacity: 0; transition: opacity .4s; }
#map.is-zoomed .pin .pin-label, #map.is-zoomed .pin .pin-year,
#map .pin:hover .pin-label, #map .pin:hover .pin-year,
#map .pin.is-open .pin-label, #map .pin.is-open .pin-year { opacity: 1; }
#map .pin.is-open .core { fill: var(--paper); stroke: var(--red); stroke-width: 2.5; }
#map .pin:hover .core { r: 7; }
/* Documentaries: red star with a dark outline (stands out on cream) */
/* On the wood the documentaries are near-white stars (red got lost in the honey tones) */
#map .pin .core.star { fill: #fbf3df; }
.l-pin .core.star { fill: var(--red); }
#map .pin .core.star, .l-pin .core.star { stroke: #3a2a18; stroke-width: 1.3; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center; transition: transform .25s var(--ease-out); }
#map .pin:hover .core.star { transform: scale(1.25); }
#map .pin.is-open .core.star { fill: #fffaf0; stroke: var(--paper); stroke-width: 2; transform: scale(1.3); }

/* Leader line from the pin to the case panel on wide screens */
#map .leader { stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 4; fill: none; opacity: .8; pointer-events: none; }

/* Big state name behind the map */
.state-watermark {
  position: absolute; left: 0; right: 0; bottom: clamp(16px, 5vh, 56px);
  text-align: center; pointer-events: none; z-index: 0;
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(64px, 14vw, 230px); line-height: .85; letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 1px rgba(138, 101, 49, .3);
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
  white-space: nowrap; overflow: hidden;
}
.state-watermark.is-on { opacity: 1; transform: none; }

/* ---------- Overlays ---------- */
.intro {
  position: absolute; z-index: 5;
  top: calc(var(--top-h) + clamp(8px, 3vh, 36px)); left: clamp(16px, 3vw, 36px);
  max-width: 400px;
  pointer-events: none;
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out);
}
.intro.is-hidden { opacity: 0; transform: translateY(-12px); }
.kicker {
  margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-glow); }
.intro h1 {
  margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(44px, 5vw, 74px); line-height: .88; letter-spacing: .005em;
}
.lede {
  margin: 18px 0 0; max-width: 34ch;
  font-size: 17px; line-height: 1.5; font-style: italic; color: var(--paper-dim);
}

.crumbs {
  position: absolute; z-index: 6;
  top: calc(var(--top-h) + 14px); left: clamp(16px, 3vw, 36px);
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.crumbs button {
  background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--paper-dim);
  letter-spacing: inherit; text-transform: inherit;
}
.crumbs button:hover { color: var(--paper); }
.crumbs .sep { color: var(--brass-dim); }
.crumbs .here { color: var(--paper); padding: 6px 2px; }
.crumbs .back {
  display: inline-flex; align-items: center; gap: 8px; margin-right: 10px;
  padding: 7px 12px 7px 9px !important; border: 1px solid var(--ink-3) !important; color: var(--paper) !important;
  background: rgba(246, 239, 223, .85) !important;
}
.crumbs .back:hover { border-color: var(--brass) !important; }
.crumbs .back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.state-note {
  flex-basis: 100%; margin-top: 10px; text-transform: none; letter-spacing: .02em;
  font-family: var(--f-serif); font-style: italic; font-size: 15px; color: var(--paper-dim);
}
.state-note b.is-soon { color: var(--amber); }
.state-note b { color: var(--red); font-style: normal; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; }

.search {
  position: absolute; z-index: 8;
  top: calc(var(--top-h) + 14px); right: clamp(16px, 3vw, 36px);
  width: min(320px, calc(100vw - 32px));
}
.search input {
  width: 100%; padding: 12px 14px 12px 40px;
  background: rgba(250, 245, 233, .9); border: 1px solid var(--ink-3); color: var(--paper);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em;
  border-radius: 0; outline: none; backdrop-filter: blur(6px);
  transition: border-color .2s;
}
.search input::placeholder { color: var(--paper-faint); }
.search input:focus { border-color: var(--brass); }
.search-icon { position: absolute; left: 13px; top: 13px; width: 17px; height: 17px; fill: none; stroke: var(--paper-faint); stroke-width: 2; }
.search-results {
  list-style: none; margin: 4px 0 0; padding: 4px 0;
  background: var(--ink-2); border: 1px solid var(--ink-3);
  max-height: 50vh; overflow: auto;
}
.search-results li {
  padding: 10px 14px; cursor: pointer; display: grid; gap: 2px;
}
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--ink-3); }
.search-results .r-main { font-family: var(--f-serif); font-size: 15px; }
.search-results .r-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-faint); }
.search-results .r-sub b { color: var(--red); font-weight: 500; }

.index {
  position: absolute; z-index: 5;
  left: clamp(16px, 3vw, 36px); bottom: clamp(16px, 4vh, 40px);
  width: min(340px, calc(100vw - 32px));
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.index-title {
  margin: 0 0 8px; display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--paper-faint); border-bottom: 1px solid var(--ink-3); padding-bottom: 8px;
}
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list a {
  width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 10px;
  padding: 8px 4px; background: none; border: 0; border-bottom: 1px solid rgba(120, 100, 70, .22);
  text-align: left; cursor: pointer; text-decoration: none;
  transition: background .2s, padding .3s var(--ease-out);
}
.index-list a:hover, .index-list a.is-lit { background: rgba(138, 101, 49, .1); padding-left: 10px; }
.index-list .i-no { font-family: var(--f-mono); font-size: 11px; color: var(--brass); letter-spacing: .08em; }
.index-list .i-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .02em; text-transform: uppercase; }
.index-list .i-where { font-family: var(--f-mono); font-size: 11px; color: var(--paper-faint); letter-spacing: .06em; white-space: nowrap; }
.index-list a.is-soon .i-where { color: var(--red); }

.tooltip {
  position: absolute; z-index: 9; pointer-events: none;
  padding: 8px 11px; background: var(--paper); color: var(--ink);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
}
.tooltip b { font-family: var(--f-display); font-weight: 900; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; display: block; }
.tooltip .t-files { color: var(--red); }
.tooltip .t-soon { color: #e39a4e; }

.toast {
  position: absolute; z-index: 9; left: 50%; bottom: clamp(18px, 5vh, 48px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; background: var(--ink-2); border: 1px solid var(--ink-3);
  font-size: 15px; font-style: italic; color: var(--paper-dim);
  animation: toast-in .45s var(--ease-out);
}
.toast b { font-style: normal; color: var(--paper); }
.toast button {
  border: 1px solid var(--red); background: rgba(192, 57, 43, .14); padding: 7px 12px; cursor: pointer;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-style: normal;
}
.toast button:hover { background: var(--red); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

.hint {
  position: absolute; z-index: 4; right: clamp(16px, 3vw, 36px); bottom: 14px; margin: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-dim);
  transition: color .3s, transform .3s var(--ease-out);
}
.hint.is-flash { color: var(--red); transform: translateY(-2px); }
.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-dim);
}
.scroll-cue:hover { color: var(--paper); }
.scroll-cue svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
body.case-open .scroll-cue { opacity: 0; pointer-events: none; }
.legend { display: flex; gap: 16px; margin: 0 0 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-faint); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend .lg-red { width: 13px; height: 13px; border-radius: 0; background: #fbf3df; filter: drop-shadow(0 0 .7px #3a2a18) drop-shadow(0 0 .7px #3a2a18);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.legend .lg-amber { width: 10px; height: 10px; background: none; border: 2px solid #fbf3df; box-shadow: 0 0 0 1px #3a2a18, inset 0 0 0 1px #3a2a18; }
.hint kbd { font: inherit; border: 1px solid var(--ink-3); padding: 1px 5px; }

/* ---------- Case panel ---------- */
.case, .a-sheet, .lightbox {
  --ink: #1a1814; --ink-2: #24211c; --ink-3: #35302a;
  --paper: #f8f2e4; --paper-dim: #c9bfab; --paper-faint: #8c8475;
  --brass: #b48a4e; --brass-dim: #6e5734;
}
.case {
  position: fixed; z-index: 20;
  top: var(--top-h); right: 0; bottom: 0; width: var(--panel-w);
  background: var(--paper); color: var(--ink);
  box-shadow: -24px 0 50px rgba(70, 50, 20, .18); border-left: 1px solid #cdbd9c;
  transform: translateX(102%);
  transition: transform .7s var(--ease-out);
}
.case.is-open { transform: none; }
.case::before { /* paper texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .33 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.case-scroll { position: relative; height: 100%; overflow-y: auto; padding: 26px clamp(20px, 3vw, 34px) 40px; overscroll-behavior: contain; }
.case-close {
  position: absolute; z-index: 2; top: 14px; right: 14px; width: 40px; height: 40px;
  display: grid; place-items: center; border: 1px solid rgba(20, 22, 26, .25); background: var(--paper); cursor: pointer;
}
.case-close:hover { border-color: var(--ink); }
.case-close svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; fill: none; }

.case .c-stamp {
  display: inline-flex; gap: 10px; align-items: center;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: #6b5a3f;
}
.case .c-stamp .c-no { color: var(--paper); background: var(--ink); padding: 3px 8px; letter-spacing: .14em; }
.case .c-stamp .c-no.is-soon { background: var(--amber); color: var(--ink); }
.case .c-soonbox { margin: 22px 0 0; padding: 20px; background: var(--ink); color: var(--paper); }
.case .c-soonbox p { margin: 0 0 14px; font-size: 16px; line-height: 1.5; font-style: italic; color: var(--paper-dim); }
.case .c-soonbox .c-soon-k { margin-bottom: 8px; font-family: var(--f-mono); font-style: normal; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.case .c-soonbox .c-btn.is-primary { border-color: var(--amber); background: var(--amber); color: var(--ink); }
.case .c-text.no-drop::first-letter { float: none; font: inherit; color: inherit; margin: 0; }
.case .c-soonbox .c-btn.is-primary:hover { background: var(--paper); border-color: var(--paper); }
.case .c-source a { color: var(--ink); }
.case h2 {
  margin: 14px 0 6px; padding-right: 36px;
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(38px, 4.4vw, 54px); line-height: .9; letter-spacing: .005em;
}
.case .c-place { margin: 0; font-style: italic; font-size: 17px; color: #4b443a; }
.case .c-date { margin: 4px 0 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: #6b5a3f; }

.case .c-video {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 22px 0 0;
  background: var(--ink); border: 0; padding: 0; cursor: pointer; overflow: hidden;
}
.case .c-video img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease-out), filter .4s; }
.case .c-video:hover img { transform: scale(1.035); filter: brightness(.85); }
.case .c-video .play {
  position: absolute; left: 14px; bottom: 14px; width: 58px; height: 58px;
  display: grid; place-items: center; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 var(--red-glow); animation: play-pulse 2.2s infinite;
}
.case .c-video .play svg { width: 24px; height: 24px; fill: var(--paper); margin-left: 4px; }
@keyframes play-pulse { 0% { box-shadow: 0 0 0 0 var(--red-glow); } 70% { box-shadow: 0 0 0 18px rgba(192, 57, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); } }
.case .c-video .badge {
  position: absolute; left: 10px; top: 10px; padding: 5px 9px; background: var(--red); color: var(--paper);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.case iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.case .c-vtitle { margin: 8px 0 0; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; color: #6b5a3f; }

.case .c-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); margin: 24px 0 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid rgba(20, 22, 26, .25);
}
.case .c-stat { padding: 12px 0 12px; }
.case .c-stat + .c-stat { border-left: 1px solid rgba(20, 22, 26, .25); padding-left: 16px; }
.case .c-stat dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #6b5a3f; }
.case .c-stat dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 900; font-size: 46px; line-height: 1; }
.case .c-stat.is-killed dd { color: var(--red); }
.case .c-stat small { display: block; margin-top: 4px; font-family: var(--f-serif); font-style: italic; font-size: 12.5px; color: #6b5a3f; line-height: 1.3; }

.case .c-rr { margin: 14px 0 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: #4b443a; }
.case .c-text { margin: 18px 0 0; font-size: 17.5px; line-height: 1.6; }
.case .c-text::first-letter {
  float: left; font-family: var(--f-display); font-weight: 900; font-size: 64px; line-height: .8; margin: 6px 8px 0 0; color: var(--red);
}
.case .c-finding {
  margin: 20px 0 0; padding: 14px 16px; background: rgba(20, 22, 26, .06); border-left: 3px solid var(--red);
  font-size: 16px; line-height: 1.55;
}
.case .c-finding h3 { margin: 0 0 4px; font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.case .c-finding p { margin: 0; }
.case .c-source { margin: 18px 0 0; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.55; letter-spacing: .02em; color: #6b5a3f; }
.case .c-source b { color: var(--ink); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.case .c-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.case .c-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; text-decoration: none; cursor: pointer;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--ink); background: none;
}
.case .c-btn.is-primary { background: var(--ink); color: var(--paper); }
.case .c-btn.is-primary:hover { background: var(--red); border-color: var(--red); }
.case .c-btn:not(.is-primary):hover { background: rgba(20, 22, 26, .08); }
.case .c-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 14px; border-top: 1px solid rgba(20, 22, 26, .25); }
.case .c-nav button { background: none; border: 0; cursor: pointer; padding: 6px 0; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #4b443a; }
.case .c-nav button:hover { color: var(--red); }
.case .c-approx { margin: 12px 0 0; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; color: #8a7b63; }

/* Staggered reveal of the panel contents */
.case.is-open .reveal { animation: rise .7s var(--ease-out) both; }
.case.is-open .reveal:nth-child(2) { animation-delay: .06s; }
.case.is-open .reveal:nth-child(3) { animation-delay: .12s; }
.case.is-open .reveal:nth-child(4) { animation-delay: .18s; }
.case.is-open .reveal:nth-child(5) { animation-delay: .24s; }
.case.is-open .reveal:nth-child(6) { animation-delay: .3s; }
.case.is-open .reveal:nth-child(n+7) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

body.case-open .index, body.case-open .hint { opacity: 0; pointer-events: none; }
body.case-open .search { right: calc(var(--panel-w) + 24px); }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; z-index: 60; }

/* ---------- About (below the map) + footer ---------- */
.about { padding: clamp(56px, 8vw, 112px) var(--gut); border-top: 1px solid var(--ink-3); background: var(--ink); }
.about-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 96px); align-items: start;
}
.about h2 {
  margin: 0 0 18px; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(40px, 4.4vw, 76px); line-height: .9; letter-spacing: .005em;
}
.about-lede { margin: 0; max-width: 52ch; font-size: clamp(18px, 1.2vw, 21px); line-height: 1.6; color: var(--paper-dim); }
.about-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.about-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 20px; text-decoration: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--paper); color: var(--paper); transition: background .2s, color .2s, border-color .2s;
}
.about-btn:hover { background: var(--paper); color: var(--ink); }
.about-btn.is-yt { background: var(--red); border-color: var(--red); color: #fbf7ee; }
.about-btn.is-yt:hover { background: #8f241d; border-color: #8f241d; color: #fbf7ee; }
.about-btn svg { width: 18px; height: 18px; fill: currentColor; }
.about-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--paper); }
.about-grid li { padding: 22px 28px 26px 0; border-bottom: 1px solid var(--ink-3); }
.about-grid li:nth-child(even) { padding: 22px 0 26px 28px; border-left: 1px solid var(--ink-3); }
.about-grid h3 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.about-grid p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--paper-dim); }
.ab-star { flex: none; width: 15px; height: 15px; background: #fbf3df; filter: drop-shadow(0 0 .7px #3a2a18) drop-shadow(0 0 .7px #3a2a18);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ab-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: none; border: 2px solid #fbf3df; box-shadow: 0 0 0 1px #3a2a18, inset 0 0 0 1px #3a2a18; }
.ab-doc { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.foot { border-top: 1px solid var(--ink-3); }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gut) 56px; color: var(--paper-dim); font-size: 15px; line-height: 1.6; }
.foot-inner p { max-width: 70ch; margin: 0 0 12px; }
.foot-brand { font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; color: var(--paper); }
.foot-brand b { color: var(--brass); margin-left: .28em; }
.foot-links { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.foot-links a { color: var(--paper); text-decoration: none; }
.foot-small { font-size: 13px; color: var(--paper-faint); }

@media (max-width: 900px) {
  .about-inner, .about-grid { grid-template-columns: 1fr; }
  .about-grid li, .about-grid li:nth-child(even) { padding: 20px 0 22px; border-left: 0; }
}

/* Mid-size screens: the file index would sit on top of the board (the same files are in the search and /files/) */
@media (max-width: 1100px) and (min-width: 761px) { .index { display: none; } }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  .brand-name { font-size: 18px; }
  .top-nav a:not(.btn-yt) { display: none; }
  .intro { max-width: 92vw; }
  .intro h1 { font-size: 46px; }
  .lede { font-size: 15px; margin-top: 10px; }
  .search { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; }
  .search-results { position: absolute; bottom: 100%; left: 0; right: 0; margin: 0 0 4px; }
  .index { display: none; }
  .hint { display: none; }
  .scroll-cue { display: none; }
  .toast { bottom: 76px; }
  .case {
    top: auto; left: 0; right: 0; width: auto; height: 78vh; height: 78dvh;
    transform: translateY(104%); box-shadow: 0 -16px 40px rgba(70, 50, 20, .2);
  }
  .case.is-open { transform: none; }
  body.case-open .search { display: none; }
  .state-watermark { bottom: 70px; }
  #map .city text { font-size: 10px; }
  #map .nation, #map .state-outline { stroke-width: 1.8; }
  #map .borders { stroke-width: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  body::after { animation: none; }
}

/* Request link in the state note, YouTube note in the case panel */
.state-note .state-ask { display: inline-block; margin-top: 6px; font-family: var(--f-mono); font-style: normal; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); }
.case .yt-note { font-size: 10.5px; color: #8a7b63; }
.case .yt-note a { color: inherit; }
