:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --plane: #f9f9f7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --rule: rgba(11,11,11,0.10);
  --grid: #e1e0d9;
  --meter-fill: #2a78d6;
  --meter-track: #cde2fb;
  --good: #0ca30c;
  --warning: #fab219;
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a;
  --cat-4: #eda100; --cat-5: #e87ba4; --cat-6: #008300;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface: #1a1a19; --plane: #0d0d0d; --ink: #ffffff; --ink-2: #c3c2b7;
    --muted: #898781; --rule: rgba(255,255,255,0.10); --grid: #2c2c2a;
    --meter-fill: #3987e5; --meter-track: #0d366b;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70;
    --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #1a1a19; --plane: #0d0d0d; --ink: #ffffff; --ink-2: #c3c2b7;
  --muted: #898781; --rule: rgba(255,255,255,0.10); --grid: #2c2c2a;
  --meter-fill: #3987e5; --meter-track: #0d366b;
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70;
  --cat-4: #c98500; --cat-5: #d55181; --cat-6: #008300;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5; -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 20px 72px; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
h3 { font-size: 18px; }
p { margin: 0; }
.lede { color: var(--ink-2); max-width: 60ch; margin-top: 12px; font-size: 16px; }

header.masthead { border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 32px; }
.crumb { font-size: 14px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 14px; }
.crumb:hover { color: var(--ink); }

/* hero figure — exactly one per view */
.hero { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 28px 0 4px; }
.hero-value { font-size: clamp(48px, 9vw, 68px); font-weight: 600; letter-spacing: -0.03em; }
.hero-label { color: var(--ink-2); font-size: 16px; max-width: 34ch; }

/* stat tiles */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
       background: var(--rule); border: 1px solid var(--rule); border-radius: 10px;
       overflow: hidden; margin: 28px 0 40px; }
.tile { background: var(--surface); padding: 16px 18px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 600; margin-top: 2px; letter-spacing: -0.02em; }
.tile-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

section { margin-bottom: 44px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
        padding: 18px; text-decoration: none; color: inherit; display: block;
        transition: border-color .15s ease, transform .15s ease; }
.card:hover { border-color: var(--muted); transform: translateY(-1px); }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule);
         color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.badge .dot { width: 7px; height: 7px; }

/* meter — fill and track are steps of the same ramp */
.meter { margin-top: 16px; }
.meter-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.meter-track { height: 8px; border-radius: 4px; background: var(--meter-track); overflow: hidden; }
.meter-fill { height: 100%; background: var(--meter-fill); border-radius: 4px; min-width: 3px; }
.meter-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }

.facts { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 16px;
         padding-top: 14px; border-top: 1px solid var(--rule); }
.fact-label { font-size: 12px; color: var(--muted); }
.fact-value { font-size: 15px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--grid); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.num { text-align: right; }
.sub { color: var(--muted); font-size: 12px; }

ol.steps { margin: 0; padding-left: 22px; }
ol.steps li { margin-bottom: 10px; padding-left: 4px; }
.passive { color: var(--ink-2); }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-left: 6px; }

.note { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--warning);
        border-radius: 8px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); }
footer { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 20px;
         font-size: 13px; color: var(--muted); }
