/* agent-uplift dark theme — vanilla, no framework, single file. */

:root {
  --bg: #0a0a0f;
  --bg-2: #14141c;
  --bg-3: #1c1c26;
  --stroke: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #6ee7b7;
  --accent-2: #fcd34d;
  --warn: #f87171;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); background: var(--bg-3); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
strong { color: var(--text); }
button { cursor: pointer; }

/* topbar */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, #0e0e16 0%, var(--bg) 100%);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { color: var(--accent); font-size: 22px; }
.title { font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.tag { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 10px; border: 1px solid var(--stroke); }
.tab {
  background: transparent; color: var(--muted); border: 0; padding: 8px 16px;
  border-radius: 8px; font-family: var(--mono); font-size: 13px;
}
.tab.active { background: var(--bg-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--stroke); }
.tab:hover:not(.active) { color: var(--text); }
.right { display: flex; gap: 8px; justify-content: flex-end; }
.ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--stroke);
  padding: 8px 14px; border-radius: 8px; font-family: var(--mono); font-size: 13px;
}
.ghost:hover { color: var(--text); border-color: var(--muted); }

/* layout */
.container { max-width: 1240px; margin: 0 auto; padding: 28px; display: grid; gap: 24px; }
.card {
  background: var(--bg-2); border: 1px solid var(--stroke); border-radius: 14px;
  padding: 24px; position: relative;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.status { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.ctl { display: flex; align-items: center; gap: 12px; }
.ctl label { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ctl select { background: var(--bg-3); color: var(--text); border: 1px solid var(--stroke); border-radius: 6px; padding: 4px 8px; font-family: var(--mono); font-size: 12px; }

/* hero stats */
.hero { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.stat .num { font-family: var(--mono); font-size: 32px; font-weight: 700; color: var(--text); }
.stat .lbl { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat.highlight .num { color: var(--accent); }
@media (max-width: 880px) { .hero { grid-template-columns: repeat(2, 1fr); } }

/* explainer */
.explainer h2 { margin: 0 0 12px; font-size: 18px; }
.explainer p { color: var(--muted); line-height: 1.6; margin: 0 0 8px; }
.explainer .footnote { font-size: 13px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--stroke); text-align: left; vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
tbody tr.leaderrow { cursor: pointer; transition: background 80ms ease; }
tbody tr.leaderrow:hover { background: rgba(110, 231, 183, 0.04); }
td.model { font-family: var(--mono); font-weight: 600; color: var(--text); }
td.harness { font-family: var(--mono); color: var(--text); }
td.num { font-family: var(--mono); }
td.num .num { font-weight: 700; }
td.num .sub { font-size: 11px; color: var(--muted); }
td.uplift { font-family: var(--mono); font-weight: 700; }
td.uplift.up { color: var(--accent); }
td.uplift.up.big { color: var(--accent); text-shadow: 0 0 12px rgba(110, 231, 183, 0.4); }
td.uplift.flat { color: var(--muted); }
td.count { font-family: var(--mono); color: var(--muted); }
td.share .pill {
  display: inline-block; padding: 3px 10px; background: var(--bg-3);
  border: 1px solid var(--stroke); border-radius: 999px; font-family: var(--mono); font-size: 11px;
}
td.empty { color: var(--muted); text-align: center; padding: 40px; }

/* movers */
.movers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.movers li {
  display: grid; grid-template-columns: 100px 1fr 1fr 80px;
  gap: 12px; padding: 10px 14px; background: var(--bg-3); border-radius: 8px;
  font-family: var(--mono); font-size: 13px;
}
.movers .mover-date { color: var(--muted); }
.movers .mover-model { color: var(--text); }
.movers .mover-harness { color: var(--accent); }
.movers .mover-score { text-align: right; font-weight: 700; }
.movers .empty { color: var(--muted); text-align: center; padding: 20px; }

/* foot */
.foot { display: flex; justify-content: space-between; padding: 12px 4px 32px; font-family: var(--mono); color: var(--muted); font-size: 12px; }

/* drawer */
.drawer {
  position: fixed; inset: 0; background: rgba(5,5,12,0.65); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 24px;
  z-index: 50;
}
.drawer.hidden { display: none; }
.drawer-inner {
  background: var(--bg-2); border: 1px solid var(--stroke); border-radius: 14px;
  padding: 28px; width: min(900px, 100%); max-height: calc(100vh - 120px); overflow-y: auto;
  position: relative;
}
.drawer-close {
  position: absolute; right: 14px; top: 14px;
  background: transparent; color: var(--muted); border: 0; font-size: 26px; line-height: 1;
  width: 36px; height: 36px; border-radius: 8px;
}
.drawer-close:hover { color: var(--text); background: var(--bg-3); }
.drawer h2 { margin: 0 0 8px; font-family: var(--mono); font-size: 24px; }
.drawer .sub { color: var(--muted); margin: 0 0 20px; }
.drawer .sub .uplift { font-size: 16px; padding: 2px 8px; border-radius: 6px; background: rgba(110,231,183,0.08); }
.drawer .chart { margin-bottom: 24px; }
.svg-lbl { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.svg-val { font-family: var(--mono); font-size: 12px; fill: var(--text); }

.rawlinks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rawlinks li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 12px; background: var(--bg-3); border-radius: 8px; font-size: 12px; }
.mono { font-family: var(--mono); color: var(--muted); }

/* methodology page */
.methodology main { max-width: 760px; margin: 60px auto; padding: 0 28px; line-height: 1.7; }
.methodology h1 { font-family: var(--mono); }
.methodology ol li { margin-bottom: 14px; }
