:root {
  --bg: #0b0c0e;
  --panel: #121418;
  --panel-2: #171a1f;
  --line: #23262d;
  --ink: #e9e7e2;
  --mute: #8b9099;
  --accent: #ff5240;
  --high: #ff5240;
  --med: #f2a93b;
  --low: #5b8def;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f3ee;
    --panel: #ffffff;
    --panel-2: #faf9f6;
    --line: #e2dfd7;
    --ink: #16171a;
    --mute: #676b73;
    --accent: #d93a28;
    --high: #d93a28;
    --med: #c98112;
    --low: #3d6fd6;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
code { font-family: var(--mono); font-size: .92em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* hero */
.hero { padding: 72px 16px 36px; }
.eyebrow { font-family: var(--mono); color: var(--accent); letter-spacing: .08em; font-size: 13px; margin: 0 0 16px; }
h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.03; letter-spacing: -.025em; margin: 0 0 18px; max-width: 15ch; font-weight: 750; }
.lede { color: var(--mute); max-width: 60ch; font-size: 17px; margin: 0 0 32px; }

.dossier {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 22px 26px;
  border-radius: 6px;
  white-space: pre-wrap;
  min-height: 120px;
}
.dossier mark { background: none; color: var(--accent); font-weight: 600; }
.pulse { color: var(--mute); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; }
.stats b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.stats span { color: var(--mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; padding: 0; margin: 18px 0 0; color: var(--mute); font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.high { background: var(--high); box-shadow: 0 0 0 3px color-mix(in srgb, var(--high) 20%, transparent); }
.dot.med { background: var(--med); }
.dot.low { background: var(--low); opacity: .7; }
.dot.nil { background: var(--line); }

/* nav */
nav.toc {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
nav.toc .wrap { display: flex; gap: 2px; overflow-x: auto; padding-block: 9px; scrollbar-width: none; }
nav.toc .wrap::-webkit-scrollbar { display: none; }
nav.toc a { color: var(--mute); text-decoration: none; font-size: 13px; white-space: nowrap; padding: 4px 10px; border-radius: 99px; }
nav.toc a:hover { color: var(--ink); background: var(--panel); }

/* cards */
.card { margin: 32px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.card > header { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.num { font-family: var(--mono); color: var(--accent); font-size: 13px; padding-top: 4px; }
.card h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.card header p { margin: 4px 0 0; color: var(--mute); font-size: 14px; max-width: 70ch; }
.badge { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--mute); white-space: nowrap; padding-top: 4px; }

.row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  gap: 3px 24px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
}
.rows > .row:first-child { border-top: 0; }
.label { font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
.label .dot { transform: translateY(-1px); }
.value { font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.value.nil { color: var(--mute); font-style: italic; font-family: var(--sans); font-size: 13.5px; }
.value img { display: block; max-width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.why { grid-column: 2; color: var(--mute); font-size: 12.5px; max-width: 72ch; }
.loading { padding: 18px 24px; color: var(--mute); font-family: var(--mono); font-size: 13px; }
.note { padding: 14px 24px; font-size: 13.5px; color: var(--mute); border-top: 1px solid var(--line); background: var(--panel-2); }
.note b { color: var(--ink); }

/* opt-in */
.optin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.optin-item { padding: 20px 24px; border-left: 1px solid var(--line); }
.optin-item:first-child { border-left: 0; }
.optin-item h3 { margin: 0 0 4px; font-size: 15px; }
.optin-item p { margin: 0 0 14px; color: var(--mute); font-size: 13.5px; }
.optin-item .row { grid-template-columns: 1fr; padding: 10px 0; }
.optin-item .why { grid-column: 1; }
button {
  font: inherit; font-size: 14px; font-weight: 600;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer;
}
button:hover { background: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, nav.toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

footer { color: var(--mute); font-size: 13.5px; padding-block: 16px 64px; }
footer p { max-width: 80ch; }
footer b { color: var(--ink); }

@media (max-width: 720px) {
  .hero { padding-top: 48px; }
  .stats { grid-template-columns: 1fr; }
  .row { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .why { grid-column: 1; }
  .card > header { padding: 16px; }
  .optin-grid { grid-template-columns: 1fr; }
  .optin-item { border-left: 0; border-top: 1px solid var(--line); padding: 16px; }
  .optin-item:first-child { border-top: 0; }
  .dossier { padding: 16px 18px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
}
