/* =============================================================
   TestEvo-Bench — academic / minimal stylesheet
   Inspired by the Nerfies project page. No framework.
============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #FDFDFC;
  --bg-alt: #F7F5EF;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #7a7a7a;
  --muted-2: #a0a0a0;
  --border: #ebebeb;
  --border-strong: #dedede;
  --panel: #ffffff;
  --del-bg: rgba(179, 58, 58, 0.18);
  --del-bg-soft: rgba(179, 58, 58, 0.10);
  --del-fg: #7a2a2a;
  --add-bg: rgba(46, 125, 50, 0.14);
  --add-bg-soft: rgba(46, 125, 50, 0.08);
  --accent: #1f4e79;
  --accent-light: #e8f0f8;
  --mono: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
  --serif: "Source Serif 4", "Libre Caslon Text", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 78, 121, 0.25);
}
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2 {
  font-size: 1.55rem;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-alt);
  padding: 1px 5px;
  border-radius: 3px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 48px 0; }
section + section { border-top: none; }

#stats { border-top: none; }
#explorer { padding-top: 72px; border-top: none; }

/* Contained separator — matches Overview h2 style, stays within container */
.tab-panel > .container > .section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ===========================================================
   HERO
=========================================================== */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, #FDFDFC 0%, var(--bg) 100%);
  border-bottom: none;
}
#abstract::before {
  content: "";
  display: block;
  border-top: 1px solid var(--border);
  margin: 0 0 48px;
  max-width: 1080px;
}
.hero .title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.2rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero .subtitle {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  line-height: 1.45;
}
.hero .subtitle em { font-style: italic; color: var(--ink-soft); }

.authors {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.author { white-space: nowrap; }
.affiliations {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-family: var(--sans);
  transition: all 120ms;
}
.pill:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ===========================================================
   TAB BAR — LiveCodeBench-style: title left, pill tabs right
=========================================================== */
.tab-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 253, 252, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: none;
}
.tab-bar .container {
  border-bottom: 1px solid var(--border);
}
.tab-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.tab-bar-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  white-space: nowrap;
  border-bottom: none;
  text-decoration: none;
  flex-shrink: 0;
}
.tab-bar-title:hover {
  border-bottom: none;
  color: var(--ink);
}
.tab-bar-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 9px 22px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms, color 150ms;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--ink-soft);
  background: var(--bg-alt);
}
.tab-btn.active {
  color: var(--ink);
  font-weight: 600;
  background: #F7F5EF;
}

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

/* Large centered title at top of Leaderboard / Data Explorer tabs —
   mirrors the Overview hero style with gradient background */
.tab-hero {
  text-align: center;
  padding: 72px 0 56px;
  background: linear-gradient(180deg, #FDFDFC 0%, var(--bg) 100%);
  border-bottom: none;
}
.tab-hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  border: none;
  padding: 0;
}
.tab-hero-desc {
  max-width: 640px;
  margin: 12px auto 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ===========================================================
   SHARED TIME WINDOW — LiveCodeBench-style
=========================================================== */
.tw-section {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px 20px;
  margin-bottom: 28px;
}

.tw-summary {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
  line-height: 1.5;
}
.tw-summary strong {
  font-weight: 600;
  color: var(--ink);
}

/* Row: date input — slider — date input */
.tw-slider-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.tw-date-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.tw-date-input-group label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}
.tw-date-input {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  width: 140px;
  transition: border-color 120ms;
}
.tw-date-input:focus {
  border-color: var(--accent);
}

/* Slider track wrapper */
.tw-track-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  padding-top: 0;
}


/* Track area */
.tw-track-area {
  position: relative;
  height: 28px;
  user-select: none;
}

.tw-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
}

/* Colored portion before selection */
.tw-track-before {
  position: absolute;
  top: 11px;
  left: 0;
  height: 6px;
  background: #b0cfe0;
  border-radius: 3px 0 0 3px;
  pointer-events: none;
}

/* Active range between thumbs */
.tw-track-active {
  position: absolute;
  top: 11px;
  height: 6px;
  background: var(--ink);
  border-radius: 0;
  pointer-events: none;
}

/* Range inputs */
.tw-range {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 28px;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  z-index: 2;
}
.tw-range::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
  border: none;
}
.tw-range::-moz-range-track {
  height: 6px;
  background: transparent;
  border: none;
}
.tw-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  margin-top: -5px;
  cursor: pointer;
  position: relative;
  z-index: 3;
  transition: background 120ms, transform 120ms;
}
.tw-range::-webkit-slider-thumb:hover {
  background: #000;
  transform: scale(1.15);
}
.tw-range::-moz-range-thumb {
  pointer-events: all;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  cursor: pointer;
  position: relative;
  z-index: 3;
}

/* 6-month tick marks */
.tw-ticks {
  position: relative;
  height: 20px;
  margin-top: 6px;
}
.tw-tick {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tw-tick-mark {
  width: 1px;
  height: 5px;
  background: var(--border-strong);
}
.tw-tick-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-2);
  margin-top: 2px;
  white-space: nowrap;
}

/* ===========================================================
   HERO FIGURE — code animations (two tracks)
=========================================================== */
.hero-figure { padding-top: 40px; padding-bottom: 20px; }
.hero-figure.embedded { padding-top: 32px; padding-bottom: 0; }

.track-block {
  width: 100%;
  margin-bottom: 40px;
}
.track-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  padding-left: 4px;
  flex-wrap: wrap;
}
.track-heading h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0;
  border: none;
  padding: 0;
}
.track-heading .desc {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
}

.stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  padding: 56px 0 20px;
  font-family: var(--mono);
  font-size: 12.5px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.panel-label {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.track-badge {
  position: absolute;
  top: 9px;
  left: 14px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg);
}

.code { padding: 0 20px; }
.ln {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  min-height: 1.65em;
  padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
}
.ln.prod-old, .ln.prod-new,
.ln.test-old, .ln.test-new,
.ln.prod-upd-old, .ln.prod-upd-new {
  max-width: 100%;
}

.kw   { color: #7b4fa1; }
.ty   { color: #1f5a99; }
.fn   { color: #0d6b5a; }
.str  { color: #a5511a; }
.num  { color: #a5511a; }
.cmt  { color: #8a8a8a; font-style: italic; }
.anno { color: #a89b2e; }

.multi { display: block; overflow: hidden; width: fit-content; max-width: 100%; }
.multi .ln { padding-left: 20px; padding-right: 20px; }

.arrow {
  width: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}
.arrow svg { width: 48px; height: 24px; }

/* ----- TRACK 1 keyframes (test_update) ----- */
.t1 .prod-old { animation: t1ProdOld 15s infinite; }
.t1 .prod-new { animation: t1ProdNew 15s infinite; }
.t1 .prod-ins { animation: t1ProdInsert 15s infinite; }
.t1 .test-old { animation: t1TestOld 15s infinite; }
.t1 .test-new { animation: t1TestNew 15s infinite; }

@keyframes t1ProdOld {
  0%, 3%    { background: transparent; color: inherit; text-decoration: none; }
  7%, 100%  { background: var(--del-bg); color: var(--del-fg); text-decoration: line-through; }
}
@keyframes t1ProdNew {
  0%, 7%    { opacity: 0; background: transparent; }
  13%, 100% { opacity: 1; background: var(--add-bg); }
}
@keyframes t1TestOld {
  0%, 17%   { background: transparent; color: inherit; text-decoration: none; }
  23%, 100% { background: var(--del-bg); color: var(--del-fg); text-decoration: line-through; }
}
@keyframes t1TestNew {
  0%, 23%   { opacity: 0; background: transparent; }
  33%, 100% { opacity: 1; background: var(--add-bg); }
}
@keyframes t1ProdInsert {
  0%,  7%   { opacity: 0; background: transparent; }
  13%, 100% { opacity: 1; background: var(--add-bg); }
}

/* ----- TRACK 2 keyframes (test_generation) ----- */
.t2 .prod-upd-old { animation: t2UpdOld     15s infinite; }
.t2 .prod-upd-new { animation: t2UpdNew     15s infinite; }
.t2 .prod-ins     { animation: t2ProdInsert 15s infinite; }
.t2 .test-ins     { animation: t2TestInsert 15s infinite; }

@keyframes t2UpdOld {
  0%,  3%   { background: transparent; color: inherit; text-decoration: none; }
  7%, 100%  { background: var(--del-bg); color: var(--del-fg); text-decoration: line-through; }
}
@keyframes t2UpdNew {
  0%,  7%   { opacity: 0; background: transparent; }
  13%, 100% { opacity: 1; background: var(--add-bg); }
}
@keyframes t2ProdInsert {
  0%,  7%   { opacity: 0; background: transparent; }
  13%, 100% { opacity: 1; background: var(--add-bg-soft); }
}
@keyframes t2TestInsert {
  0%,  23%  { opacity: 0; background: transparent; }
  33%, 100% { opacity: 1; background: var(--add-bg-soft); }
}

/* ===========================================================
   TEXT SECTIONS
=========================================================== */
.text-section p, .text-section li {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 780px;
}
#abstract p { max-width: none; }
.text-section ol { padding-left: 22px; }
.text-section ol li { margin-bottom: 8px; }
.section-lead {
  color: var(--muted);
  max-width: 780px;
  font-size: 0.97rem;
  margin-top: -6px;
  margin-bottom: 22px;
}

/* ===========================================================
   HEADLINE STATS
=========================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
}
.stat .label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}
.stat .value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.8rem;
  line-height: 1.1;
  margin: 6px 0 2px;
  color: var(--ink);
}
.stat .sub {
  font-size: 0.85rem;
  color: var(--muted);
}
.stat-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

/* ===========================================================
   CONTROLS (chips, search) — no longer includes time slider
=========================================================== */
.controls {
  display: flex;
  gap: 22px;
  align-items: end;
  margin-bottom: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px 20px;
}
.control-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control-group.grow { flex: 1; min-width: 0; }
.control-group > label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}

.track-toggles { display: flex; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  background: var(--panel);
  user-select: none;
  transition: all 120ms;
}
.chip input { margin: 0; }
.chip:has(input:checked) {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

#repo-search {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color 120ms;
}
#repo-search:focus { border-color: var(--accent); }

/* ===========================================================
   EXPLORER TABLE — fixed width layout
=========================================================== */
.explorer-table,
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.explorer-table { table-layout: fixed; }

.explorer-table thead th,
.leaderboard-table thead th {
  text-align: left;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #F7F5EF;
}
.explorer-table thead th.sortable,
.rev-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 120ms;
}
.explorer-table thead th.sortable:hover,
.rev-table th.sortable:hover {
  color: var(--ink);
}
.explorer-table thead th.sortable.sort-active,
.rev-table th.sortable.sort-active {
  color: var(--ink);
}
.sort-arrow {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.85em;
  opacity: 0.7;
  min-width: 8px;
}

.explorer-table tbody td,
.leaderboard-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.explorer-table tbody tr:last-child td,
.leaderboard-table tbody tr:last-child td { border-bottom: none; }
.explorer-table tbody tr.repo-row { cursor: pointer; transition: background 120ms; }
.explorer-table tbody tr.repo-row:hover { background: #F7F5EF; }
.explorer-table tbody tr.repo-row.open { background: #F7F5EF; }

.col-expand  { width: 32px; }
.col-repo    { width: 32%; }
.col-num     { width: 150px; text-align: right !important; font-family: var(--mono); white-space: nowrap; }
.col-dates   { width: 280px; white-space: nowrap; font-family: var(--mono); font-size: 0.84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.explorer-table td.col-num,
.explorer-table th.col-num { text-align: right; }

.repo-row .repo-name {
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repo-row .repo-sub {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.caret {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 150ms;
  margin-top: 2px;
}
tr.repo-row.open .caret { transform: rotate(45deg); }

/* Expanded rev-pair rows */
.rev-pair-row td {
  background: #FAFAF8;
  padding: 10px 14px 14px;
  font-size: 0.86rem;
}
.rev-pair-row .rev-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.rev-pair-row .rev-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.rev-pair-row .rev-table .rev-col-track   { width: 100px; }
.rev-pair-row .rev-table .rev-col-date    { width: 110px; }
.rev-pair-row .rev-table .rev-col-commit  { width: 160px; }
.rev-pair-row .rev-table .rev-col-deps    { width: auto; }
.rev-pair-row .rev-table .rev-col-methods { width: auto; }

.rev-pair-row .rev-commit-cell {
  font-family: var(--mono);
  color: var(--ink-soft);
}
.rev-pair-row .rev-commit-cell .diff-link {
  font-family: var(--mono);
  font-size: inherit;
  white-space: nowrap;
}

.rev-pair-row .rev-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-family: var(--mono);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rev-pair-row .rev-table tr:last-child td { border-bottom: none; }

.dep-methods-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.test-methods-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.track-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}
.track-tag.tu { background: #eef3fa; color: #1f4e79; border-color: #c9d9ee; }
.track-tag.tg { background: #f2f7ee; color: #2e6b2c; border-color: #cadfc3; }

.dep-methods {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dep-methods .m {
  color: var(--ink-soft);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.dep-methods .m:hover {
  white-space: normal;
  word-break: break-all;
  overflow: visible;
}
.test-methods {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.test-methods .m {
  color: var(--ink-soft);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.test-methods .m:hover {
  white-space: normal;
  word-break: break-all;
  overflow: visible;
}
.diff-link {
  font-family: var(--sans);
  font-size: 0.82rem;
}

.loading, .empty {
  text-align: center;
  color: var(--muted);
  padding: 28px !important;
  font-style: italic;
}

/* ===========================================================
   LEADERBOARD
=========================================================== */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.lb-tab {
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 12px 28px;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all 150ms;
}
.lb-tab:hover {
  color: var(--ink-soft);
  background: #F7F5EF;
}
.lb-tab.active {
  color: var(--ink);
  background: #F7F5EF;
  border-color: var(--border-strong);
  font-weight: 600;
}

.leaderboard-table td { font-family: var(--mono); font-size: 0.88rem; }
.leaderboard-table td:nth-child(2) { font-family: var(--sans); }
.leaderboard-table .model-name { font-weight: 500; color: var(--ink); }
.leaderboard-table .org { color: var(--muted); font-size: 0.78rem; }
.leaderboard-table .metric-pending { color: var(--muted-2); }

.lb-window-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: -10px 0 10px;
}

.metric-defs { margin-top: 16px; font-size: 0.9rem; color: var(--ink-soft); }
.metric-defs summary { cursor: pointer; color: var(--muted); font-family: var(--sans); }
.metric-defs dl { margin-top: 10px; }
.metric-defs dt { font-family: var(--mono); font-weight: 600; margin-top: 8px; }
.metric-defs dd { margin: 2px 0 0 0; color: var(--ink-soft); }

/* ===========================================================
   BIBTEX + FOOTER
=========================================================== */
.bibtex {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink-soft);
  overflow-x: auto;
  white-space: pre;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 28px 0 60px;
  border-top: none;
}
.site-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--border);
  margin-bottom: 28px;
}

/* ===========================================================
   RESPONSIVE
=========================================================== */
@media (max-width: 860px) {
  .hero .title { font-size: 2.4rem; }
  .tab-hero-title { font-size: 2.4rem; }
  .stage { grid-template-columns: 1fr; }
  .arrow { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .controls { flex-direction: column; }
  .col-dates { display: none; }
  .explorer-table .col-num { width: 80px; }

  .tab-bar-inner {
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
    padding: 10px 0;
  }
  .tab-bar-title { font-size: 1.15rem; }
  .tab-btn { padding: 7px 14px; font-size: 0.84rem; }

  .tw-slider-row {
    flex-direction: column;
    gap: 12px;
  }
  .tw-date-input-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .rev-pair-row td { overflow-x: auto; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .explorer-table .col-expand { width: 24px; }
  .explorer-table .col-num { width: 65px; }
  .tw-tick-label { font-size: 0.55rem; }
}
