/* RESQ — "The Planning Table" (DECISIONS.md, 30 Oct 2026).
   The page is a drafting table and everything on it comes from the game's files: the playable flood replays RESQ's
   deterministic simulation (lab webflood), the 25 small models are drawn from the mission maps (export_valleys.py),
   and the photographs are Editor renders. Token roles: --cta only for the primary action; --kept / --newly only for
   the forecast tint (as in the game); --water only for water. One family, Atkinson Hyperlegible. */

@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --table: #EEF1EF;
  --night: #0D1918;
  --night-2: #1B302E;
  --on-night: #EAF1EF;
  --on-night-soft: #A9BEBB;
  --sheet: #F5F7F7;
  --ink: #132B2A;
  --muted: #4E605D;
  --rule: rgba(19, 43, 42, 0.16);
  --water: #3E8FB8;
  --kept: #46BE6E;
  --newly: #E8482C;
  --cta: #FF6B35;
  --gutter: 16px;
  --max: 1240px;
}
@media (min-width: 700px) { :root { --gutter: 28px; } }
@media (min-width: 1200px) { :root { --gutter: 44px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; color: var(--ink); font: 400 1.0625rem/1.5 "Atkinson Hyperlegible", Arial, sans-serif; background: #EEF1EF; }
img, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; }
ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
code { font-size: 0.9em; background: rgba(19, 43, 42, 0.07); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
.label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.45; max-width: 52ch; color: var(--muted); }
.fine { font-size: 0.9375rem; color: var(--muted); max-width: 70ch; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--cta); color: var(--ink);
  font-weight: 700; text-decoration: none; margin: 4px 8px 4px 0; }
.btn:hover { background: #FF8152; }
.btn.ghost { background: transparent; border: 2px solid var(--ink); }
.btn.ghost:hover { background: rgba(19, 43, 42, 0.06); }

/* ---------- header and menu ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 var(--gutter);
  background: rgba(238, 241, 239, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.08em; text-decoration: none; margin-right: auto; }
.mark .ring, .foot-mark .ring { width: 28px; height: 28px; }
.links { display: flex; gap: 2px; }
.links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; font-weight: 700; text-decoration: none; border-radius: 999px; }
.links a:hover { background: rgba(19, 43, 42, 0.07); }
.links a[aria-current="page"] { background: var(--ink); color: #fff; }
.menu { display: none; }
.menu summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 88px; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: #fff; }
.menu[open] summary span::after { content: " ✕"; }
.menu-sheet { position: fixed; inset: 64px 0 0 0; background: var(--table); padding: 12px var(--gutter) 40px; overflow-y: auto; border-top: 1px solid var(--rule); }
.menu-sheet a { display: flex; align-items: center; min-height: 64px; font-size: 1.75rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--rule); }
.menu-sheet a[aria-current="page"] { color: var(--water); }
.menu-note { margin-top: 24px; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 799px) { .top nav { display: none; } .menu { display: block; } }

/* ---------- intro ---------- */
.intro { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 4.5vw, 64px) var(--gutter) 8px; display: grid; gap: 16px; }
.intro h1 { font-size: clamp(2.75rem, 6.4vw, 5.75rem); line-height: 0.92; letter-spacing: -0.035em; }
@media (min-width: 1000px) { .intro:not(.small) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; column-gap: var(--gutter); } .intro:not(.small) .label { grid-column: 1 / -1; } .intro:not(.small) .lede { padding-bottom: 10px; } }
.intro.small h1 { font-size: clamp(2.5rem, 5.6vw, 4.75rem); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--sheet); }
.jump a:hover { border-color: var(--ink); }

/* ---------- the flood: the real simulation, playable ---------- */
.flood { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) clamp(56px, 7vw, 96px); }
.flood-head { display: grid; gap: 10px; max-width: 760px; margin-bottom: 8px; }
.flood-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.05; }
.flood-head p { color: var(--muted); max-width: 60ch; }
.flood-stage { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr); gap: 20px var(--gutter); align-items: center; }
.flood-stage canvas { width: 100%; height: clamp(320px, 46vw, 640px); }
.flood-ui { display: grid; gap: 18px; align-content: start; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices button { min-height: 52px; border: 2px solid var(--ink); border-radius: 12px; background: var(--sheet); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.choices button:hover { background: #fff; }
.choices button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.timeline { display: flex; align-items: center; gap: 12px; }
.play { min-height: 48px; min-width: 88px; border-radius: 999px; border: 0; background: var(--cta); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.timeline input { flex: 1; accent-color: var(--ink); min-height: 44px; }
.timeline output { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.status { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.status li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.status b { font-variant-numeric: tabular-nums; }
.status .since, .status .word { font-style: normal; }
.status li.wet b { color: #B0341C; }
.status li.dry b { color: #23794A; }
.key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.875rem; color: var(--muted); }
.k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.k.kept { background: var(--kept); }
.k.newly { background: var(--newly); }
.kv { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.source { margin-top: 18px; font-size: 0.875rem; color: var(--muted); max-width: 78ch; }
@media (max-width: 899px) { .flood-stage { grid-template-columns: minmax(0, 1fr); } .flood-stage canvas { height: 72vw; margin: 0 calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); } }

/* ---------- the campaign: 25 small models ---------- */
.campaign, .photos, .hands { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 104px) var(--gutter); border-top: 1px solid var(--rule); }
.section-intro { display: grid; gap: 12px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-intro h2 { font-size: clamp(1.75rem, 3.6vw, 3rem); letter-spacing: -0.02em; line-height: 1.04; }
.section-intro p:not(.label) { color: var(--muted); }
.world-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 5fr); gap: 12px var(--gutter); padding: 18px 0; border-top: 1px solid var(--rule); align-items: center; }
.world-row h3 { font-size: 1.5rem; margin-top: 4px; }
.world-row h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.world-row h3 a:hover { text-decoration: underline; }
.minis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.minis canvas { width: 100%; height: 118px; }
.minis.big canvas { height: 150px; }
.mini-id { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); margin-top: 4px; }
.mini-title { font-weight: 700; line-height: 1.25; }
.mini-sub { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 899px) {
  .world-row { grid-template-columns: minmax(0, 1fr); }
  .minis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; }
  .minis li { flex: 0 0 62%; scroll-snap-align: start; }
  .minis canvas, .minis.big canvas { height: 150px; }
}

/* ---------- photographs on the table ---------- */
.photo-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; }
.ph img { width: 100%; border-radius: 6px; background: var(--sheet); box-shadow: 0 1px 0 rgba(19, 43, 42, 0.08), 0 14px 30px rgba(19, 43, 42, 0.14); }
.ph.wide img { box-shadow: none; background: none; filter: drop-shadow(0 24px 28px rgba(19, 43, 42, 0.22)); }
.ph figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 899px) { .photo-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ph.wide { grid-column: 1 / -1; } }

/* ---------- hands ---------- */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); border-top: 2px solid var(--ink); margin-bottom: 28px; }
.ways li { padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 1.125rem; max-width: 48ch; }
.ways b { display: block; }
@media (max-width: 699px) { .ways { grid-template-columns: minmax(0, 1fr); } }

/* ---------- worlds page ---------- */
.chapter { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter); border-top: 6px solid var(--accent);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px var(--gutter); }
.chapter-head { display: grid; gap: 14px; align-content: start; }
.chapter-head h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); letter-spacing: -0.025em; line-height: 1; }
.chapter-photo img { filter: drop-shadow(0 20px 24px rgba(19, 43, 42, 0.2)); box-shadow: none; background: none; }
.chapter-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px var(--gutter); border-top: 2px solid var(--ink); padding-top: 18px; }
.chapter-facts .label { margin: 0 0 8px; }
.chapter-facts p + .label { margin-top: 18px; }
.threats li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.threats .t { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.8em; color: #B0341C; }
.fact { margin-top: 12px; color: var(--muted); }
.plan { margin-bottom: 10px; }
.plan b { display: inline-block; min-width: 1.6em; color: #23794A; }
.chapter .minis { grid-column: 1 / -1; }
@media (max-width: 899px) { .chapter { grid-template-columns: minmax(0, 1fr); } .chapter-facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- inner pages (copy from the generator) ---------- */
.room { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 7vw, 96px); }
.room.page-top { padding-top: clamp(48px, 7vw, 96px); padding-bottom: 24px; }
.room-head h1, .room-head h2 { font-size: clamp(2.5rem, 5.6vw, 4.75rem); line-height: 0.98; letter-spacing: -0.03em; margin-top: 14px; max-width: 18ch; }
.room-head .card-kicker { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.room-text { margin-top: 16px; font-size: 1.125rem; max-width: 62ch; color: var(--muted); }
.dark-room { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gutter); margin-top: 32px; }
.plate img { width: 100%; border-radius: 6px; box-shadow: 0 14px 30px rgba(19, 43, 42, 0.14); }
.plate figcaption { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }
.plate .tag { font-weight: 700; color: var(--ink); }
.plate-text h3 { font-size: 1.375rem; margin: 14px 0 6px; }
.plate-text p { color: var(--muted); max-width: 46ch; }
@media (max-width: 899px) { .plates { grid-template-columns: minmax(0, 1fr); } }
.settings, .notes, .doc-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 22px 24px; }
.settings .card-kicker, .doc-card h2 { font-weight: 700; }
.settings .card-kicker { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.set-row { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--rule); align-items: center; }
.set-name { font-weight: 700; }
.set-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule); font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.seg.on { border-color: var(--ink); color: #fff; background: var(--ink); }
.set-note { grid-column: 2; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 599px) { .set-row { grid-template-columns: minmax(0, 1fr); } .set-note { grid-column: 1; } }
.notes { margin-top: 16px; }
.notes dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--rule); }
.notes dl > div:first-child { border-top: 0; }
.notes dt { font-weight: 700; }
.notes dd { color: var(--muted); }
@media (max-width: 599px) { .notes dl > div { grid-template-columns: minmax(0, 1fr); } }
.room-title { font-size: 2rem; margin-top: 56px; }
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.press-tile { display: block; padding: 10px; text-decoration: none; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
.press-img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.press-tile span { display: flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }
.docs { display: grid; gap: 14px; max-width: 900px; }
.doc-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.doc-card p { color: var(--muted); max-width: 66ch; margin-top: 8px; }
.room .jump .btn.ghost { border-width: 1px; }
.lost-map { width: 100%; height: clamp(260px, 40vw, 460px); margin-top: 24px; }

/* ---------- footer ---------- */
.foot { border-top: 2px solid var(--ink); padding: 48px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px var(--gutter); max-width: var(--max); margin: 32px auto 0; }
.foot-mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.08em; }
.foot-status { font-weight: 700; grid-column: 1; max-width: 36ch; }
.foot-links { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.foot-links a { display: flex; align-items: center; min-height: 48px; font-weight: 700; text-decoration: none; border-top: 1px solid var(--rule); }
.foot-links a:hover { text-decoration: underline; }
.foot-note { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); max-width: 90ch; }
@media (max-width: 699px) { .foot { grid-template-columns: minmax(0, 1fr); } .foot-links { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- the hero: a scroll-told mission on a night table ---------- */
.story { position: relative; height: 340vh; background: var(--night); color: var(--on-night); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  background: radial-gradient(ellipse 52% 46% at 66% 58%, var(--night-2) 0%, var(--night) 72%); }
.stage canvas { grid-column: 2; grid-row: 1; width: 100%; height: 100%; }
.beats { grid-column: 1; grid-row: 1; position: relative; padding: 0 0 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.beat { position: absolute; left: inherit; right: 0; top: 50%; padding-left: inherit; transform: translateY(calc(-50% + 22px)); opacity: 0; transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); display: grid; gap: 16px; }
.beat.on { opacity: 1; transform: translateY(-50%); }
.beat .label { color: var(--on-night-soft); }
.beat h1 { font-size: clamp(3rem, 6.6vw, 6.25rem); line-height: 0.9; letter-spacing: -0.035em; }
.beat h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.025em; max-width: 14ch; }
.beat .lede { color: var(--on-night-soft); max-width: 36ch; }
.hud { position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: 28px; width: min(320px, 40vw);
  background: rgba(13, 25, 24, 0.78); border: 1px solid rgba(234, 241, 239, 0.16); border-radius: 14px; padding: 14px 16px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(12px); transition: opacity 500ms, transform 500ms; }
.story:not([data-beat="0"]) .hud { opacity: 1; transform: none; }
.hud-clock { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.hud-clock .label { color: var(--on-night-soft); }
.hud output { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud .status { border-top-color: rgba(234, 241, 239, 0.4); }
.hud .status li { border-bottom-color: rgba(234, 241, 239, 0.12); padding: 6px 0; font-size: 0.9375rem; }
.hud .status li.wet b { color: #FF8A6A; }
.hud .status li.dry b { color: #7FE0A0; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-night-soft); transition: opacity 400ms; }
.scroll-cue::after { content: ""; display: block; width: 2px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--on-night-soft), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.story:not([data-beat="0"]) .scroll-cue { opacity: 0; }
@media (max-width: 899px) {
  .story { height: 300vh; }
  .beat { top: 4px; transform: translateY(18px); left: var(--gutter); right: var(--gutter); padding-left: 0; }
  .beat.on { transform: none; }
  .beat h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  .beat h2 { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .stage { padding-top: 64px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 124px minmax(0, 1fr) minmax(0, 1.05fr); }
  .stage canvas { grid-column: 1; grid-row: 2; }
  .beats { grid-column: 1; grid-row: 3; padding: 0 var(--gutter); }
  .hud { position: relative; grid-column: 1; grid-row: 1; align-self: start; top: auto; bottom: auto; left: auto; right: auto; margin: 10px var(--gutter) 0; width: auto; padding: 10px 12px; }
  .hud-clock { margin-bottom: 8px; }
  .hud output { font-size: 1.25rem; }
  .hud .status { display: flex; flex-wrap: wrap; gap: 6px; border-top: 0; }
  .hud .status li { gap: 6px; padding: 3px 8px 3px 7px; font-size: 0.75rem; border: 1px solid rgba(234, 241, 239, 0.18); border-radius: 999px; align-items: center; }
  .hud .status li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .hud .status li.dry::before { background: #7FE0A0; }
  .hud .status li.wet::before { background: #FF8A6A; }
  .hud .status li.dry b { display: none; }
  .hud .status .since, .hud .status .word { display: none; }
  .scroll-cue { display: none; }
}

@media (max-width: 899px) and (max-height: 740px) {
  .stage { grid-template-rows: 120px minmax(0, 0.75fr) minmax(0, 1.25fr); }
  .beat { gap: 10px; }
  .beat .lede { font-size: 0.9375rem; }
}

/* ---------- motion: sections rise into place ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 900ms cubic-bezier(.2,.7,.2,1), transform 900ms cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .ph.reveal { transform: translateY(48px) scale(0.96); }
.js .ph.reveal.in { transform: none; }
.reveal.d1 { transition-delay: 140ms; }
.reveal.d2 { transition-delay: 280ms; }

/* ---------- footer: the shelf ---------- */
.foot { max-width: none; margin: 0; padding: 0; display: block; border-top: 0; background: var(--night); color: var(--on-night); overflow: hidden; }
.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 0;
  background: radial-gradient(ellipse 70% 60% at 50% 70%, var(--night-2), transparent 70%); }
.shelf canvas { width: 100%; height: clamp(110px, 14vw, 200px); }
.foot-word { margin: -0.06em 0 0; text-align: center; font-weight: 700; font-size: clamp(6rem, 27vw, 24rem); line-height: 0.78; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(234, 241, 239, 0.28); user-select: none; }
.foot-grid { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px var(--gutter); border-top: 1px solid rgba(234, 241, 239, 0.16); }
.foot .foot-status { color: var(--on-night); }
.foot .foot-links { grid-column: 2; grid-row: 1 / 3; }
.foot .foot-links a { border-top-color: rgba(234, 241, 239, 0.14); color: var(--on-night); }
.foot .foot-note { color: var(--on-night-soft); }
.foot a:focus-visible { outline-color: var(--on-night); }
@media (max-width: 699px) {
  .shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-top: 40px; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf canvas { flex: 0 0 64%; scroll-snap-align: center; height: 160px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot .foot-links { grid-column: 1; grid-row: auto; }
}
