:root {
  color-scheme: light;

  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-raised: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --gridline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.16);

  --accent: #2a78d6;
  --accent-soft: #e4edfc;
  --highlight-card: #fcf2e4;

  --rank-1: #0b0b0b;
  --rank-2: #52514e;
  --rank-3: #898781;

  --series-1: #2a78d6; /* blue      -- edgesynapse_ai */
  --series-2: #eb6834; /* orange    -- ntk */
  --series-3: #1baf7a; /* aqua      -- phclab */
  --series-4: #eda100; /* yellow    -- wilson */
  --series-5: #e87ba4; /* magenta   -- excited_neurons */
  --series-6: #008300; /* green     -- braincorp */
  --series-7: #4a3aa7; /* violet    -- synaptic */

  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(11, 11, 11, 0.04), 0 1px 12px rgba(11, 11, 11, 0.03);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; }
[hidden] { display: none !important; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.header-titles h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-titles .x { color: var(--text-muted); font-weight: 400; }
.header-titles .year { color: var(--accent); }

.header-subtitle {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.header-nav a:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ---------- Layout ---------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 48px;
}

.track-section {
  padding-top: 40px;
  scroll-margin-top: 84px;
}

.section-head { max-width: 760px; margin-bottom: 28px; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

.section-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 20px;
}

.panel h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.panel-note {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chart-row .panel { margin-bottom: 0; }

@media (max-width: 760px) {
  .chart-row { grid-template-columns: 1fr; }
}

.chart-box {
  position: relative;
  height: 320px;
}

/* ---------- Podium cards ---------- */

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.podium-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .podium-grid, .podium-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .podium-grid, .podium-grid-4 { grid-template-columns: 1fr; }
}

.podium-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.podium-card:hover {
  background: var(--highlight-card);
}

.podium-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-1 .rank-badge { background: var(--rank-1); }
.rank-2 .rank-badge { background: var(--rank-2); }
.rank-3 .rank-badge { background: var(--rank-3); }

.rank-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tied-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: auto;
}

.podium-card .team-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.podium-card .team-university {
  margin: -6px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.podium-card .team-members {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.podium-stats {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--gridline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.podium-stat { min-width: 68px; }

.podium-stat .stat-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.98rem;
  display: block;
}

.podium-stat .stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.consensus-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: -12px 0 32px;
}

/* ---------- Eval blocks ---------- */

.eval-block {
  padding-top: 8px;
  margin-top: 20px;
  border-top: 1px dashed var(--gridline);
}

.eval-head { margin-bottom: 16px; }

.eyebrow-eval {
  background: transparent;
  color: var(--text-muted);
  padding-left: 0;
}

.eval-head h3 {
  margin: 4px 0 6px;
  font-size: 1.3rem;
}

.eval-head .panel-note { margin: 0; }

.steps-list {
  list-style: none;
  counter-reset: step;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steps-list li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 14px 52px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-list li strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.limitations-box {
  background: #fdf8f0;
  border: 1px solid var(--border);
  border-left: 3px solid #eda100;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.limitations-box strong { color: var(--text-primary); }
.limitations-box ul { margin: 8px 0 0; padding-left: 20px; }
.limitations-box li { margin-bottom: 4px; }

/* ---------- Tables ---------- */

.table-scroll {
  max-height: 460px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--gridline);
  border-radius: 8px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 560px;
}

table.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-raised);
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--gridline);
  white-space: nowrap;
  z-index: 1;
}

table.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--gridline);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data-table tbody tr.team-row {
  cursor: default;
  background: var(--surface);
}

table.data-table tbody tr.team-row.has-children {
  cursor: pointer;
}

table.data-table tbody tr.team-row.has-children:hover {
  background: var(--accent-soft);
}

table.data-table tbody tr.sub-row td {
  color: var(--text-secondary);
  background: var(--page);
}

table.data-table tbody tr.sub-row td:first-child {
  padding-left: 30px;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.team-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.caret {
  display: inline-block;
  width: 14px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.team-row.expanded .caret { transform: rotate(90deg); }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.badge-pareto {
  background: #e7f6ef;
  color: #0f7a52;
}

.badge-muted {
  background: var(--gridline);
  color: var(--text-muted);
}

.sub-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px 32px;
  text-align: center;
}

.site-footer p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}
