/* ==========================================================================
   InteracVid project page
   ========================================================================== */

:root {
  --violet-50:  #f5f3ff;
  --violet-100: #ede9fe;
  --violet-200: #ddd6fe;
  --violet-300: #c4b5fd;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  --violet-900: #3b1a86;

  --amber-50:  #fffbeb;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-700: #b45309;

  --teal-50:  #f0fdfa;
  --teal-500: #14b8a6;
  --teal-700: #0f766e;

  --ink:      #16151d;
  --ink-soft: #3f3d4c;
  --body:     #4b4a57;
  --muted:    #736f80;
  --faint:    #9b96a8;
  --line:     #e6e2ee;
  --line-soft: #f0edf6;
  --surface:  #ffffff;
  --page:     #fbfaff;
  --page-alt: #f6f4fc;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(29, 22, 56, .06);
  --shadow-sm: 0 2px 8px rgba(29, 22, 56, .06), 0 1px 2px rgba(29, 22, 56, .04);
  --shadow-md: 0 8px 28px rgba(29, 22, 56, .09), 0 2px 6px rgba(29, 22, 56, .04);
  --shadow-lg: 0 20px 60px rgba(29, 22, 56, .16);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
          Consolas, monospace;

  --nav-h: 56px;
  --wide: 1180px;
  --text: 780px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

img, video { max-width: 100%; display: block; }

a { color: var(--violet-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.22;
  margin: 0;
  text-wrap: balance;
}

code, kbd { font-family: var(--mono); font-size: .88em; }

:focus-visible {
  outline: 2px solid var(--violet-600);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--violet-200); color: var(--violet-900); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap { width: min(100% - 40px, var(--wide)); margin-inline: auto; }
.narrow { width: min(100%, var(--text)); margin-inline: auto; }

.section { padding: 76px 0; }
.section--alt { background: var(--page-alt); border-block: 1px solid var(--line-soft); }
.section--tight { padding: 52px 0; }

.section__head { margin-bottom: 34px; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--violet-600); margin-bottom: 12px;
}
.section__eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--violet-500), var(--amber-500));
}
.section__title { font-size: clamp(27px, 3.4vw, 35px); }
.section__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet-700) 8%, #a855f7 55%, var(--amber-500) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.section__lead {
  margin: 14px 0 0; font-size: 17.5px; color: var(--muted); max-width: 74ch;
}

/* The reset has to stay at the same specificity as the sibling rule below,
   otherwise it wins and consecutive paragraphs collapse into one block. */
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose h3 {
  font-size: 20px; margin-top: 1.9em !important;
  display: flex; align-items: baseline; gap: 10px;
}
.prose ul { margin: 0; padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--violet-300); }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  background: rgba(251, 250, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-xs); }

.nav__inner {
  height: 100%; display: flex; align-items: center; gap: 20px;
}
.nav__brand {
  font-weight: 720; font-size: 16px; color: var(--ink);
  letter-spacing: -.03em; flex: none;
}
.nav__brand:hover { text-decoration: none; color: var(--violet-700); }
.nav__brand span { color: var(--violet-600); }

.nav__links {
  display: flex; gap: 2px; margin-left: auto;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 520; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--violet-100); color: var(--violet-700); text-decoration: none; }
.nav__links a.is-active { background: var(--violet-600); color: #fff; }

@media (max-width: 940px) { .nav__links { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding: 62px 0 44px;
  background:
    radial-gradient(1100px 460px at 12% -8%, #ece7ff 0%, transparent 62%),
    radial-gradient(900px 420px at 92% 4%, #fff2dc 0%, transparent 60%),
    linear-gradient(180deg, #fdfcff 0%, var(--page) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(124, 58, 237, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 58, 237, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 340px at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 340px at 50% 0%, #000 0%, transparent 78%);
}
.hero__inner { position: relative; text-align: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 14px 5px 6px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-xs);
  font-size: 13.5px; color: var(--muted);
}
.hero__badge b {
  padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--violet-600), #a855f7);
  color: #fff; font-size: 11.5px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(29px, 4.4vw, 49px);
  letter-spacing: -.03em; line-height: 1.1;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet-700) 8%, #a855f7 55%, var(--amber-500) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__sub {
  font-size: clamp(17px, 2vw, 20.5px); color: var(--muted);
  max-width: 66ch; margin: 0 auto 30px; line-height: 1.52;
}

.authors {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 18px; font-size: 16.5px; color: var(--ink); margin-bottom: 10px;
}
.authors a { color: var(--ink); font-weight: 520; }
.authors sup { color: var(--violet-600); font-weight: 700; }
.affil {
  font-size: 15px; color: var(--muted); margin-bottom: 4px;
}
.affil a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.corresp { font-size: 13.5px; color: var(--faint); }

.hero__links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 30px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 570; letter-spacing: -.01em;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s, border-color .16s, background .16s;
}
.btn:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: var(--shadow-sm); border-color: var(--violet-200); background: #fff;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary {
  background: linear-gradient(135deg, #1d1a2b, #322c4d);
  border-color: transparent; color: #fff;
}
.btn--primary:hover { background: linear-gradient(135deg, #262238, #3d3560); }
.btn--violet {
  background: linear-gradient(135deg, var(--violet-600), #9333ea);
  border-color: transparent; color: #fff;
}
/* The gradient has to be restated: .btn:hover is more specific than .btn--violet
   and would otherwise repaint the button white on white text. */
.btn--violet:hover {
  background: linear-gradient(135deg, var(--violet-600), #9333ea);
  filter: brightness(1.08);
}

.btn--teal {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  border-color: transparent; color: #fff;
}
.btn--teal:hover {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  filter: brightness(1.08);
}
.btn[aria-disabled="true"] {
  opacity: .55; pointer-events: none;
}
.btn__tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; background: var(--amber-200); color: var(--amber-700);
}

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

.figure { margin: 0; }
.figure__frame {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
/* height:auto is load-bearing: width/height attributes on <img> are presentational
   hints, so overriding width alone would stretch the image to its literal height. */
.figure__frame img { border-radius: 12px; width: 100%; height: auto; }
.figure--zoom .figure__frame { cursor: zoom-in; }
.figure__caption {
  margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted);
  max-width: 92ch;
}
.figure__caption b, .figure__caption strong { color: var(--ink-soft); font-weight: 620; }
.figure__num {
  color: var(--violet-600); font-weight: 680; margin-right: 4px;
}
.figure--plain .figure__frame { box-shadow: var(--shadow-sm); padding: 8px; }

/* --------------------------------------------------------------------------
   Stat cards
   -------------------------------------------------------------------------- */

.stats {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}
.stat {
  position: relative; overflow: hidden;
  padding: 20px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--violet-500), var(--amber-500));
  opacity: .85;
}
.stat__num {
  font-size: 30px; font-weight: 700; letter-spacing: -.045em;
  color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums;
}
.stat__num small { font-size: .58em; font-weight: 650; color: var(--violet-600); margin-left: 1px; }
.stat__label {
  margin-top: 7px; font-size: 13px; line-height: 1.42; color: var(--muted);
}

/* --------------------------------------------------------------------------
   Cards / callouts
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-xs);
}
.card__title {
  font-size: 17px; font-weight: 660; color: var(--ink); margin-bottom: 8px;
  display: flex; align-items: center; gap: 9px;
}
.card p { margin: 0; font-size: 15.5px; line-height: 1.62; }
.card p + p { margin-top: .8em; }

.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 620; letter-spacing: .02em;
  background: var(--violet-100); color: var(--violet-700);
  white-space: nowrap;
}
.pill--amber { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-200); }
.pill--teal  { background: var(--teal-50); color: var(--teal-700); }
.pill--gray  { background: var(--line-soft); color: var(--muted); }

.callout {
  display: flex; gap: 15px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--violet-50), #fdfcff);
  border: 1px solid var(--violet-200);
}
.callout__icon {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--violet-600); color: #fff;
}
.callout__icon svg { width: 17px; height: 17px; }
.callout p { margin: 0; font-size: 15.5px; }
.callout--amber {
  background: linear-gradient(180deg, var(--amber-50), #fffdf7);
  border-color: var(--amber-200);
}
.callout--amber .callout__icon { background: var(--amber-500); }

.keyline {
  border-left: 3px solid var(--violet-300); padding-left: 18px;
  font-size: 16.5px; color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */

.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 5px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow-xs);
  width: fit-content; max-width: 100%;
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 570; letter-spacing: -.01em;
  background: transparent; color: var(--muted);
  transition: background .15s, color .15s;
}
.tab:hover { background: var(--violet-100); color: var(--violet-700); }
.tab[aria-selected="true"] {
  background: var(--violet-600); color: #fff;
}
.tab__count {
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(0,0,0,.06); color: inherit;
}
.tab[aria-selected="true"] .tab__count { background: rgba(255,255,255,.24); }

.tabpanel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Sample grid
   -------------------------------------------------------------------------- */

.samples {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}
.sample {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.sample:hover { box-shadow: var(--shadow-sm); border-color: var(--violet-200); }
.sample.is-playing { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100), var(--shadow-sm); }

.vstage {
  position: relative; margin: 0; background: #0e0c16;
  aspect-ratio: 16 / 9; overflow: hidden;
}
.vstage--tall { aspect-ratio: 9 / 16; }
.vstage video, .vstage img.vposter {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
}
.vstage img.vposter { transition: opacity .2s; }
.vstage.is-live img.vposter { opacity: 0; }

.vstage__play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(10,8,20,.06) 0%, rgba(10,8,20,.34) 100%);
  transition: opacity .2s, background .2s;
}
.vstage.is-live .vstage__play { opacity: 0; pointer-events: none; }
.vstage__play:hover { background: linear-gradient(180deg, rgba(10,8,20,.1) 0%, rgba(10,8,20,.42) 100%); }
.vstage__play i {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.94); box-shadow: 0 6px 22px rgba(0,0,0,.34);
  transition: transform .18s cubic-bezier(.2,.7,.3,1);
}
.vstage__play:hover i { transform: scale(1.09); }
.vstage__play svg { width: 19px; height: 19px; fill: var(--ink); margin-left: 3px; }

.vstage__tag {
  position: absolute; z-index: 3; top: 9px; left: 9px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 7px;
  background: rgba(14,12,22,.72); backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 620; letter-spacing: .03em;
}
.vstage__dur {
  position: absolute; z-index: 3; bottom: 9px; right: 9px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(14,12,22,.72); backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.vstage.is-live .vstage__dur { display: none; }

.sample__body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }

.turn { display: grid; grid-template-columns: 22px 1fr; gap: 9px; align-items: start; }
.turn__icon {
  width: 22px; height: 22px; border-radius: 6px; margin-top: 1px;
  display: grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 700;
}
.turn__icon svg { width: 12px; height: 12px; }
.turn--q .turn__icon { background: var(--violet-100); color: var(--violet-700); }
.turn--a .turn__icon { background: var(--teal-50); color: var(--teal-700); }
.turn__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 1px;
}
.turn__text { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.turn--q .turn__text { font-weight: 550; color: var(--ink); }

.sample__caption {
  font-size: 13px; line-height: 1.55; color: var(--muted);
  padding-top: 11px; border-top: 1px dashed var(--line);
}
.lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); display: block; margin-bottom: 3px;
}
.sample__meta {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px;
}
.sample__meta .pill { font-size: 11px; padding: 2px 8px; }

.clamp { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp-4 { -webkit-line-clamp: 4; }
.is-open .clamp { -webkit-line-clamp: unset; display: block; }

.more {
  border: 0; background: none; padding: 2px 0 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 620; color: var(--violet-600);
}
.more:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Comparison (generation results / counterfactual)
   -------------------------------------------------------------------------- */

.cmp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
       box-shadow: var(--shadow-sm); overflow: hidden; }
.cmp__head {
  padding: 18px 22px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fdfcff, var(--surface));
}
.cmp__q {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline;
}
.cmp__qlabel {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--violet-600);
}
.cmp__qtext { font-size: 18px; font-weight: 580; color: var(--ink); line-height: 1.42; }
.cmp__body { padding: 20px 22px 22px; }

.cmp__row {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.cmp__row--tall { grid-template-columns: repeat(auto-fit, minmax(150px, 232px)); }
.cmp__cell { display: flex; flex-direction: column; gap: 9px; }
.cmp__celltop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cmp__name { font-size: 14px; font-weight: 640; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.cmp__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cmp__dot--gt { background: var(--teal-500); }
.cmp__dot--pt { background: var(--faint); }
.cmp__dot--ft { background: var(--violet-600); }
.cmp__dot--cf { background: var(--amber-500); }
.cmp__note { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* One case per block, stacked inside a single card. */
.gcase { padding: 20px 22px 24px; }
.gcase + .gcase { border-top: 1px solid var(--line-soft); }
.gcase .cmp__q + .cmp__row, .gcase > div + .cmp__row { margin-top: 15px; }
.gcase .cmp__name { margin-bottom: 2px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.tablewrap {
  overflow-x: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  -webkit-overflow-scrolling: touch;
}
table.t {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
table.t th, table.t td {
  padding: 9px 13px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line-soft);
}
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--page-alt);
  font-size: 12.5px; font-weight: 660; color: var(--ink);
  letter-spacing: .01em; border-bottom: 1px solid var(--line);
}
table.t thead tr:first-child th { text-align: center; }
table.t thead tr:first-child th:first-child { text-align: left; }
table.t tbody tr:hover { background: #fcfbff; }
table.t tbody tr.grouprow td {
  background: var(--page-alt); font-weight: 640; color: var(--ink);
  font-size: 13px; text-align: left; letter-spacing: .01em;
}
table.t tbody tr.delta td { color: var(--teal-700); font-size: 13.5px; border-bottom-style: dashed; }
table.t tbody tr.delta td:first-child { color: var(--faint); font-weight: 500; }
table.t tbody tr.best { background: #faf7ff; }
table.t td.b, table.t td strong { font-weight: 700; color: var(--ink); }
table.t .up { color: var(--teal-700); }
table.t .down { color: var(--faint); }
table.t td.sep, table.t th.sep { border-left: 1px solid var(--line); }
table.t .sub { font-size: 12px; color: var(--faint); font-weight: 500; }
table.t caption {
  caption-side: top; text-align: left; padding: 15px 16px 13px;
  font-size: 14px; line-height: 1.55; color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}
table.t caption b { color: var(--ink); font-weight: 650; }
.mark { color: var(--violet-600); font-weight: 700; }
.xmark { color: var(--faint); }

/* --------------------------------------------------------------------------
   Method / equation
   -------------------------------------------------------------------------- */

.eq {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px; padding: 26px 22px; margin: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  font-size: 19px; color: var(--ink);
}
.eq__term { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.eq__math { font-family: var(--mono); font-size: 17px; letter-spacing: -.02em; }
.eq__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
}
.eq__tag--gen { background: #e0e7ff; color: #4338ca; }
.eq__tag--plan { background: #f3e8ff; color: #7e22ce; }
.eq__op { font-size: 22px; color: var(--faint); }

.flow { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.flow__step {
  position: relative; padding: 20px 18px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.flow__n {
  width: 26px; height: 26px; border-radius: 8px; margin-bottom: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet-600), #a855f7); color: #fff;
  font-size: 13px; font-weight: 700;
}
.flow__step h4 { font-size: 15.5px; margin-bottom: 6px; }
.flow__step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* --------------------------------------------------------------------------
   Schema table
   -------------------------------------------------------------------------- */

.schema { font-size: 14px; }
.schema td:first-child {
  font-family: var(--mono); font-size: 12.5px; color: var(--violet-700); white-space: nowrap;
}
.schema td:last-child { text-align: left; white-space: normal; color: var(--muted); }

/* --------------------------------------------------------------------------
   BibTeX
   -------------------------------------------------------------------------- */

.bib { position: relative; }
.bib pre {
  margin: 0; padding: 22px 24px; overflow-x: auto;
  background: #1a1725; border-radius: var(--radius);
  color: #d7d2e8; font-family: var(--mono); font-size: 13px; line-height: 1.72;
  box-shadow: var(--shadow-md);
}
.bib .k { color: #c4b5fd; }
.bib .f { color: #7dd3fc; }
.bib .s { color: #fcd34d; }
.copy {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08);
  color: #e6e2f5; font-family: inherit; font-size: 12.5px; font-weight: 570;
  transition: background .15s;
}
.copy:hover { background: rgba(255,255,255,.17); }
.copy svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: 44px 0 54px; border-top: 1px solid var(--line);
  background: var(--page-alt); font-size: 14px; color: var(--muted);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 18px 30px; justify-content: space-between; }
.footer a { color: var(--violet-700); }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lb {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center; padding: 26px;
  background: rgba(14,12,22,.9); backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lb.is-open { display: grid; }
.lb img {
  max-width: 100%; max-height: calc(100vh - 90px);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  object-fit: contain;
}
.lb__cap {
  margin-top: 14px; text-align: center; color: #cfc9df; font-size: 13.5px;
  max-width: 80ch;
}
.lb__close {
  position: absolute; top: 16px; right: 20px;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff;
}
.lb__close:hover { background: rgba(255,255,255,.2); }
.lb__close svg { width: 17px; height: 17px; }

/* --------------------------------------------------------------------------
   Details / disclosure
   -------------------------------------------------------------------------- */

details.disc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  overflow: hidden;
}
details.disc + details.disc { margin-top: 10px; }
details.disc > summary {
  padding: 15px 20px; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 11px;
  font-size: 15.5px; font-weight: 600; color: var(--ink);
}
details.disc > summary::-webkit-details-marker { display: none; }
details.disc > summary::after {
  content: ""; margin-left: auto; flex: none;
  width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
details.disc[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details.disc > summary:hover { background: #fcfbff; }
.disc__inner { padding: 4px 20px 20px; border-top: 1px solid var(--line-soft); }
.disc__inner > *:first-child { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.mt-0  { margin-top: 0 !important; }
.mt-2  { margin-top: 12px; }
.mt-3  { margin-top: 18px; }
.mt-4  { margin-top: 26px; }
.mt-5  { margin-top: 36px; }
.mt-6  { margin-top: 48px; }
.center { text-align: center; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.note { font-size: 13.5px; color: var(--faint); line-height: 1.6; }
.note a { color: var(--muted); }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 34px; }
  .samples { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .eq { font-size: 16px; padding: 20px 14px; }
  .cmp__head, .cmp__body { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .nav, .hero__links, .vstage__play, .copy, .tabs { display: none !important; }
  body { background: #fff; }
  .section { padding: 24px 0; break-inside: avoid; }
}
