:root {
  --bg: #f6f0e5;
  --bg-alt: #efe5d3;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-strong: #fffaf1;
  --ink: #1f1d1a;
  --muted: #675f54;
  --line: rgba(31, 29, 26, 0.12);
  --gold: #c6762b;
  --tomato: #b44a3a;
  --moss: #6f7f53;
  --navy: #234b68;
  --shadow: 0 18px 50px rgba(71, 49, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(196, 118, 43, 0.15), transparent 32%),
    radial-gradient(circle at top right, rgba(35, 75, 104, 0.16), transparent 28%),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 50%, var(--bg-alt) 100%);
}

.shell {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero,
.board-card,
.archive-item {
  backdrop-filter: blur(8px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
}

.eyebrow,
.section-kicker,
.panel-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--tomato);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.95;
}

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(3.4rem, 7vw, 6rem);
  font-weight: 400;
}

h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

h3 {
  font-size: 1.25rem;
}

.hero-text,
.section-note,
.panel-subtitle,
.meta-pill,
.status-text,
.provider {
  color: var(--muted);
}

.hero-text {
  max-width: 55ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.meta-pill,
.legend-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 250, 241, 0.85);
  border: 1px solid var(--line);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.5)),
    linear-gradient(135deg, rgba(196,118,43,0.1), rgba(35,75,104,0.1));
}

.panel-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}

.table-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.benchmark-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.track-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 250, 241, 0.85);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}

.track-pill.active {
  color: var(--panel-strong);
  background: linear-gradient(135deg, var(--gold), var(--tomato));
  border-color: transparent;
}

.board-card {
  border-radius: 24px;
  padding: 12px 18px 18px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.95rem;
}

.leaderboard-table th {
  color: var(--muted);
  font-weight: 500;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-cell {
  font-weight: 700;
  width: 68px;
}

.score-cell {
  font-weight: 700;
}

.provider {
  margin-top: 4px;
  font-size: 0.85rem;
}

.status-pill.final,
.legend-pill.final {
  color: var(--moss);
  background: rgba(111, 127, 83, 0.10);
}

.status-pill.live,
.legend-pill.live {
  color: var(--navy);
  background: rgba(35, 75, 104, 0.10);
}

.status-pill.archived,
.legend-pill.archived {
  color: var(--tomato);
  background: rgba(180, 74, 58, 0.10);
}

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

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

  .leaderboard-table {
    display: block;
    overflow-x: auto;
  }
}
