.leaderboard-page {
  background-image: none;
}

.leaderboard-wrap {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px 22px 72px;
}

.board-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
  margin-top: 60px;
}

.board-hero h1 {
  max-width: 850px;
  font-size: clamp(38px, 6.2vw, 76px);
}

.board-hero .lede {
  max-width: 64ch;
}

.snapshot-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--rail);
  color: var(--faint);
  font: 12px/1.45 var(--mono);
}

.snapshot-card strong {
  color: var(--chalk);
  font-size: 24px;
  font-weight: 650;
}

.snapshot-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.read-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  margin-top: 70px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.read-grid h2.sec,
.table-section h2.sec,
.method h2.sec {
  margin: 0;
}

.read-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  color: var(--dust);
  font-size: 14px;
}

.table-section {
  margin-top: 70px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.table-status {
  margin-top: 7px;
  color: var(--faint);
  font: 12px/1.4 var(--mono);
}

.feed-links {
  display: flex;
  gap: 7px;
}

.feed-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--dust);
  font: 12px/1 var(--mono);
  text-decoration: none;
}

.feed-links a:hover {
  border-color: var(--accent);
  color: var(--chalk);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--rail);
}

.table-scroll:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font: 12px/1.35 var(--mono);
  font-variant-numeric: tabular-nums;
}

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

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--faint);
  background: #0a1322;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

thead button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

thead button::after {
  content: " ↕";
  color: #55647b;
}

thead th[aria-sort="descending"] button::after {
  content: " ↓";
  color: var(--accent);
}

thead th[aria-sort="ascending"] button::after {
  content: " ↑";
  color: var(--accent);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #101d33;
}

th:nth-child(1),
th:nth-child(2),
td:nth-child(1),
td:nth-child(2),
td:nth-child(10),
td:nth-child(11) {
  text-align: left;
}

tbody th strong,
tbody th small {
  display: block;
}

tbody th strong {
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 13px;
}

tbody th small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 400;
}

.value-score {
  display: inline-block;
  min-width: 48px;
  padding: 3px 7px;
  border: 1px solid #245e7d;
  border-radius: 999px;
  color: var(--accent);
  background: #0b2132;
  text-align: center;
}

.noscript-note,
.dated-note {
  margin-top: 14px;
  color: var(--faint);
  font: 12px/1.55 var(--mono);
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.stack article {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--board2);
}

.stack article.ceiling {
  border-top-color: #e0a45a;
}

.stack article span,
.stack article small {
  color: var(--faint);
  font: 10px/1.35 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stack article strong {
  align-self: end;
  font-size: 18px;
}

.stack-arrow {
  align-self: center;
  color: var(--faint);
  font-family: var(--mono);
}

.method {
  margin-top: 70px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.method-grid > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--board2);
}

.method-grid h3 {
  font-size: 15px;
}

.method-grid p {
  margin-top: 10px;
  color: var(--dust);
  font-size: 13px;
}

.method-grid code,
.dated-note code {
  color: var(--accent);
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .board-hero,
  .read-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .read-copy {
    grid-template-columns: 1fr 1fr;
  }

  .stack {
    grid-template-columns: 1fr;
  }

  .stack-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .leaderboard-wrap {
    padding: 20px 14px 52px;
  }

  .board-hero {
    margin-top: 44px;
  }

  .read-copy {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* coverage: borrowed scores, visually subordinate to the measured board */
.coverage-section { margin-top: 2.5rem; }
.coverage-note { color: var(--dust, #9aa6b2); font-size: 0.92rem; line-height: 1.6; max-width: 78ch; margin: 0.25rem 0 1rem; }
.coverage-note code { font-size: 0.85em; }
.coverage-toggle { font: inherit; font-size: 0.85rem; padding: 0.35rem 0.75rem; border-radius: 8px; border: 1px solid var(--line, #1c2740); background: transparent; color: inherit; cursor: pointer; }
.coverage-toggle:hover { border-color: var(--accent, #5ec6ff); }
.coverage-toggle[hidden] { display: none; }
.coverage-section tbody th small { display: block; font-weight: 400; opacity: 0.7; font-size: 0.8em; }
.coverage-section .borrowed { opacity: 0.85; }
.coverage-section .free-tag { color: var(--good, #3dd68c); font-weight: 600; }
.coverage-section .variant-price { display: block; font-size: 0.78em; opacity: 0.7; font-weight: 400; white-space: nowrap; }
.coverage-section .variant-price.variant-free { color: var(--good, #3dd68c); opacity: 1; font-weight: 600; }
