:root {
  color-scheme: dark;

  --bg-tl: #1f1811; --bg-br: #070403; --bg: #18110a; --surface: #271f17; --well: #0e0a07; --raised: #322a22;
  --line: #342c24; --line-strong: #50473f; --ink: #f5f0e3; --ink-dim: #b7b0a3; --ink-faint: #969083;
  --accent: #e8ba72; --accent-strong: #f8d39a; --on-accent: #140e06; --second: #93bbd3; --slate: #9a9087;
  --ramp-a: #af624f; --ramp-b: #e69b54; --ramp-c: #f5d47b; --stage: #070403; --plate: #f6f3ec;
  --shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.7);

  --card: rgba(34, 26, 18, 0.80); --card-solid: #1c150e;
  --tint: rgba(245, 240, 227, 0.05); --tint-strong: rgba(245, 240, 227, 0.10);
  --hair: rgba(245, 240, 227, 0.09); --hair-strong: rgba(245, 240, 227, 0.18);
  --accent-soft: rgba(232, 186, 114, 0.14);
  --glow-accent: 0 0 0 1px rgba(232, 186, 114, 0.6);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --radius: 18px; --radius-media: 12px; --header-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(135deg, var(--bg-tl) 0%, var(--bg-br) 100%) fixed var(--bg-br);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg-br); }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(245, 240, 227, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
figure, p, pre, ul, ol { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-synthesis: none; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h3 { font-weight: 600; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(232, 186, 114, 0.35); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 60; padding: 10px 18px; border-radius: 6px; background: var(--ink); color: var(--bg-br); text-decoration: none; }
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.page { position: relative; isolation: isolate; }
.wrap {
  position: relative; width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(40px, env(safe-area-inset-left, 0px));
  padding-right: max(40px, env(safe-area-inset-right, 0px));
}

.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg-br); pointer-events: none; }
.backdrop video { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.backdrop::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 50% 30%, rgba(7, 4, 3, 0.16) 0%, rgba(7, 4, 3, 0.58) 100%); }

.hero-text, .section-head { position: relative; isolation: isolate; }
.hero-text::before, .section-head::before {
  content: ""; position: absolute; inset: -36px -56px; z-index: -1; pointer-events: none;
  background: radial-gradient(farthest-side, rgba(7, 4, 3, 0.55) 55%, rgba(7, 4, 3, 0) 100%); }

.panel-label, .tag {
  font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
}
.panel-label {
  display: block; width: max-content; max-width: 100%; margin: 0 auto 9px;
  font-size: 10.5px; line-height: 1.5; color: var(--ink); white-space: nowrap;
}
.panel-label.accent { color: var(--accent); }
.panel-label.second { color: var(--second); }
.key { flex: none; width: 16px; height: 3px; background: var(--ink-faint); }
.key.second { background: var(--second); }
.key.accent { background: var(--accent); }
.key.slate { background: var(--slate); }

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: rgba(12, 8, 5, 0.55); -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--hair); background: rgba(12, 8, 5, 0.78); }
.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; font: italic 400 26px/1 var(--serif); letter-spacing: 0; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 2px; margin-left: auto; }
.site-nav a { padding: 7px 13px; border-radius: 6px; font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--tint-strong); }
.site-nav a[aria-current="true"] { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(232, 186, 114, 0.35); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--hair-strong); border-radius: 50%; background: rgba(18, 13, 8, 0.6); color: var(--ink-dim); }
.icon-button:hover { color: var(--ink); border-color: rgba(245, 240, 227, 0.32); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-toggle { display: none; }

.hero { padding: 64px 0 40px; }
.hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: clamp(60px, 8.4vw, 112px); line-height: 0.98; }
.hero .subtitle { margin-top: 16px; max-width: 800px; font: italic 400 clamp(21px, 2.6vw, 34px)/1.22 var(--serif); color: var(--ink-dim); text-wrap: balance; }
.authors { margin-top: 28px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; max-width: 820px; font-size: 16px; font-weight: 500; }
.authors a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(245, 240, 227, 0.25); transition: border-color .2s, color .2s; }
.authors a:hover, .authors a:focus-visible { color: var(--accent); border-bottom-color: currentColor; }
.authors sup { margin-left: 1px; font-size: 0.66em; font-weight: 600; color: var(--accent); }
.affil { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.affil small { display: block; margin: 8px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.affil .marks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 34px; }
.affil .mark { display: block; height: 35px; width: auto; }
.ack { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 500; color: #fff; }
.ack img { display: block; height: 32px; width: auto; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 17px; border: 1px solid var(--hair-strong); border-radius: 8px; background: rgba(18, 13, 8, 0.72); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
a.pill:hover, button.pill:hover { border-color: var(--accent); color: var(--ink); }
.pill.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
a.pill.primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.pill.soon { cursor: default; color: var(--ink-faint); border-style: dashed; background: transparent; }
.pill small { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

.film-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius-media); background: var(--stage); }
.film-frame video { width: 100%; height: 100%; object-fit: contain; background: var(--stage); }
.film-frame.glow { box-shadow: 0 0 0 1px var(--hair), var(--shadow); }
.hero-summary { max-width: 62ch; margin-top: 24px; font-size: 15.5px; line-height: 1.8; color: var(--ink-dim); text-wrap: balance; }
.hero-film {
  width: 94%;
  max-width: calc((100svh - var(--header-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem) * 16 / 9);
  margin: 28px auto 0;
}
.hero-film figcaption { margin: 14px auto 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--ink-faint); }

@media (min-width: 721px) and (min-height: 540px) {
  .hero {
    padding: clamp(14px, 2.8vh, 40px) 0 clamp(10px, 1.8vh, 22px);
  }
  .hero h1 { font-size: clamp(54px, min(8.4vw, 11.5vh), 112px); }
  .hero .subtitle { margin-top: clamp(6px, 1.4vh, 16px); font-size: clamp(20px, min(2.6vw, 3.5vh), 34px); }
  .hero .authors { margin-top: clamp(10px, 2.2vh, 28px); }
  .hero .affil { margin-top: clamp(4px, 0.9vh, 10px); }
  .hero .links { margin-top: clamp(10px, 2vh, 26px); }
  .hero .hero-summary { margin-top: clamp(10px, 2vh, 24px); }
}
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; background: var(--well); }
.frame video, .frame > img { width: 100%; height: 100%; object-fit: cover; }

.pending { display: grid; place-content: center; justify-items: center; gap: 4px; min-height: 120px; padding: 20px; text-align: center; border: 1px dashed var(--hair-strong); border-radius: var(--radius-media); background: rgba(14, 10, 7, 0.6); color: var(--ink-faint); font-size: 13px; }
.pending b { font: 600 10.5px/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.film-frame > .pending, .frame > .pending, .viewer-stage > .pending { position: absolute; inset: 0; min-height: 0; border: 0; border-radius: 0; }

main > section { padding: 104px 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 20px 56px; align-items: start; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(36px, 4vw, 56px); line-height: 1.05; }
.section-head .lead { padding-top: 0.55em; }
.section-head .lead p { font-size: 15.5px; line-height: 1.8; color: var(--ink-dim); }
.section-head .lead p + p { margin-top: 0.7em; }
.section-head .lead b { color: var(--ink); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.note { margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: var(--ink-faint); }
.note:empty { display: none; }
.block-gap { margin-top: 16px; }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 16px; }
.bar.foot { margin: 16px 0 0; }
.bar .group { display: flex; flex-wrap: wrap; gap: 2px 22px; }
.meta { font-size: 13px; color: var(--ink-dim); }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ink-dim); font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip[aria-selected="true"], .chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.chip small { font-size: 11.5px; opacity: 0.7; }
#compare-play.chip { min-width: 76px; justify-content: center; padding: 5px 14px; color: var(--ink); border: 1px solid var(--hair-strong); border-radius: 6px; background: rgba(245, 240, 227, 0.04); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px 22px; }
.segmented button { min-height: 34px; padding: 5px 1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-dim); font-size: 13px; font-weight: 500; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.segmented button small { margin-left: 6px; font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-dim); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.ramp { flex: none; width: 48px; height: 3px; background: linear-gradient(90deg, var(--ramp-a), var(--ramp-b), var(--ramp-c)); }

.scrub { flex: 1 1 160px; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --p: 0%; }
.scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), rgba(245, 240, 227, 0.18) var(--p)); }
.scrub::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(245, 240, 227, 0.18); }
.scrub::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--ink); }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); }
.scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }


.io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px minmax(0, 1fr); gap: 14px; align-items: stretch; padding: 0; list-style: none; }
.io .card { padding: 18px 20px 20px; text-align: center; box-shadow: none; }
.io .card p { font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); }
.io .card.out { border-color: rgba(232, 186, 114, 0.4); }
.io .join { position: relative; display: grid; place-items: center; }
.io .join span { position: relative; z-index: 1; padding: 6px 9px; border: 1px solid var(--hair-strong); border-radius: 8px; background: var(--card-solid); font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--ink); }
.io .join::before { content: ""; position: absolute; left: -8px; right: -4px; top: 50%; border-top: 1.5px solid var(--hair-strong); }
.io .join::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -4.5px; border: 4.5px solid transparent; border-left: 7px solid var(--ink-dim); border-right: 0; }
.viewer-card { margin-top: 14px; padding: 24px; }
.viewer-stage { position: relative; overflow: hidden; aspect-ratio: 4 / 3; max-width: 860px; margin: 0 auto; border-radius: 10px; background: var(--stage); box-shadow: 0 0 0 1px var(--hair); }
.viewer-mount { position: absolute; inset: 0; }

.gallery-card { padding: 24px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; }
.gallery > .pending { grid-column: 1 / -1; }
.clip { min-width: 0; }
.clip .frame { box-shadow: 0 0 0 1px var(--hair); }
.clip figcaption { margin-top: 7px; font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--ink-dim); }

.compare { padding: 20px 22px 18px; }
.compare-panels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.compare-panels figure { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; align-content: start; min-width: 0; }
.compare-panels .panel-label { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.compare-panels .frame { width: 100%; aspect-ratio: 4 / 3; background: var(--stage); box-shadow: 0 0 0 1px var(--hair); }
.compare-panels figure.ours .frame { box-shadow: var(--glow-accent); }
.compare-panels figure.ours .panel-label { color: var(--accent); }

.figure { display: grid; gap: 12px; min-width: 0; }
.figure > .diagram { min-width: 0; }
.plate { overflow-x: auto; padding: clamp(10px, 2vw, 22px); border-radius: var(--radius-media); background: var(--plate); box-shadow: 0 0 0 1px var(--hair); }
.plate img { width: 100%; height: auto; }
.figure > figcaption { max-width: 760px; margin: 0 auto; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--ink-faint); }
.figure.has-diagram > figcaption { display: none; }

.figure.has-diagram > .diagram figcaption[hidden] { display: block !important; }
.figure.has-diagram > .diagram .amd-ds-cap[hidden] { display: grid !important; }

.clips3, .plate.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
.clips3 { margin-top: 16px; }
.clips3 figure, .plate.videos figure { margin: 0; display: grid; gap: 8px; justify-items: center; align-content: start; min-width: 0; }
.clips3 .panel-label, .plate.videos .panel-label { margin: 0; }
.clips3 .frame, .plate.videos .frame { width: 100%; background: var(--stage); box-shadow: 0 0 0 1px var(--hair); }
.clips3 .frame video, .plate.videos .frame video { object-fit: contain; }
.clips3 figure.ours .frame { box-shadow: var(--glow-accent); }
.plate.videos { overflow: visible; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.figure[data-figure="downstream"] .plate.videos .frame { aspect-ratio: 4 / 3; }
.figure[data-figure="counterfactual"] .plate.videos .frame { aspect-ratio: 640 / 608; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; padding: 0; list-style: none; }
.steps li { padding: 20px 22px 22px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); min-width: 0; }
.steps h3 { font: 400 22px/1.2 var(--serif); letter-spacing: 0; }
.steps p { margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--ink-dim); }

.highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; padding: 0; list-style: none; }
.highlights li { padding: 18px 20px 18px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); min-width: 0; }
.highlights b { display: block; font: 400 56px/1 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.highlights span { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.55; color: var(--ink-dim); }
.tables { display: grid; gap: 14px; }
.table-card { padding: 18px 24px 20px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.table-caption { margin-bottom: 10px; font: 400 22px/1.3 var(--serif); color: var(--ink); }
.table-note { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--ink-faint); }
.table-scroll { overflow-x: auto; }
.metric { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.metric thead th { padding: 10px 12px; border-bottom: 1px solid var(--hair-strong); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); text-align: right; white-space: nowrap; }
.metric tbody th, .metric td { padding: 10px 12px; border-bottom: 1px solid var(--hair); text-align: right; white-space: nowrap; color: var(--ink-dim); font-weight: 400; }
.metric th:first-child, .metric td:first-child { text-align: left; }
.metric tbody th:first-child { font-weight: 500; color: var(--ink); }
.metric tbody tr:last-child th, .metric tbody tr:last-child td { border-bottom: 0; }
.metric tr.ours th, .metric tr.ours td { background: rgba(232, 186, 114, 0.10); }
.metric tr.ours th:first-child { color: var(--accent); }
.metric:not(.has-marks) tr.ours td { color: var(--ink); font-weight: 600; }
.metric td.best { font-weight: 700; color: var(--ink); }
.metric td.second { text-decoration: underline; text-decoration-color: var(--ink-faint); text-underline-offset: 3px; }
.metric tbody tr.rule-after th, .metric tbody tr.rule-after td { border-bottom-color: var(--hair-strong); }

.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; padding: 0; list-style: none; }
.limits li { padding: 22px 24px; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); min-width: 0; }
.limits h3 { font: 400 24px/1.2 var(--serif); letter-spacing: 0; }
.limits p { margin-top: 10px; font-size: 13.5px; line-height: 1.75; color: var(--ink-dim); }
.cite { position: relative; padding: 0; overflow: hidden; }
.cite pre { padding: 24px 110px 24px 26px; overflow-x: auto; font: 13px/1.7 var(--mono); color: #e2dccf; white-space: pre; }
.cite .copy { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; min-width: 74px; min-height: 34px; padding: 5px 14px; border: 1px solid var(--hair-strong); border-radius: 6px; background: rgba(18, 13, 8, 0.9); font-size: 12.5px; font-weight: 500; color: var(--ink-dim); }
.cite .copy:hover { color: var(--ink); border-color: var(--accent); }
.site-footer { margin-top: 104px; padding: 32px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--hair); background: rgba(7, 4, 3, 0.55); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--ink-faint); }
.footer-inner a { color: var(--ink-dim); text-decoration: none; }

@media (max-width: 1240px) and (min-width: 761px) {
  .hero-text::before, .section-head::before { inset: -36px -24px; }
}
@media (max-width: 1080px) {
  .wrap { padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 14px; background: rgba(12, 8, 5, 0.985); border-bottom: 1px solid var(--hair); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; font-size: 15px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  :root { --header-h: 60px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .header-inner { gap: 8px; }
  .hero { padding: 36px 0 24px; }
  .hero h1 { font-size: clamp(54px, 17vw, 76px); }
  .hero .subtitle { font-size: clamp(19px, 5.4vw, 24px); }
  .authors { gap: 2px 14px; font-size: 14.5px; }
  .affil small { display: block; margin: 2px 0 0; }
  .links { gap: 6px; }
  .pill { min-height: 38px; padding: 7px 13px; font-size: 13px; }
  .section-head { grid-template-columns: 1fr; gap: 8px; margin-bottom: 22px; }
  .section-head .lead { padding-top: 0; }
  .hero-text::before, .section-head::before { inset: -24px -16px; }
  main > section { padding-top: 76px; }
  .io { grid-template-columns: 1fr; gap: 10px; }
  .io .join { padding: 2px 0; }
  .io .join::before, .io .join::after { display: none; }
  .viewer-card, .gallery-card { padding: 14px; }
  .compare { padding: 14px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .compare-panels { gap: 10px 8px; }
  .compare-panels .panel-label { font-size: 9px; letter-spacing: 0.08em; line-height: 1.3; white-space: normal; text-align: center; }
  .steps, .highlights { grid-template-columns: 1fr; }
  .clips3, .plate.videos { grid-template-columns: 1fr; }
  .highlights b { font-size: 46px; }
  .table-card { padding: 14px 14px 16px; }
  .cite pre { padding: 56px 16px 18px; font-size: 12px; }
  .site-footer { margin-top: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .authors a { transition: none; }
}
