/* ─── tokens ──────────────────────────────────────────────────── */
:root {
  --bg: #FAF7F2;
  --bg-2: #F2EDE4;
  --surface: #FFFFFF;
  --surface-2: #F7F3EC;
  --ink: #1B1714;
  --ink-2: #443D36;
  --muted: #6F665C;
  --line: #E6DFD3;
  --line-2: #D8CFC0;
  --accent: #B45309;
  --accent-soft: #FBEBD2;
  --rose: #9D174D;
  --good: #15803D;
  --bad: #B42318;
  --track: #EAE3D7;
  --shadow-sm: 0 1px 2px rgba(27, 23, 20, .05);
  --shadow: 0 1px 2px rgba(27, 23, 20, .05), 0 10px 26px -14px rgba(27, 23, 20, .22);
  --shadow-lg: 0 2px 4px rgba(27, 23, 20, .06), 0 28px 56px -20px rgba(27, 23, 20, .28);
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --maxw: 1140px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120F;
    --bg-2: #1B1714;
    --surface: #1D1916;
    --surface-2: #252018;
    --ink: #F6F1E9;
    --ink-2: #D6CDC1;
    --muted: #A79C8E;
    --line: #332C25;
    --line-2: #443B32;
    --accent: #F0A94A;
    --accent-soft: #3A2A14;
    --rose: #F472B6;
    --good: #4ADE80;
    --bad: #F87171;
    --track: #2B251F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 28px 56px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #15120F;
  --bg-2: #1B1714;
  --surface: #1D1916;
  --surface-2: #252018;
  --ink: #F6F1E9;
  --ink-2: #D6CDC1;
  --muted: #A79C8E;
  --line: #332C25;
  --line-2: #443B32;
  --accent: #F0A94A;
  --accent-soft: #3A2A14;
  --rose: #F472B6;
  --good: #4ADE80;
  --bad: #F87171;
  --track: #2B251F;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 28px 56px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ─── base ────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
}

[hidden] { display: none !important; }

img { max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.015em; text-wrap: balance; margin: 0; }

a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ─── header ──────────────────────────────────────────────────── */
.site {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site .wrap { display: flex; align-items: center; gap: 10px; height: 60px; }

.mark {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--f-display); font-weight: 700; font-size: 17px;
  color: var(--ink); text-decoration: none; letter-spacing: -.02em; white-space: nowrap;
}
.mark svg { flex: none; }
.mark em { color: var(--accent); font-style: normal; }

.site nav { margin-left: auto; display: flex; gap: 2px; }
.site nav a {
  font: 500 14px var(--f-body); color: var(--muted); text-decoration: none;
  padding: 7px 11px; border-radius: 99px;
}
.site nav a:hover { color: var(--ink); background: var(--surface-2); }
.site nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }

.icobtn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--muted); cursor: pointer;
}
.icobtn:hover { color: var(--ink); border-color: var(--line-2); }
.icobtn svg { width: 17px; height: 17px; }

/* ─── buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px var(--f-body); padding: 11px 18px;
  border: 1px solid var(--line-2); border-radius: 99px;
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .12s, background .12s, border-color .12s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.pri:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); border-color: transparent; }
.btn.sm { font-size: 13.5px; padding: 8px 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
}

/* ─── intro ───────────────────────────────────────────────────── */
.hero { padding-block: clamp(36px, 8vw, 84px) 40px; }
.hero .inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(38px, 8.5vw, 74px); line-height: .98; margin: 18px 0 0;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(16.5px, 2.2vw, 20px); color: var(--ink-2); max-width: 58ch; margin: 20px 0 0; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .cta .btn { padding: 13px 24px; font-size: 15.5px; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; margin-top: 44px;
}
.facts div { background: var(--surface); padding: 18px 20px; }
.facts dt { font: 500 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 7px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 25px; line-height: 1.1; letter-spacing: -.02em; }
.facts dd small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 13.5px; color: var(--muted); letter-spacing: 0; margin-top: 4px; }

.steps-preview { display: grid; gap: 10px; margin-top: 44px; }
.steps-preview h2 { font-size: 13px; font-family: var(--f-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.steps-preview ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.steps-preview li {
  display: flex; gap: 11px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; font-size: 14.5px;
}
.steps-preview li span { font: 500 12px var(--f-mono); color: var(--accent); }

.disclaim {
  margin-top: 44px; padding: 16px 18px; font-size: 14px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  max-width: 76ch;
}
.disclaim b { color: var(--ink); }

/* ─── assess: progress rail ───────────────────────────────────── */
.wizbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 60px); z-index: 10; background: var(--bg); padding-block: 14px 10px; }
.wizbar .row { display: flex; align-items: center; gap: 14px; }
.wizbar .pos { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .07em; }
.wizbar .live { margin-left: auto; display: flex; align-items: baseline; gap: 7px; font: 500 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.wizbar .live b { font-family: var(--f-display); font-size: 21px; color: var(--accent); letter-spacing: -.02em; }

.ticks { display: flex; gap: 4px; flex: 1; min-width: 0; }
.ticks button {
  flex: 1; height: 5px; min-width: 0; padding: 0; border: 0; cursor: pointer;
  border-radius: 99px; background: var(--track);
  transition: background .2s, transform .2s;
}
.ticks button:hover { transform: scaleY(1.8); }
.ticks button[data-done] { background: color-mix(in srgb, var(--accent) 45%, var(--track)); }
.ticks button[data-now] { background: var(--accent); transform: scaleY(1.8); }

/* ─── assess: layout ──────────────────────────────────────────── */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; padding-bottom: 40px; }
[data-mode="review"] .stage { grid-template-columns: minmax(0, 1fr) 352px; }
@media (max-width: 940px) { [data-mode="review"] .stage { grid-template-columns: minmax(0, 1fr); } [data-mode="review"] .panel { order: -1; } }

[data-mode="wizard"] .panel { display: none; }
[data-mode="wizard"] .sec:not([data-active]) { display: none; }
[data-mode="review"] .wizbar,
[data-mode="review"] .wiznav { display: none; }

.reviewhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 18px 6px; }
.reviewhead h2 { font-size: clamp(22px, 3vw, 29px); }
.reviewhead .btn { margin-left: auto; }
[data-mode="wizard"] .reviewhead { display: none; }

/* ─── sections & questions ────────────────────────────────────── */
.sec { margin-bottom: 14px; }

.sechead { display: grid; gap: 4px; margin-bottom: 18px; }
.sechead .meta { display: flex; align-items: center; gap: 10px; }
.sechead .n { font: 500 12px var(--f-mono); color: var(--accent); letter-spacing: .1em; }
.sechead h2 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.06; }
.sechead p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.sechead .delta { margin-left: auto; font: 500 13px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.sechead .delta.pos { color: var(--good); }
.sechead .delta.neg { color: var(--bad); }

[data-mode="wizard"] .sec[data-active] { animation: stepIn .34s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.items { display: grid; gap: 14px; }

.q {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
[data-mode="review"] .sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
[data-mode="review"] .sechead { margin: 0; padding: 15px 18px; }
[data-mode="review"] .sechead h2 { font-size: 17px; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
[data-mode="review"] .sechead .n { display: none; }
[data-mode="review"] .sechead p { font-size: 13.5px; }
[data-mode="review"] .items { padding: 0 18px 18px; gap: 0; }
[data-mode="review"] .q { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px 0; }

.qlabel { display: block; font-weight: 500; font-size: 15.5px; color: var(--ink); }
.qhint { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); }

/* slider */
.sl { margin-top: 16px; }
.sl .top { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; margin-bottom: 2px; }
.sl .ends { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sl .val {
  font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.sl .val small { font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--muted); }
.q[data-inv="1"] .sl .val { color: var(--bad); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 30px; margin: 0;
  background: transparent; cursor: pointer;
  --fill: 50%; --fillc: var(--accent);
}
.q[data-inv="1"] input[type="range"] { --fillc: var(--bad); }

input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 99px;
  background: linear-gradient(90deg, var(--fillc) 0 var(--fill), var(--track) var(--fill) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -6px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--fillc);
  box-shadow: 0 1px 4px rgba(27, 23, 20, .3);
  transition: transform .12s;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: var(--track); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--fillc); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--fillc);
  box-shadow: 0 1px 4px rgba(27, 23, 20, .3);
}

.sl .marks { display: flex; justify-content: space-between; padding-inline: 10px; margin-top: -2px; }
.sl .marks i { width: 2px; height: 4px; border-radius: 1px; background: var(--line-2); }

/* radio cards */
.opts { display: grid; gap: 7px; margin-top: 14px; }
.opts label {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 14px; font-size: 14.5px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
[data-mode="review"] .opts label { background: var(--surface-2); }
.opts label:hover { border-color: var(--line-2); }
.opts input { position: absolute; opacity: 0; width: 0; height: 0; }
.opts .dot {
  flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--line-2); display: grid; place-items: center;
}
.opts .dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .14s; }
.opts input:checked ~ .dot { border-color: var(--accent); }
.opts input:checked ~ .dot::after { transform: scale(1); }
.opts label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opts input:focus-visible ~ .dot { outline: 2px solid var(--accent); outline-offset: 2px; }

/* number fields */
.nums { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.nums > div { display: grid; gap: 5px; flex: 1 1 130px; }
.nums label { font-size: 13px; color: var(--muted); }
input[type="number"] {
  font: 500 16px var(--f-mono); padding: 10px 12px; width: 100%;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
[data-mode="review"] input[type="number"] { background: var(--surface-2); }
.nums .unit { font-size: 13px; color: var(--muted); align-self: end; padding-bottom: 12px; }

/* safety checks */
.checks { display: grid; gap: 8px; margin-top: 14px; }
.checks label {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px; font-size: 14.5px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
[data-mode="review"] .checks label { background: var(--surface-2); }
.checks input { position: absolute; opacity: 0; width: 0; height: 0; }
.checks .box {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px;
  border: 2px solid var(--line-2); display: grid; place-items: center;
  color: var(--bg); font-size: 11px; font-weight: 700;
}
.checks input:checked ~ .box { background: var(--bad); border-color: var(--bad); }
.checks input:checked ~ .box::after { content: "\2713"; }
.checks label:has(input:checked) { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.checks input:focus-visible ~ .box { outline: 2px solid var(--accent); outline-offset: 2px; }

.safenote {
  margin-top: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.5;
  border: 1px solid var(--line); border-left: 3px solid var(--bad);
  border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2);
}
.safenote b { color: var(--ink); }

/* ─── wizard nav ──────────────────────────────────────────────── */
.wiznav {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding-block: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.wiznav .btn.pri { margin-left: auto; }
.wiznav .skipto { font-size: 13.5px; }

/* ─── result panel + reveal ───────────────────────────────────── */
.panel {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow);
}
@media (max-width: 940px) { .panel { position: static; } }

.reveal { padding-block: clamp(24px, 6vw, 56px) 60px; }
.reveal .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 38px); max-width: 680px; margin-inline: auto;
}
.reveal .after { max-width: 680px; margin: 26px auto 0; display: grid; gap: 26px; }

.gaugewrap { position: relative; max-width: 330px; margin-inline: auto; }
.gauge { display: block; width: 100%; }
.gauge .arcMain, .gauge .arcRange { transition: stroke-dasharray .85s cubic-bezier(.2, .8, .3, 1), stroke-dashoffset .85s cubic-bezier(.2, .8, .3, 1); }
.gaugewrap .over {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 7%; pointer-events: none;
}
.pct {
  font-family: var(--f-display); font-weight: 700; line-height: .9;
  font-size: clamp(50px, 13vw, 68px); letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.panel .pct { font-size: 54px; }
.pct sup { font-size: .42em; font-weight: 700; top: -.7em; margin-left: 2px; letter-spacing: 0; }
.rangetxt { text-align: center; font: 400 12.5px var(--f-mono); color: var(--muted); margin-top: 6px; }

.verdict { text-align: center; margin-top: 14px; }
.verdict b { display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(19px, 3vw, 24px); letter-spacing: -.02em; }
.verdict p { margin: 7px auto 0; color: var(--ink-2); font-size: 14.5px; max-width: 46ch; }
.panel .verdict b { font-size: 17px; }
.panel .verdict p { font-size: 13.5px; }
.verdict.pos b { color: var(--good); }
.verdict.neg b { color: var(--bad); }

.stages { display: grid; gap: 12px; margin-top: 24px; }
.stages .st { display: grid; gap: 6px; }
.stages .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.stages .lbl small { display: block; color: var(--muted); font-size: 12.5px; }
.stages .lbl b { font: 500 15px var(--f-mono); font-variant-numeric: tabular-nums; }
.bar { height: 9px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .7s cubic-bezier(.2, .8, .3, 1); }
.mult { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.alert {
  border: 1px solid var(--bad); border-radius: var(--r);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  padding: 15px 17px; font-size: 14.5px; line-height: 1.5; margin-bottom: 18px;
}
.alert strong { display: block; color: var(--bad); font-size: 15.5px; margin-bottom: 5px; }
.alert .lines { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.alert .lines span { font: 500 13px var(--f-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; }

h3.cap { font: 500 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 10px; }

.lev { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.lev li { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.lev li > span { min-width: 0; }
.lev li em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }
.lev li b { flex: none; font: 500 12.5px var(--f-mono); font-variant-numeric: tabular-nums; }
.lev .empty { color: var(--muted); font-size: 13.5px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.twocol { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.panel .twocol { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 20px; }

.secbars { display: grid; gap: 9px; }
.secbars .r { display: grid; grid-template-columns: minmax(0, 1fr) 72px 46px; gap: 10px; align-items: center; font-size: 13.5px; }
.secbars .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secbars .g { position: relative; height: 7px; background: var(--track); border-radius: 99px; }
.secbars .g i { position: absolute; top: 0; height: 100%; border-radius: 99px; }
.secbars .g::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.secbars .v { font: 500 12.5px var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }

/* share box */
.share { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; display: grid; gap: 12px; }
.share p { margin: 0; font-size: 13.5px; color: var(--muted); }
.consent { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent .box { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 2px solid var(--line-2); display: grid; place-items: center; color: var(--bg); font-size: 11px; font-weight: 700; }
.consent input:checked ~ .box { background: var(--accent); border-color: var(--accent); }
.consent input:checked ~ .box::after { content: "\2713"; }
.consent input:focus-visible ~ .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.pid { font: 500 15px var(--f-mono); background: var(--accent-soft); color: var(--accent); padding: 2px 9px; border-radius: 6px; user-select: all; }
.msg { font-size: 13.5px; color: var(--muted); }

/* ─── docs ────────────────────────────────────────────────────── */
.doc { padding-block: 34px 70px; max-width: 820px; }
.doc > h1 { font-size: clamp(30px, 5.5vw, 46px); line-height: 1.04; }
.doc .lede { font-size: clamp(16px, 2.2vw, 18.5px); color: var(--ink-2); margin: 16px 0 0; max-width: 64ch; }
.doc h2 { font-size: clamp(21px, 3.2vw, 27px); margin: 40px 0 10px; }
.doc h3 { font-size: 17px; font-family: var(--f-body); font-weight: 600; margin: 24px 0 6px; }
.doc p, .doc li { max-width: 72ch; }
.doc p { margin: 12px 0; color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 9px; color: var(--ink-2); }
.doc li b, .doc p b { color: var(--ink); }
.doc .formula {
  font-family: var(--f-mono); font-size: 13.5px; line-height: 1.8;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 16px 18px; overflow-x: auto; margin: 18px 0;
}
.doc code { font-family: var(--f-mono); font-size: .88em; background: var(--track); padding: 1px 6px; border-radius: 4px; }

.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 20px 0; }
table { border-collapse: collapse; width: 100%; min-width: 740px; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 13px 15px; border-bottom: 1px solid var(--line); }
th { font: 500 11.5px var(--f-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); }
tbody td:first-child { font-weight: 500; color: var(--ink); }
tbody td small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
td.w { font-family: var(--f-mono); font-size: 12.5px; white-space: nowrap; color: var(--accent); }
tr:last-child td { border-bottom: 0; }

.srcs { list-style: none; padding: 0; gap: 0; }
.srcs li { border-bottom: 1px solid var(--line); padding: 12px 0; max-width: none; }
.srcs li:last-child { border-bottom: 0; }
.srcs a { text-decoration: none; }
.srcs a:hover { text-decoration: underline; }

.formrow { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.formrow > div { display: grid; gap: 5px; flex: 1 1 165px; }
.formrow label { font-size: 13px; color: var(--muted); }
.formrow input[type="text"], .formrow select {
  font: 500 15px var(--f-mono); padding: 10px 12px; width: 100%;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.formrow select { font-family: var(--f-body); font-weight: 400; }

/* ─── footer ──────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding-block: 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot .sp { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
