/* ==========================================================================
   PEACH project page
   ========================================================================== */
/* Self-hosted fonts (SIL Open Font License, see static/fonts/*.LICENSE.txt) */
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #1f2430;
  --ink-2: #4a5160;
  --ink-3: #7a8190;
  --line: #e7e2dc;
  --bg: #fffdfb;
  --bg-tint: #fff5ee;
  --card: #ffffff;
  --peach: #f4845f;
  --peach-deep: #d9603c;
  --peach-soft: #ffe3d3;
  --red: #d62728;

  /* method colors, as in the paper figures (matplotlib tab10) */
  --m-peach: #1f77b4;
  --m-pstnet: #e377c2;
  --m-gnn: #8c564b;
  --m-tto: #bcbd22;
  --m-mango: #17becf;
  --m-oracle: #2ca02c;
  --m-oracle_mgn: #9467bd;
  --m-nocontext: #7f7f7f;
  --m-nocontext_mgn: #ff7f0e;
  --m-peach_noaug: #9467bd;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(40 20 10 / 0.05), 0 6px 22px -8px rgb(120 60 30 / 0.16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video, canvas { max-width: 100%; display: block; }
a { color: var(--peach-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
b { font-weight: 600; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0 0 0.9em; }
.red { color: var(--red); font-weight: 500; }
.c-peach { color: var(--m-peach); font-weight: 600; }
.c-pstnet { color: #c4509f; font-weight: 600; }
.c-nocontext { color: #6b6b6b; font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }
.math { font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-style: italic; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }
.center { text-align: center; }

/* ---------------------------------------------------------------- nav */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 253 251 / 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 52px; display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  color: var(--ink); text-decoration: none; letter-spacing: 0.04em;
}
.navlinks { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.navlinks a:hover { color: var(--peach-deep); }

/* ---------------------------------------------------------------- hero */
.hero {
  padding: 56px 0 36px;
  background:
    radial-gradient(900px 420px at 50% -120px, #ffe0cc 0%, rgb(255 224 204 / 0) 70%),
    radial-gradient(500px 300px at 90% 10%, rgb(255 190 160 / 0.35), transparent 70%),
    var(--bg);
}
.venue {
  display: inline-block; margin: 0 0 14px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--peach-soft); color: var(--peach-deep);
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em;
}
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.8rem, 12vw, 7rem); letter-spacing: 0.04em; line-height: 1;
  background: linear-gradient(135deg, #ffb07c 0%, #f4845f 40%, #d9534f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.acronym { margin: 10px 0 18px; color: var(--ink-3); font-size: 0.95rem; letter-spacing: 0.02em; }
.acronym b { color: var(--peach-deep); }
.paper-title {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.45rem, 3.3vw, 2.15rem); line-height: 1.25; margin: 0 auto 22px; max-width: 780px;
}
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0 0 8px; font-size: 1.02rem; }
.authors sup, .affiliations sup { color: var(--peach-deep); font-weight: 600; margin-left: 1px; }
.affiliations { color: var(--ink-2); font-size: 0.9rem; }
.affiliations span { margin: 0 8px; white-space: nowrap; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 14px -6px rgb(31 36 48 / 0.5);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--peach-deep); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--peach-soft); color: var(--ink); }
.btn-disabled { background: #b9b5b1; cursor: not-allowed; box-shadow: none; }
.btn-disabled:hover { background: #b9b5b1; transform: none; }
.soon {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgb(255 255 255 / 0.25); padding: 2px 7px; border-radius: 999px;
}

.reel-wrap { margin-top: 40px; }
.reel { display: grid; grid-template-columns: 0.78fr 2.18fr 1.62fr; gap: 12px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.reel figure {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.reel video { width: 100%; height: 230px; object-fit: contain; background: #fff; flex: none; }
.reel figcaption {
  font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2);
  padding: 6px 10px; border-top: 1px solid var(--line); text-align: center;
}
.reel-caption { color: var(--ink-3); font-size: 0.88rem; text-align: center; margin-top: 12px; }
.swatch-inline { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 5px; vertical-align: 0; }

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; }
.section.tinted { background: var(--bg-tint); border-top: 1px solid #f7e6da; border-bottom: 1px solid #f7e6da; }
.section-title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 14px; text-align: center;
}
.lead { max-width: 780px; margin: 0 auto 32px; text-align: center; color: var(--ink-2); font-size: 1.06rem; }
.abstract { text-align: justify; hyphens: auto; color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; color: var(--peach-deep); margin-bottom: 6px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.figure { margin: 36px 0 0; }
.figure img { width: 100%; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); padding: 14px; }
.figure figcaption, .figure-flat figcaption, .flipbook figcaption { color: var(--ink-2); font-size: 0.92rem; margin-top: 12px; line-height: 1.55; }

/* ---------------------------------------------------------------- tl;dr */
.tldr { max-width: 860px; margin: 0 auto 30px; text-align: center; }
.tldr-text { font-size: 1.2rem; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
  box-shadow: var(--shadow); text-align: center;
}
.stat-num { font-family: var(--display); font-weight: 700; font-size: 2.3rem; color: var(--peach-deep); line-height: 1.1; }
.stat-num span { font-size: 1.4rem; }
.stat-label { font-size: 0.9rem; font-weight: 500; margin-top: 4px; line-height: 1.35; }
.stat-label small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 3px; }

/* ---------------------------------------------------------------- method */
.steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr 0.8fr 1.5fr; gap: 14px; counter-reset: s; }
.step-img {
  height: 140px; margin: -22px -18px 14px; padding: 6px 8px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.step-img img { width: 100%; height: 100%; object-fit: contain; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px 16px; box-shadow: var(--shadow);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; right: -12px; top: 34px; width: 10px; height: 10px;
  border-top: 2px solid var(--peach); border-right: 2px solid var(--peach); transform: rotate(45deg);
}
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--peach-soft); color: var(--peach-deep); font-weight: 700; font-size: 0.95rem; margin-bottom: 8px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

.explainer { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: center; margin-bottom: 18px; }
.explainer-text p { color: var(--ink-2); font-size: 0.97rem; }
.explainer-text p.muted { color: var(--ink-3); font-size: 0.86rem; }
.explainer-canvas { position: relative; }
.explainer-canvas canvas { width: 100%; height: auto; border-radius: var(--radius-sm); background: #fffaf6; border: 1px solid var(--line); }
.tau3d {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f6efe9 100%); border: 1px solid var(--line); touch-action: none;
}
.tau3d canvas { display: block; }
.tau3d-legend {
  position: absolute; left: 10px; top: 10px; z-index: 3; font-size: 0.78rem; color: var(--ink-2);
  background: rgb(255 255 255 / 0.85); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; pointer-events: none;
}
.tau3d-legend .ring { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #1f2430; background: #9aa0aa; }
.tau3d-labels { position: absolute; inset: 0; pointer-events: none; }
.axis-label {
  font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
  background: rgb(255 255 255 / 0.85); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line);
}
.axis-label .sub { font-weight: 400; color: var(--ink-3); }
.axis-label.x { border-color: #e7a6a6; }
.axis-label.y { border-color: #a6d4a6; }
.axis-label.z { border-color: #a6bde7; }
.tick-label { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.tau3d-controls { margin-top: 8px; }
.axis-note { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-3); margin-top: 6px; font-family: var(--mono); }
.slider-label { display: block; font-weight: 600; margin: 10px 0 4px; }
.slider-label output { font-family: var(--mono); color: var(--peach-deep); }
.hint { min-height: 3em; font-size: 0.9rem; color: var(--ink); background: var(--bg-tint); border-left: 3px solid var(--peach); padding: 8px 12px; border-radius: 0 8px 8px 0; margin-top: 10px; }
.card-img {
  height: 140px; margin: -24px -24px 16px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.aux .card p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.tag { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--peach-soft); color: var(--peach-deep); padding: 2px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
.note { text-align: center; color: var(--ink-3); font-size: 0.9rem; margin-top: 18px; }

/* ---------------------------------------------------------------- range inputs */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--peach) var(--fill, 0%), #ecdcd0 var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #ecdcd0; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--peach); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--peach-deep); box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--peach-deep); }
input[type="range"]:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- controls */
.player { margin-top: 36px; }
.player-head { margin-bottom: 14px; }
.player-head p { margin: 0; font-size: 0.93rem; }
.controls-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #f6eee8; padding: 3px; border-radius: 11px; }
.seg button {
  font: inherit; font-size: 0.9rem; font-weight: 500; border: 0; background: transparent; color: var(--ink-2);
  padding: 7px 13px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.seg.small button { font-size: 0.82rem; padding: 5px 10px; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(60 30 10 / 0.15); font-weight: 600; }
.seg button:focus-visible, .chip:focus-visible, .text-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 16px; }
.chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-group-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; margin-right: 2px; }
.chip {
  font: inherit; font-size: 0.84rem; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
}
.chip .swatch { width: 11px; height: 11px; }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: #fff; font-weight: 600; }
.chip[aria-pressed="false"] .swatch { opacity: 0.35; }
.chip:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: none; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.video-grid.n1 { grid-template-columns: 1fr; }
.video-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.vcell { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; position: relative; }
.vcell video { width: 100%; aspect-ratio: var(--ar, 16/9); object-fit: contain; background: #fff; }
.vcell .vlabel {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px; font-size: 0.85rem; font-weight: 600;
  border-top: 1px solid var(--line); background: #fffcfa;
}
.vcell .vlabel small { font-weight: 400; color: var(--ink-3); margin-left: auto; font-size: 0.75rem; }
.vcell.is-ours { border-color: var(--m-peach); box-shadow: 0 0 0 1px var(--m-peach) inset; }

.transport { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.transport input[type="range"] { flex: 1; min-width: 140px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--peach-deep); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .i-play { display: none; }
.icon-btn.paused .i-play { display: block; }
.icon-btn.paused .i-pause { display: none; }
.frame-label { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); min-width: 104px; }
.text-btn { font: inherit; font-size: 0.88rem; border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.text-btn:hover { border-color: var(--peach); color: var(--ink); }

/* ---------------------------------------------------------------- charts */
.chart-card { margin-top: 22px; }
.callout { background: var(--bg-tint); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.94rem; margin: 4px 0 12px; }
.plot { position: relative; width: 100%; }
.plot svg { width: 100%; height: auto; display: block; overflow: visible; }
.plot text { font-family: var(--font); fill: var(--ink-2); }
.plot .tick-label { font-size: 12px; fill: var(--ink-3); }
.plot .axis-title { font-size: 12px; fill: var(--ink-3); }
.plot .grid line { stroke: #efe8e2; }
.plot .row-label { font-size: 13px; fill: var(--ink); }
.plot .group-label { font-size: 11px; fill: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.plot .val-label { font-size: 12px; fill: var(--ink-2); font-family: var(--mono); }
.plot .bar { transition: opacity .15s; }
.plot .row:hover .bar { opacity: 0.85; }
.plot .row .hit { fill: transparent; }
.plot .row:hover .hit { fill: rgb(244 132 95 / 0.07); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 8px 11px; font-size: 0.82rem; line-height: 1.45; min-width: 150px;
  opacity: 0; transition: opacity .1s; white-space: nowrap;
}
.tooltip.show { opacity: 1; }
.tooltip .tt-title { font-weight: 600; margin-bottom: 3px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 7px; }
.tooltip .tt-row .v { margin-left: auto; font-family: var(--mono); padding-left: 12px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.data th, table.data td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data td.num { font-family: var(--mono); text-align: right; }

.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.legend .chip { font-size: 0.82rem; }

.findings { margin-top: 22px; }
.runtime-plot { margin-top: 14px; max-width: 420px; }
.rsa-card { margin-top: 26px; }
.rsa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rsa-panel { margin: 0; }
.rsa-panel h4 { font-size: 0.92rem; margin: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.rsa-panel .rsa-stat { font-size: 0.8rem; color: var(--ink-3); font-family: var(--mono); }
.rsa-panel .axis-title { font-size: 10.5px; }
.rsa-panel .tick-label { font-size: 10px; }
.rsa-panel svg { width: 100%; height: auto; display: block; margin-top: 4px; overflow: visible; }
@media (max-width: 800px) { .rsa-grid { grid-template-columns: 1fr 1fr; } }
.finding { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 18px 20px; }
.finding h4 { font-size: 1rem; margin-bottom: 6px; }
.finding p { margin: 0; color: var(--ink-2); font-size: 0.93rem; }

/* ---------------------------------------------------------------- real world */
.rw-grid { display: grid; grid-template-columns: 0.62fr 1.38fr; gap: 18px; align-items: start; }
.flipbook { margin: 0; padding: 14px; }
.flip-frames { position: relative; aspect-ratio: 478 / 616; border-radius: var(--radius-sm); overflow: hidden; background: #eee; }
.flip-frames video { width: 100%; height: 100%; object-fit: cover; display: block; }
.figure-flat { margin: 0; padding: 14px; }
.figure-flat img { width: 100%; }
.rw-side { display: grid; gap: 18px; }
.spec-tables { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
table.mini { border-collapse: collapse; width: 100%; font-size: 0.86rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
table.mini caption { text-align: left; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding-bottom: 6px; }
table.mini th, table.mini td { padding: 6px 10px; border-bottom: 1px solid #f1ebe6; text-align: left; }
table.mini thead th { background: #fbf6f2; font-weight: 600; font-size: 0.8rem; color: var(--ink-2); }
table.mini tr:last-child td, table.mini tr:last-child th { border-bottom: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

.viewer-card { margin-top: 22px; }
.placeholder-banner {
  display: flex; gap: 10px; align-items: flex-start; background: #fff7e0; border: 1px solid #f3dc9b; color: #6d5410;
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 0.88rem; margin-bottom: 14px;
}
.placeholder-banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #c99a15; }
.viewports { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.viewport {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f3eee9 100%); border: 1px solid var(--line);
  touch-action: none;
}
.viewport canvas { width: 100% !important; height: 100% !important; display: block; }
.vp-label {
  position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 7px;
  background: rgb(255 255 255 / 0.9); padding: 4px 10px; border-radius: 999px; font-size: 0.84rem; font-weight: 600;
  border: 1px solid var(--line); pointer-events: none;
}
.vp-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 0.9rem; pointer-events: none; }
.vp-status:empty { display: none; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; font-size: 0.9rem; }
.toggles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toggles input { accent-color: var(--peach-deep); width: 16px; height: 16px; }
.toggles .text-btn { margin-left: auto; }

/* ---------------------------------------------------------------- latent */
.latent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.latent-grid > *, .rw-grid > *, .explainer > *, .grid-2 > *, .rw-side > * { min-width: 0; }
.scroll-x { overflow-x: auto; }
.latent-fig img { width: 100%; margin: 12px 0 8px; }
.latent-text p { color: var(--ink-2); }
.checks { padding-left: 1.1em; color: var(--ink-2); }
.checks li { margin-bottom: 8px; }
.stats-table td { font-family: var(--mono); text-align: center; }
.stats-table thead th { text-align: center; }

/* ---------------------------------------------------------------- bibtex / footer */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0; background: #2a2622; color: #f8ebe0; border-radius: var(--radius); padding: 22px;
  overflow-x: auto; font-family: var(--mono); font-size: 0.84rem; line-height: 1.6;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px; font: inherit; font-size: 0.8rem; font-weight: 600;
  background: var(--peach); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.copy-btn:hover { background: var(--peach-deep); }
.footer { padding: 40px 0 50px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.92rem; }
.footer p { margin: 0 0 6px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step-img { height: 130px; }
  .step:nth-child(2)::after { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .explainer, .latent-grid, .rw-grid { grid-template-columns: 1fr; }
  .flipbook { max-width: 420px; margin: 0 auto; }
  .reel video { height: 180px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }
  .card { padding: 16px; }
  .card-img { margin: -16px -16px 14px; height: 110px; }
  .navlinks { gap: 14px; }
  .steps, .grid-2, .viewports, .spec-tables { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .video-grid, .video-grid.n2 { grid-template-columns: 1fr 1fr; }
  .video-grid.n1 { grid-template-columns: 1fr; }
  .reel { grid-template-columns: 0.8fr 1.6fr; }
  .reel .r-tr { grid-column: span 2; }
  .reel video { height: 130px; }
  .reel .r-tr video { height: 200px; }
  .reel figcaption { font-size: 0.68rem; padding: 5px 4px; }
  .affiliations span { display: block; }
  .tldr-text { font-size: 1.05rem; }
  .stat-num { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
