:root {
  --bg: #ffffff; --panel: #f7f9fc; --line: #dce3ec; --text: #1b283b; --muted: #586678;
  color-scheme: light;
  --gold: #956719; --gold-hi: #80520d; --gold-dk: #684510;
  --blue: #2b72b9; --blue-hi: #205f9d; --red: #b13a2c; --up: #217444;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: Inter, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--sans);
  background-image: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(111,184,240,.08), transparent 70%),
                    radial-gradient(ellipse 50% 30% at 50% 8%, rgba(212,176,106,.07), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--blue-hi); }
b.g { color: var(--gold-hi); font-weight: 500; }

/* hero */
.hero { position: relative; max-width: 1100px; margin: 0 auto; padding: 96px 24px 56px; text-align: center; }
.hero-lines { display: block; width: 100%; max-width: 900px; height: 90px; margin: -6px auto 26px; opacity: .8; }
.hero-lines path { fill: none; stroke-width: 1.4; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s ease forwards; }
.hero-lines .axis { stroke: var(--gold-dk); }
.hero-lines .trace { stroke: var(--gold); animation-delay: .4s; }
.hero-lines .gt { stroke: var(--gold-hi); stroke-width: 2; animation-delay: 1.6s; }
.hero-lines .ev { stroke: var(--blue); animation-delay: 2.2s; }
.hero-lines .ev2 { stroke: var(--blue-hi); opacity: .6; animation-delay: 2.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kicker { position: relative; font: 12px var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
h1 { position: relative; font: 600 clamp(56px, 9vw, 104px)/1 var(--serif); letter-spacing: .04em; margin: 0;
     background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-dk)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { font: 500 clamp(22px, 3vw, 32px)/1.3 var(--serif); margin: 14px 0 10px; color: var(--text); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; max-width: 1000px; margin: 0 auto 20px; }
.author { font-size: 18px; font-weight: 500; white-space: nowrap; }
.author a { color: var(--text); text-decoration: none; }
.author a:hover { color: var(--blue-hi); text-decoration: underline; text-underline-offset: 4px; }
.authors sup, .affiliations sup, .contributions sup { font-size: .7em; margin-left: 2px; margin-right: 3px; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 980px; margin: 0 auto 14px; color: var(--muted); font-size: 14px; }
.affiliations span { display: inline-block; }
.contributions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.links a { font: 13px var(--mono); letter-spacing: .08em; color: var(--text); text-decoration: none; padding: 9px 18px;
           border: 1px solid var(--line); border-radius: 999px; transition: .2s; }
.links a:hover { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 24px rgba(212,176,106,.18); }
.tldr { max-width: 820px; margin: 40px auto 0; color: var(--text); font-size: 17px; }

/* sections */
main { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0 24px; border-top: 1px solid var(--line); }
h2 { font: 600 40px/1.1 var(--serif); margin: 0 0 18px; letter-spacing: .02em; }
h2 span { font: 13px var(--mono); color: var(--gold); letter-spacing: .2em; margin-right: 16px; vertical-align: middle; }
h3 { font: 600 15px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); margin: 0 0 8px; }
.lead { color: var(--text); max-width: 900px; margin: 0 0 32px; }

/* demo player */
.player { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0; background: var(--panel);
          border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.screen { background: var(--panel); height: 560px; }
.screen video { width: 100%; height: 100%; object-fit: contain; }
.qa { padding: 26px 26px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tags span { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
             border: 1px solid var(--line); color: var(--muted); }
.tags span:first-child { color: var(--gold-hi); border-color: var(--gold-dk); }
.stem { font-size: 17px; line-height: 1.55; margin: 0 0 18px; }
.options { list-style: none; padding: 0; margin: 0; counter-reset: opt; display: grid; gap: 8px; }
.options li { counter-increment: opt; padding: 9px 12px 9px 44px; position: relative; border: 1px solid var(--line);
              border-radius: 8px; font-size: 14.5px; transition: .35s; }
.options li::before { content: counter(opt, upper-alpha); position: absolute; left: 14px; font: 500 13px/1.75 var(--mono); color: var(--muted); }
.options li.gt { border-color: var(--gold); background: rgba(212,176,106,.1); color: var(--gold-hi); box-shadow: 0 0 22px rgba(212,176,106,.15); }
.options li.gt::before { color: var(--gold-hi); }
.note { margin: auto 0 0; padding-top: 16px; font: 11.5px var(--mono); color: var(--muted); letter-spacing: .04em; }
.timeline { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 30px 20px 16px; position: relative; cursor: pointer; user-select: none; }
.tl-row { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 14px; height: 26px; }
.tl-label { font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: .25s; }
.tl-row.on .tl-label { color: var(--text); }
.tl-row.target .tl-label { color: var(--gold-hi); }
.tl-track { position: relative; height: 10px; border-bottom: 1px solid var(--line); }
.tl-band { position: absolute; top: 1px; height: 8px; border: 1px solid var(--gold-dk); border-radius: 2px; background: rgba(212,176,106,.12); transition: .25s; }
.tl-row.target .tl-band { border-color: var(--gold); background: rgba(212,176,106,.3); }
.tl-row.on .tl-band { background: rgba(242,221,166,.55); border-color: var(--gold-hi); box-shadow: 0 0 12px rgba(242,221,166,.4); }
.tl-head { position: absolute; top: 24px; bottom: 10px; width: 2px; background: var(--blue); box-shadow: 0 0 10px var(--blue); pointer-events: none; }
.tl-time { position: absolute; top: -20px; transform: translateX(-50%); white-space: nowrap; font: 10.5px var(--mono); color: var(--blue-hi); }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: .2s; padding: 0; color: inherit; text-align: left; }
.card:hover { border-color: var(--blue); transform: translateY(-2px); }
.card.active { border-color: var(--gold); box-shadow: 0 0 20px rgba(212,176,106,.2); }
.card video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--panel); }
.card span { display: block; padding: 7px 10px; font: 11px var(--mono); letter-spacing: .05em; color: var(--muted); }
.card.active span { color: var(--gold-hi); }

/* method */
.method-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: center; margin-bottom: 48px; }
.method-row.flip video { order: 2; }
.method-row video { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: block; }
.method-text p { color: var(--text); margin: 0 0 22px; font-size: 15.5px; }
.eq { font: 13px/1.9 var(--mono); color: var(--blue-hi) !important; padding: 10px 14px; border-left: 2px solid var(--blue); background: rgba(111,184,240,.05); }
.overview { margin: 8px 0 0; }
.overview img { width: 100%; border-radius: 12px; background: #fff; padding: 18px; display: block; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* results */
.table-title { margin-top: 12px; }
.table-title small { font: 12px var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.table-wrap { overflow-x: auto; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table.results { border-collapse: collapse; width: 100%; font: 12.5px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.results th, .results td { padding: 7px 7px; text-align: center; white-space: nowrap; }
.results thead th { color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); }
.results thead tr:first-child th { color: var(--text); font-family: var(--sans); font-size: 12.5px; }
.results tbody { border-top: 1px solid var(--line); }
.results th.bb { color: var(--gold-hi); font-weight: 500; text-align: left; padding-left: 14px; }
.results td.m { text-align: left; color: var(--text); font-family: var(--sans); }
.results tr.ours { background: linear-gradient(90deg, rgba(212,176,106,.11), rgba(212,176,106,.04)); }
.results tr.ours td.m { color: var(--gold-hi); font-weight: 600; }
.results td.best { font-weight: 600; color: var(--text); }
.results tr.ours td.best { color: var(--gold-hi); }
.results td.second .v { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.results .d { display: block; font-size: 10px; margin-top: 1px; }
.results .d.up { color: var(--up); }
.results .d.down { color: var(--red); }
.takeaway { color: var(--text); max-width: 900px; margin: 0 0 40px; font-size: 15.5px; }

pre { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; overflow-x: auto;
      font: 13px/1.7 var(--mono); color: var(--text); }
footer { text-align: center; color: var(--muted); font: 12px var(--mono); letter-spacing: .1em; padding: 48px 0 56px; }

@media (max-width: 900px) {
  .hero { padding-top: 56px; }
  .kicker { line-height: 1.7; letter-spacing: .12em; }
  .player { grid-template-columns: 1fr; }
  .qa { border-left: 0; border-top: 1px solid var(--line); }
  .screen { height: auto; aspect-ratio: 4 / 3; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .method-row { grid-template-columns: 1fr; gap: 18px; }
  .method-row.flip video { order: 0; }
  .tl-row { grid-template-columns: 120px 1fr; }
}
