@font-face { font-family: 'Hanken Grotesk'; src: url(/fonts/hanken-var.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/fonts/plex-mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/fonts/plex-mono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* VATtools brand, taken from the live site (Automatic.css tokens) */
  --paper: #ffffff;
  --white: #ffffff;
  --ink: #14213a;
  --ink-2: #44506a;
  --ink-3: #6a7590;
  --rule: #e2e9f3;
  --rule-2: #c6d4e8;
  --blue: #164c94;
  --blue-2: #11396f;
  --navy: #07172c;
  --sky: #2a9be6;
  --tint: #e9f1fc;
  --tint-2: #bcd5f5;
  --yellow: #fec701;
  --amber: #8a6508;
  --red: #b42318;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Plex Mono', ui-monospace, monospace;
  --r: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: var(--white); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.n, .num, input[type=number], .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: .875rem; color: var(--ink-3); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

/* ---------- header ---------- */
.top { background: var(--white); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.3rem; letter-spacing: -0.02em; }
.logo b { font-weight: 700; color: var(--blue); }
.logo-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--ink); color: var(--white); font: 500 1rem/1 var(--mono); border-radius: 2px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .975rem; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--blue); }
.menu-toggle, .menu-btn { display: none; }

.strip { background: var(--ink); color: #d6ddd8; font-size: .8125rem; }
.strip-row { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-block: 0; padding-block: 8px; }
.strip-row div { display: flex; gap: 8px; align-items: baseline; }
.strip-row dt { color: #9aa69f; }
.strip-row dd { margin: 0; font-family: var(--mono); color: var(--white); }
.strip-row a { color: var(--white); }
.strip-checked { margin-left: auto; }

@media (max-width: 860px) {
  .menu-btn { display: grid; gap: 6px; width: 44px; height: 44px; place-content: center; cursor: pointer; position: relative; z-index: 31; }
  .menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .3s ease-out; }
  .nav { position: fixed; inset: 0; background: var(--blue-2); flex-direction: column; gap: 0; padding: 96px 24px 24px; transform: translateX(100%); visibility: hidden; transition: transform .35s ease-out, visibility 0s .35s; z-index: 30; }
  .nav a { color: var(--white); font-size: 1.75rem; font-weight: 600; padding-block: 14px; border-bottom: 1px solid rgba(255,255,255,.18); }
  .menu-toggle:checked ~ .nav { transform: none; visibility: visible; transition: transform .35s ease-out; }
  .menu-toggle:checked ~ .menu-btn span { background: var(--white); }
  .menu-toggle:checked ~ .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle:checked ~ .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .strip-checked { margin-left: 0; }
  .strip-row div:nth-child(3) { display: none; }
}

/* ---------- page heads ---------- */
.crumbs { font-size: .875rem; color: var(--ink-3); padding-top: 22px; }
.crumbs a { color: var(--ink-2); }
.head { padding-block: 22px 26px; }
.head .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; margin: 0; }
.head .lede strong { color: var(--ink); }

/* ---------- calculator ---------- */
.tool { display: grid; gap: 0; overflow: clip; background: var(--white); border: 1px solid var(--rule-2); border-radius: var(--r); }
@media (min-width: 900px) { .tool { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.calc { padding: 22px 18px; }
@media (min-width: 720px) { .calc { padding: 30px 32px; } }
.field { margin-bottom: 22px; }
.field > label, .field > .label { display: block; font-weight: 650; margin-bottom: 6px; }
.field .hint { display: block; color: var(--ink-3); font-size: .9rem; margin-top: 4px; }
.money { display: flex; align-items: stretch; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); overflow: clip; }
.money:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.money span { display: grid; place-items: center; min-width: 48px; padding-inline: 14px; color: var(--ink-2); background: #f4f8fe; font: 500 1.15rem/1 var(--mono); border-right: 1px solid var(--rule-2); }
.money span.after { border-right: 0; border-left: 1px solid var(--rule-2); }
.money input { border: 0; outline: 0; background: transparent; }
input[type=number], input[type=date], select, input[type=text] { font: 500 1.15rem/1.2 var(--sans); padding: 12px; width: 100%; min-width: 0; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--white); color: var(--ink); }
input[type=number] { font-family: var(--mono); font-size: 1.3rem; }
input:focus, select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.money input[type=number] { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
/* no browser spinners: the arrows crowd the number and nobody steps money by 0.01 */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.row2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }

/* segmented choice: real radios, square segments */
/* hairline gaps instead of borders, so wrapped rows on a phone still get dividers */
.seg { display: flex; flex-wrap: wrap; gap: 1px; background: var(--rule-2); border: 1px solid var(--rule-2); border-radius: var(--r); overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { flex: 1 1 0; min-width: max-content; justify-content: center; text-align: center; white-space: nowrap; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: .975rem; min-height: 50px; display: flex; align-items: center; background: var(--white); transition: background-color .15s ease-out; }
.seg input:not(:checked) + label:hover { background: var(--tint); }
.seg input:checked + label { background: var(--ink); color: var(--white); }
.seg input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: -4px; }
.seg .mono { font-weight: 500; }

/* the working: an accountant's ledger, double rule under the total */
.working { border-top: 1px solid var(--rule-2); padding: 22px 18px; background: #fbfcfb; }
@media (min-width: 900px) { .working { border-top: 0; border-left: 1px solid var(--rule-2); padding: 30px 28px; } .working-in { position: sticky; top: 24px; } }
.working h2 { font-size: .95rem; font-weight: 650; color: var(--ink-2); margin-bottom: 14px; letter-spacing: 0; }
.ledger { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ledger td { padding: 9px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.ledger td:last-child { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.ledger .sub td { color: var(--ink-3); font-size: .9rem; }
.ledger .total td { border-bottom: 0; font-weight: 700; font-size: 1.25rem; padding-top: 12px; }
.ledger .total td:last-child { border-bottom: 3px double var(--ink); color: var(--ink); }
.ledger .warn td:last-child { color: var(--red); }
.big { font: 500 clamp(2rem, 1.6rem + 2vw, 2.8rem)/1.1 var(--mono); letter-spacing: -0.02em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.big-label { color: var(--ink-2); margin: 0 0 18px; }
.rule-cite { margin-top: 18px; font-size: .875rem; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 12px; }
.rule-cite p { margin: 0 0 6px; }
.verdict { font-weight: 650; margin: 0 0 12px; }
.verdict.bad { color: var(--red); }
.verdict.ok { color: var(--blue); }
.tool-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .9rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.noscript { padding: 14px 0 0; color: var(--ink-2); }

/* threshold month grid */
.months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
@media (min-width: 560px) { .months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.months label { font-size: .85rem; color: var(--ink-2); font-weight: 600; display: block; margin-bottom: 2px; }
.months input { font-size: 1rem; padding: 9px 10px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; align-items: end; height: 120px; margin: 8px 0 4px; position: relative; border-bottom: 1px solid var(--ink); }
.bars i { display: block; background: var(--blue); min-height: 1px; }
.bars i.over { background: var(--red); }
.bars .line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--red); }
.bars .line span { position: absolute; right: 0; top: -18px; font: 500 .75rem var(--mono); color: var(--red); background: #fbfcfb; padding-left: 4px; }
.bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; font: .7rem var(--mono); color: var(--ink-3); text-align: center; }

/* ---------- content ---------- */
.below { display: grid; gap: 40px; padding-block: 48px 64px; }
@media (min-width: 1000px) { .below { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; } }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--tint); padding: 1px 4px; border-radius: 2px; }
.prose .note { font-size: .975rem; color: var(--ink-2); }
.prose .note::before { content: 'Note: '; font-weight: 700; color: var(--ink); }
.table { overflow-x: auto; margin: 0 0 1.4em; border-top: 2px solid var(--ink); }
.table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table th { text-align: left; font-weight: 650; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table td.n, .table th.n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.side { font-size: .95rem; }
.side h2 { font-size: 1rem; margin: 0 0 10px; }
.side ul { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid var(--rule-2); }
.side li { border-bottom: 1px solid var(--rule); }
.side li a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); font-weight: 550; }
.side li a:hover { color: var(--blue); }
.side .src { color: var(--ink-2); }
.side .src li { padding: 9px 0; }
.toc a { font-weight: 500 !important; }
.faq h3 { margin-top: 1.5em; }

/* ---------- home ---------- */
.home-head { padding-block: 34px 26px; display: grid; gap: 8px 48px; }
@media (min-width: 960px) { .home-head { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.home-head h1 { margin: 0; }
.home-head p { margin: 0; color: var(--ink-2); font-size: 1.1rem; }
.section { padding-block: 56px; border-top: 1px solid var(--rule-2); }
.section-head { display: grid; gap: 6px 48px; margin-bottom: 26px; }
@media (min-width: 900px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
.index { width: 100%; border-collapse: collapse; }
.index td, .index th { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.index th { font-weight: 650; font-size: .9rem; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.index td:first-child a { font-weight: 650; font-size: 1.075rem; text-decoration: none; color: var(--ink); }
.index td:first-child a:hover { color: var(--blue); text-decoration: underline; }
.index td.n { white-space: nowrap; }
@media (max-width: 640px) { .index .hide-s { display: none; } }
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
@media (min-width: 800px) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.numbers div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); }
.numbers dt { color: var(--ink-2); font-size: .9rem; }
.numbers dd { margin: 4px 0 0; font: 500 1.6rem/1.2 var(--mono); }
.numbers dd small { display: block; font: .8rem var(--sans); color: var(--ink-3); margin-top: 4px; }
.changes { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.changes li { display: grid; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .changes li { grid-template-columns: 150px 1fr; } }
.changes time { font-family: var(--mono); font-size: .9rem; color: var(--ink-2); }
.changes .soon { color: var(--amber); }

/* rates table + country */
.rates td.n { text-align: right; }
.rates th.n { text-align: right; }
.flag-code { font-family: var(--mono); color: var(--ink-3); font-size: .85rem; margin-right: 8px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c9d1cc; padding-top: 48px; font-size: .95rem; }
.foot a { color: var(--white); }
.foot .logo { color: var(--white); }
.foot .logo b { color: #8fc3ac; }
.foot .logo-mark { background: var(--white); color: var(--ink); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 36px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot h2 { font-size: .95rem; color: var(--white); margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { padding: 4px 0; }
.foot li a { text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot .small { color: #9aa69f; }
.foot-about p { margin-top: 14px; max-width: 46ch; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid rgba(255,255,255,.14); padding-block: 18px; font-size: .85rem; color: #9aa69f; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .top, .foot, .side, .tool-actions { display: none; } body { background: #fff; } }

/* ================= blue system (live-site aesthetic) ================= */
h1, h2, h3 { color: var(--blue); }
.logo img { height: 30px; width: auto; }
.foot .logo img { height: 28px; }
.top-row { min-height: 72px; }
.strip { background: var(--navy); }
.strip-row a { color: var(--yellow); text-decoration-color: rgba(254,199,1,.5); }
.seg input:checked + label { background: var(--blue); }
.seg { border-radius: var(--r); }
.foot { background: var(--navy); }
.foot .small { color: #8ea2c2; }
.foot-base { color: #8ea2c2; }

/* hero band: navy to brand blue, faint + − × = from the logo mark */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #0b2a5a 0%, var(--blue) 48%, #1d66bf 100%); padding-bottom: 40px; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .07; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M42 10h16v32h32v16H58v32H42V58H10V42h32z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 6% top 24px / 260px,
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20 9l30 30 30-30 11 11-30 30 30 30-11 11-30-30-30 30L9 80l30-30L9 20z' fill='%23fff'/%3E%3C/svg%3E") no-repeat left -40px bottom -30px / 300px,
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M10 30h80v14H10zM10 56h80v14H10z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 30% bottom -20px / 220px; }
.hero h1 { color: #fff; }
.hero .lede, .hero .head p, .hero .home-head p { color: #d7e5f8; }
.hero .lede strong { color: #fff; }
.hero .small { color: #b9cdea; }
.hero .crumbs { color: #a9c3e8; }
.hero .crumbs a { color: #d7e5f8; }
.hero .tool { box-shadow: 0 1px 0 rgba(7,23,44,.2); border-color: transparent; color: var(--ink); }
.hero .tool h2 { color: var(--blue); }
.hero .head, .hero .home-head { padding-bottom: 30px; }
.hero-tight { padding-bottom: 8px; }

/* pale blue bands, like the live site's sections */
.band { background: var(--tint); }
.band .numbers, .band .changes, .band .index { background: transparent; }
.numbers { border-top-color: var(--blue); }
.numbers dd { color: var(--ink); }
.changes, .index th { border-top-color: var(--blue); }
.index th { border-bottom-color: var(--blue); }
.table { border-top-color: var(--blue); }
.working { background: #f7faff; }
.ledger .total td:last-child { border-bottom-color: var(--blue-2); }

/* blog: cover, cards, meta */
.meta { font-size: .9rem; color: #b9cdea; margin: 14px 0 0; }
.meta time { color: #fff; }
.cover { margin: 0 0 28px; }
.cover img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--tint); }
.cards { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--tint); margin-bottom: 14px; }
.card .kicker { font-size: .85rem; color: var(--ink-3); margin: 0 0 6px; }
.card .kicker b { color: var(--blue); font-weight: 650; }
.card h3 { font-size: 1.2rem; margin: 0 0 8px; color: var(--ink); }
.card p { color: var(--ink-2); font-size: .975rem; margin: 0; }
.card:hover h3 { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.feature { display: grid; gap: 20px 40px; align-items: center; text-decoration: none; color: inherit; }
@media (min-width: 900px) { .feature { grid-template-columns: 1.2fr 1fr; } }
.feature img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); }
.feature h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); }
.feature p { color: #d7e5f8; }
.feature .kicker { color: #b9cdea; font-size: .9rem; margin-bottom: 8px; }
.feature:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 26px; font-weight: 600; }
.filters a { text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; padding-bottom: 4px; }
.filters a[aria-current] { color: var(--blue); border-bottom-color: var(--blue); }
.blog-side-img { border-radius: var(--r); margin-bottom: 10px; aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.band .section { border-top: 0; }
.hero .tool { margin-top: 4px; }
.hero-tight .head { padding-bottom: 34px; }
.hero .feature { padding-bottom: 16px; }
.below > * { min-width: 0; }

/* ================= rework 2: rhythm, fewer tables ================= */
/* tables: a soft blue panel, not spreadsheet rules */
.table { background: #f4f8fe; border: 1px solid var(--rule); border-top: 1px solid var(--rule); border-radius: var(--r); padding: 6px 18px 2px; }
.table th { color: var(--blue); font-size: .875rem; border-bottom: 1px solid var(--tint-2); }
.table td { border-bottom: 1px solid #e3ebf7; }
.table tr:last-child td { border-bottom: 0; }

/* worked sums: one line each, answer in bold */
.sums { margin: 0 0 1.4em; display: grid; gap: 8px; }
.sum { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 16px; background: #f4f8fe; border-radius: var(--r); font: 500 1.05rem/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.sum b { color: var(--blue); font-weight: 600; }
.sum-label { font: 600 .9rem/1.4 var(--sans); color: var(--ink-2); min-width: 9rem; }

/* sidebar: one pale card that follows you down the page */
.side { align-self: start; }
@media (min-width: 1000px) { .side { position: sticky; top: 20px; } }
.side { background: var(--tint); border-radius: var(--r); padding: 22px 22px 6px; }
.side ul { border-top: 0; margin-bottom: 22px; }
.side li { border-bottom: 1px solid var(--tint-2); }
.side li:last-child { border-bottom: 0; }
.side h2 { font-size: .95rem; margin-bottom: 4px; }
.side .src li { padding: 7px 0; }

/* prose headings get a little air and a short blue mark */
.prose h2 { padding-top: 6px; }

/* homepage calculator cards */
.toolgrid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .toolgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.toolcard { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 22px; text-decoration: none; color: var(--ink); transition: border-color .2s ease-out; }
.toolcard strong { color: var(--blue); font-size: 1.1rem; }
.toolcard span { color: var(--ink-2); font-size: .95rem; }
.toolcard em { margin-top: auto; padding-top: 8px; font-style: normal; font-weight: 600; color: var(--blue); font-size: .9rem; }
.toolcard:hover { border-color: var(--blue); }
.toolcard:hover em { text-decoration: underline; text-underline-offset: 3px; }
.band .cards .card img { background: #fff; }
.section-white { background: #fff; }

/* EU rates: country cards instead of a table */
.ratesgrid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .ratesgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ratesgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ratesgrid a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .2s ease-out; }
.ratesgrid a:hover { border-color: var(--blue); }
.rg-top { font-weight: 650; }
.rg-std { font: 500 2rem/1.15 var(--mono); color: var(--blue); letter-spacing: -0.02em; margin-top: 6px; }
.rg-red { font-size: .85rem; color: var(--ink-3); }
.flag-code { font-family: var(--mono); color: var(--ink-3); font-size: .8rem; margin-right: 8px; }

/* branded date picker (replaces the native calendar) */
.dp { position: relative; }
.dp-field { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; font: 500 1.1rem/1.2 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--rule-2); border-radius: var(--r); cursor: pointer; text-align: left; }
.dp-field svg { color: var(--blue); flex: none; }
.dp-field:hover, .dp-field[aria-expanded="true"] { border-color: var(--blue); }
.dp-field:focus-visible { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.dp-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 304px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--rule-2); border-radius: var(--r); box-shadow: 0 10px 30px rgba(7, 23, 44, .14); padding: 14px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head strong { color: var(--blue); font-weight: 650; }
.dp-nav { width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; color: var(--blue); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dp-nav:hover { background: var(--tint); }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: .75rem; font-weight: 650; color: var(--ink-3); padding: 4px 0; }
.dp-grid button { height: 38px; border: 0; border-radius: 6px; background: none; font: 500 .95rem var(--mono); color: var(--ink); cursor: pointer; }
.dp-grid button:hover { background: var(--tint); }
.dp-grid button.out { color: #a9b4c6; }
.dp-grid button.now { box-shadow: inset 0 0 0 1px var(--sky); }
.dp-grid button.sel { background: var(--blue); color: #fff; }
.dp-grid button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.dp-foot { display: flex; justify-content: flex-end; margin-top: 8px; border-top: 1px solid var(--rule); padding-top: 8px; }
.dp-foot button { border: 0; background: none; color: var(--blue); font: 600 .9rem var(--sans); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.dp-foot button:hover { background: var(--tint); }

/* country markers */
.scope { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .95rem; font-weight: 550; color: var(--ink-2); }
.hero .scope { color: #d7e5f8; }
.cc { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border: 1.5px solid currentColor; border-radius: 4px; font: 600 .78rem/1 var(--mono); letter-spacing: .04em; }
.hero .cc { color: #fff; border-color: rgba(255,255,255,.75); }
.tc-scope { display: flex; align-items: center; gap: 8px; font-size: .8rem !important; color: var(--ink-3) !important; font-weight: 600; margin-bottom: 4px; }
.tc-scope .cc { height: 20px; min-width: 30px; font-size: .7rem; color: var(--blue); }
.wrap > .scope { margin-bottom: 8px; font-size: .9rem; }
.wrap > .scope .cc { color: var(--blue); }

/* ================= calculator polish ================= */
.calc { padding: 28px 22px; }
@media (min-width: 720px) { .calc { padding: 34px 36px; } }
.calc .field { margin-bottom: 24px; }
.calc .field:last-of-type { margin-bottom: 0; }
.field > label, .field > .label { font-size: .975rem; margin-bottom: 8px; }
.field .hint { font-size: .85rem; margin-top: 6px; }

/* one control height and one width everywhere */
.calc input[type=number], .calc input[type=text], .calc select, .dp-field { height: 52px; }
.money { max-width: none !important; width: 100%; height: 52px; overflow: hidden; border-radius: var(--r); }
.money span { min-width: 52px; background: var(--tint); color: var(--blue); font-weight: 600; border-right: 1px solid var(--rule-2); }
.money span.after { border-left: 1px solid var(--rule-2); border-right: 0; }
.money input, .money input:focus { border: 0 !important; border-radius: 0; box-shadow: none !important; height: 100%; padding: 0 14px; }
.calc input[type=number] { width: 100%; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* segmented choices: full width, equal parts, same height as inputs */
.seg { display: flex; width: 100%; }
.seg label { flex: 1 1 0; justify-content: center; text-align: center; min-height: 52px; padding: 8px 10px; line-height: 1.25; border-right-color: var(--rule-2); }
.seg label:hover { background: var(--tint); }
.seg input:checked + label:hover { background: var(--blue); }
@media (max-width: 520px) { .seg { flex-wrap: wrap; } .seg label { flex-basis: 50%; border-bottom: 1px solid var(--rule-2); } }

/* checkbox rows line up with the rest */
.calc .field > label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.calc input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; }

/* section titles inside long forms */
.calc h2 { font-size: 1rem !important; margin: 0 0 16px !important; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.calc h2 ~ h2 { margin-top: 34px !important; }

/* working panel */
.working { padding: 30px 26px; }
@media (min-width: 900px) { .working { padding: 34px 32px; } }
.working h2 { font-size: .85rem !important; color: var(--blue) !important; margin-bottom: 18px; }
.big { margin-bottom: 6px; }
.big-label { font-size: .95rem; }
.hero .scope .cc { color: #fff; border-color: rgba(255,255,255,.75); }

/* cookie banner (only rendered when GA4 is configured) */
#cookie-banner { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin-inline: auto; background: #fff; color: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--r); box-shadow: 0 12px 36px rgba(7,23,44,.18); }
.cb-in { display: grid; gap: 16px; padding: 20px 22px; }
@media (min-width: 720px) { .cb-in { grid-template-columns: 1fr auto; align-items: end; } }
#cookie-banner h2 { font-size: 1.05rem; margin: 0 0 6px; }
#cookie-banner p { margin: 0; font-size: .925rem; color: var(--ink-2); }
.cb-more { display: grid; gap: 8px; margin-top: 12px; font-size: .9rem; }
.cb-more label { display: flex; gap: 10px; align-items: flex-start; }
.cb-more input { width: 18px; height: 18px; accent-color: var(--blue); margin-top: 2px; }
.cb-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 720px) { .cb-actions { grid-template-columns: repeat(3, auto); } }
.cb-actions button { min-height: 44px; padding: 0 18px; border-radius: var(--r); font: 600 .95rem var(--sans); cursor: pointer; border: 1px solid var(--blue); background: #fff; color: var(--blue); }
.cb-actions button:hover { background: var(--tint); }
.strip-row dt { display: inline-flex; align-items: center; gap: 8px; }
.cc-s { height: 18px; min-width: 26px; font-size: .65rem; color: #fff; border-color: rgba(255,255,255,.55); }

/* accountant lead form */
.lead { background: linear-gradient(135deg, #0b2a5a 0%, var(--blue) 60%, #1d66bf 100%); color: #fff; }
.lead-in { display: grid; gap: 28px 56px; padding-block: 56px; }
@media (min-width: 960px) { .lead-in { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.lead h2 { color: #fff; }
.lead-copy p { color: #d7e5f8; }
.lead-copy .small, .lead-copy .small a { color: #b9cdea; }
.lead-msg { background: #fff; color: var(--red) !important; padding: 10px 14px; border-radius: var(--r); font-weight: 600; }
.lead-form { background: #fff; color: var(--ink); border-radius: var(--r); padding: 26px 24px; }
.lead-form .field { margin-bottom: 16px; }
.lead-form input[type=text], .lead-form input[type=email], .lead-form input[type=tel], .lead-form select, .lead-form textarea { width: 100%; height: 50px; font: 500 1rem var(--sans); padding: 0 12px; border: 1px solid var(--rule-2); border-radius: var(--r); background: #fff; color: var(--ink); }
.lead-form textarea { height: auto; padding: 10px 12px; resize: vertical; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.lead-form .opt { font-weight: 400; color: var(--ink-3); }
.lead-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .925rem; }
.lead-form .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.lead-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--r); background: var(--blue); color: #fff; font: 650 1rem var(--sans); cursor: pointer; width: 100%; }
.btn:hover { background: var(--blue-2); }
.cf-turnstile { margin-bottom: 14px; }
.geo-note { background: var(--tint); color: var(--ink) !important; padding: 10px 12px; border-radius: var(--r); margin-top: 10px !important; }
.geo-note .linkbtn { font-weight: 600; }
