:root {
  --bg: #0a0a0a;
  --bg-elev: #18181b;
  --bg-elev-2: #27272a;
  --border: #2a2a2e;
  --fg: #fafafa;
  --fg-dim: #a1a1aa;
  --fg-mute: #71717a;
  --accent: #d97757;
  --c-claude: #d97757;
  --c-copilot: #7c3aed;
  --c-codex: #10a37f;
  --c-cursor: #22d3ee;
  --c-devin: #f59e0b;
  --c-cline: #ec4899;
  --c-aider: #84cc16;
  --c-bot: #52525b;
  --c-human: #27272a;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-elev); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; color: #e4e4e7; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(217,119,87,0.18), transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(124,58,237,0.12), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
.brand-mark {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}
.brand-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(22,163,74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74, 0); }
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.accent { color: var(--accent); }
.lede { color: var(--fg-dim); max-width: 720px; font-size: 17px; margin: 0 0 40px; }

.big-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.big-pct {
  font-size: clamp(80px, 14vw, 144px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.big-pct-label {
  color: var(--fg-dim);
  font-size: 18px;
}
.big-pct-label select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 16px;
}

.tool-bar {
  display: flex;
  height: 22px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-human);
  margin: 24px 0 12px;
}
.tool-bar .seg { height: 100%; transition: opacity 0.2s; }
.tool-bar .seg:hover { opacity: 0.85; }
.seg-claude { background: var(--c-claude); }
.seg-copilot { background: var(--c-copilot); }
.seg-codex { background: var(--c-codex); }
.seg-cursor { background: var(--c-cursor); }
.seg-devin { background: var(--c-devin); }
.seg-cline { background: var(--c-cline); }
.seg-aider { background: var(--c-aider); }

.tool-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: var(--fg-dim);
  font-size: 14px;
}
.tool-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

main.container { padding-top: 40px; padding-bottom: 80px; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}
.card-head h2 { margin-bottom: 0; }
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.filters select, .filters input {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
}
.filters input { min-width: 180px; }

.table-wrap {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  white-space: nowrap;
}
th {
  color: var(--fg-mute);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
th.num, td.num { text-align: right; }
tbody tr { cursor: pointer; transition: background 0.15s; }
tbody tr:hover { background: var(--bg-elev-2); }

.mix-bar {
  display: inline-flex;
  width: 120px;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--c-human);
  vertical-align: middle;
}
.mix-bar .seg { height: 100%; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elev-2);
  color: var(--fg-dim);
}
.tag.claude { background: rgba(217,119,87,0.18); color: var(--c-claude); }
.tag.copilot { background: rgba(124,58,237,0.18); color: #a78bfa; }
.tag.codex { background: rgba(16,163,127,0.18); color: var(--c-codex); }
.tag.cursor { background: rgba(34,211,238,0.18); color: var(--c-cursor); }
.tag.devin { background: rgba(245,158,11,0.18); color: var(--c-devin); }
.tag.cline { background: rgba(236,72,153,0.18); color: var(--c-cline); }
.tag.aider { background: rgba(132,204,22,0.18); color: var(--c-aider); }

.share-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.tool-totals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.tool-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.tool-tile .tname {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  margin-bottom: 4px;
}
.tool-tile .tval {
  font-size: 28px;
  font-weight: 700;
}

.footer {
  color: var(--fg-mute);
  font-size: 13px;
  margin-top: 32px;
  line-height: 1.65;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: flex-end;
  z-index: 100;
}
.drawer.hidden { display: none; }
.drawer-inner {
  width: min(680px, 100%);
  height: 100%;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  padding: 32px;
  overflow-y: auto;
  position: relative;
}
.drawer-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--fg-dim);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.drawer-close:hover { color: var(--fg); }

.drawer h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}
.drawer .meta {
  color: var(--fg-mute);
  margin-bottom: 24px;
  font-size: 13px;
}
.commit-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.commit-list li {
  border-top: 1px solid var(--border);
  padding: 10px 0;
  font-size: 13px;
  color: var(--fg-dim);
}
.commit-list li .sha {
  font-family: ui-monospace, monospace;
  color: var(--fg-mute);
  margin-right: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--fg-mute);
}
.empty-state strong { color: var(--fg-dim); }

@media (max-width: 640px) {
  .hero { padding: 40px 0 32px; }
  h1 { font-size: 36px; }
  th, td { padding: 8px 8px; font-size: 13px; }
}
