:root {
  --bg: oklch(0.93 0.018 75);
  --card: oklch(0.975 0.012 75);
  --text: oklch(0.28 0.03 40);
  --muted: oklch(0.50 0.02 55);
  --line: oklch(0.86 0.015 75);
  --gold: oklch(0.78 0.15 85);
  --silver: oklch(0.82 0.008 260);
  --chris: oklch(0.68 0.13 250);
  --jon: oklch(0.68 0.13 150);
  --trent: oklch(0.68 0.13 35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Karla', system-ui, sans-serif;
}

a { color: var(--trent); text-decoration: none; }
a:hover { color: oklch(0.55 0.15 35); }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.disp, .title, .cat-name, .cat-badge, .rank-name, .rank-pts, .chart-label, .section-label {
  font-family: 'Baloo 2', sans-serif;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.title { font-size: clamp(32px, 5vw, 46px); font-weight: 700; line-height: 1; }
.subtitle { font-size: 14px; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.status-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 999px; padding: 9px 16px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }

.standings { display: flex; gap: 16px; flex-wrap: wrap; }
.rank-card {
  flex: 1 1 200px;
  background: var(--card); border-radius: 18px; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.rank-card .top-row { display: flex; justify-content: space-between; align-items: center; }
.rank-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.rank-name { font-size: 26px; font-weight: 600; }
.rank-pts-row { display: flex; align-items: baseline; gap: 6px; }
.rank-pts { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pts-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.section-divider { display: flex; align-items: center; gap: 12px; }
.section-label { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rule { flex: 1; height: 1px; background: var(--line); }

.categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 860px) { .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .categories { grid-template-columns: 1fr; } }

.cat-card {
  background: var(--card); border-radius: 18px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px;
  color: inherit; transition: background 0.12s ease, box-shadow 0.12s ease;
}
.cat-card:hover { background: oklch(0.955 0.014 75); box-shadow: 0 0 0 1.5px var(--line) inset; }
.cat-head { display: flex; justify-content: space-between; align-items: center; }
.cat-head-left { display: flex; align-items: center; gap: 8px; }
.cat-badge {
  width: 26px; height: 26px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.cat-name { font-size: 16px; font-weight: 600; }
.cat-max { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.bar-row { display: flex; align-items: center; gap: 6px; }
.bar-initial { width: 13px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-initial.chris { color: var(--chris); }
.bar-initial.jon { color: var(--jon); }
.bar-initial.trent { color: var(--trent); }
.bar-track { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-val { width: 34px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.coming-soon { align-self: flex-start; background: var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--muted); }

.chart-card { background: var(--card); border-radius: 18px; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-label { font-size: 15px; font-weight: 700; color: var(--muted); }
.legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.dot.chris, .bar-fill.chris, .rank-pts.chris { background: var(--chris); }
.dot.jon, .bar-fill.jon, .rank-pts.jon { background: var(--jon); }
.dot.trent, .bar-fill.trent, .rank-pts.trent { background: var(--trent); }
.rank-pts.chris { color: var(--chris); background: none; }
.rank-pts.jon { color: var(--jon); background: none; }
.rank-pts.trent { color: var(--trent); background: none; }
#chart { width: 100%; height: 260px; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

.footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; }
#footer-source { color: var(--muted); }
.lead-pill { background: var(--card); border-radius: 999px; padding: 6px 14px; font-weight: 600; }

/* ---------- Category detail page ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
.detail-note { font-size: 14px; color: var(--muted); font-style: italic; }

.detail-table-wrap { background: var(--card); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; overflow-x: auto; }
.detail-table-title { font-size: 16px; font-weight: 700; }
.detail-table { border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.detail-table th, .detail-table td { padding: 7px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.detail-table th:first-child, .detail-table td:first-child { text-align: left; padding-left: 0; }
.detail-table thead th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.detail-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
.detail-table tbody th { text-align: left; font-weight: 700; }
.detail-table tbody th.chris, .row-label.chris { color: var(--chris); }
.detail-table tbody th.jon, .row-label.jon { color: var(--jon); }
.detail-table tbody th.trent, .row-label.trent { color: var(--trent); }
