*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #08080e;
  --surface:     #0f0f18;
  --surface2:    #14141f;
  --border:      #1c1c2e;
  --border2:     #252540;
  --text:        #dde1f0;
  --muted:       #5a5a7a;
  --faint:       #2a2a40;
  --c-anthropic: #c084fc;
  --c-openai:    #34d399;
  --c-google:    #60a5fa;
  --red:         #f87171;
  --green:       #4ade80;
  --amber:       #fbbf24;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,14,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: 0;
  height: 54px;
}

.nav-brand {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-right: 2rem;
  white-space: nowrap;
  user-select: none;
}
.nav-brand span { color: var(--c-anthropic); }

.nav-tabs { display: flex; gap: 0; }

.nav-tab {
  padding: 0 1.1rem;
  height: 54px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  user-select: none;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--text); border-bottom-color: var(--c-anthropic); }

/* ── Layout ──────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.75rem 4rem;
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
}

.card + .card { margin-top: 1rem; }

.card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* ── Grids ───────────────────────────────────────────── */
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  font-size: 0.74rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-red   { background: rgba(248,113,113,0.14); color: var(--red); }
.badge-green { background: rgba(74,222,128,0.14);  color: var(--green); }
.badge-amber { background: rgba(251,191,36,0.14);  color: var(--amber); }

/* ── Provider dot ────────────────────────────────────── */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.dot-anthropic { background: var(--c-anthropic); }
.dot-openai    { background: var(--c-openai); }
.dot-google    { background: var(--c-google); }

/* ── Section header ──────────────────────────────────── */
.section-head {
  margin: 0.25rem 0 1.5rem;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}
.section-sub {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 580px;
}

/* ── Filters ─────────────────────────────────────────── */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.pill {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid var(--border2);
  color: var(--muted);
  background: transparent;
  transition: all 0.14s;
  user-select: none;
}
.pill:hover { color: var(--text); border-color: var(--muted); }
.pill.on { border-color: currentColor; }

.pill-anthropic.on { color: var(--c-anthropic); background: rgba(192,132,252,0.08); }
.pill-openai.on    { color: var(--c-openai);    background: rgba(52,211,153,0.08); }
.pill-google.on    { color: var(--c-google);    background: rgba(96,165,250,0.08); }

/* ── Select ──────────────────────────────────────────── */
select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 7px;
  font-size: 0.83rem;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235a5a7a' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}
select:focus { border-color: var(--c-anthropic); }

/* ── Tooltip ─────────────────────────────────────────── */
#tooltip {
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
  pointer-events: none;
  z-index: 1000;
  display: none;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

/* ── Charts ──────────────────────────────────────────── */
.chart-wrap { width: 100%; overflow: visible; }
svg.chart { width: 100%; display: block; overflow: visible; }

/* ── Regression list ─────────────────────────────────── */
.reg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.reg-item:last-child { border-bottom: none; }

.reg-arrow {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0.4rem;
}

.mini-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.mini-track {
  width: 160px;
  height: 5px;
  border-radius: 3px;
  background: var(--faint);
  position: relative;
  overflow: visible;
}
.mini-before, .mini-after {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 3px;
}
.mini-before { background: var(--border2); }
.mini-after  { background: var(--red); }

/* ── Compare bars ────────────────────────────────────── */
.cmp-row { margin-bottom: 1.1rem; }
.cmp-bench { font-size: 0.8rem; font-weight: 500; margin-bottom: 0.3rem; display: flex; justify-content: space-between; align-items: center; }
.cmp-track {
  height: 22px;
  border-radius: 4px;
  background: var(--faint);
  position: relative;
  margin-bottom: 0.3rem;
  overflow: hidden;
}
.cmp-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.7rem;
  font-family: 'SF Mono', monospace;
  font-weight: 700;
  min-width: 2rem;
  transition: width 0.35s ease;
}

/* ── Data table ──────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.data-table th {
  text-align: left;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .mono { font-family: 'SF Mono', monospace; font-size: 0.8rem; }

/* ── Overview hero ───────────────────────────────────── */
.hero {
  padding: 2rem 0 1.75rem;
}
.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-anthropic);
  margin-bottom: 0.6rem;
}
.hero-headline {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
}

/* ── Stat card ───────────────────────────────────────── */
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0.3rem 0 0.25rem;
}

/* ── Disclaimer ──────────────────────────────────────── */
.disclaimer {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 2.5rem;
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
  .g3 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  main { padding: 1.25rem 1rem 3rem; }
  .nav { padding: 0 1rem; }
  .nav-brand { margin-right: 1rem; }
}
