/* SCENARIO project page ---------------------------------------------------- */
:root {
  --ink: #070b14;
  --ink-2: #0e1626;
  --paper: #f6f5f1;
  --paper-2: #eceae3;
  --card: #ffffff;
  --text: #121826;
  --text-2: #4a5468;
  --muted: #7b8496;
  --line: rgba(18, 24, 38, 0.10);
  --scan: #5eead4;
  --scan-d: #0f9f8c;
  --env: #ff7a45;
  --obj: #ffc44b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 16, 30, 0.05), 0 12px 32px -12px rgba(10, 16, 30, 0.16);
  --f-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --w: 1120px;
  --w-narrow: 820px;
  --sec-pad: 64px;
  --gap: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(64px * var(--page-zoom, 1)); }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 28px;
  color: #e8edf6;
  font-family: var(--f-display);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .1em; text-decoration: none; }
.nav-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--scan); box-shadow: 0 0 0 4px rgba(94, 234, 212, .18); }
.nav-links { display: flex; gap: 4px; }
.nav-toggle { display: none; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 14px; border-radius: 99px; opacity: .75; transition: opacity .2s, background .2s; }
.nav-links a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.nav-links a.active { opacity: 1; color: var(--scan); background: rgba(94, 234, 212, .12); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 100vh; min-height: calc(100svh / var(--page-zoom, 1));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--ink);
  color: #eef2f8;
  padding: 100px 20px;
}
.wall { position: absolute; inset: 0; pointer-events: none; }
.wall canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: saturate(1.2) contrast(1.04); }
.wall-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 50%, rgba(7, 11, 20, .30) 0%, rgba(7, 11, 20, .06) 65%, rgba(7, 11, 20, .22) 100%),
    linear-gradient(180deg, rgba(7, 11, 20, .45) 0%, rgba(7, 11, 20, 0) 14%, rgba(7, 11, 20, 0) 78%, var(--ink) 100%);
}
.hero-card {
  position: relative; z-index: 2;
  width: min(740px, 100%);
  padding: 52px 40px 44px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(14, 22, 38, .55), rgba(7, 11, 20, .64));
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.hero-card::before { /* viewfinder corners */
  content: ""; position: absolute; inset: 14px; pointer-events: none;
  --cl: linear-gradient(var(--scan), var(--scan));
  background:
    var(--cl) top left / 20px 1.5px no-repeat, var(--cl) top left / 1.5px 20px no-repeat,
    var(--cl) top right / 20px 1.5px no-repeat, var(--cl) top right / 1.5px 20px no-repeat,
    var(--cl) bottom left / 20px 1.5px no-repeat, var(--cl) bottom left / 1.5px 20px no-repeat,
    var(--cl) bottom right / 20px 1.5px no-repeat, var(--cl) bottom right / 1.5px 20px no-repeat;
  opacity: .55;
}
.title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 88px);
  line-height: 1;
  letter-spacing: .06em;
  padding-left: .06em; /* optically centre the tracked word */
  background: linear-gradient(100deg, #ffffff 30%, var(--scan) 50%, #ffffff 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.acronym { margin: 14px 0 0; font-family: var(--f-display); font-size: 15px; letter-spacing: .02em; color: rgba(226, 232, 240, .55); }
.acronym b { color: var(--scan); font-weight: 700; }
.subtitle { margin: 20px auto 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(19px, 2.3vw, 25px); line-height: 1.3; color: #f1f5fb; }
.tagline { margin: 14px auto 0; font-family: var(--f-display); font-weight: 600; font-size: 16.5px; letter-spacing: .01em; color: var(--scan); text-wrap: balance; }
.authors { margin: 26px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; font-size: 16.5px; font-weight: 500; max-width: 580px; }
.authors sup, .affil sup { font-size: .65em; color: var(--scan); margin-left: 1px; }
.affil { margin: 12px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 15px; color: rgba(226, 232, 240, .65); }
.links { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 16px; border-radius: 99px;
  font-family: var(--f-display); font-size: 15px; font-weight: 600; text-decoration: none;
  color: #eef2f8; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.btn svg { width: 17px; height: 17px; }
.btn .hf { font-size: 16px; line-height: 1; }
.scroll-cue { position: absolute; left: 50%; bottom: 32px; z-index: 2; transform: translateX(-50%); width: 24px; height: 38px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .35); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--scan); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-2px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------------------------------------------------------------- sections */
.sec { padding: var(--sec-pad) 24px; }
.sec-tint { background: var(--paper-2); }
.sec-dark { background: var(--ink); color: #e8edf6; }
.wrap { width: min(var(--w), 100%); margin: 0 auto; }
.wrap.narrow { width: min(var(--w-narrow), 100%); }
.sec-head { max-width: var(--w); margin: 0 auto 28px; text-align: center; }
h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 4vw, 42px); line-height: 1.15; letter-spacing: -.01em; }
h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1.3; }
.lede { margin: 10px auto 0; max-width: var(--w); font-size: 17px; color: var(--text-2); }
.sec-dark .lede { color: rgba(226, 232, 240, .65); }
.sec-dark .lede b { color: #e8edf6; font-weight: 600; }
#lens-sec .lede { max-width: none; font-size: 16.5px; line-height: 1.65; }
/* centred copy: one line where it fits, otherwise lines of even length */
.lede, .bench-head p, .step p, .stats span, .bench-ctrl label { text-wrap: balance; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* shared pill controls */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 99px; font-family: var(--f-display); font-size: 14px; font-weight: 600; color: rgba(226, 232, 240, .7); transition: background .2s, color .2s; white-space: nowrap; }
.seg button:hover { color: #fff; }
.seg button.active { background: var(--scan); color: #04201c; }
.icon-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); display: grid; place-items: center; font-size: 17px; }
.icon-btn .i-pause { width: 10px; height: 12px; border-left: 3px solid #e8edf6; border-right: 3px solid #e8edf6; }
.icon-btn.paused .i-pause { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #e8edf6; margin-left: 3px; }
.icon-btn.light { border-color: var(--line); background: var(--paper); color: var(--text-2); }
.icon-btn.light:hover { color: var(--scan-d); border-color: var(--scan-d); }

/* ---------------------------------------------------------------- lens */
.lens {
  /* as large as possible while canvas + control bar + legend still fill exactly one screen below the nav */
  width: min(100%, calc((100vh / var(--page-zoom, 1) - 200px) * 16 / 9)); min-width: min(100%, 560px); margin: 0 auto;
  border-radius: 20px; overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
}
.lens-stage { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.lens-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: ew-resize; }
.lens-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s; background: rgba(7, 11, 20, .35); }
.lens-loading.on { opacity: 1; }
.lens-loading span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(94, 234, 212, .25); border-top-color: var(--scan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lens-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .07);
}
.lens-left { display: flex; align-items: center; gap: 10px; }
.phase { justify-self: end; font-family: var(--f-display); font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .12); color: rgba(226, 232, 240, .7); white-space: nowrap; }
.phase[data-state="env"] { color: var(--env); border-color: rgba(255, 122, 69, .45); background: rgba(255, 122, 69, .08); }
.phase[data-state="obj"] { color: var(--obj); border-color: rgba(255, 196, 75, .5); background: rgba(255, 196, 75, .08); }

.legend { margin: 24px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; }
.lg { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; color: rgba(226, 232, 240, .75); }
.lg i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }

.cases { margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.case {
  padding: 9px 20px; border-radius: 99px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(232, 237, 246, .8); font-family: var(--f-display); font-size: 15px; font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}
.case:hover { border-color: rgba(94, 234, 212, .45); color: #fff; }
.case.active { border-color: var(--scan); background: rgba(94, 234, 212, .10); color: var(--scan); }

/* ---------------------------------------------------------------- abstract */
.abstract { font-size: 17px; line-height: 1.75; color: var(--text-2); text-align: justify; hyphens: auto; }
.abstract p { margin: 0 0 18px; }
.abstract p:last-child { margin: 0; }
.abstract b { color: var(--text); }

/* ---------------------------------------------------------------- method */
.fig { padding: 20px; margin: 0; }
.fig img { width: 100%; border-radius: 8px; }
.steps { margin-top: var(--gap); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.step { padding: 28px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-align: center; }
.step-i { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--scan-d); color: var(--scan-d); font-family: var(--f-display); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.step p { margin: 8px 0 0; font-size: 15px; color: var(--text-2); line-height: 1.55; }

/* ---------------------------------------------------------------- data */
.stats {
  list-style: none; margin: 0 auto 22px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.stats li {
  padding: 18px 20px; border-radius: var(--radius); text-align: center;
  background: var(--card); border: 1px solid var(--line);
}
.stats b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 4px; font-size: 14px; color: var(--text-2); }

.group-card { margin: 0; padding: 18px 20px 16px; }
.group-grid { display: grid; grid-template-columns: 92px repeat(5, 1fr); gap: 8px; align-items: center; }
.gg-head { font-family: var(--f-display); font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-align: center; padding-bottom: 2px; }
.gg-head.lo { text-align: left; }
.gg-head.lo::before { content: "← "; }
.gg-head.hi { text-align: right; }
.gg-head.hi::after { content: " →"; }
.gg-head.base { color: var(--scan-d); }
.gg-row { display: flex; flex-direction: column; gap: 1px; font-family: var(--f-display); font-size: 14px; font-weight: 600; color: var(--text); }
.gg-row i { font-family: Georgia, "Times New Roman", serif; font-size: 17px; color: var(--scan-d); }
.gg-unit { display: none; font-size: 12px; font-weight: 500; color: var(--muted); }
.gg-cell { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--ink); }
.gg-cell video { width: 100%; height: 100%; object-fit: cover; }
.gg-cell.base { box-shadow: 0 0 0 2px var(--scan-d); }
.gg-tag {
  position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 99px;
  background: rgba(7, 11, 20, .66); color: #f1f5fb;
  font: 600 12px/1.5 var(--f-mono); white-space: nowrap;
}
.gg-tag i { font-family: Georgia, "Times New Roman", serif; font-size: 1.1em; color: var(--scan); }

.pipeline {
  list-style: none; margin: var(--gap) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
  counter-reset: none;
}
.pipeline li {
  position: relative; padding: 22px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.pipeline li:not(:last-child)::after { /* flow arrow between steps */
  content: ""; position: absolute; top: 34px; right: -12px; width: 8px; height: 8px;
  border-top: 1.5px solid var(--scan-d); border-right: 1.5px solid var(--scan-d);
  transform: rotate(45deg);
}
.pl-i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--scan-d); color: var(--scan-d); font-family: var(--f-display); font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.pipeline h3 { font-size: 17px; color: var(--text); }
.pipeline p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
/* SCENARIO-Bench and the sweep score */
.bench { margin-top: 40px; }
.bench-head { margin: 0 auto 18px; text-align: center; }
.bench-head h3 { font-size: 22px; }
.bench-head p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.bench-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 22px 28px; }
.bench-stage { min-width: 0; }
.bench-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.bf-ground { fill: none; stroke: #b9b3a3; stroke-width: 3; stroke-linecap: round; }
.bf-base, .bf-gt, .bf-gen { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bf-base { stroke: #9aa3b2; stroke-dasharray: 6 6; }
.bf-gt { stroke: var(--scan-d); }
.bf-gen { stroke: #f08a3c; }
.bf-ball { stroke: var(--text); stroke-width: 2; }
.bf-ball.base { fill: #e6e3da; }
.bf-ball.gt { fill: #8ff0df; }
.bf-ball.gen { fill: #ffc79a; }
.bf-arrow { stroke-width: 2.6; stroke-linecap: round; }
.bf-arrow.gt { stroke: var(--scan-d); }
.bf-arrow.gen { stroke: #e06a1c; }
.m-gt { fill: var(--scan-d); }
.m-gen { fill: #e06a1c; }
.bf-err { stroke: #d6336c; stroke-width: 2.2; stroke-dasharray: 3 4; stroke-linecap: round; }
.bench-key { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
  font: 600 14px "Comic Neue", "Comic Sans MS", var(--f-text); color: var(--text-2); }
.bench-key li { display: inline-flex; align-items: center; gap: 8px; }
.bench-key li::before { content: ""; width: 24px; height: 0; border-top: 3px solid currentColor; border-radius: 2px; }
.bench-key .k-base::before { border-top-style: dashed; color: #9aa3b2; }
.bench-key .k-gt::before { color: var(--scan-d); }
.bench-key .k-gen::before { color: #f08a3c; }
.bench-key b { font-family: Cambria, "Times New Roman", serif; font-size: 1.05em; }

.bench-math { min-width: 0; }
.eq { margin: 0 0 18px; display: flex; align-items: center; justify-content: center; flex-wrap: nowrap;
  font-family: Cambria, "STIX Two Text", "Times New Roman", serif; font-size: 21px; color: var(--text); white-space: nowrap; }
.eq b { font-weight: 700; }
.eq sup { font-size: .62em; position: relative; top: -.55em; line-height: 0; vertical-align: baseline; margin-left: .04em; }
.eq-var { font-style: italic; }
.eq-fn { font-style: normal; margin-right: .08em; }
.eq-op { margin: 0 .3em; }
.eq-minus { margin: 0 .22em; }
.eq-sep { margin-right: .1em; }
.eq-paren { font-size: 2.1em; line-height: 1; font-weight: 300; margin: 0 .04em; transform: translateY(-.04em); }
.eq-frac { display: inline-flex; flex-direction: column; align-items: center; margin: 0 .1em; }
.eq-num { padding: 0 .2em .12em; border-bottom: 1.5px solid currentColor; }
.eq-den { padding: .14em .2em 0; }
.eq-sqrt { display: inline-flex; align-items: stretch; }
.eq-sqrt::before { content: "√"; font-size: 1.15em; line-height: 1; margin-right: -.02em; transform: translateY(.06em); }
.eq-rad { border-top: 1.4px solid currentColor; padding: .06em .08em 0; }

/* slider: how strongly the generated video follows the change */
.bench-ctrl label { display: block; margin-bottom: 8px; text-align: center; font: 600 15px "Comic Neue", "Comic Sans MS", var(--f-text); color: var(--text); }
.bench-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer;
}
.bench-ctrl input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 99px; border: 2px solid var(--text);
  background: linear-gradient(90deg, #f08a3c var(--fill, 50%), #fff var(--fill, 50%));
}
.bench-ctrl input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; border: 2px solid var(--text); background: #fff; }
.bench-ctrl input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: #f08a3c; }
.bench-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%;
  background: #ffc79a; border: 2px solid var(--text); box-shadow: 2px 2px 0 var(--text);
}
.bench-ctrl input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #ffc79a; border: 2px solid var(--text); box-shadow: 2px 2px 0 var(--text); }
.bench-ctrl input[type="range"]:focus-visible { outline: 2px solid var(--scan-d); outline-offset: 4px; border-radius: 99px; }
.bc-ends { position: relative; height: 18px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.bc-ends span { position: absolute; top: 0; white-space: nowrap; }
.bc-ends span:nth-child(1) { left: 0; }
.bc-ends span:nth-child(2) { left: 71.4%; transform: translateX(-50%); color: var(--scan-d); font-weight: 600; } /* 100 of 140 */
.bc-ends span:nth-child(3) { right: 0; }

/* the score on a 0-1 scale, with where the methods land on SCENARIO-Bench */
.bench-scale { margin-top: 12px; padding: 34px 0 22px; }
.bs-track { position: relative; height: 12px; border-radius: 99px; background: linear-gradient(90deg, #f6d3bd, #ece7d8 50%, #9ff0df); border: 2px solid var(--text); }
.bs-ref { position: absolute; left: calc(var(--x) * 100%); top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--text); }
.bs-ref em { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 12.5px "Comic Neue", "Comic Sans MS", var(--f-text); font-style: normal; color: var(--text-2); }
.bs-ref:not(.ours) em { transform: translateX(-88%); }
.bs-ref.ours em { color: var(--scan-d); transform: translateX(-20%); }
.bs-mark { position: absolute; left: calc(var(--x) * 100%); top: 50%; transform: translate(-50%, -50%); transition: left .12s linear; }
.bs-mark i { display: block; width: 22px; height: 22px; border-radius: 50%; background: #ffc79a; border: 2px solid var(--text); box-shadow: 2px 2px 0 var(--text); }
.bs-mark em { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 18px "Comic Neue", "Comic Sans MS", var(--f-text); font-style: normal; color: var(--text); }
.bs-ends { margin-top: 6px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- results */
.res-tabs { display: flex; width: max-content; max-width: 100%; margin: 0 auto 20px; background: var(--card); border-color: var(--line); flex-wrap: wrap; justify-content: center; }
.res-tabs button { color: var(--text-2); }
.res-tabs button.active { background: var(--ink); color: var(--scan); }
/* headline numbers on controllability */
.wins { margin-bottom: 26px; }
.wins li { display: flex; flex-direction: column; align-items: center; padding: 18px 16px 16px; }
.wins span { font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.wins em { margin-top: auto; padding-top: 10px; font: 600 13.5px "Comic Neue", "Comic Sans MS", var(--f-text); font-style: normal; color: #c95a12; }
.res-card { padding: 16px; }
.res-pane { margin: 0; }
.res-pane figcaption { margin-top: 12px; text-align: center; font-size: 15px; font-weight: 500; color: var(--text); text-wrap: balance; }
.res-pane { display: none; }
.res-pane.active { display: block; }
.res-pane video { width: 100%; border-radius: 10px; background: #000; }
/* comparison grids: method names and values laid over the tiles of one clip */
.cmp-cases { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 14px; }
.cmp-cases button { border: 1.5px solid var(--line); background: var(--card); color: var(--text-2); padding: 5px 14px; border-radius: 99px; font: 600 14px var(--f-display); transition: background .2s, color .2s; }
.cmp-cases button:hover { color: var(--text); }
.cmp-cases button.active { background: var(--scan); color: #04201c; border-color: var(--scan); }
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp-frame { position: relative; }
.cmp-frame video { display: block; width: 100%; height: 100%; border-radius: 10px; background: #fff; }
.cmp-frame:not(.plain) video { cursor: pointer; }
.cmp-frame.square { max-width: 760px; margin: 0 auto; } /* square Physion++ tiles would make the card very tall */
.cmp-frame.plain video { height: auto; background: #000; }
.cmp-over { position: absolute; inset: 0; pointer-events: none; }
.cmp-tile { position: absolute; }
.cmp-tile.ours { box-shadow: inset 0 0 0 3px var(--scan); border-radius: 3px; }
.cmp-lab, .cmp-val { position: absolute; left: 6px; padding: 1px 8px; border-radius: 99px; font: 600 12.5px/1.5 var(--f-display); white-space: nowrap; }
.cmp-lab { top: 6px; background: rgba(15, 23, 42, .74); color: #fff; }
.cmp-tile.ours .cmp-lab { background: var(--scan); color: #04201c; }
.cmp-val { bottom: 6px; background: rgba(255, 255, 255, .92); color: var(--text); font-family: "Comic Neue", "Comic Sans MS", var(--f-text); font-weight: 700; font-size: 13.5px; }
.table-card { margin-top: var(--gap); padding: 12px 20px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 780px; }
.tbl th { text-align: right; font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:nth-child(-n+2) { text-align: left; }
.tbl td { text-align: right; padding: 11px 10px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td:nth-child(-n+2) { text-align: left; font-family: var(--f-text); font-size: 15px; }
.tbl td:nth-child(2) { color: var(--muted); }
.tbl tr.ours td { background: rgba(94, 234, 212, .10); font-weight: 700; }
.tbl tr.ours td:first-child { border-radius: 8px 0 0 8px; }
.tbl tr.ours td:last-child { border-radius: 0 8px 8px 0; }
.tbl .s-col { width: 190px; color: var(--scan-d); }
.tbl caption { caption-side: top; padding: 4px 10px 10px; text-align: left; font-size: 14.5px; color: var(--text-2); }
.tbl caption b { color: var(--text); }
.tbl td.second { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.tbl td.s-cell.second { text-decoration: none; }
.tbl td.s-cell.second b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.tbl td.s-cell b { font-weight: inherit; }
.tbl tr.ours td.s-cell b { color: var(--scan-d); }
.sbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sbar i { display: block; height: 6px; border-radius: 99px; background: #c5cbd6; }
.tbl tr.ours .sbar i { background: var(--scan-d); }

/* ---------------------------------------------------------------- bibtex */
.bib { position: relative; padding: 0; background: var(--ink); border-color: transparent; }
/* wide enough for the title line; narrower screens scroll the block sideways instead of wrapping it */
#bibtex .wrap.narrow { width: min(960px, 100%); }
.bib pre { margin: 0; padding: 28px 96px 28px 30px; white-space: pre; overflow-x: auto; font: 14px/1.65 var(--f-mono); color: #d7deea; }
.copy { position: absolute; top: 14px; right: 14px; padding: 6px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #e8edf6; font-family: var(--f-display); font-size: 14px; font-weight: 600; }
.copy.ok { color: var(--scan); border-color: var(--scan); }

.foot { padding: 36px 20px 44px; background: var(--ink); color: rgba(226, 232, 240, .5); font-family: var(--f-display); font-size: 14px; text-align: center; letter-spacing: .04em; }

/* ---------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .bench-card { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  :root { --sec-pad: 48px; }
  .nav { padding: 0 10px 0 18px; }
  .nav.open { background: rgba(7, 11, 20, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(255, 255, 255, .08); }
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 12px; background: transparent;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: #e8edf6;
    transition: transform .25s ease, background .2s;
  }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { transform: translateY(-6px); }
  .nav-toggle span::after { transform: translateY(6px); }
  .nav.open .nav-toggle span { background: transparent; }
  .nav.open .nav-toggle span::before { transform: rotate(45deg); }
  .nav.open .nav-toggle span::after { transform: rotate(-45deg); }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px 12px 14px;
    /* near-opaque: a backdrop blur here would not work inside the blurred header */
    background: rgba(7, 11, 20, .97);
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
  .nav-links a { padding: 12px 14px; font-size: 16px; border-radius: 12px; }
  .hero { padding: 84px 16px; }
  .hero-card { padding: 40px 20px 32px; border-radius: 22px; }
  .br-lg { display: none; }
  .authors { font-size: 15.5px; gap: 4px 14px; }
  .affil { font-size: 14px; }
  .links { gap: 8px; }
  .btn { padding: 0 12px; }
  .sec { padding-left: 16px; padding-right: 16px; }
  .sec-head { margin-bottom: 22px; }
  .steps { grid-template-columns: 1fr; }
  .lens-bar { justify-content: center; padding: 12px; }
  .phase { display: none; }
  .seg button { padding: 6px 12px; font-size: 13.5px; }
  .legend { gap: 8px 18px; }
  .lg { font-size: 14px; }
  .case { font-size: 14px; padding: 8px 15px; }
  .abstract { text-align: left; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats li { padding: 14px 10px; }
  .stats b { font-size: 24px; }
  .stats span { font-size: 13px; }
  .group-card { padding: 12px 10px; border-radius: 16px; }
  /* phone: each parameter becomes a labelled row of five small videos */
  .group-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .gg-head { display: none; }
  .gg-row { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 6px; margin: 8px 0 2px; font-size: 13.5px; }
  .gg-head + .gg-row { margin-top: 0; }
  .res-tabs { border-radius: 18px; } /* the Data tabs wrap to two rows on phones */
  .bench { margin-top: 30px; }
  .bench-head h3 { font-size: 20px; }
  .bench-head p { font-size: 14.5px; text-align: left; }
  .bench-card { padding: 14px 14px 18px; gap: 16px; }
  .eq { font-size: 14.5px; overflow: hidden; justify-content: center; padding: 2px 0; }
  .bench-key { font-size: 13px; gap: 4px 14px; }
  .bs-mark em { font-size: 16px; }
  .bs-ref em { font-size: 11.5px; }
  .bs-ref.ours em { transform: translateX(-62%); }
  .bc-ends { font-size: 11px; }
  .bc-ends span:nth-child(2) { transform: translateX(-70%); }
  .gg-cell { border-radius: 5px; }
  .gg-tag { left: 2px; top: 2px; padding: 0 4px; font-size: 9.5px; }
  .gg-tag .gg-eq { display: none; }
  .gg-unit { display: inline; }
  /* phone: five-column comparisons scroll sideways instead of shrinking to thumbnails */
  .cmp-frame.wide { width: 660px; }
  .cmp-cases { gap: 6px; }
  .cmp-cases button { padding: 4px 11px; font-size: 13px; }
  .cmp-lab, .cmp-val { left: 4px; padding: 0 6px; font-size: 10.5px; }
  .cmp-lab { top: 4px; }
  .cmp-val { bottom: 4px; font-size: 11.5px; }
  .pipeline { grid-template-columns: 1fr; gap: 10px; }
  .pipeline li:not(:last-child)::after { top: auto; bottom: -10px; right: auto; left: 32px; transform: rotate(135deg); }
  .bib pre { padding: 56px 20px 24px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
}
/* ---------------------------------------------------------------- large screens
   Sizes are authored in px for a roughly 1760px-wide desktop, so on bigger windows the
   whole page is scaled up instead of leaving a small column in an empty screen. An inline
   script in index.html sets --page-zoom continuously from the window size; the media steps
   below are the fallback without JavaScript. Viewport units are scaled by zoom too, so
   sizes in vh/svh divide by --page-zoom. Canvas code sizes from getBoundingClientRect,
   which already reports the zoomed size. */
:root { --page-zoom: 1; }
@supports (zoom: 1) {
  @media (min-width: 2200px) and (min-height: 960px)  { :root { --page-zoom: 1.2; } }
  @media (min-width: 2560px) and (min-height: 1080px) { :root { --page-zoom: 1.35; } }
  @media (min-width: 3000px) and (min-height: 1280px) { :root { --page-zoom: 1.6; } }
  @media (min-width: 3440px) and (min-height: 1440px) { :root { --page-zoom: 1.8; } }
  @media (min-width: 3840px) and (min-height: 1600px) { :root { --page-zoom: 2; } }
  body { zoom: var(--page-zoom); }
}

@media (prefers-reduced-motion: reduce) {
  .title, .scroll-cue span { animation: none; }
  html { scroll-behavior: auto; }
}
