/* SanityBench — shared styles. Dark, technical, skeptical. */

:root {
  --bg:        #1a1a1c;   /* charcoal */
  --bg-panel:  #232327;
  --bg-hover:  #2a2a2f;
  --border:    #38383d;
  --text:      #e6edf3;
  --text-dim:  #aab1bd;
  --accent:    #7dd3fc;   /* ice blue — "measured / honest" */
  --claimed:   #d98030;   /* amber — "vendor claimed" */
  --good:      #3fb950;
  --bad:       #f85149;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.topbar .wrap { padding-top: 1rem; padding-bottom: 1rem; display: flex; align-items: baseline; gap: 1rem; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.brand:hover { text-decoration: none; }
.brand .logo { display: block; }
.brand .dot { color: var(--accent); }
.nav { margin-left: auto; display: flex; gap: 1.25rem; font-size: .9rem; }

/* Model header */
.model-head h1 { margin: 0 0 .25rem; font-size: 2rem; }
.model-head .vendor { color: var(--text-dim); font-size: 1rem; }
.badges { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.badge {
  font-family: var(--mono); font-size: .75rem;
  background: var(--bg-panel); border: 1px solid var(--border);
  color: var(--text-dim); padding: .2rem .55rem; border-radius: 999px;
}
.badge.lic { color: var(--good); border-color: #2ea04326; }

/* Spec grid */
.specs {
  margin: 1.75rem 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.spec { background: var(--bg-panel); padding: .9rem 1rem; }
.spec .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.spec .v { font-family: var(--mono); font-size: 1.05rem; margin-top: .15rem; }

/* Benchmark table */
.section-title { font-size: 1.25rem; margin: 2.5rem 0 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td.num { font-family: var(--mono); text-align: right; }
tr:hover td { background: var(--bg-hover); }
.measured { color: var(--accent); font-weight: 600; }
.claimed  { color: var(--claimed); }
.dim { color: var(--text-dim); }

.note {
  margin-top: 2rem; padding: 1rem 1.25rem;
  background: var(--bg-panel); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0; font-size: .92rem; color: var(--text-dim);
}

footer { border-top: 1px solid var(--border); color: var(--text-dim); font-size: .85rem; }
footer .wrap { padding-top: 1.5rem; padding-bottom: 2rem; }

/* ---- Leaderboard ---- */
.lb-title { font-size: 2.5rem; margin: 1rem 0 .4rem; }
.lb-sub { color: var(--text-dim); margin: 0 0 1.75rem; font-size: 1rem; }
.lb-sub strong { color: var(--text); }

.lb-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.search { flex: 1 1 260px; }
.search input {
  width: 100%; background: var(--bg-panel); border: 1px solid var(--border);
  color: var(--text); font-family: var(--sans); font-size: .95rem;
  padding: .6rem .85rem; border-radius: 8px;
}
.search input:focus { outline: none; border-color: var(--accent); }

.filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.filters-label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-right: .25rem; }
.pill {
  font-family: var(--mono); font-size: .82rem; cursor: pointer;
  background: var(--bg-panel); border: 1px solid var(--border); color: var(--text-dim);
  padding: .35rem .85rem; border-radius: 999px; transition: all .12s;
}
.pill:hover { color: var(--text); border-color: var(--accent); }
.pill.active { color: var(--accent); border-color: var(--accent); background: #7dd3fc14; }

.lb-status { font-family: var(--mono); font-size: .8rem; color: var(--text-dim); margin: 0 0 1rem; }
.lb-status strong { color: var(--text); }

.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th { color: var(--text-dim); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; padding: .6rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lb-table th.sortable { cursor: pointer; user-select: none; }
.lb-table th.sortable:hover { color: var(--text); }
.lb-table th.sorted-asc::after  { content: " ▲"; color: var(--accent); }
.lb-table th.sorted-desc::after { content: " ▼"; color: var(--accent); }
.lb-table td { padding: .7rem .7rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.lb-table tr:hover td { background: var(--bg-hover); }
.lb-table .rank { color: var(--text-dim); font-family: var(--mono); font-size: .82rem; width: 2.5rem; text-align: center; }
.lb-table td.num, .lb-table th.num { text-align: right; font-family: var(--mono); }
.lb-table td a { font-weight: 600; }

.arch { font-family: var(--mono); font-size: .76rem; padding: .15rem .55rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-dim); white-space: nowrap; }
.arch::before { content: "●"; margin-right: .35rem; font-size: .6rem; vertical-align: middle; }
.arch-moe::before    { color: #7dd3fc; }
.arch-dense::before  { color: #aab1bd; }
.arch-mamba::before  { color: #c084fc; }
.arch-hybrid::before { color: #fbbf24; }

/* ---- Prose content pages (methodology, about) ---- */
.prose { max-width: 760px; }
.prose h1 { font-size: 2.25rem; margin: 1rem 0 .75rem; }
.prose h2 { font-size: 1.3rem; margin: 2.25rem 0 .6rem; color: var(--text); }
.prose .lead { font-size: 1.15rem; color: var(--text); margin-bottom: 1.5rem; }
.prose p { color: var(--text-dim); margin: .6rem 0 1rem; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-panel); border: 1px solid var(--border); padding: .1rem .35rem; border-radius: 4px; color: var(--text); }

.meth-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .92rem; }
.meth-table th { text-align: left; color: var(--text-dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
.meth-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); }

.support-links { display: flex; gap: .75rem; margin: 1rem 0 .5rem; flex-wrap: wrap; }
.support-btn {
  font-family: var(--mono); font-size: .9rem; padding: .55rem 1.1rem;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 8px;
  background: #7dd3fc10; transition: all .12s;
}
.support-btn:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

/* ---- Gap chart ---- */
.gap-caption { color: var(--text-dim); font-size: .92rem; margin: 0 0 1rem; }
.gap-chart { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; }

/* ---- Hero ---- */
.hero {
  margin: 1.5rem 0 2.5rem;
  padding: 3rem 2rem;
  background:
    radial-gradient(120% 140% at 50% 0%, #7dd3fc14 0%, transparent 60%),
    var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}
.hero-inner { max-width: 620px; margin: 0 auto; }
.hero-tag { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--accent); border: 1px solid var(--accent); background: #7dd3fc14; padding: .3rem .8rem; border-radius: 999px; }
.hero-title { font-family: "Archivo Black", var(--sans); font-size: 2.9rem; line-height: 1.08; margin: 1.25rem 0 1rem; font-weight: 400; letter-spacing: -.01em; }
.hero-lead { color: var(--text-dim); font-size: 1.08rem; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.hero-btn { font-family: var(--mono); font-size: .9rem; padding: .55rem 1.1rem; border: 1px solid var(--border); color: var(--text); border-radius: 8px; transition: all .12s; }
.hero-btn:hover { border-color: var(--accent); text-decoration: none; }
.hero-btn.primary { border-color: var(--accent); color: var(--accent); background: #7dd3fc10; }
.hero-btn.primary:hover { background: var(--accent); color: var(--bg); }
.lb-title#leaderboard { scroll-margin-top: 1rem; }

/* ---- Comparison ---- */
.cmp-pickers { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 1.75rem; }
.cmp-select {
  background: var(--bg-panel); border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono); font-size: .92rem; padding: .55rem .85rem; border-radius: 8px;
  min-width: 200px; cursor: pointer;
}
.cmp-select:focus { outline: none; border-color: var(--accent); }
.cmp-hint { color: var(--text-dim); font-family: var(--mono); font-size: .9rem; }

.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: .7rem .85rem; border-bottom: 1px solid var(--border); text-align: left; }
.cmp-table thead th { font-size: 1rem; color: var(--text); border-bottom: 2px solid var(--border); }
.cmp-table thead th:first-child { width: 9rem; }
.cmp-table td.num, .cmp-table th.num { text-align: right; font-family: var(--mono); }
.cmp-rowlabel { color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.cmp-best { color: var(--accent); font-weight: 700; position: relative; }
.cmp-best::after { content: "★"; font-size: .6em; color: #fbbf24; vertical-align: super; margin-left: .25em; }
.cmp-divider td { background: var(--bg-hover); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); padding: .4rem .85rem; }
