:root {
  color-scheme: light dark;
  --ink: #12161c;
  --bg: #ffffff;
  --panel: #f5f7fa;
  --line: #e1e6ee;
  --muted: #5b6472;
  --accent: #2f6df6;
  --accent-ink: #ffffff;
  --good: #1f7a4d;
  --warn: #9a5b00;
  --bad: #b42318;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ecf3; --bg: #0b0e12; --panel: #131820; --line: #232a35; --muted: #93a0b4;
    --accent: #6ea0ff; --accent-ink: #0b0e12; --good: #4fc28a; --warn: #f0b44c; --bad: #ff7b72;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.container { max-width: 880px; margin: 0 auto; padding: 0 22px; }
main { max-width: 880px; margin: 0 auto; padding: 40px 22px 64px; }
main.narrow { max-width: 480px; }

h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ── Header and footer ─────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 18px; margin-left: auto; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { color: var(--muted); }
.site-footer .disclaimer { flex-basis: 100%; }

/* ── Forms ─────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; margin: 14px 0 4px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
input, select, textarea {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; margin-right: 8px; }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; align-items: center; font-weight: 400; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

.button, button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 8px; padding: 10px 18px; display: inline-block; text-decoration: none;
}
.button.secondary, button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: 0.6; cursor: default; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; align-items: center; }

.form-status { margin-top: 12px; min-height: 1.6em; }
.form-status[data-state=ok] { color: var(--good); }
.form-status[data-state=error] { color: var(--bad); }

/* A honeypot field: visually and audibly absent, still in the DOM. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Panels, cards, results ────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 18px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 22px 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin-top: 0; }

.cta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 40px 0; }
.cta form { display: flex; gap: 10px; flex-wrap: wrap; }
.cta input[type=email] { flex: 1 1 240px; width: auto; }

table.figures { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.figures th, table.figures td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; }
table.figures th:first-child, table.figures td:first-child { text-align: left; }
table.figures thead th { color: var(--muted); font-weight: 500; }
table.figures tr.total td { font-weight: 700; }

.verdict { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.verdict.good { color: var(--good); }
.tag { display: inline-block; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; color: var(--muted); }
.tag.good { color: var(--good); border-color: currentColor; }
.tag.warn { color: var(--warn); border-color: currentColor; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 18px; margin: 18px 0; }
legend { font-weight: 700; padding: 0 6px; }
.step[hidden] { display: none; }
.steps-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; }
.steps-nav li { color: var(--muted); }
.steps-nav li[aria-current] { color: var(--ink); font-weight: 700; }
.steps-nav li + li::before { content: "›"; margin-right: 8px; color: var(--muted); }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
ul.plain li .grow { flex: 1 1 auto; }
