:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f5f5;
  --ink:           #121212;
  --ink-soft:      #555555;
  --ink-faint:     #8a8a8a;
  --line:          #e2e2e2;
  --line-strong:   #bbbbbb;

  --accent:        #f2600c;
  --accent-deep:   #c2410c;
  --accent-soft:   rgba(242, 96, 12, .08);
  --accent-line:   rgba(242, 96, 12, .35);

  --radius:        10px;
  --radius-sm:     6px;
  --nav-h:         58px;

  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .06);
  --shadow:        0 6px 12px rgba(0, 0, 0, .12);

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono:          'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

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

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

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.container-narrow { width: min(820px, calc(100% - 48px)); }

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  height: 100%;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.nav-brand:hover { text-decoration: none; }
.nav-brand span { color: var(--accent); }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: .89rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.nav-links a.is-active { color: var(--accent-deep); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  width: 38px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 8px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-soft); border-radius: 2px; }

/* Hero */

.hero {
  position: relative;
  padding: 72px 0 60px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -220px 0 auto 0;
  height: 520px;
  background:
    none;
  pointer-events: none;
  filter: blur(6px);
}
.hero .container { position: relative; }

.venue {
  margin: 0 0 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title {
  margin: 0 auto 40px;
  max-width: 950px;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -.032em;
  font-weight: 700;
}
.title-mark { color: var(--ink); }
.title-sub { display: block; margin-top: .2em; font-size: .58em; font-weight: 600; color: var(--ink); }

.title { margin-bottom: 22px; }
.authors {
  max-width: 900px;
  margin: 0 auto 10px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 20px;
  font-size: 1.05rem; font-weight: 500; color: var(--ink);
}
.author { white-space: nowrap; }
.authors sup, .affiliations sup { font-size: .68em; color: var(--accent-deep); margin-left: 1px; }
.affiliations {
  margin: 0 auto 20px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 24px;
  font-size: .95rem; color: var(--ink-soft);
}
.hero-links {
  margin: 0 auto 36px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.hero-links .ctrl { text-decoration: none; }
.hero-links .ctrl-primary {
  padding: 10px 22px;
  font-size: .98rem; font-weight: 600;
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.hero-links .ctrl-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.tldr {
  max-width: 860px;
  margin: 0 auto 44px;
}
.tldr-tag {
  font-weight: 700;
  letter-spacing: .02em;
}
.tldr-tag::after { content: ':'; }
.tldr p { display: inline; margin: 0; font-size: 1rem; color: var(--ink-soft); }
.hl { font-style: normal; font-weight: 600; color: var(--ink); }

.teaser { margin: 0; }
.teaser img, .teaser video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.teaser figcaption {
  max-width: 940px;
  margin: 16px auto 0;
  font-size: .9rem;
  color: var(--ink-faint);
  text-align: left;
}

/* Sections */

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -.024em;
  font-weight: 700;
  text-align: center;
}
.section-lead {
  margin: 0 auto 34px;
  max-width: 760px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
}

.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose .small, .prose.small { font-size: .88rem; color: var(--ink-faint); }

.caption {
  max-width: 820px;
  margin: 22px auto 0;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-faint);
}

/* Placeholders */

.placeholder {
  position: relative;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #fafafa 0 12px, #f0f0f0 12px 24px);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  text-align: center;
}
.placeholder-video { aspect-ratio: 16 / 9; }
.placeholder-body { padding: 20px; }
.placeholder-body p { margin: 4px 0; font-size: .9rem; }
.placeholder-body svg {
  width: 40px; height: 40px;
  fill: none; stroke: var(--line-strong); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 8px;
}
.placeholder::after {
  content: attr(data-label);
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: .68rem;
  opacity: .72;
}

/* Gallery */

.pill-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}
.pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent-deep); }
.pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: none;
}

/* Comparisons */

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
.cmp-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 1000px; margin-inline: auto; }
.cmp-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.cmp-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cmp-card.is-ours { border-color: var(--accent); }

.cmp-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #f5f5f5;
}
.cmp-card.is-ours .cmp-head { background: var(--accent-soft); border-bottom-color: var(--accent-line); }
.cmp-name { font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-muted { background: var(--line-strong); color: var(--ink-soft); }

.video-wrap {
  position: relative;
  background: #1b1b1b;
  aspect-ratio: 1438 / 1074;   /* matches the source clips */
}
.cmp-video { width: 100%; height: 100%; object-fit: contain; }
.video-wrap.is-loading::after {
  content: 'loading...';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #888888;
  font-family: var(--mono);
  font-size: .8rem;
}

.scrub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}
.scrub-time { color: var(--ink-faint); font-size: .72rem; white-space: nowrap; }

/* --pct is written by JS so the filled track follows playback position. */
.scrub-range {
  --pct: 0%;
  flex: 1 1 auto;
  min-width: 0;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.scrub-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.scrub-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent))
              0 / var(--pct) 100% no-repeat,
              #dcdcdc;
}
.scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px; height: 15px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .12s ease;
}
.scrub-range:hover::-webkit-slider-thumb { transform: scale(1.15); }
.scrub-range:active::-webkit-slider-thumb { transform: scale(1.15); background: var(--accent); }

.scrub-range::-moz-range-track { height: 6px; border-radius: 999px; background: #dcdcdc; }
.scrub-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}
.scrub-range::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.cmp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.ctrl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .87rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.ctrl:hover { border-color: var(--accent); color: var(--accent-deep); }
.ctrl svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.ctrl svg rect { fill: currentColor; stroke: none; }

.master-scrub {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  min-width: 220px;
}

/* Figures and cards */

.figure { margin: 0 auto; max-width: 1000px; text-align: center; }
.figure-wide { max-width: 880px; margin-top: 40px; }
.section > .container > .figure-wide:first-of-type { margin-top: 0; }
.figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.figure figcaption {
  margin-top: 14px;
  font-size: .9rem;
  color: var(--ink-faint);
  text-align: center;
}

/* Tables */

.table-block { margin: 0 0 44px; }
.table-narrow { max-width: 620px; margin-inline: auto; }
.table-block:last-child { margin-bottom: 0; }
.table-block figcaption {
  max-width: 900px;
  margin: 0 auto 16px;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-soft);
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .89rem;
  font-variant-numeric: tabular-nums;
}
.tbl th, .tbl td {
  padding: 9px 14px;
  text-align: right;
  white-space: nowrap;
}
.tbl thead th {
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.tbl thead tr:first-child th[colspan] {
  text-align: center;
  border-left: 1px solid var(--line);
  color: var(--ink);
}
.tbl .col-method { text-align: left; }
.tbl tbody td { border-bottom: 1px solid #eeeeee; }
.tbl tbody:last-child tr:last-child td { border-bottom: none; }
.tbody-group > tr:first-child > td { border-top: 1px solid var(--line-strong); }
.tbl .second { text-decoration: underline; text-underline-offset: 3px; }
.tbl .row-ours { background: var(--accent-soft); }
.tbl .row-ours .col-method { font-weight: 600; color: var(--accent-deep); }
.tbl tbody tr:hover { background: #fafafa; }
.tbl .row-ours:hover { background: rgba(242, 96, 12, .13); }

/* Footer */

/* Responsive */

@media (max-width: 980px) {
  .nav-links a { padding: 6px 8px; font-size: .84rem; }
}

@media (max-width: 900px) {
  .cmp-grid, .cmp-grid-2 { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container, .container-narrow { width: calc(100% - 32px); }
  .nav-inner { width: calc(100% - 32px); }
  .section { padding: 54px 0; }
  .hero { padding: 44px 0 40px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.is-open { display: flex; }

  .tldr { flex-direction: column; gap: 10px; }
  .cmp-controls { border-radius: var(--radius); }
  .master-scrub { flex-basis: 100%; }
}

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