:root {
  --bg: #fbfbfd;
  --bg-soft: #f2f5fa;
  --card: #ffffff;
  --ink: #15202b;
  --ink-2: #3f4b59;
  --ink-3: #6b7786;
  --line: #e3e8ef;
  --accent: #2f7fcf;
  --accent-soft: #dcebfa;
  --accent-ink: #1b5ea3;
  --ours: #8fbce6;
  --base: #f0b6c7;
  --good: #2d9a62;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 32, 43, .05), 0 8px 24px -12px rgba(21, 32, 43, .14);
  --maxw: 1080px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.12rem; font-weight: 650; }
code, pre { font-family: var(--font-mono); }
.container { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 10px;
}
.section-head p.lede { color: var(--ink-2); max-width: 760px; margin-top: 12px; font-size: 1.02rem; }
.muted { color: var(--ink-3); }
.caption { font-size: .9rem; color: var(--ink-3); margin-top: 12px; line-height: 1.55; }
.caption b { color: var(--ink-2); font-weight: 600; }
.figure { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.figure.flush { padding: 0; overflow: hidden; }
.figure.flush img, .figure.flush video { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 253, .82); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 54px; gap: 16px; }
.nav .brand { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.nav .brand span { color: var(--accent-ink); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav li a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.nav li a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 70%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 60% at 30% 40%, rgba(143, 188, 230, .35), transparent 70%),
    radial-gradient(50% 50% at 75% 30%, rgba(240, 182, 199, .28), transparent 70%);
  filter: blur(10px);
}
.hero .venue {
  display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--accent-ink);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); max-width: 980px; margin-inline: auto; }
.hero h1 .name { font-weight: 600; }
.hero h1 .sub { display: block; font-size: .62em; color: var(--ink-2); margin-top: 10px; font-weight: 400; }
.authors { margin: 28px auto 8px; max-width: 900px; font-size: 1.02rem; line-height: 1.9; }
.authors a { color: var(--ink); }
.authors a:hover { color: var(--accent-ink); }
.authors sup { font-size: .68em; color: var(--ink-3); margin-left: 1px; }
.affils { font-size: .92rem; color: var(--ink-2); line-height: 1.8; max-width: 900px; margin-inline: auto; }
.affils sup { color: var(--ink-3); margin-right: 2px; }
.notes { font-size: .82rem; color: var(--ink-3); margin-top: 6px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: .93rem; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: #0b1420; box-shadow: var(--shadow); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-soft); }

/* ---------- teaser & highlights ---------- */
.teaser { padding: 30px 0 64px; }
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.stat .num { font-family: var(--font-serif); font-size: 2.1rem; font-weight: 500; color: var(--accent-ink); line-height: 1; }
.stat .num small { font-size: .5em; color: var(--ink-3); font-family: var(--font-sans); font-weight: 500; margin-left: 2px; }
.stat .lbl { font-size: .9rem; font-weight: 600; margin-top: 8px; }
.stat .ctx { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }

/* ---------- abstract ---------- */
.abstract p { font-size: 1.08rem; color: var(--ink-2); }
.abstract p strong { color: var(--ink); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: start; }
.method-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.mcard .tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 9px; border-radius: 6px; margin-bottom: 10px; }
.mcard h3 { margin-bottom: 8px; }
.mcard p { color: var(--ink-2); font-size: .96rem; margin: 0; }
.mcard .eq { margin-top: 12px; padding: 10px 12px; background: var(--bg-soft); border-radius: 8px; font-family: var(--font-mono); font-size: .86rem; color: var(--ink-2); overflow-x: auto; white-space: nowrap; }

/* ---------- tables ---------- */
.tables { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tables .span2 { grid-column: 1 / -1; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 14px; }
.tcard h3 { font-size: 1rem; margin-bottom: 4px; }
.tcard .sub { font-size: .85rem; color: var(--ink-3); margin-bottom: 12px; }
.twrap { overflow-x: auto; }
table.res { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.res th, table.res td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res th { font-weight: 600; color: var(--ink-2); font-size: .82rem; }
table.res th:first-child, table.res td:first-child { text-align: left; }
table.res thead tr.group th { border-bottom: none; padding-bottom: 2px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; text-align: center; }
table.res tbody tr:last-child td { border-bottom: none; }
table.res tr.ours td { background: rgba(143,188,230,.16); font-weight: 600; color: var(--accent-ink); }
table.res tr.ours td:first-child { border-left: 3px solid var(--accent); }
table.res td b { font-weight: 700; color: var(--ink); }
table.res tr.ours td b { color: var(--accent-ink); }
table.res td u { text-decoration: underline dotted; text-underline-offset: 3px; }
table.res .delta { color: var(--good); font-weight: 600; font-size: .8rem; margin-left: 4px; }
table.res .sep td { border-bottom: 2px solid var(--line); }
table.res .divider th { border-left: 1px solid var(--line); }
table.res .divider td { border-left: 1px solid var(--line); }

/* ---------- video prediction ---------- */
.pred-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card video { width: 100%; background: #000; }
.video-card .vc-body { padding: 14px 18px 16px; }
.video-card .vc-body h3 { font-size: 1rem; }
.video-card .vc-body p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-3); }

/* ---------- real-world: hotspot figure ---------- */
.rw-intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
.hotspot-figure { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.hotspot-wrap { position: relative; display: block; width: 100%; user-select: none; -webkit-user-select: none; container-type: inline-size; --hs: clamp(12px, 2.8cqw, 18px); }
.hotspot-wrap > img { width: 100%; height: auto; display: block; pointer-events: none; }
.hotspot { position: absolute; width: 0; height: 0; z-index: 2; }
.hotspot .dot {
  position: absolute; left: 0; top: 0; width: var(--hs); height: var(--hs); transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: #fff;
  box-shadow: 0 0 0 2px var(--accent) inset, 0 2px 8px rgba(0,0,0,.35);
  display: grid; place-items: center; transition: transform .2s ease, box-shadow .2s ease;
}
.hotspot .dot::after { content: ""; width: 36%; height: 36%; border-radius: 50%; background: var(--accent); }
.hotspot .ring {
  position: absolute; left: 0; top: 0; width: var(--hs); height: var(--hs); transform: translate(-50%, -50%);
  border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; pointer-events: none;
  animation: ripple 3s cubic-bezier(.2, .6, .3, 1) infinite;
}
.hotspot .ring:nth-child(2) { animation-delay: 1s; }
.hotspot .ring:nth-child(3) { animation-delay: 2s; }
@keyframes ripple {
  0%   { transform: translate(-50%, -50%) scale(.9); opacity: .7; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}
.hotspot.robot .dot { box-shadow: 0 0 0 2px #e0557a inset, 0 2px 8px rgba(0,0,0,.35); }
.hotspot.robot .dot::after { background: #e0557a; }
.hotspot.robot .ring { border-color: #e0557a; }
.hotspot:hover .dot, .hotspot.active .dot, .hotspot:focus-within .dot { transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 0 3px var(--accent) inset, 0 0 0 6px rgba(47,127,207,.18), 0 4px 14px rgba(0,0,0,.35); }
.hotspot.robot:hover .dot, .hotspot.robot.active .dot { box-shadow: 0 0 0 3px #e0557a inset, 0 0 0 6px rgba(224,85,122,.18), 0 4px 14px rgba(0,0,0,.35); }
.hotspot:hover .ring, .hotspot.active .ring, .hotspot:focus-within .ring, .hotspot.hl .ring { animation-duration: 1.2s; }
.hotspot:hover, .hotspot.active, .hotspot:focus-within { z-index: 20; }
.hotspot.hl { z-index: 10; }
.hotspot.hl .dot { transform: translate(-50%, -50%) scale(1.25); }
.hotspot.dim .dot, .hotspot.dim .ring { opacity: .25; }
.hotspot.dim .ring { animation-play-state: paused; }
.hotspot .tip {
  position: absolute; left: 0; bottom: 18px; transform: translate(-50%, -6px) scale(.98);
  width: max-content; max-width: 290px; background: #15202b; color: #fff;
  padding: 10px 12px 11px; border-radius: 10px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility .18s;
  text-align: left; z-index: 5; font-size: .85rem; line-height: 1.4;
}
.hotspot .tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #15202b; }
.hotspot .tip .obj { font-weight: 700; font-size: .95rem; letter-spacing: -.005em; }
.hotspot .tip .task { display: inline-block; margin: 5px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #cfe3f7; background: rgba(143,188,230,.18); padding: 2px 7px; border-radius: 5px; }
.hotspot.robot .tip .task { color: #ffd3df; background: rgba(224,85,122,.22); }
.hotspot .tip .desc { color: #d6dde6; font-size: .8rem; }
.hotspot:hover .tip, .hotspot.active .tip, .hotspot:focus-within .tip { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
.hotspot.below .tip { bottom: auto; top: 18px; transform: translate(-50%, 6px) scale(.98); }
.hotspot.below .tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #15202b; }
.hotspot.below:hover .tip, .hotspot.below.active .tip, .hotspot.below:focus-within .tip { transform: translate(-50%, 0) scale(1); }
.hotspot.left .tip { transform: translate(-12%, -6px) scale(.98); }
.hotspot.left:hover .tip, .hotspot.left.active .tip, .hotspot.left:focus-within .tip { transform: translate(-12%, 0) scale(1); }
.hotspot.left .tip::after { left: 12%; }
.hotspot.right .tip { transform: translate(-88%, -6px) scale(.98); }
.hotspot.right:hover .tip, .hotspot.right.active .tip, .hotspot.right:focus-within .tip { transform: translate(-88%, 0) scale(1); }
.hotspot.right .tip::after { left: 88%; }
.hotspot .lbl {
  position: absolute; left: 0; top: 0; transform: translate(calc(var(--hs) * .8), -50%);
  white-space: nowrap; font-size: clamp(.68rem, 1.9cqw, .8rem); font-weight: 700; color: #fff; background: #15202b;
  padding: 2px 7px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 4;
}
.hotspot.hl .lbl { opacity: 1; }
.hotspot.right .lbl { transform: translate(calc(-100% - var(--hs) * .8), -50%); }
.hotspot-figure .hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .82rem; color: var(--ink-3); margin-top: 12px; }
.hotspot-figure .hint span.t { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.hotspot-figure .hint .k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--accent) inset; }
.hotspot-figure .hint .k.r { box-shadow: 0 0 0 2px #e0557a inset; }

.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legend li button {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background .15s, transform .15s;
}
.legend li button:hover, .legend li button.active { border-color: var(--accent); background: var(--accent-soft); transform: translateX(2px); }
.legend .sw { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; }
.legend .sw.a { background: #d8493a; } .legend .sw.b { background: #6f8fcf; } .legend .sw.c { background: #2b3440; } .legend .sw.d { background: #e3a21a; }
.legend .txt b { display: block; font-size: .93rem; }
.legend .txt span { font-size: .8rem; color: var(--ink-3); }
.rw-setup p { color: var(--ink-2); font-size: .97rem; }

/* ---------- task cards ---------- */
.tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.task { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.task .vids { display: grid; grid-template-columns: 1fr; background: #000; }
.task .vids video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.task .body { padding: 16px 18px 18px; }
.task .body .lab { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.task .body .lab i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: .75rem; }
.task .body h3 { margin: 6px 0 6px; }
.task .body p { font-size: .92rem; color: var(--ink-2); margin: 0 0 12px; }
.task .strip { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 10px; }
.task .strip img { width: 100%; border-radius: 6px; }
.task .metrics { display: flex; gap: 18px; font-size: .85rem; color: var(--ink-3); }
.task .metrics b { color: var(--accent-ink); font-weight: 700; font-size: 1.05rem; }
.task .metrics small { display: block; }

/* ---------- bibtex ---------- */
.bib { position: relative; background: #0f1720; color: #dbe4ee; border-radius: var(--radius); padding: 22px 24px; overflow: auto; font-size: .86rem; line-height: 1.6; box-shadow: var(--shadow); }
.bib pre { margin: 0; white-space: pre; }
.bib .copy { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.bib .copy:hover { background: rgba(255,255,255,.16); }

footer { padding: 36px 0 48px; color: var(--ink-3); font-size: .88rem; border-top: 1px solid var(--line); }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .two-col, .rw-intro { grid-template-columns: 1fr; }
  .tables { grid-template-columns: 1fr; }
  .tasks { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  section { padding: 44px 0; }
  .hero { padding: 48px 0 28px; }
  .method-cards { grid-template-columns: 1fr; }
  .hotspot .tip { max-width: 200px; font-size: .78rem; }
  .task .vids { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hotspot .ring { animation: none; opacity: .5; transform: translate(-50%, -50%) scale(1.8); }
  html { scroll-behavior: auto; }
}

/* ---------- task frame strips (Figure 7) ---------- */
.strips { display: grid; gap: 14px; }
.strips .row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.strips .row i { font-style: normal; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 700; font-size: .85rem; }
.strips .row img { width: 100%; border-radius: 6px; }
.rw-bottom { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 28px; justify-items: center; }
.rw-bottom .tcard { width: 100%; max-width: 640px; }
