:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #121212;
  --muted: #5e5e5e;
  --faint: #696969; /* 5.1:1 on --bg, 5.5:1 on --surface (WCAG AA) */
  --line: #e6e6e3;
  --line-strong: #d4d4d0;
  --accent: #121212;
  --accent-ink: #ffffff;
  --good: #0c7a4b;
  --good-soft: #e7f6ee;
  --warn: #8a5a00;
  --warn-soft: #f8f1dc;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --gauge: #121212;
  --gauge-track: #ecece8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 920px;
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090909;
    --surface: #111111;
    --ink: #f3f3f1;
    --muted: #a3a3a3;
    --faint: #8c8c8c; /* 5.9:1 on --bg, 5.5:1 on --surface */
    --line: #242424;
    --line-strong: #333333;
    --accent: #f3f3f1;
    --accent-ink: #090909;
    --good: #3dd68c;
    --good-soft: #10281c;
    --warn: #e6b450;
    --warn-soft: #2a220f;
    --bad: #ff7a70;
    --bad-soft: #2c1412;
    --gauge: #f3f3f1;
    --gauge-track: #242424;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #090909;
  --surface: #111111;
  --ink: #f3f3f1;
  --muted: #a3a3a3;
  --faint: #8c8c8c; /* 5.9:1 on --bg, 5.5:1 on --surface */
  --line: #242424;
  --line-strong: #333333;
  --accent: #f3f3f1;
  --accent-ink: #090909;
  --good: #3dd68c;
  --good-soft: #10281c;
  --warn: #e6b450;
  --warn-soft: #2a220f;
  --bad: #ff7a70;
  --bad-soft: #2c1412;
  --gauge: #f3f3f1;
  --gauge-track: #242424;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body[data-test-state="running"] .ad-slot { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--good); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}
.skip:focus { top: 0.75rem; z-index: 5; }

.site-header, .site-footer, main {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}
.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 0 0.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 620;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}
.brand:hover { color: var(--ink); }
.mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 99px;
  background: var(--good);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 18%, transparent);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-left: auto;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 620; }
.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.theme-toggle::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 99px;
  box-shadow: inset -0.42rem 0 0 var(--ink);
}
:root[data-theme="dark"] .theme-toggle::before {
  box-shadow: inset 0.42rem 0 0 var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle::before {
    box-shadow: inset 0.42rem 0 0 var(--ink);
  }
}

main { padding: 2.5rem 0 5rem; }
.kicker {
  margin: 0 0 0.7rem;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3 { font-weight: 580; letter-spacing: -0.045em; line-height: 1.12; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 0.85rem; max-width: 22ch; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.15rem); max-width: 13ch; }
h2 { font-size: 1.25rem; margin: 0 0 0.65rem; letter-spacing: -0.03em; }
h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.lede { font-size: 1.125rem; max-width: 38rem; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.crumbs { color: var(--faint); font-size: 0.88rem; margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; }
.crumbs a:hover { color: var(--ink); }

.hero { padding: 2.5rem 0 0.5rem; }
.choices { display: grid; gap: 0.75rem; margin: 2.75rem 0 1.5rem; }
.choice {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.choice:hover { border-color: var(--line-strong); color: inherit; }
.choice h2 { font-size: 1.55rem; margin: 0 0 0.3rem; }
.choice p { margin: 0; color: var(--muted); }
.choice-go { color: var(--ink); font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.trust { color: var(--muted); max-width: 40rem; margin: 0.5rem 0 2.5rem; }
.quiet { margin: 2.75rem 0; }
.quiet h2 { font-size: 0.95rem; letter-spacing: 0.02em; font-weight: 620; }

.panel, .prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { margin: 1.5rem 0; padding: 1.5rem 1.4rem 1.4rem; }
.prose { padding: 0.25rem 0 0.5rem; background: transparent; border: 0; box-shadow: none; }
.prose h2 { margin-top: 2.25rem; }
.stage { padding: 1.5rem 0 0.5rem; text-align: center; }
.stage-copy { text-align: left; margin-bottom: 2rem; }
.stage h1 { max-width: 16ch; font-size: clamp(2.1rem, 4vw, 3rem); }

.gauge {
  position: relative;
  width: min(100%, 280px);
  margin: 0 auto 0.75rem;
}
.gauge svg { display: block; width: 100%; height: auto; }
.gauge-track, .gauge-value { fill: none; stroke-width: 8; }
.gauge-track { stroke: var(--gauge-track); }
.gauge-value {
  stroke: var(--gauge);
  stroke-linecap: round;
  stroke-dasharray: 527.79;
  stroke-dashoffset: 527.79;
}
.gauge-readout {
  position: absolute;
  inset: 18%;
  display: grid;
  align-content: center;
  justify-items: center;
}
.gauge-label {
  margin: 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.gauge-number {
  margin: 0.15rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  font-weight: 560;
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.gauge-unit { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.95rem; }

.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.7rem; margin: 0.4rem 0 0.6rem; }
.stage .controls { margin-top: 0; }
.btn:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 2.75rem;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-ghost:not([hidden]) {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { filter: none; background: var(--surface); }
.phase { margin: 0.35rem 0 1.25rem; color: var(--muted); min-height: 1.4em; }
.stage .phase { text-align: center; }
.error {
  color: var(--bad);
  background: var(--bad-soft);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  text-align: left;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0.5rem auto 0;
  max-width: 34rem;
  text-align: left;
}
.stat-row div {
  padding: 0.85rem 0.2rem 0.2rem;
  border-top: 1px solid var(--line);
}
.stat-row dt { color: var(--faint); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-row dd { margin: 0.25rem 0 0; font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.stat-row .unit { color: var(--muted); font-size: 0.8rem; letter-spacing: 0; }

.grade-row { display: flex; gap: 1rem; align-items: flex-start; text-align: left; }
.grade-letter {
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  background: var(--surface);
  border: 1px solid var(--line);
}
.grade-ap, .grade-a { color: var(--good); background: var(--good-soft); border-color: transparent; }
.grade-b { color: var(--good); background: var(--good-soft); border-color: transparent; }
.grade-c, .grade-d { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.grade-f, .grade-none { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.grade-row .kicker { margin-bottom: 0.25rem; }
.grade-row p { margin: 0.15rem 0; }

.verdicts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; text-align: left; }
.verdict {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.8rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.verdict p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.95rem; }
.verdict-name { font-weight: 620; }
.verdict-badge { font-size: 0.78rem; font-weight: 650; border-radius: 999px; padding: 0.2rem 0.55rem; height: fit-content; }
.verdict-ready .verdict-badge { background: var(--good-soft); color: var(--good); }
.verdict-marginal .verdict-badge { background: var(--warn-soft); color: var(--warn); }
.verdict-not-ready .verdict-badge { background: var(--bad-soft); color: var(--bad); }
.report-verdict { font-size: 2rem; letter-spacing: -0.04em; margin: 0.15rem 0 0.35rem; font-weight: 580; }
.verdict-healthy, .verdict-good { color: var(--good); }
.verdict-aging { color: var(--warn); }
.verdict-replace { color: var(--bad); }
.verdict-unknown, .verdict-drain { color: var(--ink); }

.diagnosis, .notes, .prose ul, .prose ol { padding-left: 1.15rem; }
.diagnosis li, .notes li { margin: 0.35rem 0; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: grid; gap: 0.1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.history time { color: var(--faint); font-size: 0.82rem; }
.empty { color: var(--muted); border-top: 0; }

label { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}
textarea { width: 100%; min-height: 9rem; resize: vertical; }
.plan, .stack { display: grid; gap: 0.8rem; }
.split { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--ink); }
.check input { margin-top: 0.25rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 1rem; }
.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
pre.command {
  background: #161616;
  color: #f4f4f2;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
}
:root[data-theme="dark"] pre.command,
:root:not([data-theme="light"]) pre.command { background: #000; }
.spec { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: 0.35rem 1rem; margin: 1rem 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-variant-numeric: tabular-nums; }
.spec-heading { grid-column: 1 / -1; margin-top: 0.8rem; font-size: 1.05rem; color: var(--ink); }
.hero-stat, .drain-score {
  font-size: clamp(3.5rem, 12vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin: 0.2rem 0 0.8rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.drain-label { font-weight: 600; margin-top: 0; }
canvas#drain-canvas { width: min(100%, 320px); height: auto; background: #161616; border-radius: 12px; }
.clock { font-variant-numeric: tabular-nums; font-size: 2rem; letter-spacing: -0.04em; margin: 0.4rem 0; }
.details summary { cursor: pointer; font-weight: 620; }
.details p, .details ul { color: var(--muted); }
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; }
.guide-list li { border-top: 1px solid var(--line); }
.guide-list a { display: block; padding: 0.85rem 0; text-decoration: none; }
.guide-list a:hover { color: var(--ink); }
.guide-list p { margin: 0; color: var(--muted); }

.ad-slot:not([hidden]) { margin: 3.5rem 0 0; }
.ad-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.ad-frame {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  min-height: 3.25rem;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--faint);
  font-size: 0.82rem;
  padding: 0.7rem;
}
.ad-frame p { margin: 0; }
.site-footer { padding: 0 0 2.5rem; color: var(--faint); font-size: 0.88rem; }
.site-footer a { color: var(--muted); }

@media (min-width: 760px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .plan { grid-template-columns: 1fr 1fr; }
  main { padding-top: 3.5rem; }
  .hero { padding-top: 3.5rem; }
}
@media (max-width: 640px) {
  .gauge { width: min(68vw, 230px); }
  .stage-copy { margin-bottom: 0.75rem; }
  .site-header { flex-wrap: wrap; }
  .site-header nav { order: 3; width: 100%; margin-left: 0; padding-top: 0.35rem; }
  .theme-toggle { margin-left: auto; }
  h1 { font-size: 2.35rem; }
  .choice { align-items: flex-start; flex-direction: column; gap: 0.8rem; }
  .stat-row { gap: 0.4rem; }
  .stat-row dd { font-size: 1.2rem; }
  .btn:not([hidden]) { width: 100%; }
  .stage .controls { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gauge-value { transition: none; }
}
@media print {
  .site-header, .ad-slot, .controls, .site-footer, .theme-toggle { display: none !important; }
  body { background: white; color: black; }
}

a.btn:not([hidden]) { text-decoration: none; }
a.btn:hover { color: var(--accent-ink); }
.hero-cta { justify-content: flex-start; margin: 1.75rem 0 0; }
.stage .hero-cta { margin-top: 1.25rem; }
.confidence {
  margin: 0 0 0.35rem;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fixes { margin: 0.8rem 0 0; padding-left: 1.15rem; }
.fixes li { margin: 0.4rem 0; }
.score-hero {
  font-size: clamp(4.2rem, 12vw, 6.5rem);
  letter-spacing: -0.07em;
  line-height: 0.9;
  margin: 0.2rem 0 0.4rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.subscores { display: grid; margin: 1.25rem 0; }
.subscore {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.checkup-stage .stage-copy { max-width: 40rem; }
/* Privacy switch. State follows html[data-privacy], which privacy.js sets in
   <head> before first paint, so a saved "off" never flashes "on". On and Off
   are always spelled out; color only reinforces the words and the icon. */
.privacy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--good) 40%, var(--line-strong));
  background: var(--good-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.3rem 0.25rem 0.6rem;
  min-height: 2.25rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.privacy-toggle:hover { border-color: var(--good); }
.privacy-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pt-shield { flex: none; color: var(--good); }
.pt-shield-body { fill: currentColor; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pt-check { fill: none; stroke: var(--good-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pt-state {
  display: inline-grid;
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  background: var(--good);
  color: var(--accent-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}
/* Both words share one grid cell, so the pill keeps the width of the longer one. */
.pt-state > span { grid-area: 1 / 1; }
.pt-off { visibility: hidden; }

:root[data-privacy="off"] .privacy-toggle {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line-strong));
}
:root[data-privacy="off"] .privacy-toggle:hover { border-color: var(--warn); }
:root[data-privacy="off"] .pt-shield { color: var(--warn); }
:root[data-privacy="off"] .pt-shield-body { fill: none; }
:root[data-privacy="off"] .pt-check { display: none; }
:root[data-privacy="off"] .pt-state {
  background: transparent;
  color: var(--warn);
  box-shadow: inset 0 0 0 1px var(--warn);
}
:root[data-privacy="off"] .pt-on { visibility: hidden; }
:root[data-privacy="off"] .pt-off { visibility: visible; }

/* Off note: sits in main's top padding, so showing it never moves the page. */
main { position: relative; }
.privacy-note {
  display: none;
  position: absolute;
  top: 0.55rem;
  right: 0;
  margin: 0;
  max-width: 100%;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.3;
  text-align: right;
}
:root[data-privacy="off"] .privacy-note { display: block; }
@media (prefers-reduced-motion: reduce) { .privacy-toggle { transition: none; } }
@media print { .privacy-note { display: none !important; } }
.charts { display: grid; gap: 0.8rem; margin: 1.25rem auto 0; max-width: 40rem; text-align: left; }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.25rem; }
.chart svg { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-down { stroke: var(--ink); }
.chart-up { stroke: var(--good); }
.chart-idle { stroke: var(--faint); }
.chart-loaded { stroke: var(--warn); }
.legend { color: var(--faint); font-style: normal; }
.legend i { display: inline-block; width: 0.7rem; height: 0.15rem; margin: 0 0.2rem 0 0.45rem; vertical-align: middle; }
.legend-idle { background: var(--faint); }
.legend-loaded { background: var(--warn); }
.ico { width: 0.9rem; height: 0.9rem; vertical-align: -0.1rem; margin-right: 0.2rem; }
.ring-row { display: flex; align-items: center; gap: 0.8rem; }
.score-ring, #charge-ring svg { width: 4.5rem; height: 4.5rem; }
.ring-track { fill: none; stroke: var(--gauge-track); stroke-width: 7; }
.ring-value { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.rings .subscore { align-items: center; justify-content: flex-start; gap: 0.75rem; }
.rings .subscore strong { margin-left: auto; }
.hint-detail { display: block; color: var(--faint); font-size: 0.78rem; margin-top: 0.2rem; }
.cap-bars { width: min(100%, 320px); height: auto; margin: 0.4rem 0 1rem; }
.bar-track { fill: var(--gauge-track); }
.bar-design { fill: var(--faint); }
.bar-full { fill: var(--good); }
@media (max-width: 640px) {
  .privacy-note { left: 0; right: auto; text-align: left; }
  .charts { grid-template-columns: 1fr; }
}
@media (min-width: 760px) {
  .charts { grid-template-columns: 1fr 1fr; }
  .charts .chart:last-child { grid-column: 1 / -1; }
}

/* Call test inputs: long values stack under their label on narrow screens. */
@media (max-width: 560px) {
  .spec-stack { grid-template-columns: 1fr; gap: 0.1rem; }
  .spec-stack dd { margin-bottom: 0.6rem; }
}

/* Guided unplugged run (src/client/battery-run.ts) */
.meter { position: relative; height: 0.85rem; border-radius: 999px; background: var(--gauge-track); overflow: hidden; margin: 0.6rem 0 0.35rem; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--good); border-radius: inherit; transition: width 0.4s ease; }
.run-headline { font-size: 1.35rem; letter-spacing: -0.02em; font-weight: 580; margin: 0.3rem 0 0.6rem; }
.run-tone-good { color: var(--good); }
.run-tone-warn { color: var(--warn); }
.run-tone-bad { color: var(--bad); }
.run-tone-neutral { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* Sprint A: VPN hint and on/off compare */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vpn-hint { text-align: left; margin: 1.25rem 0; padding: 0.9rem 1rem; border-radius: 12px; background: var(--warn-soft); border: 1px solid transparent; }
.vpn-hint[data-level="possible"] { background: var(--surface); border-color: var(--line-strong); }
.vpn-hint .kicker { margin: 0 0 0.2rem; }
.vpn-hint p { margin: 0.2rem 0; }
.vpn-hint-label { font-weight: 620; color: var(--ink); }
.vpn-hint .notes { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }
.compare .controls { justify-content: flex-start; }
.compare-step { margin: 0.6rem 0; font-weight: 560; }
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { text-align: right; padding: 0.55rem 0.5rem; border-top: 1px solid var(--line); white-space: nowrap; }
.compare-table th[scope="row"], .compare-table thead th:first-child { text-align: left; font-weight: 560; }
.compare-table thead th { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; border-top: 0; }
.delta-worse { color: var(--bad); }
.delta-better { color: var(--good); }
.delta-same { color: var(--muted); }
.reach-link { margin: 1rem 0 0; }

/* Sprint C: site reachability */
.reach-intro { margin-bottom: 0.5rem; }
.notice { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; color: var(--muted); }
.notice strong { color: var(--ink); }
.panel .controls { justify-content: flex-start; }
.reach-summary { font-size: 1.15rem; font-weight: 580; letter-spacing: -0.02em; margin: 0.2rem 0 1rem; }
.reach-groups { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .reach-groups { grid-template-columns: 1fr 1fr; } }
.reach-group h2 { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 620; margin: 0 0 0.2rem; }
.reach-list { list-style: none; padding: 0; margin: 0; }
.reach-row { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.reach-name { font-weight: 600; }
.reach-badge { font-size: 0.78rem; font-weight: 650; border-radius: 999px; padding: 0.2rem 0.55rem; height: fit-content; background: var(--gauge-track); color: var(--muted); font-variant-numeric: tabular-nums; }
.reach-detail { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.88rem; }
.reach-detail:empty { display: none; }
.reach-row[data-outcome="reachable"] .reach-badge { background: var(--good-soft); color: var(--good); }
.reach-row[data-outcome="slow"] .reach-badge { background: var(--warn-soft); color: var(--warn); }
.reach-row[data-outcome="no-response"] .reach-badge { background: var(--bad-soft); color: var(--bad); }

/* Start feedback (guided run, timed drain) */
.notice:not([hidden]) { display: block; margin: 0.5rem 0 0.75rem; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid transparent; font-weight: 560; }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-info { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.notice-flash { animation: notice-flash 0.6s ease-out; }
@keyframes notice-flash { 0% { box-shadow: 0 0 0 0 var(--line-strong); transform: translateY(-2px); } 100% { box-shadow: 0 0 0 6px transparent; transform: none; } }
@media (prefers-reduced-motion: reduce) { .notice-flash { animation: none; } }
