/* Dutchgids: the same poster look as inburgering.net. Warm paper, one sans
   family, hairlines instead of boxes, small tracked labels above plain values.
   Light only, like print. */
:root {
  color-scheme: light;
  --paper: #f3ead9; --paper-deep: #eadfca; --ink: #111111; --grey: #6b655b;
  --label: #7d6840; --rule: #cdbf9f; --link: #111111; --tap: 44px;
  --error: #a5281b;
  --stripe: linear-gradient(90deg, #5fa544 0 16.6%, #f2b632 16.6% 33.3%, #ef8a2c 33.3% 50%,
    #d9453b 50% 66.6%, #8d4a9c 66.6% 83.3%, #2f8fcf 83.3% 100%);
  --sans: "Helvetica Neue", Helvetica, "Inter", Arial, "Noto Sans", sans-serif;
  --track: .09em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--ink); font: 400 18px/1.6 var(--sans); overflow-wrap: break-word;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 55%, var(--paper-deep) 100%) fixed; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.4rem; }
a { color: var(--link); text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--paper); padding: .6rem .9rem; z-index: 5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Small tracked capitals: the poster's label voice. */
.nav a, .crumbs, .toc-title, .next-label, .checked, th, .card-title, .sources h2,
.results-title, .figure-label, .field > label, .field > legend, .breakdown caption, .source-group {
  font-size: .72rem; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }

/* Header */
.top { padding-top: 1.6rem; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 1.15rem; font-weight: 500;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; margin-top: .6rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); color: var(--label);
  text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.nav a:focus-visible { outline-offset: -2px; }

/* Page text */
.page { padding-top: 3.2rem; padding-bottom: 3.5rem; }
.crumbs { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; color: var(--label); margin-bottom: 2.2rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--label); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current="page"] { color: var(--grey); }
h1 { font-size: clamp(2.3rem, 8.5vw, 3.9rem); font-weight: 500; line-height: 1.02; letter-spacing: -.04em;
  margin: 0 0 1rem; text-wrap: balance; }
h1::before { content: ""; display: block; width: 6.5rem; height: 4px; margin-bottom: 1.5rem; background: var(--stripe); }
h2 { font-size: 1.45rem; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin: 3rem 0 .7rem; text-wrap: balance; }
h2::before, .toc::before, .next::before, .checked::before {
  content: ""; display: block; width: 1.5rem; height: 1px; background: var(--rule); margin-bottom: 1.3rem; }
h3 { font-size: 1.05rem; font-weight: 500; margin: 1.7rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-inline-start: 1.2rem; }
li { margin-bottom: .35rem; }
li::marker { color: var(--label); }
strong { font-weight: 600; }

/* The line under the title: larger and grey, the only text set this way */
.lead { font-size: clamp(1.2rem, 3.4vw, 1.5rem); line-height: 1.35; letter-spacing: -.015em; color: var(--grey);
  margin: 0 0 2.6rem; max-width: 36rem; }

/* Asides set off by a rule at the start, never a filled box */
.note, .message { padding-inline-start: .9rem; border-inline-start: 2px solid var(--label); }
.note { margin: 2rem 0; color: var(--grey); font-size: .95rem; }
.formula { padding: .2rem 0 .2rem .9rem; border-inline-start: 1px solid var(--rule); font-size: .95rem;
  font-variant-numeric: tabular-nums; overflow-x: auto; }

/* Contents as a short numbered spec */
.toc { margin-bottom: .5rem; }
.toc-title, .next-label { color: var(--label); margin-bottom: .5rem; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: section; }
.toc li { margin: 0; counter-increment: section; }
.toc a { display: flex; align-items: baseline; gap: .9rem; min-height: var(--tap); padding: .55rem 0; text-decoration: none; font-size: .98rem; }
.toc a::before { content: counter(section, decimal-leading-zero); flex: none; color: var(--label); font-size: .72rem; letter-spacing: var(--track); }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--ink); }

/* Tools and guides as label-over-text rows, split by short rules */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); column-gap: 2.5rem;
  margin: 0 0 1rem; padding: 0; list-style: none; }
.cards li { margin: 0; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 0 1.3rem; min-height: var(--tap);
  text-decoration: none; color: var(--ink); position: relative; }
.card::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 1.5rem; height: 1px; background: var(--rule);
  transition: width .25s ease, background-color .25s ease; }
.card:hover::before { width: 100%; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .card::before { transition: none; } }
.card-title { color: var(--label); }
.card:hover .card-title { color: var(--ink); }
.card-text { font-size: .98rem; line-height: 1.45; }
.card-meta { color: var(--grey); font-size: .85rem; }

/* Tables: hairline rows, labels in the header */
table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .93rem; display: block; overflow-x: auto;
  font-variant-numeric: tabular-nums; }
th, td { text-align: start; vertical-align: top; padding: .7rem 1.4rem .7rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--label); }
.table-scroll { overflow-x: auto; }
.table-scroll > table { display: table; margin-bottom: 0; }

.rate-table { max-width: 28rem; }
.rate-table td:last-child, .rate-table th:last-child { text-align: end; padding-inline-end: 0; }
.rate-table tr[aria-current="true"] td { font-weight: 600; background: var(--paper-deep); }
.rate-table tr[aria-current="true"] td:first-child { box-shadow: inset 2px 0 0 var(--ink); padding-inline-start: .6rem; }

/* Calculator: the form, then the result, one column like the rest of the page */
.tool { margin: 0 0 2.5rem; }
.panel { min-width: 0; }
.panel + .panel { margin-top: 2.5rem; }
.panel + .panel::before { content: ""; display: block; height: 1px; background: var(--ink); margin-bottom: 1.6rem; }

.field { margin: 0 0 1.8rem; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > legend { display: block; margin-bottom: .35rem; padding: 0; color: var(--ink); font-size: .8rem; font-weight: 600; }
.hint { display: block; margin: 0 0 .6rem; color: var(--grey); font-size: .9rem; line-height: 1.45; }
.hint:empty { display: none; }
#amount-error { margin: .5rem 0 0; color: var(--error); }

.amount { position: relative; }
.amount::before { content: "\20AC"; position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%);
  color: var(--grey); pointer-events: none; }
input[type="text"], input[type="number"], select { width: 100%; min-height: 52px; padding: .5rem .8rem; font: inherit;
  font-size: 1.25rem; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 0;
  font-variant-numeric: tabular-nums; }
.amount input { padding-inline-start: 2rem; }
input[type="text"]:focus-visible, input[type="number"]:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }

/* Options as plain rows separated by hairlines */
.choices { border-top: 1px solid var(--rule); }
.choice { display: flex; align-items: center; gap: .8rem; min-height: var(--tap); padding: .55rem 0;
  border-bottom: 1px solid var(--rule); cursor: pointer; line-height: 1.35; }
.choice:hover { border-bottom-color: var(--ink); }
.choice:has(input:checked) { font-weight: 500; }
.choice input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--ink); }
.choice input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sub-field { margin: 0 0 0 2rem; }
.sub-field .choices { border-top: 0; }

/* Results */
.results-title { color: var(--label); margin: 0 0 .2rem; }
.year-tag { color: var(--grey); font-size: .9rem; margin-bottom: 1.2rem; }
.message { margin: 0 0 1.2rem; }
.message:empty { display: none; }
.headline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); column-gap: 1.6rem;
  margin: 0 0 2rem; }
.figure { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 0 1rem; border-top: 1px solid var(--rule); }
.figure-main { border-top-color: var(--ink); }
.figure-label { color: var(--label); }
.figure-value { font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 500; line-height: 1.05; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.figure-main .figure-value { font-size: clamp(2.1rem, 8vw, 3rem); }

.breakdown { width: 100%; font-size: .93rem; }
.breakdown caption { text-align: start; color: var(--label); padding-bottom: .4rem; }
.breakdown th { color: var(--ink); font-size: inherit; font-weight: 400; letter-spacing: 0; text-transform: none; }
.breakdown td { text-align: end; white-space: nowrap; padding-inline-end: 0; }
.breakdown .how { display: block; color: var(--grey); font-size: .82rem; line-height: 1.4; margin-top: .15rem; }
.breakdown .how a { color: inherit; display: inline-block; }
.breakdown .sub th, .breakdown .sub td { color: var(--grey); }
.breakdown .sub th { padding-inline-start: 1rem; }
.breakdown .total th, .breakdown .total td { font-weight: 600; border-bottom-color: var(--ink); }

/* Sources: their own quiet region at the end */
.sources { margin-top: 3rem; font-size: .88rem; color: var(--grey); }
.sources h2 { color: var(--label); margin: 0 0 .6rem; }
.sources ul { list-style: none; padding: 0; }
.sources li { margin-bottom: .6rem; }
.sources a { color: var(--grey); overflow-wrap: anywhere; }
.sources a:hover { color: var(--ink); }
.source-group { display: block; color: var(--label); margin-bottom: .1rem; }

.next { margin-top: 3rem; }
.next .card { padding-top: 0; }
.next .card::before { display: none; }
.checked { color: var(--label); margin-top: 3rem; }
.checked time { color: var(--ink); }
.foot { color: var(--grey); font-size: .82rem; line-height: 1.5; padding: 0 0 3rem; }
.foot .wrap::before { content: ""; display: block; height: 1px; background: var(--rule); margin-bottom: 1.4rem; }
.foot p { max-width: 30rem; }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--grey); }
