:root {
  --bg: #FCFCFA;
  --ink: #1A1A1A;
  --muted: #6B6B66;
  --accent: #2F4F63;
  --rule: #E5E3DC;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 60px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 79, 99, 0.35);
}
a:hover { border-bottom-color: var(--accent); }

/* ---------- Top nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  background: rgba(252, 252, 250, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.topnav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  border-bottom: none;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.navlinks {
  display: flex;
  gap: 22px;
  flex: 1;
}

.navlinks a {
  font-size: 14px;
  color: var(--muted);
  border-bottom: none;
}
.navlinks a:hover { color: var(--ink); }

.navcta {
  display: flex;
  gap: 16px;
}

.navcta a {
  font-size: 14px;
  border-bottom: none;
  color: var(--ink);
}
.navcta a:hover { color: var(--accent); }

/* ---------- Header ---------- */

.hero {
  padding: 64px 0 8px;
}

#overview, #highlights, #results, #method, #citation {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.hero .wrap:first-of-type {
  text-align: center;
  animation: fade-in 0.7s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}

.venue {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 28px;
}

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

.authors sup { color: var(--accent); font-size: 11px; }

.affiliations {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 32px;
}

.affiliations sup { font-size: 10px; }
.affiliations .note { font-style: italic; }

.links {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  margin-bottom: 48px;
}

.links a { border-bottom: none; }
.links a:hover { border-bottom: 1px solid var(--accent); }
.links .sep { color: var(--rule); margin: 0 10px; font-style: normal; }

/* ---------- Sections ---------- */

.block {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 32px;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  margin: 48px 0 20px;
}

h3:first-of-type { margin-top: 0; }

.lede {
  font-size: 17px;
  max-width: 680px;
  margin: 20px auto;
  color: #333230;
  text-align: left;
}

/* ---------- Highlights ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.stat {
  background: var(--bg);
  padding: 28px 22px;
}

.stat-num {
  font-family: var(--serif);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin: 0 0 10px;
  line-height: 1.25;
}

.stat-label {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.stat-label strong {
  color: var(--ink);
  font-weight: 600;
}

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

.fig {
  margin: 0 0 36px;
  text-align: center;
}

.fig img {
  display: inline-block;
  width: 100%;
  height: auto;
  background: #F2F1EC;
}

.fig img.missing {
  border: 1px dashed var(--rule);
}

figcaption {
  font-size: 14px;
  color: var(--muted);
  margin: 12px auto 0;
  line-height: 1.55;
  width: 100%;
  text-align: left;
}

figcaption em { color: var(--ink); font-style: italic; }

/* ---------- Method steps ---------- */

.steps {
  max-width: 640px;
  margin: 0 auto 20px;
  padding-left: 22px;
}

.steps li {
  margin-bottom: 10px;
  padding-left: 6px;
}

.note-line {
  font-size: 14px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 44px;
}

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

.table-block {
  margin-bottom: 48px;
}

.table-caption {
  font-size: 15px;
  margin: 0 0 16px;
  max-width: 720px;
}

.mllm-tag {
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

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

th, td {
  text-align: right;
  padding: 9px 12px;
  white-space: nowrap;
}

th:first-child, td:first-child {
  text-align: left;
  padding-left: 0;
}

th {
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
}

td { border-bottom: 1px solid var(--rule); }

tr.tir-row td {
  font-weight: 500;
}

tr.tir-row td:first-child {
  color: var(--accent);
}

tr.baseline-row td {
  color: var(--muted);
}

tr.baseline-row + tr:not(.baseline-row) td {
  border-top: 1px solid var(--ink);
}

td.win {
  background: #DCEEDD;
  font-weight: 600;
  color: #1F4A2C;
}

tr.tir-row td.win:first-child {
  color: #1F4A2C;
}

.delta {
  color: var(--accent);
  font-size: 12px;
  margin-left: 4px;
}

/* ---------- Citation ---------- */

.bib-box {
  position: relative;
  background: #F4F3EE;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 24px;
}

.bib-box pre {
  margin: 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--sans);
  font-size: 12px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--muted);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

footer {
  padding: 40px 0 64px;
  border-top: 1px solid var(--rule);
}

footer p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

footer .fine {
  font-size: 12px;
}

/* ---------- Accessibility / motion ---------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hero .wrap:first-of-type { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .navlinks { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 8px; }
  .block { padding: 40px 0; }
  .links { font-size: 15px; }
  .links .sep { margin: 0 6px; }
  .lede { font-size: 16px; }
  table { font-size: 12.5px; }
  th, td { padding: 7px 8px; }
}
