/* =============================================================================
   Belastingkaart — design system
   Cool paper background, blue-black ink, cobalt as the brand colour and a marker yellow
   to point at "your" field or figure. Green/red only as semantics.
   Typography (self-hosted, SIL OFL 1.1, see ../fonts/LICENSES.txt): Archivo (wide) for
   headings, Public Sans for text, IBM Plex Mono for labels and small caps.

   Tokens (every token has a dark-mode value):
     Surfaces   --bg --surface --surface-2 --line --line-2 --control-line --grid
     Text       --ink --ink-2 --ink-3 (notes, >= 4.5:1)
     Brand      --brand --brand-hover --brand-soft --brand-ink --on-brand --brand-50
     Accent     --accent --accent-soft --marker --on-accent (never yellow text)
     Semantics  --ok --ok-soft --warn --warn-soft --bad --bad-soft
     Shape      --radius-sm --radius --radius-lg --shadow --shadow-high --cut
     Motion     --dur --dur-slow --ease (disabled with prefers-reduced-motion)
     Focus      --ring
     Type       --display --sans --mono
   ========================================================================== */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600 800; font-stretch: 100% 125%;
  font-display: swap; src: url("../fonts/archivo-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("../fonts/public-sans-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #eef1f6; --surface: #ffffff; --surface-2: #f5f7fb;
  --ink: #0e1a2c; --ink-2: #354156; --ink-3: #586579;
  --line: #dce2ec; --line-2: #c3cbda; --grid: rgba(14, 26, 44, .065);
  --brand: #1f3fc4; --brand-hover: #172f9a; --brand-soft: #e6ebfb; --brand-ink: #1a36a8; --on-brand: #ffffff; --brand-50: #f3f5fd;
  --accent: #ffd23f; --accent-soft: #fff6d6; --on-accent: #0e1a2c;
  --ok: #1d7456; --ok-soft: #e6f2ec; --bad: #a63f2a; --bad-soft: #f8e8e3; --warn: #8a5a00; --warn-soft: #fbf1dc;
  --cut: 18px; --slant: -32deg;
  --shadow: 0 1px 2px rgba(14, 26, 44, .06), 0 1px 1px rgba(14, 26, 44, .03);
  --shadow-high: 0 14px 36px -8px rgba(14, 26, 44, .2), 0 2px 6px rgba(14, 26, 44, .06);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px;
  --ring: #1f3fc4;
  --dur: .18s; --dur-slow: .32s; --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Archivo", "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101623; --surface: #192235; --surface-2: #222e44;
    --ink: #eef1f8; --ink-2: #c0cbdf; --ink-3: #a4b1c9;
    --line: #34425b; --line-2: #495c7b; --control-line: #7185a6; --grid: rgba(164, 177, 201, .09);
    --brand: #9aacff; --brand-hover: #b4c1ff; --brand-soft: #29385f; --brand-ink: #c3ceff; --on-brand: #10182e; --brand-50: #202c49;
    --accent: #f5ce66; --accent-soft: #3a3020; --marker: #806022; --on-accent: #0e1a2c;
    --ok: #82d7b6; --ok-soft: #1b3532; --bad: #ffad9d; --bad-soft: #40282c; --warn: #f2c578; --warn-soft: #3a2e20;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45); --shadow-high: 0 14px 36px -8px rgba(0, 0, 0, .7);
    --ring: var(--brand);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101623; --surface: #192235; --surface-2: #222e44;
  --ink: #eef1f8; --ink-2: #c0cbdf; --ink-3: #a4b1c9;
  --line: #34425b; --line-2: #495c7b; --control-line: #7185a6; --grid: rgba(164, 177, 201, .09);
  --brand: #9aacff; --brand-hover: #b4c1ff; --brand-soft: #29385f; --brand-ink: #c3ceff; --on-brand: #10182e; --brand-50: #202c49;
  --accent: #f5ce66; --accent-soft: #3a3020; --marker: #806022; --on-accent: #0e1a2c;
  --ok: #82d7b6; --ok-soft: #1b3532; --bad: #ffad9d; --bad-soft: #40282c; --warn: #f2c578; --warn-soft: #3a2e20;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45); --shadow-high: 0 14px 36px -8px rgba(0, 0, 0, .7);
  --ring: var(--brand);
  color-scheme: dark;
}

/* ---- base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  font-feature-settings: "tnum" 1, "lnum" 1; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--brand); text-underline-offset: 2px; transition: color var(--dur); }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-family: var(--display); font-stretch: 112%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ---- skip link and top bar ------------------------------------------------- */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(calc(-100% - 16px));
  padding: 10px 14px; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-weight: 600; }
.skip-link:focus { transform: translateY(0); color: var(--on-brand); box-shadow: var(--shadow-high); }
.appbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.appbar-in { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: baseline; gap: 1px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-icon { width: 30px; height: 24.4px; flex: none; align-self: center; overflow: visible; transform: translateY(-1px); }
.brand-icon .p { fill: var(--brand); transform-box: fill-box; transition: transform var(--dur-slow) var(--ease); }
.brand-icon .p2 { fill: var(--accent); transform-box: fill-box; transition: transform var(--dur-slow) var(--ease); }
.brand:is(:hover, :focus-visible) .brand-icon .p2 { transform: translateX(8%); }
.brand-icon :is(.brand-stem, .brand-bowl-top, .brand-bowl-bottom) {
  transition: transform var(--dur-slow) var(--ease);
}
.brand-icon .brand-stem { fill: var(--accent); }
.brand-icon :is(.brand-bowl-top, .brand-bowl-bottom) { fill: var(--brand); }
.brand:is(:hover, :focus-visible, :active) .brand-stem { transform: translateX(-6px); }
.brand:is(:hover, :focus-visible, :active) .brand-bowl-top { transform: translate(4px, -4px); }
.brand:is(:hover, :focus-visible, :active) .brand-bowl-bottom { transform: translate(4px, 4px); }
@media (prefers-reduced-motion: reduce) {
  .brand-icon :is(.brand-stem, .brand-bowl-top, .brand-bowl-bottom) { transition: none; }
}
.brand-name { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.nav { display: flex; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { position: relative; display: flex; align-items: center; padding: 0 12px; height: 100%; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--brand); transform: scaleX(0); transition: transform var(--dur) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(.4); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a:focus-visible { outline-offset: -4px; }
.appbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--control-line, var(--line-2)); border-radius: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .04em; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.lang-switch:hover { color: var(--ink); border-color: var(--ink-3); }
@media (max-width: 1179px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .appbar-in { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .nav { order: 3; width: 100%; height: 44px; margin: 0 -12px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); padding-right: 24px; }
}
@media (max-width: 760px) {
  .appbar-in { gap: 12px; }
  .appbar { transition: transform var(--dur-slow) var(--ease); }
  .appbar.tucked { transform: translateY(-100%); }
}
@media (max-width: 480px) { .nav a { padding: 0 10px; font-size: 13.5px; } .appbar-end .btn-cta { display: none; } }

/* ---- buttons --------------------------------------------------------------- */
.btn { font: inherit; font-weight: 600; font-size: 14px; border-radius: 8px; padding: 10px 16px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; line-height: 1.2; white-space: nowrap; min-height: 40px;
  transition: background-color var(--dur), border-color var(--dur), color var(--dur), transform var(--dur) var(--ease); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(13, 27, 34, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--control-line, var(--line-2)); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 34px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 9px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer;
  font: inherit; transition: background-color var(--dur), color var(--dur), border-color var(--dur); }
.btn-icon:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--dur-slow) var(--ease); }
.btn-icon svg .fill { fill: currentColor; stroke: none; }
.theme-btn:is(:hover, :focus-visible) svg { transform: rotate(180deg); }

/* ---- shared labels ----------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
/* The yellow slash: a small slanted accent before a label. */
.eyebrow::before, .slash::before { content: ""; display: inline-block; flex: none; width: 11px; height: 9px; border-radius: 1px;
  background: var(--accent); transform: skewX(var(--slant)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); }
.lead { color: var(--ink-2); margin: 8px 0 0; max-width: 68ch; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.yours { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.notice { background: var(--warn-soft); color: var(--warn); border-left: 3px solid currentColor; border-radius: 0 8px 8px 0;
  padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.notice b { color: inherit; }
/* Brand ribbon: a blue top rule with a slanted yellow segment. */
.ribbon { position: relative; }
.ribbon::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; pointer-events: none;
  background: linear-gradient(112deg, var(--brand) 0 22px, transparent 22px 24px, var(--accent) 24px 40px, transparent 40px 42px, var(--brand) 42px); }
.cut-corner { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }

/* ---- cards ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-family: var(--display); font-stretch: 108%; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); margin-bottom: 12px; }

/* ---- home: masthead and hero -------------------------------------------------- */
.home { padding-top: 32px; padding-bottom: 56px; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding: 0 0 8px; }
.hero::before { content: ""; position: absolute; inset: -32px 0 -20px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 20% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 20% 30%, #000 25%, transparent 75%); }
.masthead { position: relative; display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 22px; padding: 11px 0 9px;
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.masthead span:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--ink-3); }
.masthead::before { content: ""; position: absolute; left: 0; top: -3px; width: 66px; height: 3px;
  background: linear-gradient(112deg, var(--brand) 0 26px, var(--bg) 26px 28px, var(--accent) 28px 44px, var(--bg) 44px 46px, var(--brand) 46px); }
.hero h1 { font-size: clamp(34px, 5.6vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; max-width: 16ch; }
.hero h1 .marker { background: linear-gradient(transparent 66%, var(--marker, var(--accent)) 66%, var(--marker, var(--accent)) 90%, transparent 90%);
  padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { font-size: 17px; line-height: 1.55; margin-top: 20px; max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-panel { position: relative; margin-top: 32px; padding: 24px 22px; background: var(--brand-50); border-left: 4px solid var(--brand); }
.hero-panel h2 { font-family: var(--display); font-stretch: 112%; font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.hero-panel p { color: var(--ink-2); margin: 0 0 10px; }
.hero-panel p:last-child { margin-bottom: 0; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 40px; }
  .masthead { grid-column: 1 / -1; }
  .hero-text { grid-column: 1; align-self: center; }
  .hero-panel { grid-column: 2; margin-top: 0; align-self: center; }
}
@media (max-width: 480px) {
  .masthead span:last-child { display: none; }
  .masthead span:nth-last-child(2)::after { content: none; }
}
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 64px 0 20px;
  padding-bottom: 12px; border-bottom: 2px solid var(--ink); scroll-margin-top: 80px; }
.section-head h2 { font-family: var(--display); font-stretch: 112%; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.02em; }

/* ---- calculator form ----------------------------------------------------------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1040px) { .calc { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.form { display: flex; flex-direction: column; gap: 14px; }
.block { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px 20px; min-width: 0; transition: border-color var(--dur), box-shadow var(--dur); }
.block:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow-high); }
.block legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-stretch: 110%; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.block legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ink);
  color: var(--surface); font-family: var(--mono); font-size: 12px; font-weight: 500; font-stretch: normal; transition: background-color var(--dur), color var(--dur); }
.block:focus-within .step { background: var(--accent); color: var(--on-accent); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span, .field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.help { font-size: 12px; color: var(--ink-3); margin: 0; line-height: 1.4; }
input[type="number"], input[type="text"], input[type="email"], input[type="search"], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--control-line, var(--line-2)); border-radius: 8px; padding: 8px 10px; width: 100%; min-height: 42px;
  transition: border-color var(--dur), box-shadow var(--dur); }
input[type="number"] { font-variant-numeric: tabular-nums; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
option:disabled { color: var(--ink-3); }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 25%, transparent); }
.form-actions { display: flex; flex-direction: column; gap: 10px; }
.form-actions .btn { width: 100%; min-height: 46px; font-size: 15px; }

/* ---- result panel (blocked: never a net amount) ------------------------------- */
.result { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-high); padding: 26px 22px 22px; min-width: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.result::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(112deg, var(--brand) 0 22px, transparent 22px 24px, var(--accent) 24px 40px, transparent 40px 42px, var(--brand) 42px); }
@media (min-width: 1040px) { .result { position: sticky; top: 84px; } }
.result h3 { font-family: var(--display); font-stretch: 110%; font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin: 12px 0 8px; }
.result p { color: var(--ink-2); margin: 0 0 12px; }
.result-status { display: flex; align-items: center; gap: 8px; }
.result-list { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.result-list li { padding-left: 20px; position: relative; }
.result-list li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 9px; height: 7px; border-radius: 1px;
  background: var(--line-2); transform: skewX(var(--slant)); }

/* ---- roadmap / tool index --------------------------------------------------------- */
.tools { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tool { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; align-content: start; padding: 16px 0 18px; border-bottom: 1px solid var(--line-2); }
.tool > .ico { width: 28px; height: 28px; grid-row: 1 / span 3; margin-top: -1px; }
.tool > :not(.ico) { grid-column: 2; }
.tool h3 { font-family: var(--display); font-stretch: 106%; font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.tool p { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 6px 0 8px; max-width: 44ch; }
.tool .chip { justify-self: start; }
/* The whole card is the link target; the visible link stays on the title. */
.tool:has(h3 a) { position: relative; }
.tool h3 a { color: var(--ink); text-decoration: none; }
.tool h3 a::after { content: ""; position: absolute; inset: 0; }
.tool:has(h3 a):hover h3 a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }
.tool h3 a:focus-visible { outline: none; }
.tool:has(h3 a:focus-visible) { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.ico { display: block; flex: none; fill: var(--brand); }
.ico .r { fill: var(--accent); }
.promises { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 24px; color: var(--ink-2); font-size: 14px; }
@media (min-width: 700px) { .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.promises li { padding-left: 22px; position: relative; }
.promises li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.promises b { color: var(--ink); display: block; margin-bottom: 2px; }

/* ---- editorial content pages ------------------------------------------------------- */
body.page { background: var(--surface); font: 16px/1.6 var(--sans); }
.page-main { padding-top: 28px; padding-bottom: 64px; }
.page-main > * { max-width: 880px; margin-left: auto; margin-right: auto; }
.page-main h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; margin-top: 6px; margin-bottom: 10px; }
.page-main > .lead { font-size: 18px; line-height: 1.5; margin-top: 18px; }
.page-main > .eyebrow { display: flex; }
.breadcrumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumbs a { color: var(--ink-3); text-decoration: underline; }
.breadcrumbs a:hover { color: var(--brand); }
.updated { position: relative; color: var(--ink-3); font-size: 13px; margin-top: 0; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.updated::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 52px; height: 3px;
  background: linear-gradient(112deg, var(--brand) 0 30px, transparent 30px 32px, var(--accent) 32px 52px); }
.prose { margin-top: 28px; }
.prose section { border-top: 1px solid var(--line-2); padding-top: 26px; margin-top: 44px; }
.prose section:first-child { margin-top: 0; }
.prose h2 { font-family: var(--display); font-stretch: 108%; font-size: clamp(20px, 2.3vw, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 14px; max-width: 34ch; }
.prose p, .prose li { color: var(--ink-2); max-width: 40em; }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 22px; margin: 0 0 12px; }
.prose li + li { margin-top: 4px; }
.summary-box { position: relative; font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--brand-50);
  border-left: 3px solid var(--brand); border-image: linear-gradient(to bottom, var(--accent) 0 14px, var(--brand) 14px) 1;
  padding: 14px 22px 14px 18px; margin: 0 0 8px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.summary-box::before { margin-right: 10px; vertical-align: 1px; }
.link-list { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; }
.link-list li { border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0 !important; }
.link-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.link-list a:hover { color: var(--brand); text-decoration: underline; }
.link-list span { display: block; font-size: 13.5px; color: var(--ink-3); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ---- footer -------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
body.page .footer { background: var(--bg); }
.footer-in { padding-top: 20px; padding-bottom: 28px; font-size: 13px; color: var(--ink-2); }
.footer p { margin: 4px 0; }
/* three columns of links, a dates line and the legal links in a bottom row (reference layout) */
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; margin: 18px 0 16px; max-width: 760px; }
.footer-title { margin: 0 0 6px !important; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.footer-title::before { content: ""; width: 7px; height: 9px; background: var(--accent); transform: skewX(-22deg); flex: none; }
.footer-col { min-width: 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: 0; }
.footer-nav a { display: inline-block; padding: 3px 0; color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--brand-ink); text-decoration: underline; }
.footer-small { color: var(--ink-3); }
.footer-dates, .footer-legal { font-size: 12px; }
.footer-legal { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 8px !important; }
.footer-legal a { color: var(--ink-3); }
.footer-legal a:hover { color: var(--brand); }
@media (max-width: 760px) { .footer-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; } .footer-nav a { padding: 7px 0; } }

/* ---- touch, motion, print ----------------------------------------------------------- */
@media (pointer: coarse), (max-width: 760px) {
  .btn-icon, .lang-switch { min-width: 44px; height: 44px; }
  .btn, .btn-sm { min-height: 44px; }
  .brand { min-height: 44px; }
  .footer-nav a, .footer-legal a, .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  input[type="number"], input[type="text"], input[type="email"], input[type="search"], select { min-height: 46px; font-size: 16px; }
}
@media (max-width: 520px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .appbar, .footer-nav, .skip-link, .theme-btn, .hero-actions, .form-actions { display: none !important; }
  :root:root:root { --bg: #fff; --surface: #fff; --ink: #0e1a2c; --ink-2: #354156; --ink-3: #586579; --line: #dce2ec; --line-2: #c3cbda;
    --brand: #1f3fc4; --brand-50: #f3f5fd; --accent: #ffd23f; --marker: var(--accent); --control-line: var(--line-2); --shadow: none; --shadow-high: none; color-scheme: light; }
}
