:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #5a6272;
  --accent: #1d4ed8;
  --accent-soft: #eff4ff;
  --border: #e3e5ea;
  --good: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 10px;
  --max: 860px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #1a1d26;
    --text: #e8eaf0;
    --muted: #9aa1b2;
    --accent: #7ba3f7;
    --accent-soft: #1e2536;
    --border: #2a2e3a;
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); }
.logo span { color: var(--accent); }
nav.main a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 0.95rem;
}
nav.main a:hover, nav.main a.active { color: var(--accent); }
main { max-width: var(--max); margin: 0 auto; padding: 32px 20px 60px; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin-top: 2.2em; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin-top: 1.8em; }
p.lede { font-size: 1.12rem; color: var(--muted); margin-top: 0; }
a { color: var(--accent); }
.updated { font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0;
}
.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.98rem;
}
.callout.warn { border-left-color: var(--warn); }
table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.95rem; }
.table-wrap { overflow-x: auto; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
/* Forms */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 640px) { .calc-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 5px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; display: block; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
button.primary {
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 18px;
}
button.primary:hover { filter: brightness(1.1); }
/* Results */
.results { margin-top: 28px; }
.plan-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.plan-row .name { font-weight: 700; }
.plan-row .pay { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-row .meta { width: 100%; color: var(--muted); font-size: 0.88rem; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.best { background: var(--good); color: #fff; }
.verdict { font-size: 1rem; }
.footnote { font-size: 0.82rem; color: var(--muted); }
/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface);
}
footer.site .inner { max-width: var(--max); margin: 0 auto; padding: 24px 20px; }
footer.site a { color: var(--muted); margin-right: 16px; }
.ad-slot {
  min-height: 90px;
  margin: 26px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
}
ul.toc { padding-left: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.tile:hover { border-color: var(--accent); }
.tile b { color: var(--accent); }
.tile p { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
