:root {
  --bg: #f7f7f4; --surface: #ffffff; --ink: #1d1f1e; --muted: #5d6360; --line: #e2e3df;
  --accent: #1f6f5c; --accent-soft: #e2f0eb; --warn: #a15c07; --warn-soft: #fbefdc;
  --bad: #b0322a; --bad-soft: #f8e3e1; --good: #1f6f5c; --bar: #9bc7b9; --bar-strong: #1f6f5c;
  --radius: 10px; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121413; --surface: #1b1e1c; --ink: #e8eae7; --muted: #a3a9a5; --line: #2c302d;
    --accent: #6cc3a8; --accent-soft: #1d3029; --warn: #e0a54d; --warn-soft: #33281a;
    --bad: #ec7a70; --bad-soft: #3a1f1c; --good: #6cc3a8; --bar: #2f5a4d; --bar-strong: #6cc3a8;
  }
}
:root[data-theme="dark"] {
  --bg: #121413; --surface: #1b1e1c; --ink: #e8eae7; --muted: #a3a9a5; --line: #2c302d;
  --accent: #6cc3a8; --accent-soft: #1d3029; --warn: #e0a54d; --warn-soft: #33281a;
  --bad: #ec7a70; --bad-soft: #3a1f1c; --good: #6cc3a8; --bar: #2f5a4d; --bar-strong: #6cc3a8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
header.top nav a { margin-left: 16px; text-decoration: none; color: var(--muted); font-size: 14px; }
header.top nav a:hover { color: var(--ink); }
.brand { font-weight: 650; letter-spacing: -0.01em; }
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 20ch; }
.hero p.lede { font-size: 18px; color: var(--muted); max-width: 62ch; margin: 0 0 20px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: 8px; }
section { padding: 28px 0; }
section h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
section p.sub { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .v { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; }
.kpi .l { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pill.pass { background: var(--accent-soft); color: var(--good); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 56px; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--bar); }
.bar-fill.strong { background: var(--bar-strong); }
.legend { color: var(--muted); font-size: 13px; margin-top: 8px; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.flow .col { display: grid; gap: 8px; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.node small { display: block; color: var(--muted); font-size: 12px; }
.node.core { border-color: var(--accent); background: var(--accent-soft); }
.arrow { color: var(--muted); font-size: 20px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 24px 0 40px; margin-top: 24px; }
code, .mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); justify-self: center; }
  .bar-row { grid-template-columns: 110px 1fr 48px; }
  header.top nav a { margin-left: 0; margin-right: 14px; }
}
/* demo */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.people button { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: var(--ink); font: inherit; }
.people button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.people button small { display: block; color: var(--muted); font-size: 12px; }
.skill { border-top: 1px solid var(--line); padding: 10px 0; }
.skill:first-child { border-top: 0; }
.skill h4 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev { font-size: 13px; color: var(--muted); margin: 4px 0 0 0; padding-left: 12px; border-left: 2px solid var(--line); }
.score { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.teams { max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.teams .t-title { font-weight: 650; font-size: 16px; }
.teams .t-sub { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.teams .t-skill { font-weight: 600; margin-top: 10px; }
.teams .t-ev { color: var(--muted); font-size: 12px; }
.teams .t-choices { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.teams .t-choices span { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.teams .t-choices span.on { border-color: var(--accent); color: var(--accent); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; color: var(--muted); font: inherit; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tour { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 10; }
.tour p { margin: 6px 0 12px; font-size: 15px; }
.tour .btn { background: var(--bg); color: var(--ink); }
.tour .btn.ghost { background: transparent; color: var(--bg); border: 1px solid var(--bg); }
.people { align-self: start; }
.layout > div { align-self: start; min-width: 0; }
.tour .step { font-size: 12px; opacity: .7; }
.hl { outline: 3px solid var(--warn); outline-offset: 4px; border-radius: 8px; }
