/* ---------- Tokens ---------- */
:root {
  --bg: #070b16; --bg2: #0c1324; --panel: rgba(17, 25, 45, .72); --panel-solid: #111a2e; --line: rgba(148, 170, 220, .14); --line2: rgba(148, 170, 220, .26);
  --ink: #e8eefc; --ink2: #a9b6d3; --ink3: #7484a6; --brand: #7cf5d4; --brand2: #7aa2ff; --brand-ink: #04121a;
  --c-net: #4fe3b8; --c1: #7aa2ff; --c2: #b18cff; --c3: #ffc66b; --c4: #ff8fa3; --c5: #64d2ff;
  --r: 18px; --r-sm: 12px; --shadow: 0 20px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font);
  --max: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7fc; --bg2: #eef2fa; --panel: rgba(255, 255, 255, .86); --panel-solid: #fff; --line: rgba(20, 35, 80, .1); --line2: rgba(20, 35, 80, .2);
    --ink: #0d1530; --ink2: #3b4766; --ink3: #66728f; --brand: #0b8f73; --brand2: #3d5fe0; --brand-ink: #fff;
    --c-net: #12b88d; --c1: #4c6ef5; --c2: #8b5cf6; --c3: #f59f00; --c4: #e8597a; --c5: #22a6d6;
    --shadow: 0 18px 50px -24px rgba(20, 35, 80, .28), 0 0 0 1px var(--line);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7fc; --bg2: #eef2fa; --panel: rgba(255, 255, 255, .86); --panel-solid: #fff; --line: rgba(20, 35, 80, .1); --line2: rgba(20, 35, 80, .2);
  --ink: #0d1530; --ink2: #3b4766; --ink3: #66728f; --brand: #0b8f73; --brand2: #3d5fe0; --brand-ink: #fff;
  --c-net: #12b88d; --c1: #4c6ef5; --c2: #8b5cf6; --c3: #f59f00; --c4: #e8597a; --c5: #22a6d6;
  --shadow: 0 18px 50px -24px rgba(20, 35, 80, .28), 0 0 0 1px var(--line); color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 85% -10%, color-mix(in srgb, var(--brand2) 22%, transparent), transparent 60%),
              radial-gradient(700px 480px at -10% 10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; }
p, ul, ol { margin: 0 0 1em; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--panel-solid); padding: 8px 12px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-h { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.site-h .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.15rem var(--display); letter-spacing: -.02em; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav > details { position: relative; }
.nav summary, .nav > a { display: flex; align-items: center; white-space: nowrap; list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; color: var(--ink2); font-weight: 500; font-size: .95rem; text-decoration: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary:hover, .nav > a:hover, .nav details[open] summary { background: var(--line); color: var(--ink); }
.nav .menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(560px, 92vw); padding: 14px; border-radius: var(--r); background: var(--panel-solid); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.nav .menu a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink2); text-decoration: none; font-size: .92rem; }
.nav .menu a:hover { background: var(--line); color: var(--ink); }
.nav .menu .all { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; color: var(--brand); }
.flag { font-size: .8rem; opacity: .9; margin-right: 4px; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn { background: none; border: 1px solid var(--line2); color: var(--ink2); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; }
.theme-btn:hover { color: var(--ink); }
@media (max-width: 760px) {
  .site-h .wrap { gap: 8px; }
  .logo span { display: none; }
  .hero { padding: 26px 0 8px; }
  .lede { font-size: 1rem; }
  .nav summary, .nav > a { padding: 8px; font-size: .9rem; }
  .nav .navx { display: none; }
  .nav .menu { position: fixed; left: 12px; right: 12px; width: auto; top: 70px; grid-template-columns: 1fr; max-height: 70vh; overflow: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 18px; }
.crumbs { font-size: .85rem; color: var(--ink3); margin-bottom: 14px; }
.crumbs a { color: var(--ink3); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink2); max-width: 760px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: .8rem; color: var(--ink2); border: 1px solid var(--line2); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.pill b { color: var(--ink); font-weight: 600; }
.pill .dot, .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }

/* ---------- Calculator ---------- */
.calc-shell { margin: 10px 0 28px; border-radius: calc(var(--r) + 6px); padding: 1px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 55%, transparent), transparent 35%, transparent 65%, color-mix(in srgb, var(--brand2) 55%, transparent)); box-shadow: var(--shadow); }
.calc { border-radius: calc(var(--r) + 5px); background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: 22px; min-height: 420px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } .calc { padding: 16px; } }
.calc-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field:first-child, .field.wide, .field.check, .field:has(.chips) { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.field label { font-size: .8rem; font-weight: 600; color: var(--ink2); letter-spacing: .01em; }
.field small { color: var(--ink3); font-size: .76rem; line-height: 1.4; }
.field .hint { color: var(--ink2); font-weight: 600; font-variant-numeric: tabular-nums; min-height: 1em; }
.field input[type=text], .field select { width: 100%; height: 46px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--ink); font: 500 1rem var(--font); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field select option { background: var(--panel-solid); color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field:first-child input { height: 56px; font-size: 1.35rem; font-weight: 600; }
.affix { position: relative; display: flex; align-items: center; }
.affix .pre, .affix .post { position: absolute; color: var(--ink3); font-weight: 600; pointer-events: none; }
.affix .pre { left: 12px; } .affix .pre + input { padding-left: 28px; }
.affix .post { right: 12px; } .affix input:has(+ .post) { padding-right: 34px; }
.field.check label { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; font-weight: 500; color: var(--ink2); cursor: pointer; }
.field.check input, .chip input { accent-color: var(--brand); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line2); border-radius: 99px; font-size: .86rem; cursor: pointer; color: var(--ink2); }
.chip:has(input:checked) { border-color: var(--brand); color: var(--ink); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.chip input { margin: 0; width: 15px; height: 15px; }
.advanced { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.advanced summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; padding: 6px 0; }
.advanced .fields { margin-top: 10px; }
.calc-actions { display: flex; gap: 8px; margin-top: 16px; }
.btn { border: 1px solid var(--line2); background: none; color: var(--ink2); border-radius: 10px; padding: 8px 14px; font: 600 .85rem var(--font); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { color: var(--ink); border-color: var(--ink3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); color: var(--brand-ink); }

/* Results */
.calc-out { min-width: 0; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--ink2); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 10px; margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: color-mix(in srgb, var(--bg) 40%, transparent); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card .k { font-size: .76rem; color: var(--ink3); font-weight: 600; }
.card .v { font: 700 1.25rem var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.card .s { font-size: .76rem; color: var(--ink3); }
.card.big { grid-column: 1 / -1; padding: 18px 18px; }
.card.big .v { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.card.accent { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 13%, transparent), color-mix(in srgb, var(--brand2) 8%, transparent)); }
.card.accent .v { color: var(--brand); }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } .cards .card:last-child:nth-child(even) { grid-column: 1 / -1; } }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 16px 0 8px; gap: 2px; }
.stack span { min-width: 3px; }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--ink2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend b { color: var(--ink); }
.tbl-sec h3 { font-size: .95rem; margin: 18px 0 8px; color: var(--ink2); font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th[scope=row] { font-weight: 500; color: var(--ink2); white-space: normal; min-width: 150px; }
.tbl thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); background: color-mix(in srgb, var(--bg) 40%, transparent); }
.tbl .n { text-align: right; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl tr.gross th, .tbl tr.gross td { color: var(--ink); font-weight: 600; }
.tbl tr.net th, .tbl tr.net td, .tbl tfoot th, .tbl tfoot td { color: var(--brand); font-weight: 700; background: color-mix(in srgb, var(--brand) 7%, transparent); border-top: 1px solid var(--line2); }
.tbl tr.muted th, .tbl tr.muted td { color: var(--ink3); font-size: .8rem; }
.tbl-details { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tbl-details summary { cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: .9rem; color: var(--ink2); }
.tbl-details .tbl-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.notes { margin: 14px 0 0; padding-left: 18px; color: var(--ink3); font-size: .82rem; line-height: 1.5; }
.notes li { margin-bottom: 4px; }
.err { color: var(--c4); }
.calc-skel { display: grid; gap: 12px; }
.calc-skel i { display: block; height: 46px; border-radius: 12px; background: linear-gradient(90deg, var(--line), transparent, var(--line)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* Country switch */
.switch { display: inline-flex; padding: 4px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); gap: 4px; margin-bottom: 14px; }
.switch button { border: 0; background: none; color: var(--ink2); font: 600 .95rem var(--font); padding: 9px 16px; border-radius: 10px; cursor: pointer; }
.switch button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }

/* ---------- Ads ---------- */
.ad { margin: 8px 0 28px; min-height: 120px; border: 1px dashed var(--line2); border-radius: var(--r-sm); display: grid; place-items: center; color: var(--ink3); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.ad.live { border: 0; }

/* ---------- Content ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; padding-bottom: 40px; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } .aside { display: none; } }
.prose { max-width: 760px; font-size: 1.02rem; color: var(--ink2); }
.prose h2, .prose h3, .prose strong { color: var(--ink); }
.prose h2:first-child { margin-top: .4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 0 0 1.2em; display: block; overflow-x: auto; }
.prose .tbl { display: table; margin: 0; font-size: .9rem; }
.prose .tbl-wrap { margin: 0 0 1.2em; }
.prose .tbl th, .prose .tbl td { padding: 9px 12px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { color: var(--ink); font-weight: 600; }
.prose li { margin-bottom: .35em; }
.example { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 18px 10px; background: var(--panel); margin: 1.6em 0; }
.example .tbl-wrap { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.3rem; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 14px; }
.aside { position: sticky; top: 84px; display: grid; gap: 16px; }
.box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--panel); font-size: .9rem; }
.box h4 { margin: 0 0 8px; font: 700 .78rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--ink3); }
.box ul { list-style: none; padding: 0; margin: 0; }
.box li { margin: 0; } .box li a { display: block; padding: 5px 0; color: var(--ink2); text-decoration: none; }
.box li a:hover { color: var(--brand); }
.sources { font-size: .85rem; color: var(--ink3); }
.sources a { color: var(--ink2); }
.premium-cta { border: 1px solid color-mix(in srgb, var(--brand2) 40%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--brand2) 14%, transparent), transparent); }

/* Tool grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 30px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: color-mix(in srgb, var(--brand) 60%, transparent); transform: translateY(-2px); color: var(--ink); }
.tile b { font-family: var(--display); font-size: 1.02rem; }
.tile span { font-size: .84rem; color: var(--ink3); line-height: 1.45; }
.states { columns: 4 170px; gap: 18px; font-size: .92rem; margin-bottom: 30px; }
.states a { display: block; padding: 3px 0; color: var(--ink2); text-decoration: none; }
.states a:hover { color: var(--brand); }
.country-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 10px; }
@media (max-width: 760px) { .country-cards { grid-template-columns: 1fr; } }

/* Footer */
.site-f { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0 50px; color: var(--ink3); font-size: .88rem; }
.site-f .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 24px; }
@media (max-width: 760px) { .site-f .cols { grid-template-columns: 1fr 1fr; } }
.site-f h5 { color: var(--ink); font: 700 .8rem var(--font); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.site-f a { color: var(--ink3); text-decoration: none; display: block; padding: 3px 0; }
.site-f a:hover { color: var(--ink); }
.disclaimer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.55; }

@media print {
  .site-h, .site-f, .ad, .aside, .calc-actions, .advanced, .switch, body::before { display: none !important; }
  body { background: #fff; color: #000; }
  .calc { background: #fff; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) {
  .tbl { font-size: .8rem; }
  .tbl th, .tbl td { padding: 8px 7px; }
  .tbl th[scope=row] { min-width: 0; }
  .tbl thead th { font-size: .66rem; letter-spacing: .03em; }
  .calc { padding: 12px; }
  .card { padding: 10px 12px; }
}
