:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --ink: #17191c;
  --muted: #5d636b;
  --line: #e3e3dd;
  --accent: #0f7b5f;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ed;
  --neg: #b42318;
  --focus: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #1a1d20; --ink: #eceff1; --muted: #a2a9b1; --line: #2b3035;
    --accent: #3fbf96; --accent-ink: #0b1310; --accent-soft: #15302a; --neg: #ff8a80; --focus: #8ab4ff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
nav.main { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.95rem; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); }

main { padding: 28px 0 48px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 40px 0 10px; }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 6px; max-width: 70ch; }
.checked { display: inline-block; font-size: 0.85rem; color: var(--muted); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; margin: 6px 0 20px; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc > *, fieldset, .field { min-width: 0; }
.calc-form, .calc-result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.calc-result { position: sticky; top: 12px; }
@media (max-width: 760px) { .calc-result { position: static; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
fieldset:last-child { margin-bottom: 0; }
legend { font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.input-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.input-box:focus-within { border-color: var(--focus); }
.input-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 9px 10px; outline: none; }
.affix { color: var(--muted); padding: 0 10px; }
select { width: 100%; max-width: 100%; text-overflow: ellipsis; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check label { margin: 0; }
.help { font-size: 0.82rem; color: var(--muted); margin: 4px 0 0; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 420px) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.kpi span { display: block; font-size: 0.8rem; color: var(--muted); }
.kpi strong { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 0.78rem; }
.kpi.pos strong { color: var(--accent); }
.kpi.neg strong, td.neg { color: var(--neg); }

table.breakdown { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.breakdown caption { text-align: left; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }
.breakdown td, .breakdown th { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; white-space: nowrap; }
.breakdown td small { display: block; color: var(--muted); font-size: 0.8rem; }
.breakdown tr.total td { font-weight: 700; }
.breakdown tr.sub td { color: var(--muted); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: right; }
.badge { margin-left: 6px; font-size: 0.72rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.empty { color: var(--muted); margin: 8px 0; }
.notes { font-size: 0.85rem; color: var(--muted); padding-left: 18px; margin: 12px 0 0; }

.prose { max-width: 72ch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 10px 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
.table-scroll { overflow-x: auto; }
.sources { font-size: 0.9rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 18px 0; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); }
.card strong { display: block; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 0.9rem; }
.card.feature { border-color: var(--accent); background: var(--accent-soft); }

.cta { margin: 36px 0; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.cta h2 { margin-top: 0; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button[disabled] { opacity: 0.6; }
form.waitlist { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
form.waitlist input[type="email"] { flex: 1 1 240px; min-width: 0; font: inherit; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.form-msg { flex-basis: 100%; margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }
.hp { position: absolute; left: -9999px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; padding: 24px 0 40px; }
footer.site a { color: var(--muted); }
footer.site nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.wl-more { flex-basis: 100%; font-size: 0.92rem; }
.wl-more summary { cursor: pointer; color: var(--muted); }
.wl-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 8px 0; }
.wl-more select { width: auto; margin-left: 6px; }
.prose, .lede, h1 { overflow-wrap: break-word; }
.compare td:not(:first-child), .breakdown td:last-child, .nowrap { white-space: nowrap; }
.compare td small { white-space: normal; }
@media (max-width: 520px) {
  .compare th:nth-child(3), .compare td:nth-child(3) { display: none; }
  .compare { font-size: 0.88rem; }
  .compare .badge { display: inline-block; margin: 2px 0 0; }
}
.report { margin: 20px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.report summary { cursor: pointer; font-weight: 600; }
form.feedback { display: grid; gap: 6px; margin-top: 10px; }
form.feedback textarea, form.feedback input[type="email"] { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
form.feedback .button { justify-self: start; }
