:root {
  --bg: #FAF8F2;
  --bg-soft: #FAF9F4;
  --ink: #14181E;
  --ink-soft: #47525E;
  --ink-faint: #77808D;
  --accent: #0E7387;
  --accent-ink: #ffffff;
  --highlight: #94241C;
  --line: #E3E0D9;
  --face: 'Optima', 'Optima nova', 'URW Classico', 'Arsenal', Candara, 'Gill Sans', 'Gill Sans MT', -apple-system, sans-serif;
  --good: #1f8a5c;
  --bad: #c24545;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(20,20,40,.04), 0 8px 24px rgba(20,20,40,.05);
  --radius: 14px;
  --maxw: 1440px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101116;
    --bg-soft: #16171f;
    --ink: #eef0f6;
    --ink-soft: #b3b6c6;
    --ink-faint: #7c7f92;
    --accent: #8686ff;
    --accent-ink: #10101a;
    --line: #262836;
    --good: #4fc389;
    --bad: #e37272;
    --card: #171821;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #101116;
  --bg-soft: #16171f;
  --ink: #eef0f6;
  --ink-soft: #b3b6c6;
  --ink-faint: #7c7f92;
  --accent: #8686ff;
  --accent-ink: #10101a;
  --line: #262836;
  --good: #4fc389;
  --bad: #e37272;
  --card: #171821;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--face);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- top notice ---------- */
.anon-banner {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- hero / header ---------- */
header.hero {
  padding: 64px 0 36px;
  text-align: center;
}
.venue {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
h1.title {
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 620px;
  margin: 0 auto 22px;
}
.authors {
  color: var(--ink-faint);
  font-size: 15px;
  margin-bottom: 4px;
}
.affil {
  color: var(--ink-faint);
  font-size: 13.5px;
  margin-bottom: 26px;
}

.linkrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.linkbtn:hover { transform: translateY(-1px); border-color: var(--accent); }
.linkbtn svg { flex: none; }
.linkbtn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- generic section ---------- */
section { padding: 46px 0; }
section.soft { background: var(--bg-soft); }
.section-head { margin-bottom: 24px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
h2 { font-size: 25px; margin: 0 0 8px; letter-spacing: -0.01em; }
h2.sota-title { color: var(--highlight); }
.lede { color: var(--ink-soft); max-width: 700px; }

.abstract-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat .lab { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- hero comparison ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
}
@media (max-width: 820px) {
  .compare { grid-template-columns: 1fr; }
  .compare .arrow { transform: rotate(90deg); margin: 4px auto; }
}
.shot { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #000; }
.shot img, .shot video { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; cursor: pointer; }
.shot .tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 4px 9px; border-radius: 999px; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
}
.shot .tag.ok { background: color-mix(in srgb, var(--good) 80%, black 10%); }
.shot .tag.bad { background: color-mix(in srgb, var(--bad) 78%, black 10%); }
.shot .metric {
  position: absolute; bottom: 10px; right: 10px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.55); padding: 4px 9px; border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.arrow { color: var(--ink-faint); font-size: 22px; text-align: center; }
.compare-cap { text-align: center; font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }

/* ---------- method diagram ---------- */
.method-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: center;
  margin-top: 10px;
}
@media (max-width: 820px) { .method-grid { grid-template-columns: 1fr; } }
.contrib-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contrib-list li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  font-size: 14.5px; color: var(--ink-soft);
}
.contrib-list .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.diagram-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.diagram-card svg { width: 100%; height: auto; display: block; }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--ink-faint); }
.diagram-legend span { display: inline-flex; align-items: center; gap: 6px; }
.diagram-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
table.results { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.results caption { text-align: left; padding: 14px 16px 0; font-size: 13px; color: var(--ink-faint); caption-side: top; }
table.results th, table.results td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.results th:first-child, table.results td:first-child { text-align: left; white-space: normal; }
table.results thead th { color: var(--ink-faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
table.results tbody tr:hover { background: var(--bg-soft); }
table.results td.best { color: var(--accent); font-weight: 700; }
table.results tr.group td { background: var(--bg-soft); font-weight: 700; color: var(--ink-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
table.results tr.ours td { background: color-mix(in srgb, var(--accent) 7%, transparent); font-weight: 700; }
.table-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }

/* ---------- gallery ---------- */
.gallery-controls { display: flex; gap: 8px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button {
  border: none; background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.seg button.active { background: var(--accent); color: var(--accent-ink); }
.gallery-hint { font-size: 12.5px; color: var(--ink-faint); }

.gallery-scroll { overflow-x: auto; padding: 58px 0 14px; }
.gtable { display: grid; gap: 16px; min-width: 1000px; }
.grow { display: none; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; align-items: start; }
.grow.active { display: grid; }
.grow .rowlabel { grid-column: 1; grid-row: 1; position: relative; }
.trajitem { grid-column: 1; grid-row: 2; }
.grow.lay-row .trajitem { grid-column: 4; grid-row: 1; }
.pending { width: 100%; aspect-ratio: 9/5; display: flex; align-items: center; justify-content: center; background: #EAE6DA; color: var(--ink-faint); font-size: 13px; letter-spacing: .03em; }
.carousel + .carousel { margin-top: 36px; }
.abl-title { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.trajitem canvas { width: 100%; aspect-ratio: 9/5; display: block; border-radius: 8px; }
.grow .rowlabel .rbtns, .grow .trajitem .rbtns { position: absolute; left: 0; right: 0; top: -44px; margin: 0; }
.cap { margin-top: 6px; font-size: 14px; font-weight: 700; text-align: center; color: var(--ink); }
.cap::first-letter { text-transform: uppercase; }
.cap.ours { color: var(--highlight); }
.gnav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 30px; margin: 0 0 -30px; pointer-events: none; position: relative; z-index: 1; }
.gnav button {
  height: 30px; padding: 0 14px; font-size: 13px; font-weight: 700; border-radius: 6px;
  border: 0; background: #F7F5D8; color: var(--ink); cursor: pointer; font-family: inherit;
  pointer-events: auto;   /* .gnav itself is click-through so the row buttons under it stay usable */
}
.gnav .count { font-size: 13px; color: var(--ink-faint); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.grow .rowlabel { font-size: 12.5px; color: var(--ink-soft); }
.grow .rowlabel img { width: 100%; aspect-ratio: 9/5; object-fit: cover; display: block; }
.rbtns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
.rbtns button {
  height: 30px; padding: 0; font-size: 12px; font-weight: 700; border-radius: 6px;
  border: 0; background: #F7F5D8; color: var(--ink-soft);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.rbtns button.active { color: var(--accent); }
.rbtns button.play { color: var(--accent); }
.gcell { position: relative; overflow: hidden; }
.keys { position: absolute; left: 7px; right: 7px; bottom: 7px; display: flex; justify-content: space-between; pointer-events: none; }
.keys .cluster { display: grid; grid-template-columns: repeat(3, 15px); grid-template-rows: repeat(2, 15px); gap: 2px; }
.keys .k { display: flex; align-items: center; justify-content: center; border-radius: 3px; font: 700 9px/1 var(--face); background: rgba(255,255,255,0.4); color: #14181E; }
.keys .k.on { background: rgba(255,255,255,0.9); }
.keys .k svg { display: block; }
.gcell img, .gcell video { width: 100%; aspect-ratio: 9/5; object-fit: cover; display: block; cursor: pointer; border: 0; outline: 0; }
.gcell .lab {
  position: absolute; bottom: 0; left: 0; right: 0; font-size: 10.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); padding: 12px 6px 4px; text-align: center;
  font-weight: 600; letter-spacing: .02em;
}
.ghead .ours { color: var(--highlight); font-size: 13px; }
.ghead { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-width: 1000px; font-size: 11.5px; color: var(--ink-faint); text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 10px; }
.gallery-hint-mobile { display: none; }
@media (max-width: 640px) {
  .gallery-hint-mobile { display: inline; }
}

/* ---------- bibtex ---------- */
.bibtex-card {
  background: #14151d; color: #d8dae6; border-radius: var(--radius);
  padding: 20px 22px; font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12.8px; line-height: 1.7; overflow-x: auto; position: relative; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.copy-btn {
  position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.15);
  padding: 6px 10px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.copy-btn:hover { background: rgba(255,255,255,.16); }

/* ---------- footer ---------- */
footer { padding: 40px 0 60px; text-align: center; color: var(--ink-faint); font-size: 13px; }
footer a { color: var(--ink-faint); }

.pending-note {
  margin-top: 14px; font-size: 13px; color: var(--ink-faint);
  border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--bg-soft); border-radius: 0 8px 8px 0;
}

/* ---------- teaser: 3x3 grid of the source clips ---------- */
.teaser-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.teaser-grid video { width: 100%; aspect-ratio: 864 / 480; object-fit: cover; display: block; background: #000; cursor: pointer; }
.teaser-grid .ttile { position: relative; min-width: 0; }
@media (max-width: 700px) { .teaser-grid .keys { display: none; } }

/* swipeable examples */
.gtable { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.gtable:active { cursor: grabbing; }
.grow.enter-next, .rv-item.enter-next { animation: enter-next .6s cubic-bezier(.22, .8, .24, 1); }
.grow.enter-prev, .rv-item.enter-prev { animation: enter-prev .6s cubic-bezier(.22, .8, .24, 1); }
@keyframes enter-next { from { opacity: 0; transform: translateX(120px); } to { opacity: 1; transform: none; } }
@keyframes enter-prev { from { opacity: 0; transform: translateX(-120px); } to { opacity: 1; transform: none; } }

/* ---------- More Results: drifting strip with arrows ---------- */
.marquee-wrap { position: relative; }
.marquee { overflow: hidden; padding: 4px 0; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.marquee.dragging { cursor: grabbing; }
/* edge fades as overlays: cheaper than a mask on a moving layer */
.marquee .track { display: flex; gap: 18px; padding-right: 18px; width: max-content; will-change: transform; }
.marquee .ttile { position: relative; flex: 0 0 clamp(260px, 27vw, 420px); }
.marquee video { width: 100%; aspect-ratio: 864 / 480; object-fit: cover; display: block; background: #000; cursor: inherit; pointer-events: none; }
.mq-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.72); color: var(--ink); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(20, 24, 30, 0.2);
}
.mq-prev { left: 14px; }
.mq-next { right: 14px; }
@media (max-width: 700px) { .marquee .keys { display: none; } .mq-arrow { width: 34px; height: 34px; } }

/* strip focus: centre card full size, edges smaller and faded (overlay, not a filter) */
.marquee .ttile { transform-origin: 50% 50%; will-change: transform; }
.marquee .ttile { border-radius: 10px; overflow: hidden; backface-visibility: hidden;
  box-shadow: 0 calc(6px + 14px * var(--lift, 0)) calc(14px + 26px * var(--lift, 0)) rgba(20, 24, 30, calc(0.14 + 0.16 * var(--lift, 0))); }
.marquee .ttile .keys { z-index: 2; }
.marquee { padding: 26px 0 38px; }

/* ---------- Fig. 1(a) + insight ---------- */
.insight { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .insight { grid-template-columns: 1fr; gap: 20px; } }
.insight .fig svg { width: 100%; height: auto; display: block; }
#fig1a .lbl { font: 600 11.5px var(--face); fill: #14181E; }
#fig1a text.tok { font: 700 12px var(--face); }
#fig1a .mk, #fig1a .miss { fill: #C0392B; }
#fig1a .mkd { fill: #C0392B; }
#fig1a .mkl { stroke: #C0392B; stroke-dasharray: 3 2; }
#fig1a .hist { fill: #EDEDED; stroke: #9A9A9A; }
#fig1a .an { fill: #F6D9B0; stroke: #B9822F; }  #fig1a .anT { fill: #B9822F; }
#fig1a .ba { fill: #BFE0C8; stroke: #3E8A5B; }  #fig1a .baT, #fig1a .bkT { fill: #3E8A5B; }
#fig1a .re { fill: #BFD6EE; stroke: #2F6DA8; }  #fig1a .reT { fill: #2F6DA8; }
#fig1a .tg { fill: #D9CBEC; stroke: #6C4B9E; }  #fig1a .tgT { fill: #6C4B9E; }
#fig1a .tgl { stroke: #6C4B9E; }
#fig1a .win { stroke: #77808D; stroke-dasharray: 2 3; }
#fig1a .ret path { fill: none; stroke: #3E8A5B; stroke-width: 1.3; stroke-dasharray: 4 4; }
#fig1a .bk rect { fill: #BFE0C8; stroke: #3E8A5B; }
#fig1a .brace { fill: none; stroke: #3E8A5B; stroke-width: 1.2; }
#fig1a [data-s], #fig1a [data-part], #fig1a .loss { transition: opacity .5s ease; }
#fig1a .hide { opacity: 0; }
#fig1a .dim { opacity: .22; }
#fig1a .flow .ret path { animation: fig-flow 1s linear infinite; }
#fig1a .glow rect { stroke-width: 2.4; }
@keyframes fig-flow { to { stroke-dashoffset: -16; } }
.fig-ctl { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.fig-play { height: 28px; min-width: 40px; border: 0; border-radius: 6px; background: #F7F5D8; color: var(--accent); font: 700 12px var(--face); cursor: pointer; }
.fig-dots { display: inline-flex; gap: 6px; }
.fig-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #E3E0D9; cursor: pointer; }
.fig-dots button.on { background: var(--highlight); }
.fig-legend { font-size: 12px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fig-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.fig-legend i.an { background: #F6D9B0; } .fig-legend i.ba { background: #BFE0C8; } .fig-legend i.re { background: #BFD6EE; } .fig-legend i.tg { background: #D9CBEC; }
.insight-text { margin: 0; padding-left: 1.2em; display: grid; gap: 14px; }
.insight-text li { font-size: 16px; line-height: 1.55; color: var(--ink); padding: 4px 8px; border-radius: 6px; transition: background-color .4s ease; }
.insight-text li.on { background: #F7F5D8; }
.insight-text li::marker { color: var(--highlight); font-weight: 700; }

/* math letters in the paper's fonts (Computer Modern via KaTeX): A, T, k italic; B, R, T calligraphic */
.mi { font-family: KaTeX_Math, "Times New Roman", serif; font-style: italic; }
.cal { font-family: KaTeX_Caligraphic, "Times New Roman", serif; font-style: normal; }
.mn { font-family: KaTeX_Main, "Times New Roman", serif; font-style: normal; }
#fig1a text.tok { font-weight: 400; font-size: 14px; }
#fig1a tspan.sub { font-size: 9px; }
.insight-text .mi, .insight-text .cal, .fig-legend .mi, .fig-legend .cal { font-size: 1.08em; }
.insight-text b .mi, .insight-text b .cal { font-weight: 400; }

/* ---------- Revisit Consistency ---------- */
.rv-nav { margin: 0 0 12px; pointer-events: auto; height: auto; }
.rv-item { display: none; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px 20px; align-items: start; }
.rv-item.active { display: grid; }
.rv-main { position: relative; }
.rv-main video { width: 100%; aspect-ratio: 864 / 480; object-fit: cover; display: block; background: #000; cursor: pointer; }
.rv-main .rv-play { position: absolute; left: 10px; top: 10px; z-index: 3; height: 28px; min-width: 40px; border: 0; border-radius: 6px; background: rgba(247,245,216,.94); color: var(--accent); font: 700 12px var(--face); cursor: pointer; }
.rv-side { display: grid; gap: 12px; }
.rv-item { align-items: stretch !important; }
.rv-side { display: flex; flex-direction: column; gap: 12px; }
.rv-map { width: 100%; flex: 1 1 auto; min-height: 160px; display: block; border-radius: 8px; }
.rv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-pair figure { margin: 0; }
.rv-pair img { width: 100%; aspect-ratio: 864 / 480; object-fit: cover; display: block; border-radius: 6px; transition: box-shadow .3s ease; }
.rv-pair figcaption { margin-top: 4px; font-size: 13px; font-weight: 700; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-pair figure.hit img { box-shadow: 0 0 0 3px #16A34A; }
.rv-pair figure.hit figcaption { color: #0F7B3A; }
@media (max-width: 900px) { .rv-item.active { grid-template-columns: 1fr; } .rv-map { aspect-ratio: 16 / 9; } }
.rv-top1 { position: absolute; top: 10px; right: 10px; width: 17%; text-align: right; z-index: 3; pointer-events: none; transition: opacity .3s ease; }
.rv-top1.empty { opacity: 0; }
.rv-top1 img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -1px; }
.rv-top1.first img { outline: 3px solid var(--highlight); }
.rv-top1 span { display: inline-block; margin-top: 5px; padding: 2px 7px; border-radius: 4px; background: rgba(255, 255, 255, .82); color: var(--ink); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-top1.first span { color: var(--highlight); }
.rv-now { position: absolute; left: 58px; top: 10px; z-index: 3; height: 28px; line-height: 28px; padding: 0 9px; border-radius: 6px; background: rgba(255, 255, 255, .82); color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }

/* revisit stop: every clip holds on the revisit frame for a few seconds */
.grow { position: relative; }
.stopnote { position: absolute; left: 50%; top: -46px; transform: translate(-50%, -6px); z-index: 3; opacity: 0; pointer-events: none;
  padding: 6px 16px 8px; border-radius: 8px; background: #fff; color: #0F7B3A; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 24, 30, .18); transition: opacity .25s ease, transform .25s ease; }
.stopnote::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #16A34A; transform-origin: 0 50%; }
.grow.at-stop .stopnote { opacity: 1; transform: translate(-50%, 0); }
.grow.at-stop .stopnote::after { animation: stop-count var(--stop-ms, 6500ms) linear forwards; }
@keyframes stop-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.stoptag { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 2; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  padding: 4px 12px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #0F7B3A; font-size: 15px; font-weight: 700; white-space: nowrap; }
.grow.at-start .stoptag { opacity: 1; }
.grow.at-start .rowlabel img { outline: 3px solid #16A34A; outline-offset: -3px; }

/* TL;DR + links under the title */
.tldr { position: relative; max-width: 1120px; margin: 30px auto 0; padding: 20px 36px 16px; text-align: center;
  background: #F7F5D8; border-radius: 14px; }
.tldr-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: var(--highlight); box-shadow: 0 1px 4px rgba(20, 24, 30, .12); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.tldr p { margin: 0; font-size: 17.5px; line-height: 1.6; color: var(--ink); }
.tldr b { font-weight: 700; color: var(--ink); }
.links { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.links a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 18px; background: #F7F5D8; color: var(--ink); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.links a svg { width: 15px; height: 15px; }
.links a.soon { cursor: default; opacity: .55; }

/* ---------- section separation: alternating bands + numbered headings ---------- */
body { counter-reset: sec; }
section:not(#teaser) { padding: 72px 0 80px; }
section:not(#teaser) { background: var(--bg); position: relative; }
/* divider only as wide as the text column */
section:not(#teaser)::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: calc(min(var(--maxw), 100%) - 40px); height: 1px; background: rgba(20, 24, 30, .12); }
section:not(#teaser) .section-head { margin-bottom: 30px; }
section:not(#teaser) h2.sota-title { font-size: 30px; counter-increment: sec; }
section:not(#teaser) h2.sota-title::before {
  content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--highlight);
  padding-bottom: 8px; width: 44px; border-bottom: 2px solid var(--highlight);
}
.trajitem canvas, .rv-map { box-shadow: 0 1px 4px rgba(20, 24, 30, .12); }

/* Fig. 1(b) */
.insight-b { margin-top: 44px; }
#fig1b { width: 100%; height: auto; display: block; font-family: var(--face); }
#fig1b .f1b-grid { stroke: #E6E2D8; stroke-width: 1; }
#fig1b .f1b-axis { fill: none; stroke: #9A958A; stroke-width: 1; }
#fig1b .f1b-beyond { fill: rgba(20, 24, 30, .05); }
#fig1b .f1b-tick { font-size: 11px; fill: #14181E; }
#fig1b .f1b-sec { font-size: 10.5px; fill: #14181E; opacity: .6; }
#fig1b .f1b-lab { font-size: 12px; font-weight: 600; fill: #14181E; }
#fig1b .f1b-note { font-size: 11px; fill: #14181E; opacity: .55; }
#fig1b .f1b-pool { fill: none; stroke: #5b5f66; stroke-width: 1.8; stroke-dasharray: 5 4; }
#fig1b .f1b-poolT { font-size: 11.5px; font-weight: 600; fill: #5b5f66; }
#fig1b .f1b-k { fill: none; stroke-linejoin: round; stroke-linecap: round; }
#fig1b .f1b-legend text { font-size: 11.5px; fill: #14181E; }
#fig1b .f1b-cur line { stroke: var(--highlight); stroke-width: 1.2; stroke-dasharray: 3 3; }
#fig1b .f1b-cur .cp { fill: #fff; stroke: #5b5f66; stroke-width: 2; }
#fig1b .f1b-cur .cb { fill: #fff; stroke: #009E73; stroke-width: 2.4; }
#fig1b .f1b-read rect { fill: rgba(255, 255, 255, .92); stroke: #E3DED2; }
#fig1b .f1b-read text { font-size: 11.5px; fill: #14181E; font-variant-numeric: tabular-nums; }
#fig1b .f1b-read .r1 { font-weight: 700; fill: var(--highlight); }
#fig1b .f1b-read .r3 { fill: #007A5A; font-weight: 700; }
.insight-b-text p { font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0 0 14px; padding: 0 8px; }
.insight-b-text .mi { font-size: 1.08em; }

/* section 01: Fig. 1(a) and 1(b) side by side, each with its text underneath */
.insight-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.insight-pair .insight { grid-template-columns: 1fr; gap: 18px; align-items: start; }
.insight-pair .insight-b { margin-top: 0; }
.insight-pair .insight-text li, .insight-pair .insight-b-text p { font-size: 15px; line-height: 1.5; }
.insight-pair .insight-text { gap: 6px; }
.insight-pair .insight-b-text p { margin: 0 0 8px; }
section#insight { padding: 56px 0 60px; }
@media (max-width: 1000px) { .insight-pair { grid-template-columns: 1fr; gap: 32px; } }
/* while a row holds, frame every clip so the pause is obvious */
.stopbox { position: absolute; border: 4px solid #16A34A; border-radius: 10px; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .25s ease; }
.grow.at-stop .stopbox { opacity: 1; }

/* Bank Contents, second row: the other-episode clip and the frames its bank held */
.bankstrip { align-self: center; }
.bs-label { font-size: 14px; color: var(--ink); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.bs-label b { font-weight: 700; }
.bs-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bs-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 6px; box-shadow: 0 2px 8px rgba(20, 24, 30, .15); }

/* Revisit Consistency: hold at first visit / back again */
.rv-main { --stop-ms: 6500ms; }
.rv-main::after { content: ""; position: absolute; inset: 0; border: 4px solid #16A34A; opacity: 0; pointer-events: none; z-index: 2; transition: opacity .25s ease; }
.rv-item.at-stop .rv-main::after { opacity: 1; }
.rv-stopnote { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 6px); z-index: 4; opacity: 0; pointer-events: none;
  padding: 6px 16px 8px; border-radius: 8px; background: #fff; color: #0F7B3A; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 24, 30, .25); transition: opacity .25s ease, transform .25s ease; }
.rv-stopnote::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #16A34A; transform-origin: 0 50%; }
.rv-item.at-stop .rv-stopnote { opacity: 1; transform: translate(-50%, 0); }
.rv-item.at-stop .rv-stopnote::after { animation: stop-count var(--stop-ms) linear forwards; }
.rv-top1 span { white-space: nowrap; }

/* sections 2-4: round side arrows like the strip; the counter stays top-right */
.carousel, .rv { position: relative; }
.gnav { position: static; }
.gnav .count { position: relative; z-index: 1; }
.gnav button.side-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.72); color: var(--ink); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(20, 24, 30, 0.2);
}
.gnav button.side-arrow.prev { left: -8px; }
.gnav button.side-arrow.next { right: -8px; }
@media (max-width: 700px) { .gnav button.side-arrow { width: 34px; height: 34px; } }

/* sections 2-4: content sits inside the arrows, never under them */
.carousel .gallery-scroll, .rv .rv-stage { margin-left: 58px; margin-right: 58px; }
.gnav { padding-right: 58px; }
.gnav button.side-arrow.prev { left: 0; }
.gnav button.side-arrow.next { right: 0; }
@media (max-width: 700px) {
  .carousel .gallery-scroll, .rv .rv-stage { margin-left: 40px; margin-right: 40px; }
  .gnav { padding-right: 40px; }
}

/* every video and still: slightly rounded corners */
.gcell, .grow .rowlabel img, .trajitem canvas, .rv-main, .rv-main video, .rv-pair img, .bs-thumbs img, .rv-top1 img, .marquee .ttile, .marquee video { border-radius: 8px; }
.gcell { overflow: hidden; }
.rv-main { overflow: hidden; }
.rv-main::after { border-radius: 8px; }
