:root {
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ink: #f2f4f7;
  --ink-soft: #a4acb8;
  --ink-faint: #6a7380;
  --line: #242830;
  --line-soft: #1a1d24;
  --bg: #07080b;
  --card: #11141a;
  --card-hi: #161a22;
  /* Cool steel is what; gold is when. The paper already paints the two
     content towers blue and green, so the site chrome follows that cool
     family instead of violet. */
  --accent: #8eb4d8;
  --accent-deep: #4d86c4;
  --accent-soft: #121820;
  --groove: #171C24;
  --shot-bg: #21364B;
  --shot-bg-played: #2C4A69;
  --shot-fg: #93B4D6;
  --dlg-bg: #153330;
  --dlg-bg-played: #1C4740;
  --dlg-fg: #7FCBB4;
  --shot-active: linear-gradient(180deg, #58A6FF, #3B82F6);
  --dlg-active: linear-gradient(180deg, #2DD4BF, #14B8A6);
  --tick: #8B949E;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-deep); color: #fff; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 104px 0 196px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% -160px, rgba(77,134,196,.30), transparent 68%),
    radial-gradient(760px 320px at 50% 108%, rgba(77,134,196,.16), transparent 72%),
    radial-gradient(600px 300px at 10% 104%, rgba(77,148,224,.20), transparent 70%),
    radial-gradient(600px 300px at 90% 104%, rgba(230,169,66,.16), transparent 70%),
    var(--bg);
}

.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(760px 380px at 50% 34%, #000, transparent 78%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-task {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-task .mark {
  position: absolute;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(88px, 16vw, 180px);
  line-height: 1;
  letter-spacing: .04em;
  user-select: none;
  background: linear-gradient(180deg, rgba(142,180,216,.50), rgba(142,180,216,.16));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-task .mark-what {
  top: 5%;
  left: 2%;
  /* Same two stops as the title: steel of the shots into sage of the lines. */
  background-image: linear-gradient(115deg, rgba(142,180,216,.52), rgba(122,176,152,.22));
}

.hero-task .mark-when {
  right: 2%;
  bottom: 24%;
  background: linear-gradient(180deg, rgba(230,169,66,.50), rgba(230,169,66,.18));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-clock {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: min(1080px, 92%);
  transform: translateX(-50%);
}

.hero-clock::before {
  content: "";
  position: absolute;
  inset: -26px -48px -18px;
  border-radius: 20px;
  /* A cool wash over the lanes, a warm one under the clock. */
  background:
    radial-gradient(72% 80% at 50% 90%, rgba(201,162,79,.13), transparent 70%),
    radial-gradient(60% 120% at 50% 48%, rgba(77,134,196,.10), transparent 72%);
  pointer-events: none;
}

.hero-clock svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.venue {
  margin: 0 0 26px;
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1.16;
  margin: 0 auto 30px;
  letter-spacing: .045em;
  word-spacing: .06em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(96deg, #c8e0f4, #6a9fd4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* What is the two content streams together, so the word itself runs from the
   steel of the shot lane into the sage of the dialogue lane. When stays gold.
   background-image only, so the clip on em is left intact. */
.hero h1 em.t-what { background-image: linear-gradient(115deg, #b4d4ee 6%, #8eb4d8 40%, #87b8a6 100%); }
.hero h1 em.t-when { background-image: linear-gradient(96deg, #ffd489, #dd9a32); }

.subtitle {
  font-family: var(--display);
  font-size: clamp(20px, 2.7vw, 29px);
  font-weight: 400;
  color: #d4dbe4;
  margin: 0 auto 38px;
  max-width: 820px;
  line-height: 1.38;
  /* Newsreader is optical-size aware; the title runs at 72, so the deck sits
     between that and body copy. Large serif also needs less tracking. */
  font-variation-settings: "opsz" 36;
  letter-spacing: .012em;
  text-wrap: balance;
}

.authors {
  margin: 0 auto 18px;
  max-width: 960px;
  color: var(--ink);
  font-size: 18.5px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: .005em;
}

.authors sup {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-left: 2px;
}

.affils {
  list-style: none;
  margin: 0 auto 44px;
  padding: 0;
  max-width: 940px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.5;
}

.affils sup {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-right: 5px;
}

.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: .18s;
}

.btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(142,180,216,.10); }
.btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.btn-primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: #5e96d0; border-color: #5e96d0; color: #fff; }

/* headline stat under the hero */

.stat {
  display: flex; align-items: baseline; justify-content: center; gap: 14px;
  margin: 42px 0 0;
  flex-wrap: wrap;
}

.stat-num {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 64px);
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: .04em;
  font-variation-settings: "opsz" 72;
}

.stat-num span { font-size: .44em; color: var(--ink-faint); margin-left: 5px; }

.stat-cap {
  text-align: left;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 260px;
}

.stat-cap b { display: block; color: var(--ink-soft); font-weight: 500; }

/* ---------- sticky table of contents ---------- */

.tocbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7,8,11,.78);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.toc { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; padding: 13px 28px; }

.toc a {
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 3px 0;
  border-bottom: 1.5px solid transparent;
  transition: .18s;
}

.toc a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- sections ---------- */

.section { padding: 74px 28px; scroll-margin-top: 60px; }
.section + .section { border-top: 1px solid var(--line-soft); }

.h2row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin: 0 0 40px;
  text-align: center;
}

.h2num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.2;
  color: var(--accent);
  opacity: .4;
  flex: none;
}

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.24;
  margin: 0;
  letter-spacing: .03em;
  font-variation-settings: "opsz" 60;
}

h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: .002em;
  color: var(--ink);
}

.abstract {
  margin: 0 auto;
  max-width: 880px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.78;
  text-align: center;
}

.abstract strong { color: var(--ink); font-weight: 600; }
.abstract em { color: var(--accent); font-style: italic; }

#demos > .legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  margin-bottom: 32px;
}

#demos > .legend .legend-item { justify-content: center; }

/* ---------- figures ---------- */

.figure {
  margin: 0 0 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 18px;
}

.figure img {
  display: block; width: 100%; height: auto;
  border-radius: 6px;
  background: #fff;
}

.figure figcaption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--ink-faint);
}

.figure figcaption b { color: var(--ink-soft); font-weight: 600; }

/* ---------- introductory film ---------- */

.promo-section { max-width: 1040px; }

.promo-note { max-width: 880px; }

.promo-frame {
  margin: 0;
  padding: 12px 12px 16px;
  overflow: hidden;
  background:
    radial-gradient(860px 320px at 50% -10%, rgba(77,134,196,.17), transparent 72%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
}

.promo-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 10px;
}

.promo-frame figcaption {
  margin: 14px 8px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 13.5px;
  line-height: 1.62;
}

.promo-frame figcaption b { color: var(--ink-soft); font-weight: 600; }

/* ---------- prose columns ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
}

.col p { margin: 0; font-size: 14.5px; line-height: 1.72; color: var(--ink-soft); }

.col code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.math {
  display: inline-block;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 5px;
  color: #c4b1ff;
  white-space: nowrap;
}

.math sup { font-style: normal; font-size: 10px; }

/* ---------- numbered stages ---------- */

.stages {
  list-style: none; counter-reset: st; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}

.stages li {
  counter-increment: st;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 20px;
}

.stages li::before {
  content: counter(st);
  position: absolute; top: 16px; right: 20px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  color: var(--accent);
  opacity: .24;
}

.stages p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }

/* ---------- results table ---------- */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.results { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 900px; }

.results th, .results td { padding: 10px 11px; text-align: center; white-space: nowrap; }

.results thead th {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.results thead tr:first-child th:not(.lead) {
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--accent);
  opacity: .8;
}

.results thead tr:first-child th + th { border-left: 1px solid var(--line); }

.results td {
  border-top: 1px solid var(--line-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--ink-soft);
}

.results .lead {
  text-align: left;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.results .best { font-weight: 700; color: #fff; }
.results .second { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--ink); }
.results .na { color: #43404e; }

.results tbody tr:hover td { background: var(--card-hi); }

.results tr.ours td { background: rgba(77,134,196,.13); border-top-color: rgba(142,180,216,.24); }
.results tr.ours:hover td { background: rgba(77,134,196,.19); }
.results tr.ours .lead { color: #fff; }

.results .tag {
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-faint);
  background: rgba(255,255,255,.05);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 7px;
}

.results .tag-ours { background: var(--accent-deep); color: #fff; }

.tnote { margin: 18px 0 0; font-size: 13.5px; line-height: 1.66; color: var(--ink-faint); max-width: 880px; }
.tnote b { color: var(--ink-soft); }
.tnote u { text-underline-offset: 3px; }

/* ---------- legend ---------- */

.legend {
  display: flex; gap: 28px; flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-deep);
  border-radius: var(--radius);
}

.legend-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); }
.legend-item b { color: var(--ink); font-weight: 600; }

.swatch { width: 22px; height: 12px; border-radius: 3px; flex: none; margin-top: 4px; }
.swatch-req { background: linear-gradient(90deg, var(--shot-bg) 50%, var(--dlg-bg) 50%); }
.swatch-now { background: linear-gradient(90deg, #58A6FF 50%, #2DD4BF 50%); }
.swatch-head { background: var(--ink); width: 3px; border-radius: 2px; height: 16px; margin-top: 2px; }

/* ---------- grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 26px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: .2s;
}

.card:hover { border-color: #3a3448; }
.card.playing { border-color: var(--accent-deep); box-shadow: 0 0 0 1px rgba(77,134,196,.35), 0 10px 40px rgba(77,134,196,.14); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 17px 11px;
}

.card-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: .03em;
  color: var(--ink);
}

/* Two lines are reserved whether or not the title wraps, so every stage in a
   row starts at the same height. */
.card:not(.featured) .card-title { min-height: 2.6em; }

.card-meta { font-size: 12px; color: var(--ink-faint); font-family: "JetBrains Mono", monospace; flex: none; }

.stage { position: relative; background: #000; cursor: pointer; user-select: none; }
.stage video { display: block; width: 100%; aspect-ratio: var(--ar, 704 / 1280); object-fit: contain; background: #000; }

/* One frame shape for the whole grid, set from the clips themselves, so the
   timelines under the videos line up too. */
.card:not(.featured) .stage video { aspect-ratio: var(--row-ar, var(--ar, 704 / 1280)); }

.playbtn {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(6,5,9,.34);
  transition: opacity .2s;
  pointer-events: none;
}

.card.playing .playbtn { opacity: 0; }

.playbtn span {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.93);
  display: grid; place-items: center;
  box-shadow: 0 6px 26px rgba(0,0,0,.5);
}

.playbtn span::after {
  content: ""; width: 0; height: 0; margin-left: 4px;
  border-left: 17px solid #111;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* ---------- player controls ---------- */

.ctrl {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 22px 12px 9px;
  background: linear-gradient(transparent, rgba(4,3,7,.78) 55%);
  opacity: 0;
  transition: opacity .18s;
}

.stage:hover .ctrl,
.stage:focus-within .ctrl,
.card.playing .ctrl { opacity: 1; }

.ctrl-play {
  flex: none;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: grid; place-items: center;
  cursor: pointer;
}

.ctrl-play::before {
  content: "";
  width: 0; height: 0; margin-left: 3px;
  border-left: 9px solid #111;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.card.playing .ctrl-play::before {
  width: 9px; height: 11px; margin: 0;
  border: 0;
  background: linear-gradient(90deg, #111 0 3px, transparent 3px 6px, #111 6px 9px);
}

.bar {
  position: relative;
  flex: 1;
  height: 16px;
  display: flex; align-items: center;
  cursor: pointer;
  touch-action: none;
}

.bar::before {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.24);
}

.bar-buf, .bar-fill {
  position: absolute; left: 0; right: 0;
  height: 4px; border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.bar-buf { background: rgba(255,255,255,.28); }
.bar-fill { background: var(--accent); }

.bar-knob {
  position: absolute; top: 50%; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .15s;
  will-change: transform;
}

.bar:hover .bar-knob,
.bar:focus-visible .bar-knob,
.bar.dragging .bar-knob { opacity: 1; }

.bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.ctrl-time {
  flex: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(255,255,255,.82);
}

/* featured first card: video left, timeline right */

.card.featured { grid-column: 1 / -1; }

@media (min-width: 820px) {
  .card.featured {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    grid-template-areas: "head head" "stage body";
    align-items: start;
  }
  .card.featured .card-head { grid-area: head; padding: 20px 24px 14px; }
  .card.featured .card-title { font-size: 24px; }
  .card.featured .stage { grid-area: stage; margin: 0 0 20px 24px; border-radius: 10px; overflow: hidden; }
  .card.featured .stage video { max-height: 440px; width: auto; max-width: 100%; margin: 0 auto; }
  .card.featured .card-body { grid-area: body; display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
  .card.featured .claim { padding: 0 24px 16px; }
  .card.featured .tl { border-top: 0; padding: 4px 24px 0; }
  .card.featured .lane { height: 34px; }
  .card.featured .lane.dia { height: 26px; }
  .card.featured .seg { font-size: 12px; }
  .card.featured .readout { min-height: 58px; font-size: 14px; }
  .card.featured .scene { padding: 14px 24px 20px; font-size: 13.5px; }
}

/* ---------- opening claim ---------- */

.claim { padding: 16px 17px 2px; }

.claim-line {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.14;
  letter-spacing: .01em;
  color: var(--ink);
}

.claim-line em {
  font-style: italic;
  background: linear-gradient(96deg, #9ec4ea 8%, #ffd07a 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.claim-sub {
  margin: 13px 0 0;
  max-width: 52ch;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--ink-faint);
}

/* ---------- timeline ---------- */

.tl { padding: 14px 17px 16px; border-top: 1px solid var(--line); }

.tl-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }

.tl-label {
  width: 54px; flex: none;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); text-align: right;
  font-weight: 500;
}

.lane {
  position: relative;
  flex: 1;
  height: 24px;
  background: var(--groove);
  border-radius: 6px;
}

.seg {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font: 600 11px/1 "JetBrains Mono", ui-monospace, monospace;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: background .18s ease, transform .18s ease, color .18s ease, filter .18s ease;
  transform-origin: center center;
  cursor: default;
}

.lane.shots .seg { background: var(--shot-bg); color: var(--shot-fg); }
.lane.shots .seg.is-played { background: var(--shot-bg-played); }
.lane.shots .seg.is-current {
  background: var(--shot-active);
  color: #0B1220;
  transform: scaleY(1.06);
}

.lane.dialogue .seg { background: var(--dlg-bg); color: var(--dlg-fg); }
.lane.dialogue .seg.is-played { background: var(--dlg-bg-played); }
.lane.dialogue .seg.is-current {
  background: var(--dlg-active);
  color: #04211C;
  transform: scaleY(1.06);
}

.seg:hover { filter: brightness(1.18); }
.seg.is-current:hover { filter: none; }

.head {
  position: absolute; top: -2px; bottom: -2px; left: 0; width: 2px;
  background: #fff;
  pointer-events: none;
  will-change: transform;
  z-index: 2;
}

.ticks {
  display: flex; justify-content: space-between;
  padding-left: 63px;
  font-size: 10px;
  color: var(--tick);
  font-family: "JetBrains Mono", monospace;
  margin-top: 2px;
}

/* ---------- readout ---------- */

.readout {
  margin: 11px 0 0;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: #171c22;
  border-radius: 8px;
  padding: 10px 12px;
}

.readout .tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  margin-right: 8px;
}

.readout .err { color: var(--ink-soft); font-family: "JetBrains Mono", monospace; font-size: 11.5px; }

.scene { padding: 0 17px 16px; font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; margin: 0; }
.scene b { color: var(--ink-soft); font-weight: 500; }

/* ---------- misc ---------- */

.cite {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--ink-soft);
}

footer { padding: 38px 28px 70px; border-top: 1px solid var(--line); margin-top: 34px; }
footer p { margin: 0; font-size: 13.5px; color: var(--ink-faint); max-width: 820px; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 660px) {
  .grid { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
  /* Single column: nothing to line up, so titles take only the room they need. */
  .card:not(.featured) .card-title { min-height: 0; }
  .card:not(.featured) .stage video { aspect-ratio: var(--ar, 704 / 1280); }
  .section { padding: 50px 20px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 72px 0 150px; }
  .hero-task .mark { font-size: 72px; opacity: .8; }
  /* The byline runs to many lines on a phone, so it gets back some of the air
     the wide layout can afford to spend. */
  .hero h1 { margin-bottom: 22px; }
  .subtitle { margin-bottom: 28px; }
  .authors { margin-bottom: 12px; font-size: 16.5px; line-height: 1.8; }
  .affils { margin-bottom: 32px; gap: 8px 20px; font-size: 14px; }
  .toc { gap: 17px; padding: 11px 20px; }
  .figure { padding: 14px 14px 12px; }
  .legend { gap: 16px; }
  #demos > .legend { grid-template-columns: 1fr; }
  .h2row { gap: 12px; margin-bottom: 28px; }
  #demos > .legend { margin-bottom: 28px; }
  .h2num { font-size: 24px; }
  h2 { font-size: 28px; }
  .stat { gap: 12px; }
}
