:root {
  --bg: #f7f6f2; --panel: #ffffff; --ink: #1d1f24; --muted: #5c616b; --line: #e2e0d8;
  --accent: #0f6e5c; --accent-ink: #ffffff; --warn: #a3401e; --good: #0f6e5c; --mid: #b07a12;
  --you: #e7f3ef; --code: #f0eee7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a; --panel: #1c1f24; --ink: #e9e7e1; --muted: #a0a4ac; --line: #2e3238;
    --accent: #4fc2a6; --accent-ink: #0b1a16; --warn: #f08a63; --good: #4fc2a6; --mid: #e0b04a;
    --you: #1d332d; --code: #23272d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 980px; margin: 0 auto; padding-inline: 20px; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding-block: 14px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.mark { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 6px;
  padding: 0 6px; margin-right: 4px; font-size: .9rem; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
pre.agent-doc { white-space: pre-wrap; word-break: break-word; font-size: .9rem; line-height: 1.5; }
section { padding-block: 34px; border-bottom: 1px solid var(--line); }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.15; margin: 10px 0 14px; letter-spacing: -.01em; }
h1 em { color: var(--accent); font-style: normal; }
h2 { font-size: 1.45rem; margin: 0 0 10px; }
h3 { font-size: 1.02rem; margin: 0 0 6px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 46em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.steps { display: grid; gap: 14px; margin: 16px 0; }
.steps > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; position: relative; }
.steps p { margin: 0 0 8px; }
.n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; float: left; margin-right: 10px; }
pre { background: var(--code); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 6px 0;
  font-size: .86rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; position: relative; }
pre.copy { cursor: pointer; }
pre.copy::after { content: "click to copy"; position: absolute; top: 6px; right: 10px; font-size: .7rem; color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif; }
pre.copied::after { content: "copied"; color: var(--good); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: .88rem; color: var(--muted); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 14px 0; }
.form label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
input, select { font: inherit; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); min-width: 0; }
button { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 0;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; align-self: end; }
button:disabled { opacity: .55; cursor: progress; }
.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 10px; }
#barfill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.err { color: var(--warn); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; }
td.num { font-variant-numeric: tabular-nums; }
tr.you td { background: var(--you); font-weight: 600; }
.tag { font-size: .75rem; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.tag.verified { border-color: var(--good); color: var(--good); }
.tag.paper { border-color: var(--mid); color: var(--mid); }
.score { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-width: 140px; flex: 1; }
.stat .v { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .82rem; color: var(--muted); }
.stat.big .v { color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 18px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.cat { margin: 10px 0; }
.cat .row { display: flex; justify-content: space-between; font-size: .9rem; }
.track { height: 8px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 4px; }
.track > div { height: 100%; background: var(--accent); }
.track.mid > div { background: var(--mid); }
.track.low > div { background: var(--warn); }
.miss { border-top: 1px solid var(--line); padding: 12px 0; }
.miss summary { cursor: pointer; }
.miss .why { color: var(--muted); font-size: .92rem; }
.note { background: var(--you); border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
svg text { fill: var(--muted); font-size: 10px; }
footer { padding-block: 28px 40px; color: var(--muted); font-size: .85rem; }
textarea { font: inherit; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); min-width: 0; resize: vertical; }
.form label.wide { grid-column: 1 / -1; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.tabs button { background: var(--panel); color: var(--muted); border: 1px solid var(--line); padding: 6px 14px; font-weight: 600; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.miss .reply { white-space: pre-wrap; background: var(--code); border-radius: 8px; padding: 10px 12px; font-size: .88rem; max-height: 22em; overflow: auto; }
.prose { max-width: 760px; }
.prose li { margin-bottom: 6px; }
.prose h2 { margin-top: 28px; }
.prose table { border-collapse: collapse; margin: 10px 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 6px 12px 6px 0; text-align: left; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); margin: 12px 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.f-standard { background: #9aa7b4; } .f-realistic { background: var(--accent); } .f-pressure { background: var(--warn); }
.findchart { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 28px; margin: 8px 0 18px; }
.fname { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.frow { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.ftrack { flex: 1; height: 12px; background: var(--code); border-radius: 3px; overflow: hidden; }
.fbar { height: 100%; border-radius: 3px; }
.fval { width: 3.2em; text-align: right; font-size: .85rem; font-variant-numeric: tabular-nums; }
ul.findings { padding-left: 20px; max-width: 46em; } ul.findings li { margin-bottom: 6px; }
.steps { grid-template-columns: minmax(0, 1fr); }
.steps > div, .cards > *, .findchart > *, .form > * { min-width: 0; }
#boardtable th { white-space: normal; vertical-align: bottom; }

/* --- home: two-column top panel -------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding-block: 52px 44px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.05rem); margin: 6px 0 22px; }
.eyebrow { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin: 0 0 22px; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  padding: 16px 30px; border-radius: 12px; text-decoration: none; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(15,110,92,.25); }
.cta:hover { filter: brightness(1.08); }
.cta-2 { font-weight: 600; text-decoration: none; }
.hero .lede { margin-top: 0; }
.hero-board { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.hb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hb-head h2 { margin: 0; font-size: 1.2rem; }
.hb-fmt { font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--warn);
  color: var(--warn); white-space: nowrap; }
.hb-sub { margin: 6px 0 10px; }
.hb-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.hb-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.hb-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); white-space: normal; vertical-align: middle; }
.hb-table tbody tr:last-child td { border-bottom: 0; }
.hb-table .hb-r { text-align: right; }
.hb-rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: .78rem; font-weight: 700; background: var(--code); color: var(--muted); }
.hb-model { font-weight: 600; }
.hb-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.hb-track { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.hb-track > div { height: 100%; background: var(--warn); border-radius: 6px; }
.hb-track.mid > div { background: var(--mid); }
.hb-track.good > div { background: var(--good); }
.hb-pct { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; color: var(--warn); }
.hb-hint { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hb-foot { margin: 10px 0 8px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 32px; }
}

/* --- docs tabs, footer, about ------------------------------------------------------ */
nav[aria-label="Main"] { gap: 4px 26px; }
nav[aria-label="Main"] a { font-size: .97rem; font-weight: 500; }
.docs-tabs { border-bottom: 1px solid var(--line); }
.docs-tabs nav { gap: 0 4px; padding-top: 8px; }
.docs-tabs a { padding: 8px 12px 10px; font-size: .92rem; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.docs-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.docs-tabs a:hover { color: var(--ink); }
footer.wrap { padding-block: 28px 40px; color: var(--muted); font-size: .88rem; }
footer .foot-links a { color: var(--muted); }
.about-grid { display: grid; gap: 14px; margin: 16px 0; }
.paper { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.paper h3 { margin: 0 0 4px; }
.paper .status { font-size: .8rem; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.paper p { margin: 6px 0; }

/* Frozen header: stays at the top on every page while the content scrolls. */
.sitebar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(0,0,0,.04); }
.sitebar .docs-tabs { border-bottom: 0; }
.sitebar .docs-tabs nav { padding-top: 0; }
/* In-page links (Test a model, Leaderboard) land below the frozen header, not under it. */
[id] { scroll-margin-top: 96px; }
