:root {
  --bg: #0B0F1A;
  --surface: #131825;
  --surface-hover: #1A2033;
  --border: #1E2640;
  --text: #E8EAF0;
  --text-muted: #8B92A8;
  --accent: #4ADE80;
  --accent-dim: rgba(74, 222, 128, 0.12);
  --warn: #FB923C;
  --warn-dim: rgba(251, 146, 60, 0.12);
  --danger: #F87171;
  --danger-dim: rgba(248, 113, 113, 0.12);
  --blue: #60A5FA;
  --blue-dim: rgba(96, 165, 250, 0.12);
  --purple: #A78BFA;
  --purple-dim: rgba(167, 139, 250, 0.12);
  --cyan: #22D3EE;
  --cyan-dim: rgba(34, 211, 238, 0.12);
}

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

body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 700px;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
  max-width: 720px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: background 0.2s;
}

.stat-card:hover {
  background: var(--surface-hover);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
}

.stat-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-delta {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 8px;
}

table .stat-delta {
  margin-top: 0;
}

table a {
  color: var(--accent);
  font-weight: 600;
}

.delta-up {
  color: var(--accent);
  background: var(--accent-dim);
}

.delta-down {
  color: var(--danger);
  background: var(--danger-dim);
}

.delta-neutral {
  color: var(--warn);
  background: var(--warn-dim);
}

.delta-cyan {
  color: var(--cyan);
  background: var(--cyan-dim);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.comp-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.comp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.comp-table .driver-name {
  color: var(--text);
  font-weight: 500;
}

.comp-table .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

.comp-table .change {
  text-align: right;
  font-weight: 600;
  font-size: 13px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  border-left: 3px solid var(--accent);
}

.insight-card.warn {
  border-left-color: var(--warn);
}

.insight-card.danger {
  border-left-color: var(--danger);
}

.insight-card.info {
  border-left-color: var(--blue);
}

.insight-card.cyan {
  border-left-color: var(--cyan);
}

.insight-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.insight-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.type-breakdown {
  display: flex;
  gap: 2px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
}

.type-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--bg);
  min-width: 40px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.year-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.callout {
  background: var(--accent-dim);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}

.callout.warn-callout {
  background: var(--warn-dim);
  border-color: rgba(251, 146, 60, 0.2);
}

.callout.cyan-callout {
  background: var(--cyan-dim);
  border-color: rgba(34, 211, 238, 0.2);
}

.callout h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.callout p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.monthly-compare {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  height: 160px;
  margin: 24px 0 8px;
  padding-bottom: 28px;
  position: relative;
}

.month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.month-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  position: relative;
}

.month-bar.y24 {
  background: var(--blue);
  opacity: 0.5;
}

.month-bar.y25 {
  background: var(--accent);
}

.month-bar.y25-q4 {
  background: var(--cyan);
}

.month-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
}

.bar-pair {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 100%;
  width: 100%;
}

.bar-pair .month-bar {
  width: 45%;
}

.q4-marker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.tier-visual {
  margin: 24px 0;
}

.tier-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.tier-label-col {
  text-align: right;
}

.tier-name {
  font-size: 14px;
  font-weight: 600;
}

.tier-count {
  font-size: 12px;
  color: var(--text-muted);
}

.tier-track {
  height: 32px;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}

.tier-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--bg);
  min-width: 30px;
}

.tier-pct {
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-weight: 500;
  text-align: right;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compact-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.compact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

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

.compact-table .repo-name {
  font-weight: 500;
}

.compact-table .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  text-align: right;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.tag-new {
  color: var(--cyan);
  background: var(--cyan-dim);
}

.tag-growth {
  color: var(--accent);
  background: var(--accent-dim);
}

.tag-decline {
  color: var(--warn);
  background: var(--warn-dim);
}

.contrib-chart {
  position: relative;
  height: 200px;
  margin: 24px 0 40px;
}

.contrib-chart svg {
  width: 100%;
  height: 100%;
}

.contrib-grid-line {
  stroke: var(--border);
  stroke-width: 1;
}

.contrib-line-24 {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  opacity: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contrib-line-25 {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contrib-dot-24 {
  fill: var(--blue);
  opacity: 0.5;
}

.contrib-dot-25 {
  fill: var(--accent);
}

.contrib-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 11px;
  fill: var(--text-muted);
}

.contrib-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 600;
}

.contrib-value-24 {
  fill: var(--blue);
  opacity: 0.7;
}

.contrib-value-25 {
  fill: var(--accent);
}

.vol-bar-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.vol-label {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: var(--text-muted);
}

.vol-track {
  height: 28px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  gap: 1px;
}

.vol-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--bg);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 20px;
  }

  .monthly-compare {
    gap: 4px;
  }

  .tier-row {
    grid-template-columns: 100px 1fr 60px;
  }
}
