/* Mimese benchmark pages (HMB leaderboard, audit reports).
   Same design tokens as the mimese.ai homepage; self-contained, no external fonts or CDNs. */
:root {
  --ink: #101418; --muted: #5b6470; --line: #e7eaee;
  --accent: #2f54eb; --accent-soft: #eef2ff; --bg: #ffffff; --bg-soft: #f7f8fa;
  --good: #1a7f4b; --good-soft: #e8f6ee; --warn: #9a6400; --warn-soft: #fff4dc;
  --bad: #b42318; --bad-soft: #fdecea; --neutral-soft: #eef0f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ebef; --muted: #9aa3ae; --line: #262c33;
    --accent: #7c96ff; --accent-soft: #1b2340; --bg: #0d1013; --bg-soft: #13171b;
    --good: #5fd39a; --good-soft: #10291d; --warn: #f0b955; --warn-soft: #2b2312;
    --bad: #ff8a80; --bad-soft: #2e1614; --neutral-soft: #1c2127;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

/* nav (matches the homepage) */
nav.top { border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { font-size: 14px; font-weight: 600; color: #fff !important; background: var(--ink); padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.nav-cta:hover { background: var(--accent); }
@media (max-width: 640px) {
  .nav-links { gap: 12px; font-size: 13px; }
  .nav-links a.secondary { display: none; }
  .nav-cta { padding: 8px 12px; }
}
@media (max-width: 400px) { .nav-links a:not(.nav-cta) { display: none; } }

/* hero */
header.hero { padding: 64px 0 32px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 14px; }
.lede { font-size: 18px; color: var(--muted); max-width: 760px; }
h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 8px; }
h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 6px; }
.sub { color: var(--muted); max-width: 760px; margin-bottom: 20px; }
section.block { padding: 36px 0; }
section.alt { background: var(--bg-soft); }

/* banners, cards, chips */
.banner { border-radius: 12px; padding: 14px 18px; margin: 8px 0 0; font-size: 15px; border: 1px solid var(--line); }
.banner.preview { background: var(--warn-soft); border-color: transparent; color: var(--ink); }
.banner strong { font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px; }
.card p { color: var(--muted); font-size: 15px; }
.stat { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.chip.pass { background: var(--good-soft); color: var(--good); }
.chip.fail { background: var(--bad-soft); color: var(--bad); }
.chip.ne, .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.muted { background: var(--neutral-soft); color: var(--muted); }
.chip.role-simulator { background: var(--accent-soft); color: var(--accent); }
.chip.role-baseline { background: var(--neutral-soft); color: var(--muted); }
.chip.role-control { background: var(--neutral-soft); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg-soft); white-space: nowrap; }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
th[aria-sort="ascending"] button::after { content: " ▲"; }
th[aria-sort="descending"] button::after { content: " ▼"; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-control td { color: var(--muted); }
tr.detail td { background: var(--bg-soft); }
.row-toggle { all: unset; cursor: pointer; font-weight: 650; }
.row-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.row-toggle::before { content: "▸ "; color: var(--muted); }
.row-toggle[aria-expanded="true"]::before { content: "▾ "; }

/* score with interval bar */
.score { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.score b { font-variant-numeric: tabular-nums; min-width: 34px; }
.bar { position: relative; flex: 1; height: 8px; border-radius: 999px; background: var(--neutral-soft); min-width: 90px; }
.bar .ci { position: absolute; top: 0; height: 8px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent); }
.bar .pt { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); margin-left: -1.5px; }
.bar .tick50 { position: absolute; top: -4px; left: 50%; width: 1px; height: 16px; background: var(--muted); opacity: 0.45; }

/* metric grid in detail rows */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 8px 32px; padding: 6px 0 10px; }
.metric { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: center; font-size: 13.5px; min-width: 0; }
.metric .score { min-width: 0; gap: 8px; }
.metric .bar { min-width: 0; }
.metric .name { overflow-wrap: anywhere; }
.metric .na { font-size: 12px; color: var(--muted); }

.controls-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 12px 0; font-size: 14px; }
.controls-row label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
footer.foot { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.error { color: var(--bad); }
ul.plain { list-style: none; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
ul.plain li:last-child { border-bottom: 0; }
pre.repro { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* model page */
[hidden] { display: none !important; }  /* author display rules (e.g. .controls-row) must not un-hide */
.model-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.model-link::after { content: " →"; }
tr.is-current td { background: var(--accent-soft); }
#run-row select { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); max-width: 100%; }
#m-pillars .slot { margin: 8px 0 6px; }
.eyebrow a { color: inherit; text-decoration: none; }
