/* ============================================================
   RNG-Bench project page — clean academic style
   One accent color, hairline rules, booktabs tables, no gradients.
   ============================================================ */
:root {
  --ink:        #16181d;   /* primary text */
  --ink-2:      #44474f;   /* secondary text */
  --ink-3:      #74777f;   /* muted */
  --line:       #e6e7eb;   /* hairlines */
  --line-2:     #d3d5da;   /* stronger rule (table) */
  --bg:         #ffffff;
  --bg-2:       #fafafb;   /* alt sections */
  --bg-3:       #f3f4f6;   /* table head, code chips */
  --accent:     #2f4fd0;   /* single accent — links + small highlights */
  --accent-ink: #233a9e;   /* accent on hover */
  --accent-bg:  #eef1fc;   /* faint accent fill */
  --maxw:       960px;
  --radius:     10px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   TOP NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-brand:hover { color: var(--ink); text-decoration: none; }
.nav-links {
  display: flex;
  gap: 1.35rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.page-hero {
  background: var(--bg);
  padding: 3.4rem 1.5rem 2.6rem;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.venue-pill {
  display: inline-block;
  padding: 0.28em 0.85em;
  background: var(--accent-bg);
  color: var(--accent-ink);
  border: 1px solid #d6defa;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.publication-title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.18;
  font-size: clamp(1.85rem, 4vw, 2.95rem);
  margin: 1rem 0 0.5rem;
  color: var(--ink);
}
.publication-title em {
  font-style: italic;
  color: var(--accent);
}
.tagline {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-top: 0.9rem;
}
.publication-authors {
  color: var(--ink);
  margin-top: 1.1rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.publication-authors a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.publication-authors a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.publication-authors sup { color: var(--ink-3); font-size: 0.7em; }
.affil-line { margin-top: 0.5rem; font-size: 0.88rem; color: var(--ink-2); line-height: 1.6; }
.affil-line sup { color: var(--ink-3); }
.affil-note { color: var(--ink-3); font-size: 0.85em; }

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.7rem;
}
.publication-links .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 7px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5em 0.95em;
  height: auto;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.publication-links .button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}
.publication-links .button.is-disabled {
  background: #fff;
  color: var(--ink-3);
  border-color: var(--line-2);
  cursor: not-allowed;
  pointer-events: none;
}
.publication-links .button.is-primary-cta {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}
.publication-links .button.is-primary-cta:hover {
  background: var(--accent-bg);
  color: var(--accent-ink);
  border-color: #d6defa;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  max-width: var(--maxw);
  margin: 2.2rem auto 0;
  padding: 0 1.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 780px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-cell {
  padding: 1.15rem 0.8rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: 0; }
@media (max-width: 780px) {
  .stat-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-cell:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.85rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.stat-label {
  display: block;
  margin-top: 0.2em;
  font-size: 0.76rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ============================================================
   TEASER
   ============================================================ */
.hero.teaser { background: transparent; padding: 2.8rem 0 0.5rem; }
.teaser-container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.teaser-frame {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
}
.teaser-frame img { width: 100%; display: block; border-radius: 6px; }
.teaser-caption {
  margin: 1.3em auto 0;
  max-width: 760px;
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.7;
  text-align: center;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3.4rem 1.5rem; }
.section .container,
.container.is-max-desktop { max-width: var(--maxw); margin: 0 auto; }
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.55em;
}
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  margin-bottom: 0.35em;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}
.section-title .accent {
  color: var(--accent);
  font-style: italic;
}
.subhead {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 2.2rem 0 0.3rem;
  color: var(--ink);
}
.section-lead {
  color: var(--ink-2);
  margin: 0 0 1.8rem;
  max-width: 720px;
  font-size: 1.02rem;
  line-height: 1.7;
}
.section-footnote {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin-top: 1.2em;
}
.content p, .content li { color: var(--ink); line-height: 1.75; }

/* Long-form prose (abstract) reads as paper text */
.prose { font-family: var(--serif); font-size: 1.08rem; line-height: 1.78; color: var(--ink); }
.prose p { margin-bottom: 1em; }

/* ============================================================
   FEATURE / CONTRIBUTION CARDS  (flat)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.25rem;
}
.section-alt .feature-card { background: #fff; }
.feature-card .icon-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 1.02rem;
  margin-bottom: 0.7em;
}
.feature-card h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 0.4em;
  color: var(--ink);
}
.feature-card p { color: var(--ink-2); font-size: 0.94rem; line-height: 1.6; margin: 0; }
.feature-card code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-3);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--accent-ink);
}

/* ============================================================
   GAME CARDS  (flat)
   ============================================================ */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.columns.is-centered { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.columns.is-vcentered { align-items: center; }
@media (max-width: 780px) { .columns { grid-template-columns: 1fr; } }
.column.is-10, .column.is-half { width: auto; }

.game-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}
.game-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 0.5em;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.game-card p { color: var(--ink-2); }
.game-card .tag-row { display: flex; flex-wrap: wrap; gap: 0.4em; margin: 0.9em 0 1em; }
.tag {
  background: var(--bg-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.2em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--mono);
}
.game-meta { font-size: 0.9rem; color: var(--ink-2); margin: 0; }
.game-meta strong { color: var(--ink); }

/* ============================================================
   GAMEPLAY STRIP
   ============================================================ */
.gameplay-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 1.4rem;
}
@media (max-width: 720px) { .gameplay-strip { grid-template-columns: repeat(2, 1fr); } }
.gameplay-step { text-align: center; }
.gameplay-step img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.gameplay-step .step-label {
  display: block;
  margin-top: 0.6em;
  font-size: 0.84rem;
  color: var(--ink-2);
  font-weight: 600;
}
.gameplay-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 0.45em;
}
.gameplay-step.is-oracle .step-num { background: var(--accent); }

/* ============================================================
   FORMULA / CALLOUT
   ============================================================ */
.formula-block {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.95rem 1.15rem;
  margin: 1.4em 0;
  font-family: var(--mono);
  font-size: 0.98rem;
  color: var(--ink);
}

/* ============================================================
   RESULTS TABLE  (booktabs)
   ============================================================ */
.table-container { overflow-x: auto; margin-top: 1.6rem; }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.results-table thead th { background: transparent; }
.results-table th {
  font-family: var(--sans);
  font-weight: 700;
  text-align: right;
  padding: 0.7em 0.9em;
  font-size: 0.82rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.results-table thead { border-top: 2px solid var(--ink); }
.results-table tbody { border-bottom: 2px solid var(--ink); }
.results-table th:first-child { text-align: left; }
.results-table td {
  text-align: right;
  padding: 0.62em 0.9em;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table td.model-name {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.results-table .model-logo {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
  vertical-align: -0.25em;
  margin-right: 0.5em;
}
.results-table .best { font-weight: 700; color: var(--accent-ink); }
.results-table tr:hover td { background: var(--bg-2); }

/* grouped header (two metric blocks) */
.results-table th[colspan] {
  text-align: center;
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4em;
}
.results-table .grp { border-left: 1px solid var(--line-2); }

/* comparison / positioning table */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table thead { border-top: 2px solid var(--ink); }
.compare-table tbody { border-bottom: 2px solid var(--ink); }
.compare-table th {
  font-weight: 700; font-size: 0.78rem; color: var(--ink-2);
  text-align: center; padding: 0.6em 0.55em; border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table td {
  text-align: center; padding: 0.55em 0.55em;
  border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.compare-table td:first-child { color: var(--ink); font-weight: 500; }
.compare-table .yes { color: #1f9d57; font-weight: 700; }
.compare-table .no  { color: #c2c5cc; }
.compare-table .part { color: #c98a1a; font-weight: 700; }
.compare-table tr.ours { background: var(--accent-bg); }
.compare-table tr.ours td { color: var(--ink); font-weight: 600; border-bottom: 0; }
.compare-note { font-size: 0.82rem; color: var(--ink-3); margin-top: 0.7em; }

/* axes table: left-align all columns, first column emphasised */
.axes-table th, .axes-table td { text-align: left; }
.axes-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.axes-table tbody tr:hover td { background: var(--bg-2); }

/* ============================================================
   FIGURES
   ============================================================ */
.fig {
  margin: 1.4rem auto 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
}
.fig img { width: 100%; display: block; border-radius: 6px; }
.fig-caption {
  font-size: 0.88rem;
  color: var(--ink-3);
  margin-top: 0.7em;
  line-height: 1.55;
}
.fig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 780px) { .fig-row { grid-template-columns: 1fr; } }

/* ============================================================
   FINDINGS
   ============================================================ */
.findings-list { list-style: none; padding: 0; display: grid; gap: 0.7rem; margin-top: 1.8rem; }
.findings-list li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.section-alt .findings-list li { background: #fff; }
.findings-list li strong:first-child { color: var(--ink); }

/* ============================================================
   MODEL LINEUP
   ============================================================ */
.model-lineup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin: 1.6rem auto 0;
}
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.85em 0.4em 0.5em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
}
.model-chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }

/* ============================================================
   BIBTEX
   ============================================================ */
.bibtex-block {
  background: #15171c;
  color: #e4e6eb;
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
}
.bibtex-block pre { background: transparent; padding: 0; margin: 0; color: inherit; }
.bibtex-block code { background: transparent; color: inherit; padding: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-2);
  padding: 2rem 1.5rem;
  color: var(--ink-3);
  font-size: 0.86rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer a { color: var(--accent); }
