:root {
  --ink: #161616;
  --muted: #5e6670;
  --line: #e6e8eb;
  --paper: #ffffff;
  --wash: #f6f7f8;
  --accent: #0b57d0;
  --best: #137333;
  --best-bg: #e8f6ec;
  --ours: #f3fbf5;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --max: 1040px;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

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

img { max-width: 100%; height: auto; display: block; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav a:hover,
.nav a.active {
  background: var(--wash);
  text-decoration: none;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

header.hero {
  padding: 48px 0 12px;
  text-align: center;
}

.venue {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 auto 16px;
  max-width: 18em;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.authors {
  margin: 0;
  font-size: 18px;
}

.authors a { color: var(--ink); font-weight: 600; }
.authors .sep { color: #b0b6be; margin: 0 6px; }

.affiliation {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.affiliation small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0 22px;
}

.stat {
  padding: 16px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

button.stat {
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  border-color: #808080;
}

button.stat:hover,
button.stat:focus-visible {
  border-color: #FF8080;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #cfd3d8;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #111; text-decoration: none; }

.btn[disabled] {
  color: #8b919a;
  cursor: default;
  background: #fafafa;
}

.btn[disabled]:hover { border-color: #cfd3d8; }

.soon {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eee;
  color: #666;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.figure {
  margin: 8px 0 36px;
}

.figure img {
  width: 100%;
  border-radius: 12px;
  cursor: zoom-in;
}

.caption {
  margin: 10px auto 0;
  max-width: 68em;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.subhead {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.qual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 8px;
}

.qual-grid .gallery-item {
  margin: 0;
}

.qual-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
}

.gallery-item[hidden] { display: none; }

section { padding: 18px 0 28px; scroll-margin-top: 72px; }

h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.lede {
  margin: 0 auto 22px;
  max-width: 46em;
  color: #333;
  text-align: center;
}

.prose p { margin: 0 0 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.card .kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card strong.num {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.card p { margin: 0; color: #333; font-size: 15px; }

.method-fig { margin-bottom: 16px; }
.method-fig img { border-radius: 12px; cursor: zoom-in; }

.accordion { display: grid; gap: 10px; }

.acc {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  scroll-margin-top: 80px;
}

.acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.acc-toggle:hover { background: var(--wash); }

.badge {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.acc-toggle h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.acc-toggle p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chevron {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.acc.open .chevron { transform: rotate(225deg); margin-top: 6px; }

.acc-body {
  display: none;
  padding: 0 18px 18px 64px;
  color: #222;
}

.acc.open .acc-body { display: block; }

.acc-body p { margin: 0 0 10px; }
.acc-body img { margin-top: 8px; border-radius: 10px; cursor: zoom-in; }
.acc-body .katex-display {
  margin: 0.35em 0 0.85em;
  overflow-x: auto;
  overflow-y: hidden;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
}

.tab {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab[aria-selected="true"],
.chip[aria-selected="true"] {
  background: #111;
  border-color: #111;
  color: #fff;
}

.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.speed-readout {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

tr[data-note] { cursor: pointer; }
tr[data-note]:hover td,
tr[data-note]:focus td,
tr[data-note].noted td { background: #eef3f8; }
tr.ours[data-note]:hover td,
tr.ours[data-note]:focus td,
tr.ours[data-note].noted td { background: #e5f6ea; }

.row-note {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pulse { animation: pulse 1.1s ease; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.28); }
  100% { box-shadow: 0 0 0 12px rgba(17, 17, 17, 0); }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-color: #404080;
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child, td:first-child { text-align: left; }
thead th { background: var(--wash); font-size: 13px; }
tr.ours td { background: var(--ours); }
tbody tr:last-child td { border-bottom: 0; }
.best { color: var(--best); font-weight: 700; }
.second { text-decoration: underline; text-underline-offset: 2px; }

.panel { display: none; }
.panel.active { display: block; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 18px;
}

.split h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.study-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 16px;
}

.bibtex {
  position: relative;
  margin: 0 auto;
  max-width: 720px;
}

pre {
  margin: 0;
  padding: 18px 18px 16px;
  overflow-x: auto;
  border-radius: 14px;
  background: #111;
  color: #f4f4f4;
  font-size: 13.5px;
  line-height: 1.5;
}

#copy-bib {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: #2a2a2a;
  border-color: #3a3a3a;
}

#copy-bib:hover { border-color: #fff; }

footer {
  margin-top: 20px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

footer p { margin: 0 0 8px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 92vh;
  border-radius: 8px;
  cursor: default;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.32); }

@media (max-width: 800px) {
  .stats, .cards, .study-stats, .split { grid-template-columns: 1fr; }
  .qual-grid { grid-template-columns: repeat(2, 1fr); }
  .acc-body { padding-left: 18px; }
  h1 { font-size: 32px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
}
