/* ==========================================================================
   Video Models are Excellent Motion Models: project page

   Design notes
   - Colours for models match the renders in every result video:
     V2M (ours) blue, Kimodo orange, MotionGPT3 purple, CondMDI green,
     keyframes pink. The interface accent is the V2M blue.
   - Dark and light themes; the stored choice (or the system's) is applied
     before first paint by the inline script in index.html.
   - Type: Inter for text, Instrument Serif for display accents,
     JetBrains Mono for labels and code.
   ========================================================================== */

:root,
:root[data-theme="dark"] {
  --paper: #0A0F1E;
  --surface: #111830;
  --surface-2: #161F3A;
  --band: #0D1326;
  --ink: #EAEFFA;
  --ink-soft: #C9D2E6;
  --muted: #97A3BE;
  --faint: #6F7C98;
  --rule: #212B47;
  --rule-strong: #2E3A5C;

  --accent: #6FB6FF;
  --accent-2: #A98CFF;
  --accent-3: #FF7EB6;
  --accent-soft: rgba(111, 182, 255, .12);
  --accent-line: rgba(111, 182, 255, .38);

  --btn-bg: #EAEFFA;
  --btn-ink: #0A0F1E;

  --v2m: #56B0EA;
  --kimodo: #E0A030;
  --mgpt: #A46BDB;
  --condmdi: #22A67A;
  --key: #E8559C;

  --win: #56B0EA;
  --tie: #34405F;
  --loss: #E0A030;

  --veil: 10 15 30;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 50px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, .55);
  --code-bg: #070B17;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F6FB;
  --band: #F5F7FC;
  --ink: #0B1226;
  --ink-soft: #26304A;
  --muted: #55607A;
  --faint: #7A849C;
  --rule: #E3E8F2;
  --rule-strong: #CBD3E3;

  --accent: #1F6FD6;
  --accent-2: #6B4FE0;
  --accent-3: #D9327F;
  --accent-soft: #EAF2FD;
  --accent-line: #B9D3F6;

  --btn-bg: #0B1226;
  --btn-ink: #FFFFFF;

  --v2m: #2F95D8;
  --kimodo: #D08A14;
  --mgpt: #9150CC;
  --condmdi: #14936A;
  --key: #DB3C88;

  --win: #2F95D8;
  --tie: #D7DDEA;
  --loss: #D08A14;

  --veil: 255 255 255;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 44px rgba(15, 23, 42, .10);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, .18);
  --code-bg: #F4F6FB;
  color-scheme: light;
}

:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wide: min(100% - 32px, 1240px);
  --nav-h: 60px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
b, strong { font-weight: 600; color: var(--ink); }
kbd {
  font: 500 12px var(--mono);
  padding: 1px 6px;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-soft);
}

.wrap { width: var(--wide); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--btn-bg); color: var(--btn-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

section { padding: 100px 0; position: relative; }
section.band { background: var(--band); border-block: 1px solid var(--rule); }

h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  margin: 0 0 18px;
  max-width: 22ch;
}
h3 { font-size: 17px; letter-spacing: -.01em; margin: 0 0 8px; font-weight: 600; }
.eyebrow {
  font: 500 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.lede { color: var(--muted); font-size: 18px; max-width: 68ch; margin: 0 0 36px; }
.small { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.tiny { font-size: 12px; color: var(--faint); margin: 14px 0 0; line-height: 1.5; }
.note { font-size: 13.5px; color: var(--faint); max-width: 90ch; margin: 22px 0 0; }

/* ------------------------------------------------------------ reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgb(var(--veil) / .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--rule);
}
.navrow { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  font: 800 14px/1 var(--sans);
  letter-spacing: .02em;
  padding: 7px 9px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(120deg, var(--v2m), var(--accent-2) 60%, var(--accent-3));
  box-shadow: 0 4px 18px rgb(86 176 234 / .35);
}
.brand-sub {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s;
}
.nav.scrolled .brand-sub { opacity: 1; transform: none; }
.navlinks { list-style: none; display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.navlinks a {
  display: block; padding: 7px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.navlinks a:hover { color: var(--ink); text-decoration: none; background: var(--accent-soft); }
.navlinks a.active { color: var(--ink); background: var(--accent-soft); }
.themebtn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
  transition: transform .3s var(--ease), border-color .2s;
}
.themebtn:hover { transform: rotate(-18deg); border-color: var(--accent-line); }
:root[data-theme="dark"] .i-sun, :root[data-theme="light"] .i-moon { display: none; }
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--v2m), var(--accent-2), var(--accent-3));
}

/* -------------------------------------------------------------- hero */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 0 40px; overflow: hidden; isolation: isolate; }
.wall {
  position: absolute; z-index: -3;
  left: -18%; right: -18%; top: -12%; height: min(118vh, 1100px);
  transform: perspective(1600px) rotateX(24deg) rotateZ(-7deg) scale(1.08);
  transform-origin: 50% 30%;
  animation: drift 38s ease-in-out infinite alternate;
}
.wall video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15); }
/* In dark mode, flip the white render floor to night while keeping the model hues. */
:root[data-theme="dark"] .wall video { filter: invert(1) hue-rotate(180deg) saturate(1.5) brightness(.95); }
@keyframes drift {
  from { transform: perspective(1600px) rotateX(24deg) rotateZ(-7deg) scale(1.08) translate3d(-2%, 0, 0); }
  to   { transform: perspective(1600px) rotateX(24deg) rotateZ(-7deg) scale(1.14) translate3d(2%, -3%, 0); }
}
.veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 620px 340px at 50% 330px, rgb(var(--veil) / .7), rgb(var(--veil) / 0) 100%),
    linear-gradient(to bottom, rgb(var(--veil) / .62) 0, rgb(var(--veil) / .72) 480px, rgb(var(--veil) / .92) 720px, var(--paper) 980px);
}
:root[data-theme="light"] .veil {
  background:
    radial-gradient(ellipse 620px 340px at 50% 330px, rgb(var(--veil) / .75), rgb(var(--veil) / 0) 100%),
    linear-gradient(to bottom, rgb(var(--veil) / .8) 0, rgb(var(--veil) / .86) 480px, rgb(var(--veil) / .95) 720px, var(--paper) 980px);
}

/* Hero content rises in on load (independent of scroll observers). */
.hero .rise { animation: rise 1s var(--ease) both; }
.hero .rise:nth-child(2) { animation-delay: .08s; }
.hero .rise:nth-child(3) { animation-delay: .18s; }
.hero .rise:nth-child(4) { animation-delay: .28s; }
.hero .rise:nth-child(5) { animation-delay: .36s; }
.hero .rise:nth-child(6) { animation-delay: .44s; }
.overview .rise { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.g1 { width: 520px; height: 520px; left: -140px; top: 60px; background: radial-gradient(circle, rgb(86 176 234 / .55), transparent 65%); animation: float 16s ease-in-out infinite alternate; }
.g2 { width: 560px; height: 560px; right: -160px; top: 220px; background: radial-gradient(circle, rgb(169 140 255 / .45), transparent 65%); animation: float 19s ease-in-out infinite alternate-reverse; }
:root[data-theme="light"] .glow { opacity: .35; }
@keyframes float { to { transform: translate3d(60px, 40px, 0) scale(1.1); } }

.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  font: 500 12.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink-soft);
  background: rgb(var(--veil) / .6); border: 1px solid var(--rule-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  margin-bottom: 30px;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--v2m); box-shadow: 0 0 0 0 rgb(86 176 234 / .7); animation: ping 2.2s infinite; }
.pill-arrow { color: var(--accent); }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgb(86 176 234 / 0); } 100% { box-shadow: 0 0 0 0 rgb(86 176 234 / 0); } }

.title {
  font-size: clamp(40px, 7.2vw, 92px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 800;
  margin: 0 0 26px;
  max-width: 15ch;
  text-wrap: balance;
}
.title-em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  padding-right: .06em;
  background: linear-gradient(100deg, var(--v2m) 0%, var(--accent-2) 35%, var(--accent-3) 60%, var(--v2m) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.tagline { font-size: clamp(16px, 1.6vw, 19.5px); color: var(--ink-soft); max-width: 62ch; margin: 0 0 34px; text-wrap: pretty; }

.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; font-size: 17.5px; font-weight: 500; margin-bottom: 10px; }
.author a { color: var(--ink); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s var(--ease), color .2s; }
.author a:hover { text-decoration: none; color: var(--accent); background-size: 100% 1.5px; }
.author sup { color: var(--accent); font-size: 11px; margin-left: 2px; font-weight: 600; }
.affil { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 14.5px; color: var(--muted); margin-bottom: 34px; }
.affil sup { color: var(--accent); margin-right: 3px; font-weight: 600; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 64px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  color: var(--ink); background: rgb(var(--veil) / .55);
  border: 1px solid var(--rule-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), border-color .2s, background-color .2s, box-shadow .25s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 10px 26px rgb(0 0 0 / .18); }
.btn.primary { background: var(--btn-bg); color: var(--btn-ink); border-color: transparent; }
.btn.pending { color: var(--faint); cursor: default; }
.btn.pending:hover { transform: none; box-shadow: none; border-color: var(--rule-strong); }
.soon { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 4px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }

/* overview video */
.overview { padding: 0; }
.player {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg);
  max-width: 1120px; margin: 0 auto;
}
.player::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit; padding: 1.5px;
  background: linear-gradient(130deg, var(--v2m), transparent 35%, transparent 65%, var(--accent-3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.player video { width: 100%; height: 100%; object-fit: cover; }
.player-cover {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 18px;
  padding: clamp(16px, 3vw, 34px);
  border: 0; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(to top, rgba(5, 8, 18, .94) 0%, rgba(5, 8, 18, .7) 22%, rgba(5, 8, 18, .12) 55%, rgba(5, 8, 18, .05));
  transition: opacity .4s;
}
.player.playing .player-cover { opacity: 0; pointer-events: none; }
.play-ring {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(68px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; padding-left: 4px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), background-color .3s;
}
.play-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55); animation: ring 2.4s var(--ease) infinite;
}
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.player-cover:hover .play-ring { transform: scale(1.08); background: rgba(255, 255, 255, .26); }
.player-label { display: flex; flex-direction: column; gap: 2px; }
.player-label strong { color: #fff; font-size: clamp(16px, 1.8vw, 21px); letter-spacing: -.01em; }
.player-label span { font: 500 12.5px var(--mono); color: rgba(255, 255, 255, .75); letter-spacing: .03em; }

/* --------------------------------------------------------- highlights */
.highlights { padding: 72px 0 24px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  padding: 24px 22px 22px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--rule);
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.stat::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--v2m), var(--accent-2), var(--accent-3));
  opacity: .8;
}
.stat-num {
  font-size: clamp(40px, 4.4vw, 58px); font-weight: 800; letter-spacing: -.05em; line-height: 1;
  margin-bottom: 14px; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--ink) 30%, var(--v2m));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-num small { font-size: .5em; letter-spacing: 0; margin-left: 2px; }
.stat-num .vs { font-size: .36em; letter-spacing: 0; margin-left: 10px; font-weight: 600; -webkit-text-fill-color: var(--kimodo); }
.stat p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------ abstract */
.center-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 34px; }
.center-head h2 { margin: 0 auto; max-width: 30ch; text-wrap: balance; }
.center-head .eyebrow::after { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.prose { max-width: 80ch; margin: 0 auto; }
.prose p { margin: 0; color: var(--ink-soft); font-size: 16.5px; line-height: 1.75; text-wrap: pretty; }
.prose em { font-family: var(--serif); font-size: 1.15em; color: var(--accent); }
.c-v { color: var(--v2m); font-weight: 600; }
.c-m { color: var(--kimodo); font-weight: 600; }
.c-k { color: var(--key); font-weight: 600; }

.fig { margin: 64px 0 0; }
.fig figcaption { color: var(--muted); font-size: 14.5px; margin: 14px auto 0; text-align: center; }
.zoomable {
  display: block; width: 100%; padding: clamp(12px, 2.2vw, 26px); border: 1px solid var(--rule);
  border-radius: var(--r-lg); background: #fff; cursor: zoom-in;
  box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s;
}
.zoomable:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent-line), var(--shadow-lg); }
.hero-fig .zoomable { max-width: 1000px; margin: 0 auto; }
.zoomable img { width: 100%; height: auto; }

/* ----------------------------------------------------------- framework */
.fw-tabs, .etabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.fw-tab, .etab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color .2s, background-color .2s, border-color .2s;
}
.fw-tab:hover, .etab:hover { color: var(--ink); border-color: var(--accent-line); }
.fw-tab.active, .etab.active { color: var(--btn-ink); background: var(--btn-bg); border-color: transparent; }
.xl { font: 700 12px/1 var(--mono); width: 20px; height: 20px; display: inline-grid; place-items: center; flex: none; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.fw-tab.active .xl { background: rgb(var(--veil) / .2); color: inherit; }

.fw { display: grid; gap: 16px; }
.fw-figure {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); background: #fff; border: 1px solid var(--rule);
  padding: clamp(10px, 1.6vw, 22px); box-shadow: var(--shadow);
}
.fw-figure img { width: 100%; height: auto; }
.spot {
  position: absolute; border-radius: 12px; pointer-events: none;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 200vmax rgba(10, 15, 30, .58);
  transition: left .6s var(--ease), top .6s var(--ease), width .6s var(--ease), height .6s var(--ease), opacity .4s;
  opacity: 0;
}
.spot.on { opacity: 1; }
.fw-zoom {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 9px; cursor: zoom-in;
  display: grid; place-items: center;
  border: 1px solid #D5DBE8; background: rgba(255, 255, 255, .9); color: #26304A;
}
.fw-cap { margin: 0; min-height: 28px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); text-align: center; }
.fw-cap b { color: var(--accent); font: 700 15px var(--mono); }
.num { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11.5px/1 var(--sans); color: #fff; }
.num.v { background: var(--v2m); }
.num.m { background: var(--kimodo); }
.swap { animation: swapIn .45s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* paper figures: two-column masonry */
.figgrid { columns: 2; column-gap: 22px; }
.fcard { break-inside: avoid; margin: 0 0 26px; }
.fcard .zoomable { padding: clamp(10px, 1.6vw, 20px); }
.fcard figcaption { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }

/* ------------------------------------------------------------- results */
.gtabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.gtab {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 8px 0 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--surface);
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: color .2s, background-color .2s, border-color .2s, transform .25s var(--ease);
}
.gtab:hover { color: var(--ink); border-color: var(--accent-line); transform: translateY(-1px); }
.gtab .xl { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
.gtab .cnt { font: 500 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--faint); }
.gtab.active { color: var(--btn-ink); background: var(--btn-bg); border-color: transparent; }
.gtab.active .xl { background: linear-gradient(135deg, var(--v2m), var(--accent-2)); color: #fff; }
.gtab.active .cnt { background: rgb(var(--veil) / .16); color: inherit; }
.gtab.fail .xl { background: rgb(232 85 85 / .14); color: #E85555; }
.gtab.fail.active .xl { background: #E85555; color: #fff; }

.gbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-bottom: 26px; }
.gdesc { margin: 0; font-size: 15px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink-soft); white-space: nowrap;
}
.chip i { width: 14px; height: 6px; border-radius: 4px; background: var(--c); }
.chip.ours { border-color: var(--accent-line); color: var(--ink); }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9;
  border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden;
  background: #fff; cursor: zoom-in; box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tile video { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }
.tile-zoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; background: rgba(11, 18, 38, .72);
  opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s var(--ease);
}
.tile:hover .tile-zoom, .tile:focus-visible .tile-zoom { opacity: 1; transform: none; }
.gallery.enter .tile { animation: tileIn .7s var(--ease) both; animation-delay: var(--d); }
@keyframes tileIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }

/* ---------------------------------------------------------- evaluation */
.epane[hidden] { display: none; }
.legend-wtl { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.legend-wtl i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.legend-wtl .w { background: var(--win); } .legend-wtl .t { background: var(--tie); } .legend-wtl .l { background: var(--loss); }

.human-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hcard { padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--rule); }
.hcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hcard-head .xl { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.hcard-head span:last-child { font-weight: 600; }
.metric { margin-bottom: 16px; }
.metric:last-child { margin-bottom: 0; }
.metric-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.metric-label b { font: 700 13px var(--mono); color: var(--v2m); }
.wtl { display: flex; height: 26px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.wtl span {
  display: grid; place-items: center; width: 0; overflow: hidden; white-space: nowrap;
  font: 600 11px var(--mono); color: #fff;
  transition: width 1.2s var(--ease);
}
.wtl .w { background: var(--win); }
.wtl .t { background: var(--tie); color: var(--ink-soft); }
.wtl .l { background: var(--loss); }
.wtl.sm { height: 20px; }
.wtl.sm span { font-size: 10px; }

.completion { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.comp-card { padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--rule); }
.comp-card h3 { margin-bottom: 4px; }
.pairs { display: grid; gap: 14px; margin-top: 16px; }
.pair { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.pair .xl { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.pbar { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.pbar .track { height: 11px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar .track i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.3s var(--ease); }
.pbar.v .track i { background: linear-gradient(90deg, var(--v2m), var(--accent-2)); }
.pbar.m .track i { background: var(--kimodo); }
.pbar em { font: 600 12px var(--mono); font-style: normal; color: var(--ink-soft); text-align: right; }
.pairs-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.pairs-legend i { display: inline-block; width: 12px; height: 6px; border-radius: 3px; margin-right: 6px; vertical-align: 2px; }

.vlm { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.vrow { display: grid; grid-template-columns: 52px 92px 86px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.vrow.head { border-top: 0; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); background: var(--surface-2); }
.vrow.first { border-top: 1px solid var(--rule-strong); }
.vrow .vx { font-weight: 700; color: var(--accent); }
.vrow .vg { color: var(--muted); font-size: 12.5px; }

.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); }
.metrics { border-collapse: collapse; width: 100%; min-width: 720px; font-variant-numeric: tabular-nums; font-size: 14px; }
.metrics th, .metrics td { padding: 11px 16px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.metrics th { font-weight: 600; font-size: 12.5px; color: var(--muted); background: var(--surface-2); vertical-align: bottom; }
.metrics th small { font: 400 11px var(--mono); color: var(--faint); }
.metrics th.grp { text-align: center; border-bottom: 1px solid var(--rule-strong); }
.metrics th:nth-child(-n+2), .metrics td:nth-child(-n+2) { text-align: left; }
.metrics tbody tr.first td { border-top: 1px solid var(--rule-strong); }
.metrics td.exp { font-weight: 700; color: var(--accent); }
.metrics tr.ours td { background: var(--accent-soft); }
.metrics tr.ours td:nth-child(2) { color: var(--ink); font-weight: 600; }
.metrics td b { color: var(--ink); font-weight: 700; }
.metrics td { color: var(--ink-soft); }
.method-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--c); }


/* ------------------------------------------------------------ takeaway */
.big-quote {
  margin: 110px auto 0; max-width: 24ch; text-align: center;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.2vw, 54px); line-height: 1.12; letter-spacing: -.01em;
  color: var(--ink); text-wrap: balance;
}
.big-quote .grad {
  font-style: italic;
  background: linear-gradient(100deg, var(--v2m), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- cite */
.bib { position: relative; border-radius: var(--r-md); background: var(--code-bg); border: 1px solid var(--rule); max-width: 860px; margin: 0 auto; }
.bib pre { margin: 0; padding: 24px 26px; overflow-x: auto; font: 13.5px/1.7 var(--mono); color: var(--ink-soft); }
#copyBib {
  position: absolute; right: 12px; top: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-soft);
  transition: border-color .2s, color .2s;
}
#copyBib:hover { border-color: var(--accent-line); color: var(--ink); }
#copyBib.ok { color: var(--condmdi); border-color: var(--condmdi); }

footer { padding: 40px 0 56px; border-top: 1px solid var(--rule); }
.foot p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.foot .faint { color: var(--faint); font-size: 12.5px; }

/* ------------------------------------------------------------ lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px 72px;
  background: rgba(5, 8, 18, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.lb-fig { margin: 0; max-width: min(1600px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-fig img { max-width: 100%; max-height: 82vh; width: auto; background: #fff; border-radius: 12px; padding: 14px; animation: zoomIn .35s var(--ease); }
.lb-fig video { width: min(1500px, 100%); max-height: 82vh; background: #fff; border-radius: 12px; animation: zoomIn .35s var(--ease); }
@keyframes zoomIn { from { transform: scale(.96); opacity: 0; } }
.lb-fig figcaption { color: #C9D2E6; font-size: 14.5px; max-width: 90ch; text-align: center; }
.lb-close, .lb-nav {
  position: fixed; z-index: 2; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff;
  transition: background-color .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .18); }
.lb-close { right: 18px; top: 18px; width: 42px; height: 42px; }
.lb-nav { top: 50%; translate: 0 -50%; width: 48px; height: 48px; }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .navlinks { display: none; }
  .themebtn { margin-left: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .human-grid { grid-template-columns: 1fr; }
  .completion { grid-template-columns: 1fr; }
  .vrow { grid-template-columns: 40px 76px 70px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .figgrid { columns: 1; }
  .lightbox { padding: 16px; }
  .lb-nav { top: auto; bottom: 18px; translate: none; }
}
@media (max-width: 640px) {
  section { padding: 72px 0; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .brand-sub { display: none; }
  .links { margin-bottom: 40px; }
  .btn { height: 40px; padding: 0 14px; font-size: 14px; }
  .gtab { font-size: 13.5px; height: 42px; }
  .gtab .xl { width: 28px; height: 28px; }
  .vrow { grid-template-columns: 1fr 1fr; }
  .vrow.head { display: none; }
  .vrow .vbar-wrap { grid-column: 1 / -1; }
  .vrow .vbar-wrap::before { content: attr(data-label); display: block; font: 500 10.5px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
  .player-label span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
