:root {
  --bg: #fbfaf7;
  --bg-band: #f2f0ea;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6168;
  --line: #dedbd2;
  --accent: #c8285f;          /* AirLeg pink, as in the paper figures */
  --accent-soft: #fbe4ec;
  --teal: #2f6f73;
  --teal-soft: #dcecec;
  --v: #2b5fa8;  --v-soft: #e1eaf7;
  --l: #8a5a12;  --l-soft: #f6ead3;
  --fail: #c62828;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.06);
  --radius: 12px;
  --e1: #c8285f; --e2: #2b5fa8; --e3: #00897b;   /* efficiency bar, validated (light) */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131416; --bg-band: #1a1c1f; --surface: #212327;
    --text: #e9e7e2; --muted: #a3a7ad; --line: #34373c;
    --accent: #ff6b9a; --accent-soft: #3d1f2a;
    --teal: #7cc2c5; --teal-soft: #1d3233;
    --v: #8db4ef; --v-soft: #1d2a3d; --l: #e0b56a; --l-soft: #362a17;
    --fail: #ff6b6b;
    --e1: #e0407a; --e2: #5a7fe0; --e3: #10a08a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131416; --bg-band: #1a1c1f; --surface: #212327;
  --text: #e9e7e2; --muted: #a3a7ad; --line: #34373c;
  --accent: #ff6b9a; --accent-soft: #3d1f2a;
  --teal: #7cc2c5; --teal-soft: #1d3233;
  --v: #8db4ef; --v-soft: #1d2a3d; --l: #e0b56a; --l-soft: #362a17;
  --fail: #ff6b6b;
  --e1: #e0407a; --e2: #5a7fe0; --e3: #10a08a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
sup { font-size: .68em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.wrap.narrow { width: min(760px, 100% - 32px); }
section { padding-block: clamp(40px, 6vw, 72px); }
.band { background: var(--bg-band); border-block: 1px solid var(--line); }
.lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.6em; max-width: none; }
.note, .table-note { color: var(--muted); font-size: .86rem; margin-top: 1.4em; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 88px) 12px; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--teal); margin-bottom: 1em; }
.hero h1 { font-size: clamp(1.6rem, 1rem + 2.2vw, 2.55rem); font-weight: 700; max-width: 1120px; margin: 0 auto .8em; }
.hero h1 .nw { white-space: nowrap; }
.author-break { flex-basis: 100%; height: 0; }
.brand { color: var(--accent); }
.author-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .15em 1.1em; font-size: 1.05rem; font-weight: 500; margin-bottom: .5em; }
.affil { display: flex; flex-wrap: wrap; justify-content: center; gap: .1em 1.2em; color: var(--muted); font-size: .9rem; }
[data-anon="true"] .named, [data-anon="false"] .anon { display: none; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1.6em; }
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .6em 1.1em; border-radius: 999px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn svg { width: 18px; height: 18px; }
.btn small { font-weight: 500; font-size: .72em; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.btn:hover { opacity: .88; }
.btn.disabled { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: default; }
.btn.disabled:hover { opacity: 1; }

/* ---------- figures ---------- */
.paper-fig { margin: 0 0 28px; }
.paper-fig img { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(6px, 1vw, 14px); width: 100%; }
.paper-fig figcaption { color: var(--muted); font-size: .9rem; margin-top: .8em; }
.paper-fig figcaption b { color: var(--text); }
.teaser { padding-top: 24px; padding-bottom: 24px; }

.stats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 14px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.stats b { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--accent); }
.stats b span { font-size: .55em; font-weight: 600; margin-left: .12em; color: var(--muted); }
.stats em { font-style: normal; color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; margin-top: .5em; }

/* Jetson card: the fourth, highlighted stat tile (style of the paper's Fig. 1) */
.stat-orin {
  --ob-leg: #5a8ee8; --ob-frame: #e84a82;     /* validated on the card surface */
  background: linear-gradient(160deg, #13343f 0%, #0f2a33 60%, #0c222a 100%) !important; border-color: #0f2a33 !important;
  color: #eef4f5; display: flex; flex-direction: column; gap: 9px; padding: 16px 18px 14px !important;
}
.orin-h { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .92rem; font-weight: 600; color: #8fd9cf; }
.orin-h svg { width: 16px; height: 16px; flex-shrink: 0; }
.orin-bars { display: grid; gap: 7px; }
.ob-row { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; align-items: baseline; }
.ob-l { font-size: .84rem; color: #a9bcc1; }
.ob-v { font-size: 1.35rem; font-weight: 700; line-height: 1; color: #fff; text-align: right; }
.ob-v small { font-size: .55em; font-weight: 600; color: #a9bcc1; margin-left: 2px; }
.ob-track { grid-column: 1 / -1; height: 9px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ob-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.ob-leg { background: var(--ob-leg); } .ob-frame { background: var(--ob-frame); }
.ob-axis { display: flex; justify-content: space-between; font: .66rem/1 var(--mono); color: #7f979d; border-top: 1px solid rgba(255,255,255,.12); padding-top: 5px; }
.orin-res { display: flex; gap: 18px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; font-size: .8rem; color: #a9bcc1; }
.orin-res b { font-size: 1.15rem; color: #fff; margin-right: 3px; }
.stats li { display: flex; flex-direction: column; }
.stats li:not(.stat-orin) { justify-content: center; }

/* ---------- Experiments chapter: numbered parts on one background ---------- */
#experiments, #method { padding-bottom: 0; }
#experiments + .part, #method + .part { padding-top: 14px; }
#experiments .chapter-head, #method .chapter-head { margin-bottom: 14px; }
#experiments .part-nav, #method .part-nav { margin-bottom: 26px; }
.part-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.part-nav a {
  display: inline-flex; align-items: center; gap: 9px; padding: .45em 1em .45em .5em; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 600; font-size: .95rem; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s;
}
.part-nav a:hover { border-color: var(--accent); }
.part-nav span, .part-no {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 999px;
  font: 700 .78rem/1 var(--mono); color: var(--accent); background: var(--accent-soft);
}
.part { padding-block: 36px 36px; }
.part + .chapter { padding-top: 44px; }
.part + .part { padding-top: 0; }
.part + .part > .wrap { padding-top: 40px; border-top: 1px solid var(--line); }
.part-h { display: flex; align-items: center; gap: 12px; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); margin: 0 0 .6em; }
.chapter-kicker { margin: 0 0 .4em; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.table-scroll.solo { border-top: 1px solid var(--line); border-radius: var(--radius); }
/* table switch: pills like the platform switch, with the number of sequences */
.result-block .tabs { display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 0; margin-bottom: 14px; }
.result-block .tabs .tab {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: .55em 1.1em; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font-size: 1rem; font-weight: 600;
  box-shadow: var(--shadow); transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.result-block .tabs .tab:hover { border-color: var(--muted); color: var(--text); transform: translateY(-1px); }
.result-block .tabs .tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(200, 40, 95, .3); }
.tab-count { min-width: 24px; padding: 0 7px; border-radius: 999px; font: 600 .76rem/22px var(--mono); text-align: center; background: var(--bg-band); color: var(--muted); }
.tab[aria-selected="true"] .tab-count { background: rgba(255,255,255,.22); color: #fff; }
.platform { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; margin: 8px 0 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.platform-img { position: relative; margin: 0; }
.platform-img img { width: 100%; height: auto; filter: drop-shadow(0 14px 24px rgba(0,0,0,.14)); }
.hot {
  position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .8rem/1 var(--mono); color: #fff; background: var(--accent); box-shadow: 0 0 0 4px rgba(200, 40, 95, .22);
}
.platform-spec h3 { font-size: 1.25rem; margin-bottom: .8em; }
.spec { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.spec li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.spec-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem/1 var(--mono); color: var(--accent); background: var(--accent-soft); }
.spec b { display: block; font-size: .98rem; }
.spec li span:not(.spec-no) { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.spec-chips span { font-size: .82rem; color: var(--muted); background: var(--bg-band); border: 1px solid var(--line); border-radius: 999px; padding: .3em .85em; }
.spec-chips b { color: var(--text); }
.scenes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.scene { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #0c1a20; aspect-ratio: 16 / 9; }
.scene video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px; display: flex; align-items: baseline; gap: 7px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff;
}
.scene figcaption b { font-size: .9rem; }
.scene figcaption span { font-size: .72rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- method ---------- */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 0; }
.stage {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.stage:hover { border-color: var(--muted); transform: translateY(-2px); box-shadow: var(--shadow); }
.stage[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow); transform: none; }
.stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stage:not(:last-child)::before {      /* arrow to the next stage */
  content: ""; position: absolute; right: -14px; top: 34px; width: 10px; height: 10px;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); opacity: .5;
}
.stage[aria-selected="true"]::after {   /* notch pointing at the panel */
  content: ""; position: absolute; left: 50%; bottom: -11px; width: 18px; height: 18px; margin-left: -9px;
  background: var(--accent-soft); border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg); border-bottom-right-radius: 3px;
}
.stage-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: .92rem; }
.stage[aria-selected="true"] .stage-no { background: var(--accent); color: #fff; }
.stage-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.stage-text { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.stage .tag { margin-top: auto; padding-top: 4px; font-size: .76rem; font-weight: 600; color: var(--teal); text-transform: uppercase; letter-spacing: .05em; }
.stage-panel {
  margin-top: 22px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  animation: panel-in .25s ease;
}
.stage-panel[hidden] { display: none; }
.stage-panel.wide { grid-template-columns: 1fr; }
.stage-panel.wide .sp-text { columns: 2; column-gap: 32px; }
.stage-panel.wide .sp-text h4, .stage-panel.wide .sp-facts { column-span: all; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sp-figs { display: grid; gap: 14px; }
.sp-figs .paper-fig { margin: 0; }
.sp-figs .paper-fig img { box-shadow: none; border: 1px solid var(--line); }
.sp-text h4 { font-size: 1.15rem; margin: 0 0 .6em; }
.sp-text p { color: var(--muted); font-size: .96rem; }
.sp-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-facts li { font-size: .84rem; color: var(--muted); background: var(--bg-band); border: 1px solid var(--line); border-radius: 999px; padding: .3em .85em; }
.sp-facts b { color: var(--text); }
h3.sub { font-size: 1.3rem; margin: 12px 0 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.two-col.eq { grid-template-columns: var(--c1, 1fr) var(--c2, 1fr); }
.bullets { padding-left: 1.1em; margin: 0 0 1em; }
.bullets li { margin-bottom: .8em; color: var(--muted); }
.bullets b { color: var(--text); }

/* ---------- GrandTour gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font: inherit; font-size: .88rem; font-weight: 500; padding: .42em .95em; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip:focus-visible, .tab:focus-visible, .seq:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: .05em .55em; border-radius: 6px; line-height: 1.6; vertical-align: .08em; }
.pill.v { background: var(--v-soft); color: var(--v); }
.pill.l { background: var(--l-soft); color: var(--l); }
.pill.n { background: var(--teal-soft); color: var(--teal); }

.seq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.seq {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.seq:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.seq[hidden] { display: none; }
.seq-imgs { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 7.1; background: var(--line); }
.seq-imgs img { width: 100%; height: 100%; object-fit: cover; }
.seq-imgs img:first-child { grid-row: span 2; }
.seq-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.seq-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.seq-name { font-weight: 700; font-size: 1.05rem; }
.seq-ate { font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.seq-ate b { color: var(--accent); font-weight: 600; }
.seq-scene { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.seq-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.seq-tags .gray-flag { margin-left: auto; font-size: .76rem; }

/* ---------- gray rows ---------- */
.gray-rows { display: grid; gap: 22px; }
.gray-row { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; }
.gray-row h3 { margin: 0; }
.gray-row .meta { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.gray-row .meta .pill { margin-top: .5em; }
.gray-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gray-imgs figure { margin: 0; cursor: zoom-in; }
.gray-imgs img { border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: #000; }
.gray-imgs figcaption { font-size: .8rem; color: var(--muted); margin-top: .45em; line-height: 1.4; }

/* ---------- results ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.tab {
  font: inherit; font-weight: 600; font-size: .92rem; background: none; border: 0; color: var(--muted);
  padding: .7em 1em; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
table.results { border-collapse: collapse; width: 100%; font-size: .98rem; line-height: 1.28; white-space: nowrap; }
.results th, .results td { padding: .2em .7em; text-align: center; }
.results thead th { font-weight: 600; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.results thead .len { display: block; font-weight: 400; color: var(--muted); font-size: .84rem; }
.results thead .pill { margin-top: .3em; }
.results th:first-child, .results td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.results td { font-family: var(--mono); font-size: .95rem; }
.results td:first-child { font-family: inherit; font-size: 1rem; }
.results td.avg, .results th.avg { border-left: 1px solid var(--line); }
.results th.avg { font-weight: 600; }
.results tr.group td { text-align: left; font-family: inherit; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); padding-top: .45em; padding-bottom: .1em; border-top: 1px solid var(--line); }
.results tr.ours td { background: var(--accent-soft); }
.results tr.ours td:first-child { font-weight: 700; color: var(--accent); }
.results .best { font-weight: 700; }
.results .second { text-decoration: underline; text-underline-offset: 3px; }
.results .fail { color: var(--fail); font-weight: 700; }
.results .na { color: var(--muted); }
.results .sens { display: inline-flex; gap: 3px; margin-left: .5em; vertical-align: 1px; }
.results .sens i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block; }
.results .sens i.on { background: var(--teal); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .86rem; color: var(--muted); margin-top: 12px; }
.legend .best-chip { font-family: var(--mono); color: var(--text); }
.legend .second-chip { font-family: var(--mono); color: var(--text); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.legend .fail { color: var(--fail); }

/* ---------- runtime ---------- */
.runtime { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.runtime dl { margin: 0 0 1em; }
.runtime dl div { display: flex; justify-content: space-between; gap: 12px; padding: .5em 0; border-bottom: 1px solid var(--line); }
.runtime dt { color: var(--muted); }
.runtime dd { margin: 0; font-family: var(--mono); font-weight: 500; text-align: right; }
.runtime p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- bibtex / footer ---------- */
.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.code pre { margin: 0; padding: 18px 96px 18px 20px; font: .88rem/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.copy { position: absolute; top: 10px; right: 10px; font: inherit; font-size: .8rem; padding: .3em .8em; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.ack-h { margin-top: 1.6em; }
.ack { color: var(--muted); font-size: .92rem; }
.footer { padding: 28px 0 40px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); text-align: center; }

/* ---------- abstract (between the title and the videos, full content width) ---------- */
.abstract { padding-top: 28px; padding-bottom: 4px; }
.abstract p { text-align: justify; hyphens: auto; }


/* ---------- videos (cover row above the player) ---------- */
.videos { padding-top: 28px; padding-bottom: 8px; }
.chapter-head { text-align: center; margin-bottom: 24px; }
.chapter-head h2 { margin-bottom: .3em; }
.chapter-head p { color: var(--muted); margin: 0; }
.vid-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0 auto 24px; }
.vid-tabs[hidden] { display: none; }
.vid-tabs .vgroup {
  display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 8px 24px 8px 9px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface) !important; box-shadow: var(--shadow);
  font-size: 1.12rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.vid-tabs .vgroup:hover { border-color: var(--muted); color: var(--text); transform: translateY(-1px); }
.vid-tabs .vgroup[aria-pressed="true"] { background: var(--accent) !important; border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(200, 40, 95, .35); }
.vg-thumbs { display: inline-flex; }
.vg-thumbs img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface);
  filter: grayscale(.7); opacity: .85; transition: filter .2s, opacity .2s, margin .2s;
}
.vg-thumbs img + img { margin-left: -14px; }
.vgroup:hover .vg-thumbs img, .vgroup[aria-pressed="true"] .vg-thumbs img { filter: none; opacity: 1; }
.vgroup:hover .vg-thumbs img + img { margin-left: -9px; }
.vgroup[aria-pressed="true"] .vg-thumbs img { border-color: var(--accent); }
.vg-count {
  min-width: 24px; padding: 0 7px; border-radius: 999px; font: 600 .76rem/22px var(--mono); text-align: center;
  background: var(--bg-band); color: var(--muted);
}
.vgroup[aria-pressed="true"] .vg-count { background: rgba(255,255,255,.22); color: #fff; }
.vid-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.vid-row[hidden] { display: none; }
.vid-card {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; cursor: pointer; text-align: left;
  padding-bottom: 12px; border-bottom: 2px solid var(--line); transition: border-color .25s;
}
.vid-preview {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px;
  background: var(--line); border: 1px solid transparent; transition: box-shadow .25s, border-color .25s;
}
.vid-preview::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; pointer-events: none; transition: border-color .25s; }
.vid-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .3s, transform .45s ease; }
.vid-cap { display: flex; align-items: flex-start; gap: 9px; margin-top: 11px; }
.vid-copy { display: block; min-width: 0; }
.vid-name { display: block; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.vid-meta { display: block; margin-top: 3px; font: .68rem/1.4 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-sel { display: none !important; }
.vid-sel-unused {
  flex-shrink: 0; width: 24px; height: 24px; margin-left: auto; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); transition: color .2s, background .2s, border-color .2s;
}
.vid-sel svg { width: 11px; height: 11px; margin-left: 1px; }
.vid-card:hover .vid-preview img, .vid-card[aria-pressed="true"] .vid-preview img { opacity: 1; }
.vid-card[aria-pressed="true"] { border-bottom-color: var(--accent); }
.vid-card[aria-pressed="true"] .vid-preview { box-shadow: var(--shadow); }
.vid-card[aria-pressed="true"] .vid-preview::after { border-color: var(--accent); }
.vid-card[aria-pressed="true"] .vid-sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.vid-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (hover: hover) {
  .vid-card:hover .vid-preview img { transform: scale(1.03); }
  .vid-card:hover .vid-sel { border-color: var(--muted); color: var(--text); }
}
.vid-play {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%;
  background: rgba(10, 14, 18, .5); border: 1.5px solid rgba(255,255,255,.85); backdrop-filter: blur(2px);
  transition: transform .2s, background .2s, opacity .2s; pointer-events: none;
}
.vid-play::after { content: ""; position: absolute; left: 15px; top: 11px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.vid-card:hover .vid-play { transform: scale(1.12); background: var(--accent); border-color: var(--accent); }
.vid-card[aria-pressed="true"] .vid-play { background: var(--accent); border-color: #fff; }
.videos.is-playing .vid-card[aria-pressed="true"] .vid-play { animation: vid-pulse 1.6s ease-out infinite; }
@keyframes vid-pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 40, 95, .55); } 100% { box-shadow: 0 0 0 14px rgba(200, 40, 95, 0); } }
.player-box { position: relative; }
.player-play {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 84px; height: 84px; margin: -42px 0 0 -42px; padding: 0;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.9); background: rgba(200, 40, 95, .88); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .2s, opacity .2s;
}
.player-play svg { width: 36px; height: 36px; margin-left: 5px; }
.player-play:hover { transform: scale(1.08); }
.player-play[hidden] { display: none; }
.player { margin: 0; }
.player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #071418; border-radius: var(--radius); box-shadow: var(--shadow); }
.player figcaption { color: var(--muted); font-size: .9rem; margin-top: .8em; }
.player figcaption b { color: var(--text); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,12,.82); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lb-panel { background: var(--surface); color: var(--text); border-radius: var(--radius); width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px 20px; }
.lb-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.lb-head h3 { font-size: 1.25rem; margin: 0; }
.lb-head p { color: var(--muted); font-size: .9rem; margin: .2em 0 0; }
.lb-close { font-size: 1.8rem; line-height: 1; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px; }
.lb-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.lb-switch[hidden] { display: none; }
.lb-main { position: relative; margin: 14px 0 0; }
.lb-main img { width: 100%; max-height: 64vh; object-fit: contain; background: #000; border-radius: 8px; }
.lb-main figcaption { color: var(--muted); font-size: .9rem; margin-top: .6em; }
.lb-nav { position: absolute; top: calc(50% - 1.2em); width: 40px; height: 56px; border: 0; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 2rem; cursor: pointer; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.lb-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.lb-thumbs button { all: unset; cursor: pointer; flex: 1; max-width: 160px; border-radius: 6px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; }
.lb-thumbs button[aria-current="true"] { outline-color: var(--accent); }
.lb-thumbs img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero h1 .br-wide { display: none; }
  .platform { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .scenes { grid-template-columns: repeat(3, 1fr); }
  .vid-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 30%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .vid-card { scroll-snap-align: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stages, .two-col, .two-col.eq { grid-template-columns: 1fr; }
  .stage:not(:last-child)::before { display: none; }
  .stage-panel { grid-template-columns: 1fr; }
  .stage-panel.wide .sp-text { columns: 1; }
  .gray-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 15px; }
  .scenes { grid-template-columns: repeat(2, 1fr); }
  .vid-tabs .vgroup { padding: 6px 12px 6px 6px; gap: 7px; font-size: .9rem; }
  .vg-thumbs img + img { display: none; }
  .stats { grid-template-columns: 1fr; }
  .seq-grid { grid-template-columns: 1fr; }
  .gray-imgs { grid-template-columns: 1fr 1fr; }
  .lb-panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .videos.is-playing .vid-card[aria-pressed="true"] .vid-play { animation: none; }
  html { scroll-behavior: auto; }
  .seq { transition: none; }
}
