*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d1117;
  --bg-2: #131929;
  --fg: #faf8f5;
  --fg-muted: #a8b4c4;
  --amber: #e8a030;
  --amber-dim: #b87a1f;
  --amber-glow: rgba(232, 160, 48, 0.15);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; }
a { color: var(--amber); text-decoration: none; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,160,48,0.1);
}
.nav-logo { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; }
.nav-logo span { color: var(--amber); }
.nav-cta { font-size: 0.85rem; color: var(--fg-muted); transition: color 0.2s; }
.nav-cta:hover { color: var(--fg); }

/* GRID BG */
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(232,160,48,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,160,48,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-content { position: relative; z-index: 1; }

/* MAIN */
.stats-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}
.stats-main h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.stats-subhead {
  color: var(--fg-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 300;
  max-width: 640px;
}
.stats-meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

/* SECTIONS */
.stats-section { margin-bottom: 3rem; }
.stats-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--amber);
  font-weight: 600;
}

/* TABLE */
.stats-table-wrap { overflow-x: auto; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.stats-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  border-bottom: 1px solid rgba(232,160,48,0.15);
  background: rgba(232,160,48,0.04);
}
.stats-table td {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table .alt-row td { background: rgba(255,255,255,0.015); }
.stats-muted { color: var(--fg-muted); font-style: italic; }

/* BAR (CSS-only chart) */
.bar {
  position: relative;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  height: 22px;
  min-width: 120px;
}
.bar-fill {
  background: var(--amber-glow);
  border: 1px solid rgba(232,160,48,0.3);
  border-radius: 4px;
  height: 100%;
  transition: width 0.3s;
}
.bar-num {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* EMPTY STATE */
.empty-state {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--fg-muted);
}
.empty-state h2 {
  color: var(--fg);
  font-family: 'Fraunces', serif;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}
.empty-state p { font-size: 0.95rem; max-width: 480px; margin: 0 auto; }

/* FOOTNOTE */
.stats-footnote {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* FOOTER */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem;
  text-align: center;
}
.footer-logo { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; }
.footer-logo span { color: var(--amber); }
.footer-copy { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.5rem; }

/* RESPONSIVE */
@media (max-width: 700px) {
  .stats-main { padding: 6rem 1rem 3rem; }
  nav { padding: 1rem 1.5rem; }
  .stats-section { overflow-x: auto; }
  .stats-table { min-width: 560px; }
}
