/* ==========================================================================
   Why the Sonics Left Seattle
   System in DESIGN.md. Solid Sonics green fields and paper reading sections,
   one gold accent, condensed athletic display type, 3D and motion as the centerpiece.
   ========================================================================== */

:root {
  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --field: #063b26;
  --field-deep: #04251a;
  --paper: #eef1ea;
  --paper-2: #e0e7dc;
  --surface: #f8faf6;
  --ink: #0a1a11;
  --ink-2: #33433a;
  --on-field: #edf2ec;
  --on-field-2: #a8c0b2;
  --gold: #f6b800;
  --gold-hi: #ffc933;
  --green-mid: #2d7a57;
  --focus: var(--ink);

  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 64px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --arrive: cubic-bezier(0.16, 1, 0.3, 1);
  --fall: cubic-bezier(0.7, 0, 0.84, 0);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; scrollbar-color: var(--green-mid) var(--field-deep); caret-color: var(--gold); accent-color: var(--field); }
html:not(.lenis):not(.rm) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--field-deep); color: var(--ink); font: 400 1.1875rem/1.55 var(--text); font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s4); top: -80px; z-index: 100; background: var(--gold); color: var(--ink); padding: var(--s3) var(--s4); font-weight: 600; text-decoration: none; transition: top 150ms; }
.skip:focus { top: var(--s4); }

.field, .field-deep, .nav, .foot { --focus: var(--gold); color: var(--on-field); }
.field { background: var(--field); }
.field-deep { background: var(--field-deep); }
.paper { background: var(--paper); color: var(--ink); }
.paper-2 { background: var(--paper-2); color: var(--ink); }
.field a, .field-deep a { color: var(--gold); }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------- type ---------------------------------- */
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(2.6rem, 6.2vw, 5.6rem); line-height: 0.93; max-width: 17ch; margin-bottom: var(--s6); }
h3 { font-family: var(--text); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.lead { max-width: 58ch; font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.field .lead, .field-deep .lead { color: var(--on-field-2); }
p { text-wrap: pretty; }
.src-note { font-size: 0.9rem; color: var(--ink-2); }
.section { padding-block: clamp(80px, 12vw, 180px); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--s6); background: var(--gold); color: var(--ink) !important; font: 600 1.05rem var(--text); text-decoration: none; border: 0; cursor: pointer; transition: background 150ms, transform 150ms var(--arrive); }
.btn:hover { background: var(--gold-hi); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn-quiet { background: var(--paper-2); }
.btn-quiet:hover { background: #d3dccf; }
.textlink { font-weight: 600; }

/* ------------------------------------ nav ------------------------------------ */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h); background: var(--field-deep); }
.nav-in { height: 100%; display: flex; align-items: center; gap: var(--s5); }
.brand { display: flex; align-items: center; gap: var(--s3); margin-right: auto; color: var(--on-field) !important; text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: 0.01em; }
.brand img { width: 30px; height: 32px; }
.menu { display: flex; gap: var(--s1); }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); color: var(--on-field-2); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.menu a:hover { color: var(--on-field); }
.lite-li { display: flex; align-items: center; margin-left: var(--s2); }
.lite-btn { min-height: 44px; padding: 0 var(--s3); background: none; border: 1px solid var(--on-field-2); color: var(--on-field-2); font: 500 0.9rem var(--text); cursor: pointer; white-space: nowrap; }
.lite-btn:hover:not(:disabled) { color: var(--on-field); border-color: var(--on-field); }
.lite-btn:disabled { cursor: default; opacity: 0.8; }
.lite-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--on-field); }
.menu a[aria-current="true"] { color: var(--on-field); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.menu-btn { display: none; min-height: 44px; padding: 0 var(--s4); background: var(--field); border: 0; font-weight: 600; cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: inline-block; }
  .menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: var(--s3) var(--gutter) var(--s5); background: var(--field-deep); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 200ms var(--arrive), transform 200ms var(--arrive), visibility 0s 200ms; }
  .menu.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .menu a { width: 100%; font-size: 1.15rem; }
  .lite-li { margin: var(--s3) 0 0; }
}

/* ------------------------------------ hero ------------------------------------ */
.hero { overflow: hidden; }
.hero-grid { min-height: calc(100svh - var(--nav-h)); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: center; gap: var(--s6); padding-block: var(--s7); }
.hero h1 { font-weight: 900; font-size: clamp(3.6rem, 9.4vw, 9.6rem); line-height: 0.86; margin-bottom: var(--s6); max-width: none; }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero h1 .ln > span { display: block; }
.pre-motion .hero h1 .ln > span { transform: translateY(108%); }
.hero-q { max-width: 32ch; font-size: clamp(1.3rem, 2.1vw, 1.75rem); line-height: 1.3; font-weight: 500; margin-bottom: var(--s5); }
.hero-by { color: var(--on-field-2); font-size: 0.98rem; margin-bottom: var(--s6); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }
.hero-stage { position: relative; align-self: stretch; min-height: 360px; margin-right: calc(var(--gutter) * -0.6); }
.ball-static { position: absolute; inset: 0; margin: auto; width: min(100%, 440px); height: auto; transition: opacity 500ms; }
.hero-stage.ready .ball-static { opacity: 0; }
#gl { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero-copy { position: relative; z-index: 2; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding-block: var(--s6) var(--s7); }
  .hero-stage { order: -1; min-height: 52vw; max-height: 340px; margin: 0; }
  .hero h1 { font-size: clamp(3.4rem, 17vw, 6rem); }
}

/* ---------------------------------- question ---------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 8vw, 120px); align-items: start; }
.split-a h2 { max-width: 15ch; font-size: clamp(2.8rem, 6.6vw, 6.2rem); }
.defs { display: grid; gap: var(--s6); padding-top: var(--s7); }
.defs dt { font-weight: 600; font-size: 1.15rem; margin-bottom: var(--s1); }
.defs dd { color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.bignum { display: flex; align-items: baseline; gap: var(--s4); margin-top: var(--s7); max-width: 34ch; }
.bignum b { font: 900 clamp(5rem, 11vw, 9rem)/0.8 var(--display); color: var(--field); letter-spacing: -0.02em; }
.bignum span { font-size: 1.1rem; line-height: 1.35; color: var(--ink-2); }
.bignum small { font-size: 0.88rem; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; background: var(--field); }
.photo figcaption { margin-top: var(--s2); font-size: 0.92rem; line-height: 1.4; color: var(--ink-2); }
.photo figcaption a { color: inherit; }
.field .photo figcaption, .field-deep .photo figcaption { color: var(--on-field-2); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .defs { padding-top: var(--s5); } }

/* ------------------------------ timeline (3D) ------------------------------ */
.no-3d .tl3d, .tl-flat-mode .tl3d { display: none; }
.has-3d:not(.tl-flat-mode) .tl-flat { display: none; }
/* the shared canvas is z-index 1 behind the page; anything with text sits above it, so the pinned layer is z-index 2 and transparent */
.tl3d { position: relative; }
.tl3d-pin { position: relative; z-index: 2; height: calc(100svh - var(--nav-h)); overflow: hidden; }
.tl3d-stage { position: absolute; inset: 0; }
.tl3d-ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tl3d-head { position: absolute; left: var(--gutter); top: var(--s6); max-width: 34ch; z-index: 1; }
.tl3d-head h2 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); margin: 0 0 var(--s3); max-width: 12ch; }
.tl3d-head .lead { font-size: 1rem; line-height: 1.45; max-width: 36ch; }
.tl3d-cards { position: absolute; inset: 0; overflow: hidden; }
.tl3d-hint { position: absolute; left: var(--gutter); bottom: calc(var(--s7) + 28px); color: var(--on-field-2); font-size: 0.95rem; transition: opacity 400ms; }
.tl3d-hint.gone { opacity: 0; }
.tl-ruler { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--s3); display: flex; gap: 4px; overflow-x: auto; pointer-events: auto; scrollbar-width: none; }
.tl-ruler::-webkit-scrollbar { display: none; }
.tl-ruler button { flex: 0 0 auto; min-height: 44px; padding: 0 var(--s3); background: var(--field); color: var(--on-field-2); border: 0; cursor: pointer; font: 500 0.88rem var(--text); white-space: nowrap; transition: background 150ms, color 150ms; }
.tl-ruler .ms button { font-weight: 700; color: var(--on-field); }
.tl-ruler button:hover { color: var(--on-field); }
.tl-ruler button[aria-current="true"] { background: var(--gold); color: var(--ink); }
@media (max-width: 860px) { .tl3d-head .lead { display: none; } .tl3d-head h2 { font-size: 2rem; } .tl3d-hint { bottom: calc(var(--s7) + 18px); } }
.tl.tl-3d { margin: 0; }
.tl.tl-3d::before { display: none; }
.tl-3d .tl-row { position: absolute; left: 0; top: 0; display: block; width: min(88vw, 340px); margin: 0; padding: 0; visibility: hidden; opacity: 0; will-change: transform, opacity; }
.tl-3d .tl-row.is-both { margin: 0; }
.tl-3d .tl-date { position: static; display: inline-block; margin-bottom: 6px; background: var(--ink); color: var(--on-field); }
.tl-3d .tl-card, .tl-3d .tl-card.city, .tl-3d .tl-card.owners, .tl-3d .tl-card.both { display: block; grid-column: auto; grid-row: auto; margin: 0; max-width: none; width: 100%; text-align: left; justify-self: auto; }
.tl-3d .tl-card:hover { transform: none; }
.tl-3d .tl-row.ms { width: min(88vw, 380px); }
.tl-3d .tl-card figure img { aspect-ratio: 2 / 1; }
.tl-3d .tl-row.ms .tl-card h3 { font-size: 1.5rem; }

/* ---------------------------------- timeline ---------------------------------- */
.tl { position: relative; margin-top: var(--s8); }
.tl::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; background: var(--paper-2); transform: translateX(-3px); }
.tl-row { position: relative; display: grid; grid-template-columns: 1fr 150px 1fr; align-items: start; margin-bottom: var(--s5); }
.tl-date { grid-column: 2; grid-row: 1; justify-self: center; z-index: 1; padding: 8px 12px; background: var(--ink); color: var(--on-field); font: 700 1.05rem/1 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.tl-card { grid-row: 1; padding: var(--s5); cursor: pointer; transition: transform 240ms var(--arrive); }
.tl-card:hover { transform: translateY(-3px); }
.tl-card.city { grid-column: 1; background: var(--surface); color: var(--ink); margin-right: var(--s5); }
.tl-card.owners { grid-column: 3; background: var(--field); color: var(--on-field); margin-left: var(--s5); }
.tl-card.both { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 600px; margin-top: var(--s3); background: var(--gold); color: var(--ink); }
.tl-card h3 { font-size: 1.3rem; margin-bottom: var(--s2); }
.tl-card figure { margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s4); }
.tl-card figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tl-card figure figcaption { padding: var(--s2) var(--s5) 0; font-size: 0.8rem; opacity: 0.8; color: inherit; margin: 0; }
.tl-card figure figcaption a { color: inherit; }
.tl-num { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.tl-num b { font: 900 3.4rem/0.85 var(--display); letter-spacing: -0.01em; }
.tl-num span { font-size: 0.95rem; opacity: 0.85; }
.tl-card p { font-size: 1rem; line-height: 1.5; }
.tl-card .track { margin-top: var(--s3); font-size: 0.88rem; opacity: 0.85; }
.tl-card .go { display: inline-block; min-height: 44px; margin-top: var(--s1); padding: 0; background: none; border: 0; cursor: pointer; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 0.2em; }
.tl-card.owners .go { color: var(--gold); }
.tl-card.owners { --focus: var(--gold); }
.is-both { margin-bottom: var(--s6); }
@media (max-width: 820px) {
  .tl::before { left: 8px; transform: none; }
  .tl-row { grid-template-columns: 1fr; padding-left: var(--s6); }
  .tl-date { grid-column: 1; justify-self: start; margin-bottom: var(--s2); }
  .tl-card.city, .tl-card.owners, .tl-card.both { grid-column: 1; grid-row: 2; max-width: none; margin: 0; }
}

/* --------------------------------- causal web --------------------------------- */
.web-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); margin-top: var(--s7); align-items: start; }
.web-card { position: sticky; top: calc(var(--nav-h) + var(--s5)); }
#web { width: 100%; height: auto; touch-action: manipulation; }
.web-card { z-index: 2; }
.graph3d, .graph-hint { display: none; }
.has-3d:not(.graph-flat) .graph3d { display: block; position: relative; z-index: 2; width: 100%; aspect-ratio: 1 / 1; max-height: 76vh; margin-inline: auto; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.has-3d:not(.graph-flat) .graph-hint { display: block; margin-top: var(--s2); color: var(--on-field-2); font-size: 0.92rem; }
.has-3d:not(.graph-flat) #web { display: none; }
.graph-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.gnode { position: absolute; left: 0; top: 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; font: 600 13px var(--text); text-align: center; line-height: 1.05; padding: 4%; box-sizing: border-box; white-space: nowrap; pointer-events: none; will-change: transform; }
.gnode:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ghub { position: absolute; left: 0; top: 0; display: grid; place-content: center; text-align: center; color: var(--on-field); pointer-events: none; font-family: var(--display); will-change: transform; }
.ghub b { font: 800 1em/1.05 var(--display); }
.ghub i { font: 700 0.8em/1 var(--display); color: var(--gold); font-style: normal; }
.web-key { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); color: var(--on-field-2); font-size: 0.92rem; }
.web-key li { display: inline-flex; align-items: center; gap: var(--s2); }
.web-key i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.k-pce { background: var(--paper); } .k-wxt { background: var(--gold); } .k-arc { background: var(--green-mid); }
.web-key .k-dash { width: 24px; height: 0; border-radius: 0; border-top: 3px dashed var(--gold); }
.web-chips { display: none; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
@media (max-width: 960px) { .web-grid { grid-template-columns: 1fr; } .web-card { position: static; } .web-chips { display: flex; } }
.node { cursor: pointer; outline: none; }
.node .body { stroke: var(--field-deep); stroke-width: 4; transition: stroke 150ms, stroke-width 150ms; }
.node:hover .body, .node:focus-visible .body { stroke: var(--on-field); stroke-width: 5; }
.node.sel .body { stroke: var(--gold); stroke-width: 7; }
.node text { pointer-events: none; text-anchor: middle; font-family: var(--text); font-weight: 600; }
.node.PCE .body { fill: var(--paper); } .node.PCE text { fill: var(--ink); }
.node.WXT .body { fill: var(--gold); } .node.WXT text { fill: var(--ink); }
.node.ARC .body { fill: var(--green-mid); } .node.ARC text { fill: #fff; }
.spoke { stroke: var(--on-field-2); stroke-opacity: 0.3; }
.arrow-line { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 8 6; fill: none; animation: march 1.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -28; } }
.hub { fill: var(--field); stroke: var(--gold); stroke-width: 5; }
.hub-t { fill: var(--on-field); font: 800 19px var(--display); text-anchor: middle; letter-spacing: 0.01em; }
.hub-s { fill: var(--gold); font: 700 15px var(--display); text-anchor: middle; }
@media (max-width: 640px) { .node text { font-size: 17px; } }

.detail { background: var(--paper); color: var(--ink); padding: clamp(24px, 3vw, 40px); min-height: 480px; --focus: var(--ink); }
.detail a { color: var(--ink); }
.detail h3 { font: 800 clamp(2.2rem, 4vw, 3.2rem)/0.95 var(--display); margin-bottom: var(--s3); }
.meta { color: var(--ink-2); font-size: 0.98rem; margin-bottom: var(--s4); }
.sum { font-size: 1.15rem; }
.weight-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--s5); font-size: 0.95rem; color: var(--ink-2); }
.weight-row b { color: var(--ink); font: 800 1.6rem/1 var(--display); }
.meter { height: 10px; background: var(--paper-2); margin: var(--s2) 0 var(--s5); }
.meter i { display: block; height: 100%; background: var(--green-mid); transition: width 300ms var(--arrive); }
.detail h4 { margin: var(--s6) 0 var(--s2); font: 600 1rem var(--text); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { min-height: 44px; padding: 0 var(--s4); background: var(--paper-2); border: 0; font-weight: 500; font-size: 0.98rem; cursor: pointer; transition: background 150ms; }
.chip:hover { background: #d0dacc; }
.chip[aria-pressed="true"] { background: var(--field); color: var(--on-field); }
.web-chips .chip { background: var(--field); color: var(--on-field); }
.web-chips .chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.ev { margin-top: var(--s3); padding: var(--s5); background: var(--paper-2); transition: opacity 240ms; }
.ev.dim { opacity: 0.35; }
.ev-head { font-weight: 600; font-size: 1rem; }
.ev-head span { font-weight: 400; color: var(--ink-2); }
.ev p { margin: var(--s2) 0; font-size: 1.05rem; line-height: 1.5; }
.ev .lim { font-size: 0.95rem; color: var(--ink-2); }
.ev .lim b { color: var(--ink); }
.ev .tags { margin-top: var(--s2); font-size: 0.88rem; color: var(--ink-2); }
.links li { margin: var(--s2) 0; font-size: 1.05rem; }
.links button { min-height: 44px; padding: var(--s2) 0; background: none; border: 0; color: var(--ink); font: 600 1.05rem var(--text); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.empty { color: var(--ink-2); }
.list-alt { margin-top: var(--s7); }
.list-alt summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.table-wrap { overflow-x: auto; margin-top: var(--s5); background: var(--paper); color: var(--ink); }
.field-deep .table-wrap { margin-top: var(--s3); }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: var(--s4) var(--s5); }
th { font-weight: 600; background: var(--paper-2); font-size: 0.95rem; }
tbody tr:nth-child(even) { background: #e8ede4; }
td:first-child { font-weight: 600; width: 20%; }
.tabular { font-variant-numeric: tabular-nums; }

/* ------------------------------------ weigh ------------------------------------ */
.weigh-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.weigh-intro h2 { max-width: 10ch; }
.mind { margin-top: var(--s7); padding: var(--s5); background: var(--paper-2); }
.mind h3 { margin-bottom: var(--s3); }
.mind ul { list-style: disc; padding-left: 1.2em; }
.mind li { margin: var(--s2) 0; font-size: 1.05rem; }
.sliders { display: grid; gap: var(--s2); }
.sl label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.sl output { font: 800 1.5rem/1 var(--display); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: var(--paper-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 28px; margin-top: -11px; background: var(--field); border: 0; border-radius: 0; }
input[type="range"]::-moz-range-track { height: 6px; background: var(--paper-2); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 28px; background: var(--field); border: 0; border-radius: 0; }
input[type="range"]:focus-visible { outline-offset: -2px; }
.points { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3) var(--s4); margin-top: var(--s5); }
.count { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: auto; }
.count.bad { color: #9c2a1c; }
.cmp { margin-top: var(--s6); }
.cmp-key { font-size: 0.95rem; color: var(--ink-2); margin-bottom: var(--s3); }
.cmp-row { display: grid; grid-template-columns: 170px 1fr 200px; gap: var(--s3); align-items: center; padding: var(--s2) 0; font-size: 0.98rem; }
@media (max-width: 640px) { .cmp-row { grid-template-columns: 1fr; gap: var(--s1); } }
.pair { display: grid; gap: 4px; }
.pair i { display: block; height: 12px; width: 0; transition: width 700ms var(--arrive); }
.pair .y { background: var(--ink); } .pair .m { background: var(--green-mid); }
@media (max-width: 900px) { .weigh-grid { grid-template-columns: 1fr; } }
/* the 100-point stack: stays in view while you slide */
.stack-wrap { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 3; margin: 0 0 var(--s5); padding: var(--s3) 0 var(--s4); background: var(--paper); }
.stack-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s2); font-weight: 600; }
.stack-n b { display: inline-block; min-width: 2ch; font: 800 2.4rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stack-n b.tick { animation: tick 380ms var(--arrive); }
@keyframes tick { from { transform: translateY(-40%); opacity: 0.2; } to { transform: none; opacity: 1; } }
.stack-hint { font-size: 0.95rem; font-weight: 500; color: var(--ink-2); text-align: right; }
.stack { display: flex; height: 64px; gap: 3px; background: var(--paper); outline: 2px solid var(--ink); outline-offset: 3px; }
.blk { flex-basis: 0; min-width: 0; overflow: hidden; display: grid; place-items: center; transition: flex-grow 600ms var(--arrive); font: 800 0.95rem/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.blk.PCE { background: var(--ink); color: var(--on-field); }
.blk.WXT { background: var(--gold); color: var(--ink); }
.blk.ARC { background: var(--green-mid); color: #fff; }
.blk.thin span { opacity: 0; }
.blk span { transition: opacity 200ms; }
.blk.rest { background: var(--paper-2); }
.stack.over { outline-color: #9c2a1c; animation: nudge 420ms var(--arrive); }
.stack.full { outline-color: var(--green-mid); }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 65% { transform: translateX(3px); } }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 10px; vertical-align: -1px; }
.sw.PCE { background: var(--ink); } .sw.WXT { background: var(--gold); } .sw.ARC { background: var(--green-mid); }
.cmp-sum { font: 700 1.35rem/1.25 var(--text); margin-bottom: var(--s3); max-width: 38ch; }

/* ----------------------------------- answer ----------------------------------- */
/* Flat layout is the default and the fallback: copy left, figures and notes right, photos below.
   .ans-3d (desktop with WebGL) turns it into one pinned scene. */
.ans-frame { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--s7) clamp(40px, 7vw, 110px); align-items: start; }
.ans-copy h2 { margin-bottom: var(--s6); }
.prose p { max-width: 62ch; margin-bottom: var(--s5); color: var(--on-field); }
.prose .answer { font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.2; font-weight: 500; margin-bottom: var(--s6); max-width: 24ch; }
.pull { max-width: 22ch; margin: var(--s7) 0; font: 800 clamp(2.2rem, 4.2vw, 3.4rem)/1 var(--display); color: var(--gold); }
.ans-stage, .ans-credit { display: none; }
.route { margin: 0 0 var(--s6); }
.route svg { display: block; width: 100%; height: auto; }
.route .rt { font: 800 34px var(--display); fill: var(--on-field); letter-spacing: 0.02em; }
.route figcaption { margin-top: var(--s2); font-size: 0.92rem; color: var(--on-field-2); }
.route figcaption a { color: inherit; }
.stats { display: grid; gap: var(--s5); margin-bottom: var(--s7); }
.stat b { display: block; font: 800 clamp(3rem, 6vw, 4.6rem)/0.95 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stat .src-note { color: var(--on-field-2); }
.stat > span { display: block; margin-top: var(--s2); max-width: 36ch; color: var(--on-field-2); font-size: 1.05rem; }
.claims { display: grid; gap: var(--s6); }
.claims h3 { color: var(--gold); margin-bottom: var(--s2); }
.claims p { color: var(--on-field-2); font-size: 1.1rem; }
.ans-figs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 900px) { .ans-frame { grid-template-columns: 1fr; } .ans-figs { grid-template-columns: 1fr; } }

/* pinned scene */
.ans-3d { padding: 0; }
.ans-3d .ans-pin { position: relative; z-index: 2; height: 100vh; padding-top: calc(var(--nav-h) + var(--s5)); padding-bottom: var(--s5); box-sizing: border-box; }
.ans-3d .ans-frame { height: 100%; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 72px); align-items: stretch; }
.ans-3d .ans-copy { display: flex; flex-direction: column; min-height: 0; }
.ans-3d .ans-copy h2 { margin-bottom: var(--s5); }
.ans-3d .ans-beats { position: relative; flex: 1; min-height: 0; }
.ans-3d .beat { position: absolute; left: 0; top: 0; right: 0; margin: 0; opacity: 0; }
.ans-3d .prose p.beat { font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.5; }
.ans-3d .prose .answer.beat { font-size: clamp(1.8rem, 2.8vw, 2.5rem); line-height: 1.18; }
.ans-3d .pull.beat { font-size: clamp(2.4rem, 4.3vw, 4rem); }
.ans-3d .ans-vis { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; }
.ans-3d .ans-stage { display: block; position: relative; grid-area: 1 / 1; min-height: 0; transition: opacity 600ms var(--arrive); }
.ans-3d .ans-over { position: relative; height: clamp(190px, 27vh, 250px); margin-top: var(--s3); }
.ans-3d .stats, .ans-3d .claims { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: 0; align-items: stretch; }
.ans-3d .stat, .ans-3d .claims > div { background: var(--field-deep); padding: var(--s4); opacity: 0; }
.ans-3d .stats { grid-template-columns: 1fr 1.5fr 1fr; }
.ans-3d .stat b { font-size: clamp(2rem, 3.2vw, 2.9rem); white-space: nowrap; }
.ans-3d .stat > span { font-size: 0.92rem; line-height: 1.35; margin-top: var(--s1); }
.ans-3d .claims h3 { font-size: 1.05rem; margin-bottom: var(--s1); }
.ans-3d .claims p { font-size: 0.92rem; line-height: 1.38; }
.ans-3d .route { position: relative; grid-area: 1 / 1; min-height: 0; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; opacity: 0; pointer-events: none; background: var(--field-deep); padding: var(--s4); }
.ans-3d .route svg { height: 100%; min-height: 0; }
.ans-3d .ans-credit { display: block; margin: var(--s2) 0 0; font-size: 0.8rem; line-height: 1.35; color: var(--on-field-2); }
.ans-3d .ans-credit a { color: inherit; }
.ans-3d .ans-figs { display: none; }
.ans-3d.ans-3d-end .route { pointer-events: auto; }

/* ------------------------------- then and now ------------------------------- */
#then-now { padding-top: 0; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); margin: var(--s7) 0; }
.strip .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 900px) { .strip { grid-template-columns: 1fr; } }
.band { margin-bottom: clamp(60px, 9vw, 130px); }
.band-frame { position: relative; overflow: hidden; height: clamp(300px, 54vw, 640px); background: var(--field-deep); }
.band-frame img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; will-change: transform; }
.band figcaption { padding-top: var(--s3); font-size: 0.9rem; color: var(--ink-2); }
.status { margin-top: var(--s7); max-width: 70ch; }
.status h3 { margin-bottom: var(--s3); }
.status li { margin: var(--s3) 0; }
.open { margin-top: var(--s6); padding: var(--s5); background: var(--gold); color: var(--ink); max-width: 70ch; }

/* ----------------------------------- sources ----------------------------------- */
.src-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 100px); align-items: start; }
.need { margin-top: var(--s7); }
.need h3 { margin-bottom: var(--s3); }
.need ul { list-style: disc; padding-left: 1.2em; }
.need li { margin: var(--s3) 0; font-size: 1.05rem; }
.src-list { display: grid; gap: var(--s3); }
.src { background: var(--paper); padding: var(--s5); }
.src:target { outline: 3px solid var(--ink); outline-offset: 2px; }
.mla { padding-left: 2em; text-indent: -2em; font-size: 1.05rem; line-height: 1.5; word-break: break-word; }
.src-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s2); font-size: 0.92rem; color: var(--ink-2); }
.src-meta a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .src-grid { grid-template-columns: 1fr; } }

/* ------------------------------------ footer ------------------------------------ */
.foot { padding-block: var(--s8) var(--s7); overflow: hidden; }
.foot-mark { font: 900 min(8.1vw, 11rem)/0.9 var(--display); white-space: nowrap; letter-spacing: -0.01em; color: var(--on-field); margin-bottom: var(--s7); }
.foot-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s7); }
.foot-cols p { font-size: 0.95rem; color: var(--on-field-2); max-width: 60ch; }
@media (max-width: 860px) { .foot-cols { grid-template-columns: 1fr; gap: var(--s4); } }

/* -------------------------------- reduced motion -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .pre-motion .hero h1 .ln > span { transform: none; }
  .band-frame img { top: 0; height: 100%; }
}
@media print { .nav, .skip, .hero-stage, .chain { display: none !important; } body { background: #fff; } }

/* image credits */
.credits { margin-top: var(--s7); }
.credits h3 { margin-bottom: var(--s2); }
.credits p { max-width: 62ch; color: var(--ink-2); }
.credits ul { margin-top: var(--s3); display: grid; gap: var(--s2); }
.credits li { font-size: 0.95rem; line-height: 1.4; }
.credits li span { font-weight: 600; }
.credits a { color: inherit; }
