/* =====================================================================
   VIS-Ground project page
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceef2;
  --line: rgba(15, 23, 42, .09);
  --line-2: rgba(15, 23, 42, .16);
  --ink: #0f1115;
  --ink-2: #3c4250;
  --muted: #6b7280;
  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc05;
  --green: #34a853;
  --accent: #1a73e8;
  --ok: #188038;
  --bad: #d93025;
  --amber: #fbbc05;
  --narr: #c2410c;
  --know: #1a73e8;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .85em; }
sup { font-size: .66em; }
::selection { background: rgba(66, 133, 244, .25); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 130px 0; position: relative; }
.section + .section::before {
  content: ""; position: absolute; top: 0; left: 50%; width: min(1100px, 90%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; margin-bottom: 20px;
  background: linear-gradient(180deg, #0f1115 35%, #4b5263); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 14px; color: var(--ink-2); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 "JetBrains Mono", monospace; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.kicker .kn { color: var(--ink); padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 7px; letter-spacing: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 680px; margin-bottom: 48px; line-height: 1.55; }
.lede em { font-style: normal; color: var(--ink); background: linear-gradient(90deg, var(--blue), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.meta { font-size: 12px; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }

/* wordmark: VIS-Ground / VIS-Bench letter colours as in the paper */
.wm { font-style: italic; font-weight: 800; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--ink); -webkit-text-fill-color: currentColor; }
.wm .b { color: var(--blue); } .wm .r { color: var(--red); } .wm .y { color: var(--yellow); } .wm .g { color: var(--green); }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--blue), var(--red), var(--yellow), var(--green)); }
.topnav {
  position: fixed; top: 12px; left: 50%; z-index: 50; transform: translate(-50%, -140%); transition: transform .5s var(--ease);
  display: flex; align-items: center; gap: 22px; padding: 7px 7px 7px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .78); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(15, 23, 42, .12);
}
.topnav.show { transform: translate(-50%, 0); }
.nav-brand { text-decoration: none; font-size: 17px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); background: rgba(15, 23, 42, .06); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 600 15px/1 "Inter", sans-serif;
  text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--surface-2); border-color: rgba(15, 23, 42, .24); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-glow { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 24px -10px rgba(26, 115, 232, .6); }
.btn-glow:hover { background: #23262e; border-color: #23262e; box-shadow: 0 0 0 4px rgba(26, 115, 232, .15), 0 10px 30px -8px rgba(26, 115, 232, .6); }
.btn-disabled { color: var(--muted); cursor: default; }
.btn-disabled:hover { background: #fff; border-color: var(--line-2); }
.btn .soon { font-weight: 500; font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 6px; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 28px 24px 130px; overflow: hidden; isolation: isolate; background: #06070b; color: #fff; }
/* background: a slowly drifting wall of generated story shots, dimmed for legibility */
.hero-wall { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-wall video { position: absolute; left: 0; top: 50%; height: 100%; width: auto; min-width: 115%; object-fit: cover;
  transform: translate(0, -50%); filter: blur(3px) brightness(.8) saturate(1.1); animation: wall-drift 90s linear infinite alternate; }
@keyframes wall-drift { from { transform: translate(0, -50%); } to { transform: translate(-12%, -50%); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0) calc(100% - 80px), var(--bg) 100%),
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(6, 7, 11, .45), rgba(6, 7, 11, .7) 75%),
    linear-gradient(to bottom, rgba(6, 7, 11, .4), rgba(6, 7, 11, .1) 40%, rgba(6, 7, 11, .45)); }
.hero .wm { color: #fff; }
.hero .authors { color: rgba(255, 255, 255, .85); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero .authors sup { color: rgba(255, 255, 255, .55); }
.hero .authors a:hover { color: #8ab4ff; }
.hero .affils { gap: 26px; }
.hero .affil { background: none; padding: 0; gap: 7px; }
.hero .affil sup { color: rgba(255, 255, 255, .6); }
.hero .logo { height: 32px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .45)); }
.hero .logo-ucla { height: 46px; }
.hero .btn-glow { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn-glow:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .2), 0 10px 30px -8px rgba(26, 115, 232, .7); }
.hero .btn-disabled, .hero .btn-disabled:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .7); }
.hero .btn .soon { color: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .25); }
.hero-title { font-size: clamp(24px, 3.4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; color: #fff; margin-bottom: 16px; text-shadow: 0 2px 24px rgba(0, 0, 0, .55); }
.hero-title .wm { padding-right: .04em; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 15.5px; color: var(--ink-2); max-width: 860px; margin: 0 auto 10px; }
.authors span { white-space: nowrap; }
.authors sup { color: var(--muted); }
.authors a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .2s, background-size .25s; }
.authors a:hover { color: var(--accent); background-size: 100% 1px; }
.affils { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }
.affil { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: transparent; padding: 4px 6px; }
.affil sup { color: #5f6675; font-weight: 600; }
.logo { height: 36px; width: auto; object-fit: contain; }
.buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

/* the teaser is sized so it fits in the first screen; --teaser-top is set by fx.js */
.teaser { position: relative; width: min(1180px, 100%, max(560px, calc((100svh - var(--teaser-top, 400px) - 20px - var(--hint-space, 0px)) * 16 / 9))); margin: 0 auto; }
.video-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.glow-frame { box-shadow: 0 0 0 1px var(--line), 0 40px 100px -40px rgba(26, 115, 232, .35), 0 24px 60px -30px rgba(15, 23, 42, .35); }
.teaser .glow-frame::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, rgba(66, 133, 244, .8), rgba(234, 67, 53, .5), rgba(251, 188, 5, .5), rgba(52, 168, 83, .8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
/* reminder shown while the teaser is muted: hops and wiggles every few seconds */
/* sits beside the video (fx.js moves it above the video when there is no room) */
.sound-hint { position: absolute; left: calc(100% + 20px); top: 50%; translate: 0 -50%; z-index: 2; width: 128px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 13px/1.35 "Inter", sans-serif; text-align: center; cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .3); animation: nudge 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.sound-hint b { font-weight: 700; color: var(--accent); }
.sound-hint svg { width: 26px; height: 26px; color: var(--red); }
.sound-hint::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: #fff;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
/* not enough room beside the video: the reminder sits above it, pointing down */
.teaser.hint-above { display: flex; flex-direction: column; }
.teaser.hint-above:has(#soundHint:not([hidden])) { --hint-space: 52px; }
.teaser.hint-above .sound-hint { position: relative; left: auto; top: auto; translate: none; order: -1; align-self: center; margin: 0 0 14px;
  width: auto; flex-direction: row; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; font-size: 13.5px; }
.teaser.hint-above .sound-hint br { display: none; }
.teaser.hint-above .sound-hint b::before { content: "\00a0· "; }
.teaser.hint-above .sound-hint svg { width: 18px; height: 18px; }
.teaser.hint-above .sound-hint::before { left: 50%; top: auto; bottom: -7px; margin: 0 0 0 -6px; border-left: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sound-hint:hover { animation-play-state: paused; }
@keyframes nudge {
  0%, 52%, 100% { transform: translateY(0) rotate(0); }
  58% { transform: translateY(-10px) rotate(-5deg); }
  64% { transform: translateY(0) rotate(5deg); }
  70% { transform: translateY(-5px) rotate(-4deg); }
  76% { transform: translateY(0) rotate(3deg); }
  82% { transform: translateY(0) rotate(-2deg); }
}

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 980px; margin: 72px auto 0; gap: 0; }
.stat { padding: 8px 20px; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .16); }
.stat b { display: block; font-size: clamp(40px, 5vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px;
  background: linear-gradient(180deg, #fff, #c9d2e6); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat > span { font-size: 14.5px; color: rgba(255, 255, 255, .72); }
.stat .wm { font-size: 1em; }
.scroll-cue { display: block; width: 26px; height: 42px; margin: 70px auto 0; border: 1.5px solid var(--line-2); border-radius: 14px; position: relative; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-2); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.glow-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .18); transition: border-color .3s, transform .3s var(--ease); }
.glow-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(26, 115, 232, .08), transparent 45%); }
.glow-card:hover { border-color: var(--line-2); }
.glow-card:hover::before { opacity: 1; }

.paper-fig { margin: 56px 0 0; background: #fff; border-radius: var(--radius); padding: 14px; cursor: zoom-in; position: relative; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -50px rgba(15, 23, 42, .35); transition: transform .4s var(--ease); }
.paper-fig:hover { transform: translateY(-3px); }
.paper-fig img { width: 100%; border-radius: 8px; }
.paper-fig figcaption { position: absolute; right: 22px; bottom: 22px; font: 500 12px/1 "JetBrains Mono", monospace; color: #fff;
  background: rgba(7, 8, 11, .75); padding: 7px 10px; border-radius: 8px; opacity: 0; transition: opacity .25s; }
.paper-fig:hover figcaption { opacity: 1; }

/* ---------- task: three inputs converge ---------- */
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.tri-card { padding: 22px 22px 20px; }
.tri-card p { color: var(--ink); font-size: 18px; font-weight: 500; line-height: 1.45; margin: 0; }
.tri-label { display: block; font: 600 11.5px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.tri-card.src { box-shadow: inset 0 2px 0 var(--yellow); } .tri-card.src .tri-label { color: #b06000; }
.tri-card.pre { box-shadow: inset 0 2px 0 var(--blue); } .tri-card.pre .tri-label { color: var(--accent); }
.tri-card.req { box-shadow: inset 0 2px 0 var(--red); } .tri-card.req .tri-label { color: #c5221f; }
.tri-card:nth-child(2) { --d: .12s; } .tri-card:nth-child(3) { --d: .24s; }
.tri-lines { grid-column: 1 / -1; width: 100%; height: 90px; display: block; overflow: visible; }
.tri-lines .ln { fill: none; stroke-width: 2; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.4s var(--ease) .4s; vector-effect: non-scaling-stroke; }
.tri-lines .ln.src { stroke: var(--yellow); } .tri-lines .ln.pre { stroke: var(--blue); } .tri-lines .ln.req { stroke: var(--red); }
.tri.in .tri-lines .ln { stroke-dashoffset: 0; }
.tri-out { grid-column: 2 / 3; padding: 20px 22px; border-radius: var(--radius); --d: .5s;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(120deg, var(--yellow), var(--blue), var(--red)) border-box;
  border: 1px solid transparent; box-shadow: 0 20px 60px -30px rgba(26, 115, 232, .45); }
.tri-out .tri-label { color: var(--ink-2); }
.tri-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tri-out li { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.tri-out .d { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tri-out .d.src { background: var(--yellow); } .tri-out .d.pre { background: var(--blue); } .tri-out .d.req { background: var(--red); }

/* ---------- method steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 26px 24px 24px; display: flex; flex-direction: column; }
.step:nth-child(2) { --d: .12s; } .step:nth-child(3) { --d: .24s; }
.step-n { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -0.05em; margin-bottom: 18px;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.s1 .step-n { background-image: linear-gradient(135deg, #8ab4ff, var(--blue)); }
.s2 .step-n { background-image: linear-gradient(135deg, #7ee2a0, var(--green)); }
.s3 .step-n { background-image: linear-gradient(135deg, #ffd666, var(--yellow)); }
.step h3 { margin-bottom: 10px; }
.step p { font-size: 15.5px; margin-bottom: 18px; }
.step-tag { margin-top: auto; font: 500 12px/1.3 "JetBrains Mono", monospace; color: var(--muted); }
.step-code { margin-top: auto; display: block; font-size: 12px; color: #137333; background: rgba(52, 168, 83, .08); border: 1px solid rgba(52, 168, 83, .25); padding: 8px 10px; border-radius: 9px; }
.s1::after, .s2::after, .s3::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; }
.s1::after { background: linear-gradient(90deg, var(--blue), transparent); }
.s2::after { background: linear-gradient(90deg, var(--green), transparent); }
.s3::after { background: linear-gradient(90deg, var(--yellow), transparent); }

/* ---------- results ---------- */
.bb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.bb-card { padding: 24px; }
.bb-card:nth-child(2) { --d: .1s; } .bb-card:nth-child(3) { --d: .2s; }
.bb-name { display: block; font: 600 12.5px/1 "JetBrains Mono", monospace; color: var(--muted); letter-spacing: .04em; margin-bottom: 14px; }
.bb-score { display: block; font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--ink); }
.bb-gain { display: inline-block; margin: 12px 0 20px; font-size: 13px; font-weight: 600; color: var(--ok); background: rgba(52, 168, 83, .1); padding: 5px 10px; border-radius: 999px; }
.bars { display: grid; gap: 8px; }
.bar { position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; transition: width 1.4s var(--ease) .3s; }
.bar.ours i { background: linear-gradient(90deg, var(--blue), #8ab4ff); }
.bar.base i { background: #c9ced8; }
.bar span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font: 600 11.5px/1 "Inter", sans-serif; color: #fff; }
.bar.base span { color: var(--ink-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 12px 40px -24px rgba(15, 23, 42, .2); }
.panel-tabs { margin-bottom: 4px; }
.panel .viz { border: 0; padding: 14px 8px 4px; margin: 0; background: transparent; }

.bench { margin-top: 110px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: end; }
.bench-head h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.bench-head .kicker { margin-bottom: 14px; font-size: 18px; letter-spacing: 0; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chip-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 13px; color: var(--muted); --d: .1s; }
.chip-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metrics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.metrics span { font: 500 12.5px/1 "JetBrains Mono", monospace; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.bench .paper-fig { grid-column: 1 / -1; margin-top: 28px; }

/* results table */
.table-note { font-size: 13.5px; color: var(--muted); margin: 14px 8px 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.results { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.results th, .results td { padding: 7px 10px; text-align: right; white-space: nowrap; }
.results th { font-weight: 700; color: var(--ink); background: var(--surface-2); position: sticky; top: 0; }
.results th:first-child, .results th:nth-child(2), .results td.m, .results td.g { text-align: left; }
.results td { color: var(--ink-2); }
.results td.m { vertical-align: middle; font-weight: 600; color: var(--ink); }
.results td.g { color: var(--muted); }
.results td.comp { vertical-align: middle; font-weight: 600; color: var(--ink); }
.results tr.bb td { background: var(--surface-2); font-weight: 700; color: var(--ink); text-align: left; border-top: 1px solid var(--line); font-family: "JetBrains Mono", monospace; font-size: 12.5px; }
.results tr.ours td { background: rgba(26, 115, 232, .06); }
.results td.best { font-weight: 800; color: var(--ink); }
.results td.comp small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.results tbody tr.r2 td { border-bottom: 1px solid var(--line); }

/* ---------- segmented tabs ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 18px; }
.seg button {
  border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1.2 "Inter", sans-serif; color: var(--muted); transition: color .2s, background .2s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.seg-small button { padding: 7px 12px; font-size: 13px; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }

/* ---------- comparison ---------- */
.cmp, .demo { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.cmp-side, .demo-side { min-width: 0; padding: 22px; }
.cmp-side h3, .demo-side h3 { margin-bottom: 6px; }
.req { font-style: italic; color: var(--ink); margin: 6px 0 16px; font-size: 16.5px; }
.verdicts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.verdicts li { display: grid; grid-template-columns: 128px 1fr auto; gap: 10px; align-items: baseline; font-size: 13.5px; border-top: 1px solid var(--line); padding: 9px 0; }
.verdicts li b { font-weight: 600; color: var(--ink-2); }
.verdicts li span { color: #b3261e; }
.verdicts li.ours b { color: var(--accent); }
.verdicts li.ours span { color: var(--ok); font-weight: 500; }
.verdicts li em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.verdicts li.ours em { color: var(--ok); }
.gtag { display: inline-block; font: 700 10px/1 "Inter", sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; margin-right: 8px; vertical-align: 1px; }
.gtag.narrative { background: #fdebdc; color: var(--narr); }
.gtag.knowledge { background: #e3edfd; color: var(--know); }
.meta .gtag { margin-right: 2px; }
.cmp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-bottom: 18px; }
.cmp-controls .seg { margin-bottom: 0; }
.cons { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 12.5px; }
.cons th { font-weight: 600; color: var(--muted); text-align: center; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.cons th:first-child { text-align: left; }
.cons th.ours { color: var(--accent); }
.cons td { padding: 7px 2px; border-bottom: 1px solid var(--line); color: var(--ink-2); line-height: 1.35; }
.cons td.pass, .cons td.fail { text-align: center; font-weight: 800; width: 32px; }
.cons td.pass { color: var(--ok); }
.cons td.fail { color: var(--bad); opacity: .85; }
.cons td.ours { background: rgba(26, 115, 232, .07); }

/* ---------- demo player ---------- */
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; container-type: inline-size; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.answer-band {
  position: absolute; left: 0; right: 0; top: 0; height: 13%;
  background: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,.35) 70%, transparent);
  display: flex; align-items: center; gap: 1.2cqw; padding: 0 2cqw; pointer-events: none;
}
.answer-tag { background: var(--blue); color: #fff; font: 700 1.25cqw/1 "Inter", sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: .7cqw 1.1cqw; border-radius: 99px; white-space: nowrap; }
.answer-q { color: #fff; font: 500 1.55cqw/1.3 "Inter", sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.start-overlay {
  position: absolute; inset: 0 0 44px 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(0,0,0,.2), rgba(0,0,0,.6)); color: #fff; text-align: center; gap: 16px;
}
.start-overlay p { color: #fff; font-weight: 500; font-size: clamp(13px, 1.6cqw, 17px); text-shadow: 0 1px 4px rgba(0,0,0,.6); margin: 0; }
.big-play { width: 88px; height: 88px; border-radius: 50%; border: 0; background: #fff; color: #07080b; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(255,255,255,.12), 0 10px 40px rgba(0,0,0,.5); transition: transform .2s, box-shadow .2s; animation: pulse 2.4s ease-in-out infinite; }
.big-play:hover { transform: scale(1.06); }
.big-play svg { width: 34px; height: 34px; margin-left: 5px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.25), 0 10px 40px rgba(0,0,0,.5); } 50% { box-shadow: 0 0 0 16px rgba(255,255,255,0), 0 10px 40px rgba(0,0,0,.5); } }
.ask-overlay { position: absolute; inset: 0 0 44px 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 14, .55); backdrop-filter: blur(3px); padding: 16px; }
.ask-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; width: min(640px, 92%); max-height: 92%; overflow: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); animation: pop .3s var(--ease); }
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ask-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 14px; color: var(--ink); }
.pause-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--amber); position: relative; flex: none; }
.pause-icon::before, .pause-icon::after { content: ""; position: absolute; top: 8px; width: 3px; height: 10px; background: #fff; border-radius: 1px; }
.pause-icon::before { left: 9px; } .pause-icon::after { right: 9px; }
.ask-chips { display: flex; flex-direction: column; gap: 8px; }
.chip { text-align: left; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; padding: 11px 14px 11px 42px;
  font: 500 15px/1.45 "Inter", sans-serif; color: var(--ink); cursor: pointer; position: relative; transition: border-color .15s, background .15s; }
.chip::before { content: ""; position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--muted); }
.chip:hover { border-color: rgba(15, 23, 42, .3); }
.chip[aria-pressed="true"] { border-color: var(--amber); background: #fff8e1; }
.chip[aria-pressed="true"]::before { background: var(--amber); border-color: var(--amber); box-shadow: inset 0 0 0 3px #fff; }
.ask-actions { display: flex; gap: 10px; margin-top: 16px; }
.ask-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.toast { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); background: rgba(17, 19, 24, .92); border: 1px solid rgba(255,255,255,.14); color: #fff;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.pbar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; background: #0f1115; color: #fff; }
.pb-play, .pb-btn { width: 30px; height: 30px; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 4px; flex: none; }
.pb-btn svg, .pb-play svg { width: 100%; height: 100%; }
.pb-track { position: relative; flex: 1; height: 6px; background: rgba(255,255,255,.16); border-radius: 3px; cursor: pointer; }
.pb-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--blue), #8ab4ff); border-radius: 3px; }
.pb-marks { position: absolute; inset: 0; pointer-events: none; }
.pb-mark { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--amber); border: 2px solid #0f1115; box-shadow: 0 0 10px rgba(251,188,5,.6); }
.pb-mark.asked { background: var(--blue); box-shadow: 0 0 10px rgba(66,133,244,.6); }
.pb-mark.skipped { background: #5d6372; box-shadow: none; }
.pb-time { font: 500 13px/1 "JetBrains Mono", monospace; min-width: 96px; text-align: right; color: #d8dbe2; }
.qlog { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.qlog li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); transition: border-color .3s, background .3s; }
.qlog .when { display: block; font: 600 11px/1.4 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.qlog li.pending .when { color: var(--amber); }
.qlog li.asked { border-color: #bcd5fb; background: #f3f8ff; }
.qlog li.asked .when { color: var(--accent); }
.qlog li.skipped { opacity: .5; }
.qlog .q { display: block; }
.qlog .q + .q { margin-top: 6px; }
.qlog .q.dim { text-decoration: line-through; color: var(--muted); }
.side-note { font-size: 12.5px; color: var(--muted); margin: 0; }

.formative { margin-top: 90px; }
.formative-head { display: grid; grid-template-columns: 1fr auto; gap: 6px 40px; align-items: end; margin-bottom: 20px; }
.formative-head h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.03em; }
.formative-head p { grid-column: 1; margin: 0; color: var(--muted); font-size: 15px; }
.vs { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 28px; }
.vs b { display: block; font-size: 46px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.vs .dim b { color: var(--muted); }
.vs span { font-size: 13px; color: var(--muted); }

/* ---------- limitations ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
#failGrid { margin-top: 22px; }
.fcard { padding: 14px; }
.fcard .video-frame { border-radius: 12px; }
.fcard h3 { font-size: 17px; margin: 16px 4px 6px; }
.fcard .req { font-size: 13.5px; color: var(--ink-2); margin: 0 4px 8px; }
.fcard p { font-size: 14px; margin: 0 4px 4px; }
.fcard .ftag { display: inline-block; margin: 14px 4px 0; font: 600 11px/1 "JetBrains Mono", monospace; color: var(--bad); text-transform: uppercase; letter-spacing: .08em; }
.lim-head { margin: 80px 0 18px; font-size: 21px; }
.lim-shots figure { margin: 0; cursor: zoom-in; }
.lim-shots figure:nth-child(2) { --d: .1s; } .lim-shots figure:nth-child(3) { --d: .2s; }
.lim-shots img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); transition: transform .4s var(--ease); }
.lim-shots figure:hover img { transform: scale(1.02); }
.lim-shots figcaption { font-size: 14px; color: var(--ink); margin-top: 10px; font-weight: 500; }
.lim-shots figcaption small { display: block; font: 500 11.5px/1.4 "JetBrains Mono", monospace; color: var(--muted); margin-top: 3px; }
.lim-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.lim-card { border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); }
.lim-card h4 { margin: 0 0 6px; font-size: 17px; }
.lim-card p { margin: 0; font-size: 14.5px; }
.lim-card.audio { background: linear-gradient(135deg, rgba(251,188,5,.09), transparent 60%), var(--surface); } .lim-card.audio h4 { color: #b06000; }
.lim-card.symbols { background: linear-gradient(135deg, rgba(234,67,53,.1), transparent 60%), var(--surface); } .lim-card.symbols h4 { color: #c5221f; }

/* ---------- bibtex / footer ---------- */
.bib { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.bib pre { margin: 0; padding: 22px 24px; overflow-x: auto; font: 13.5px/1.65 "JetBrains Mono", monospace; color: var(--ink-2); }
.copy { position: absolute; top: 12px; right: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 9px; padding: 6px 12px; cursor: pointer; font: 600 13px "Inter", sans-serif; }
.copy:hover { background: var(--surface-3); }
#bibtex { padding-bottom: 100px; }
footer { text-align: center; padding: 34px 20px 54px; border-top: 1px solid var(--line); }
footer p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4, 5, 8, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 4vw; cursor: zoom-out; animation: fade .25s ease; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; background: #fff; box-shadow: 0 40px 120px rgba(0,0,0,.7); animation: pop .35s var(--ease); }
.lb-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font-size: 24px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- interactive charts ---------- */
.viz { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 12px; margin-top: 18px; background: var(--surface); min-width: 0; }
.viz h4 { margin: 0 0 2px; font-size: 17px; letter-spacing: -0.01em; }
.viz-sub { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.viz-controls { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.viz-controls .seg { margin-bottom: 8px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 8px; }
.viz-leg { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1.3 "Inter", sans-serif; color: var(--ink-2); background: none; border: 0; padding: 3px 0; }
button.viz-leg { cursor: pointer; }
button.viz-leg[aria-pressed="false"] { opacity: .4; }
button.viz-leg[aria-pressed="false"] span:last-child { text-decoration: line-through; }
.viz-leg-key { width: 16px; height: 3px; border-radius: 2px; background: var(--c); flex: none; }
.viz-leg-key.rect { width: 12px; height: 12px; border-radius: 3px; }
.viz-leg-key.shape { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.viz-leg-key.shape[data-shape="square"] { border-radius: 2px; }
.viz-leg-key.shape[data-shape="diamond"] { border-radius: 1px; transform: rotate(45deg) scale(.85); }
.viz-svg { width: 100%; }
.viz-svg svg { display: block; overflow: visible; font-family: "Inter", sans-serif; }
.viz-svg [tabindex]:focus { outline: none; }
.viz-svg [tabindex]:focus > :not(text), .viz-svg g[tabindex]:hover > :not(text) { filter: brightness(1.08); }
.viz-note { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.viz-data { margin-top: 6px; }
.viz-data summary { cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.viz-table { overflow-x: auto; }
.viz-table table { border-collapse: collapse; font-size: 13px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.viz-table th, .viz-table td { padding: 4px 12px 4px 0; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.viz-table th { color: var(--ink); font-weight: 600; }
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.viz-grid .viz:nth-child(2) { --d: .1s; }
.viz-tip {
  position: fixed; z-index: 70; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,.16); padding: 9px 12px; min-width: 150px; max-width: 300px; font: 13px/1.35 "Inter", sans-serif; color: var(--ink-2);
}
.viz-tip-title { font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); padding: 1px 0; }
.viz-tip-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 34px; }
.viz-tip-row.strong b { font-weight: 800; font-size: 14px; }
.viz-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cmp, .demo { grid-template-columns: 1fr; }
  .steps, .bb-cards, .grid3 { grid-template-columns: 1fr; }
  .viz-grid { grid-template-columns: 1fr; }
  .bench { grid-template-columns: 1fr; gap: 20px; }
  .nav-links { display: none; }
  .formative-head { grid-template-columns: 1fr; }
  .vs { grid-row: auto; grid-column: 1; margin: 10px 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 90px 0; }
  .wrap, .wrap-wide { padding: 0 16px; }
  .hero { padding: 22px 16px 150px; }
  .hero-wall video { filter: blur(3px) brightness(.6) saturate(1.05); }
  .hero-stats { grid-template-columns: 1fr; gap: 26px; margin-top: 48px; }
  .stat + .stat { border-left: 0; }
  .tri { grid-template-columns: 1fr; }
  .tri-lines { display: none; }
  .tri-out { grid-column: 1; margin-top: 8px; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .lim-cards { grid-template-columns: 1fr; }
  .logo { height: 22px; }
  .pb-time { min-width: 0; font-size: 11px; }
  .chip { font-size: 14px; }
  .verdicts li { grid-template-columns: 1fr auto; }
  .verdicts li span { grid-column: 1 / -1; grid-row: 2; }
  .seg { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; border-radius: 14px; scrollbar-width: none; }
  .seg button { white-space: nowrap; flex: none; }
  .ask-overlay { position: static; background: #0f1115; backdrop-filter: none; padding: 10px; }
  .ask-card { width: 100%; animation: none; }
  .topnav { gap: 12px; }
  .paper-fig { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .aurora i, .big-play, .scroll-cue span, .sound-hint, .hero-wall video { animation: none; }
  .tri-lines .ln { stroke-dashoffset: 0; transition: none; }
  .bar i { transition: none; }
}
