:root {
  --bg: #ffffff;
  --surface: #f6f7f8;
  --ink: #1c2126;
  --muted: #5d6670;
  --line: #e2e5e9;
  --accent: #1f3a5f;
  --accent-ink: #ffffff;
  --accent-soft: #eef2f6;
  --radius: 8px;
  --max: 1040px;
  --font: Tahoma, Verdana, "Segoe UI", Geneva, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171a; --surface: #1c2024; --ink: #e9ecef; --muted: #9aa3ad;
    --line: #2c3238; --accent: #8fb0d6; --accent-ink: #14171a; --accent-soft: #1d2631;
  }
}
:root[data-theme="dark"] {
  --bg: #14171a; --surface: #1c2024; --ink: #e9ecef; --muted: #9aa3ad;
  --line: #2c3238; --accent: #8fb0d6; --accent-ink: #14171a; --accent-soft: #1d2631;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { font-weight: 700; line-height: 1.25; letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 2em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 18px; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
.site-foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0; color: var(--muted); font-size: .85rem; }
.site-foot a { color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }

/* buttons, cards */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 13px 24px; font: 700 .95rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dest-card { text-decoration: none; color: var(--ink); display: block; transition: border-color .15s; }
.dest-card:hover { border-color: var(--accent); }
.dest-card .k { font-size: 1.15rem; font-weight: 700; }
.dest-card .v { color: var(--muted); font-size: .92rem; }
.kicker { font-size: .85rem; font-weight: 700; color: var(--muted); }

/* hero */
.hero { padding: 56px 0 28px; }
.hero p.lede { font-size: 1.1rem; color: var(--muted); max-width: 640px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.stat .l { color: var(--muted); font-size: .85rem; }

/* tables */
table.compare { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 16px 0; }
table.compare th, table.compare td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.compare th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.table-scroll { overflow-x: auto; }

/* calculator */
.calc { margin: 24px 0; }
.calc form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.calc label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.calc input, .calc select, .lead input, .lead select, .lead textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 1rem var(--font);
}
.calc .full { grid-column: 1 / -1; }
.result { display: none; margin-top: 20px; }
.result.show { display: block; }
.result .range { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: var(--accent); }
.result .sub { color: var(--muted); }
.result-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 16px 0; }
.err { color: #a33a2a; font-weight: 700; }

/* lead form */
.lead { background: var(--accent-soft); border-radius: var(--radius); padding: 28px; margin: 32px 0; }
.lead form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lead .full { grid-column: 1 / -1; }
.lead h2 { margin-top: 0; }
.hp { position: absolute; left: -9999px; }
.thanks { display: none; font-weight: 600; }

/* disclaimers */
.disclaimer { border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: .88rem; color: var(--muted); margin: 24px 0; }
.example { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.example .tag { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: .82rem; color: var(--muted); }
article ul, article ol { padding-left: 1.2em; }
.toc { font-size: .95rem; }

/* market picker + comparison */
.markets { border: 0; padding: 0; margin: 0; }
.markets legend { font-size: .85rem; font-weight: 700; margin-bottom: 8px; padding: 0; }
.chip { display: inline-block; margin: 0 6px 8px 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; background: var(--bg); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
table.compare td.num, table.compare th.num { text-align: right; white-space: nowrap; }
table.compare tr.best td { font-weight: 700; }
.mkt-add { width: auto !important; min-width: 220px; margin-top: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.calc label.chip { display: inline-block; margin: 0 6px 8px 0; font-weight: 400; font-size: inherit; }
.calc label.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
