/* Basisopmaak van de iFlow-sites (WettelijkeRente.net, IncassoKostenBerekenen.nl) — ontwikkeld door iFlow.
   Desktop-first opgezet; breakpoints aflopend: 1199 / 1100 / 1023 / 860 / 720 / 480 px.
   Sitespecifieke opmaak staat in /css/site.css van de site zelf (wordt na dit bestand geladen). */

:root {
  --brand: #8c1034;          /* bordeaux, afgeleid van het oude #A50D37 */
  --brand-strong: #6d0b28;
  --brand-deep: #4f081c;
  --brand-50: #fbf2f4;
  --brand-100: #f4dde3;
  --gold: #9b865a;           /* het goud/khaki van de oude site */
  --gold-light: #d9c49a;
  --gold-50: #f7f3ea;
  --ink: #1f1a1c;
  --ink-2: #3d3537;
  --muted: #6a6164;
  --line: #e6dee0;
  --line-strong: #cbbfc3;
  --bg: #f6f3f2;
  --surface: #ffffff;
  --ok: #1d6b45;
  --error: #b42318;
  --error-50: #fef3f2;
  --info-50: #f0f5fb;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(31, 26, 28, .06), 0 4px 16px rgba(31, 26, 28, .06);
  --shadow-lg: 0 10px 40px rgba(40, 6, 18, .25);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip; /* clip i.p.v. hidden: maakt geen scrollcontainer, zodat position: sticky blijft werken */
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid rgba(140, 16, 52, .45); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: 34px; letter-spacing: -.01em; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.small { font-size: 14px; color: var(--muted); }
.print-only { display: none; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Topbar & header ---------- */

.topbar { background: var(--brand-deep); color: rgba(255, 255, 255, .82); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar strong { color: #fff; font-weight: 600; }
.topbar__rates { display: flex; gap: 18px; white-space: nowrap; }

.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand__tld { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap;
}
.nav__link:hover { color: var(--brand); background: var(--brand-50); }
.nav__link.is-active { color: var(--brand); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 3px;
  background: var(--brand); border-radius: 3px 3px 0 0;
}
.nav__link--ext { color: var(--gold); }
.nav-toggle {
  /* Alleen het icoon; de knop heeft aria-label="Menu" */
  display: none; align-items: center; justify-content: center; padding: 8px 10px; min-height: 40px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 600 15px var(--font); color: var(--ink); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

/* ---------- Hero (homepage) ---------- */

.hero {
  color: #fff;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(217, 196, 154, .18), transparent 60%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 55%, #a3173f 100%);
  padding: 48px 0 56px;
}
/* Tekst en percentages verticaal gecentreerd t.o.v. het rekenvak: geen lege ruimte onder de percentages. */
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: center; }
.hero__title { color: #fff; font-size: 44px; margin-bottom: 12px; }
.hero__lead { font-size: 19px; color: rgba(255, 255, 255, .88); max-width: 620px; margin-bottom: 28px; }
/* ---------- Pagina-indeling ---------- */

.page { padding-top: 32px; padding-bottom: 56px; }
.page--sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.main { min-width: 0; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.page-intro { margin-bottom: 24px; }
.lead { font-size: 18px; color: var(--ink-2); }

.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose > :first-child, .prose h1 + * { margin-top: 0; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.calc-help { margin-top: 40px; }
.link-list { list-style: none; padding: 0 !important; }
.link-list li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.link-list a { font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}

.hl { color: var(--brand); white-space: nowrap; }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* Bewust geen kaders: de homepage heeft al genoeg vakken (hero, rekenvak, zijbalk). */
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 8px 0 8px; }
.info-card { border-left: 3px solid var(--brand); padding: 2px 0 2px 18px; }
.info-card h3 { font-size: 17px; margin-bottom: 6px; }
.info-card p { margin-bottom: 8px; }
.info-card p { color: var(--ink-2); font-size: 15px; }

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  /* Wit met een bordeaux accent (zoals .rate-highlight): een lichtroze vlak viel weg tegen --bg. */
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: 14px; box-shadow: var(--shadow);
  padding: 24px 28px; margin: 40px 0;
}
.cta-band h2 { font-size: 20px; margin-bottom: 4px; }
.cta-band p { margin: 0; color: var(--ink-2); }


/* FAQ en uitklapblokken */
.faq__item, .disclosure {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px;
}
.faq__item > summary, .disclosure > summary {
  cursor: pointer; padding: 14px 44px 14px 18px; font-weight: 600; list-style: none; position: relative;
}
.faq__item > summary::-webkit-details-marker, .disclosure > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after, .disclosure > summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--brand);
}
.faq__item[open] > summary::after, .disclosure[open] > summary::after { content: "\2212"; }
.faq__item > p { padding: 0 18px 4px; color: var(--ink-2); }
.faq { margin-top: 48px; }
.disclosure { margin-top: 12px; }
.disclosure .table-wrap { margin: 0 12px 12px; }

/* ---------- Sidebar ---------- */

/* Desktop: zijbalk zo hoog als de inhoud ernaast (align-self: stretch) en een flexkolom, zodat de advertentie
   (sticky) binnen de hele zijbalkhoogte kan meeschuiven. In een grid zou elke rij zijn eigen grens zijn. */
.sidebar { display: flex; flex-direction: column; gap: 20px; align-self: stretch; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.side-card--plain { text-align: center; }
.side-card__title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.side-rates { margin: 0 0 16px; display: grid; gap: 12px; }
.side-rates dt a { font-weight: 600; color: var(--ink); text-decoration: none; }
.side-rates dt a:hover { color: var(--brand); }
.side-rates dd { margin: 0; }
.side-rates strong { font-size: 24px; color: var(--brand); font-variant-numeric: tabular-nums; }
.side-rates span { font-size: 13px; color: var(--muted); }
.side-iflow { text-align: center; }
.side-iflow__logo { display: block; width: fit-content; margin: -4px auto 8px; }
.side-iflow__logo img { display: block; width: 140px; height: auto; }
.side-iflow p { margin: 0 auto 10px; max-width: 220px; font-size: 13px; line-height: 1.45; color: var(--muted); text-wrap: balance; }
.side-iflow__more { font-size: 14px; font-weight: 600; text-decoration: none; }
.side-iflow__more:hover { text-decoration: underline; }
.sidebar__sticky { position: sticky; top: 20px; }

/* ---------- Advertenties ---------- */

/* Geen overflow: hidden — responsive advertenties worden op mobiel door Google bewust schermbreed gemaakt
   (negatieve marge); afknippen zou de advertentie verminken. */
.ad { margin: 32px 0; text-align: center; }
.sidebar .ad { margin: 0; }
.ad__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
/* Geen gereserveerde ruimte: label en marge pas tonen als Google de advertentie echt gevuld heeft
   (data-ad-status="filled"). Met een adblocker of zonder advertentie blijft er zo geen lege ruimte over.
   Het <ins> zelf blijft display: block, anders kan Google de breedte niet meten en wordt hij nooit gevuld. */
.ad:not(.ad--placeholder):not(:has(ins[data-ad-status="filled"])) { margin: 0; }
.ad:not(.ad--placeholder):not(:has(ins[data-ad-status="filled"])) .ad__label { display: none; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad__box {
  display: grid; place-items: center; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14px; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(0,0,0,.02) 10px 20px);
}
.ad--sidebar .ad__box { height: 600px; }
.ad--content .ad__box { height: 250px; }
.ad--resultaat .ad__box { height: 100px; }

/* ---------- Formulieren ---------- */

.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; min-height: 44px; padding: 9px 12px;
  font: 16px var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #b3a5aa; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(140, 16, 52, .15); }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }
select.input { padding-right: 32px; }
textarea.input { min-height: 110px; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 14px; }
.input-affix { display: flex; align-items: stretch; }
.input-affix__prefix, .input-affix__suffix {
  display: grid; place-items: center; padding: 0 12px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line-strong);
}
.input-affix__prefix { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-affix__suffix { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-affix__prefix + .input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-affix--suffix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Datumveld: tekstinvoer in dd-mm-jjjj met een knop die de datumkiezer van de browser opent */
.date-field { position: relative; display: block; }
.date-field .input { padding-right: 44px; font-variant-numeric: tabular-nums; }
.date-field__btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.date-field__btn:hover { color: var(--brand); background: var(--brand-50); }
.date-field__native {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; padding: 0; border: 0;
  opacity: 0; pointer-events: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 16px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--brand); border-color: var(--brand-100); }
.btn--secondary:hover { background: var(--brand-50); border-color: var(--brand); }
.btn--link { background: none; color: var(--muted); text-decoration: underline; padding-inline: 8px; }
.btn--link:hover { color: var(--ink); }
.btn--lg { min-height: 52px; padding: 12px 32px; font-size: 17px; }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; vertical-align: 1px;
  font-size: 12px; font-weight: 600; background: var(--brand-100); color: var(--brand-strong);
}
.badge--gold { background: var(--gold-50); color: #6f5e3a; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin: 16px 0; font-size: 15px; }
.alert ul { margin: 6px 0 0; padding-left: 1.2em; }
.alert--error { background: var(--error-50); color: var(--error); border: 1px solid #fecdca; }
.alert--info { background: var(--info-50); color: #1f4a7a; border: 1px solid #d3e2f3; }

/* ---------- Rekenmodule ---------- */

.calc { padding: 8px 28px 28px; }
.calc__section { border: 0; margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.calc__section--last { border-bottom: 0; }
.calc__legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; padding: 0; margin-bottom: 14px; font-size: 18px; font-weight: 700; }
.calc__legend + * { clear: both; }
.step {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700;
}
.calc__hint { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.calc__submit { display: flex; align-items: center; gap: 16px; padding-top: 8px; }

.choices { display: grid; gap: 12px; }
.choices--3 { grid-template-columns: repeat(3, 1fr); }
.choices--2 { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__body {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 14px 16px 14px 44px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice__body::before {
  content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px;
  border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface);
}
.choice:hover .choice__body { border-color: var(--brand); }
.choice input:checked + .choice__body { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:checked + .choice__body::before { border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--surface); background: var(--brand); }
.choice input:focus-visible + .choice__body { outline: 3px solid rgba(140, 16, 52, .45); outline-offset: 2px; }
.choice__title { font-weight: 700; }
.choice__meta { font-size: 14px; color: var(--muted); }

/* Resultaat */
.result { margin-top: 28px; padding: 24px 28px 20px; scroll-margin-top: 16px; transition: opacity .2s; }
.result:focus { outline: none; }
.result.is-stale { opacity: .45; }
.result__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.result__title { margin: 0; font-size: 24px; }
.result__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result__meta { color: var(--muted); margin: 6px 0 16px; font-size: 15px; }
.result__sub { font-size: 17px; margin: 28px 0 10px; }
.result__note { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.total {
  display: flex; flex-direction: column; padding: 16px 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line);
  container-type: inline-size;  /* zodat het bedrag kan meeschalen met de breedte van het vak */
}
.total__label { font-size: 14px; color: var(--muted); font-weight: 600; }
/* Lange bedragen (bijv. € 1.154.766,11) passen niet altijd op de normale grootte (--total-size). De rekenmodule zet
   het aantal tekens in --tekens; de letter wordt dan zo groot als in de beschikbare breedte past. Gemeten: ± 0,49 em
   per teken (Segoe UI); we rekenen met 0,54 em (1 / 1,85) als marge voor bredere systeemletters. */
.total__value {
  font-size: min(var(--total-size, 26px), calc(var(--total-ruimte, 100cqi) / var(--tekens, 1) * 1.85));
  font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.total--accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.total--accent .total__label { color: rgba(255, 255, 255, .8); }

.spec { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.spec__summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg); cursor: pointer; list-style: none;
}
.spec__summary::-webkit-details-marker { display: none; }
.spec__title { font-weight: 700; }
.spec__title::before { content: "\25B8"; display: inline-block; width: 1.1em; color: var(--brand); transition: transform .15s; }
.spec[open] .spec__title::before { transform: rotate(90deg); }
.spec__meta { font-size: 14px; color: var(--muted); }
.spec__meta strong { color: var(--ink); }
.spec .table-wrap { border: 0; border-radius: 0; }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table caption { text-align: left; font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th, .table td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table thead th { background: #faf7f7; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
/* Getallen en bedragen rechts uitlijnen, in kop, body en voet (overschrijft de text-align: left hierboven) */
.table th.num, .table td.num { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfafa; }
.table tfoot th, .table tfoot td { border-top: 2px solid var(--line-strong); border-bottom: 0; font-weight: 700; background: #faf7f7; }
.table--spec .calc-formula { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--spec tr.is-capitalization td { background: var(--gold-50); font-size: 14px; color: #5b4c2d; }

/* ---------- Footer ---------- */

.footer { background: var(--brand-deep); color: rgba(255, 255, 255, .78); font-size: 15px; }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 40px 56px; padding-top: 40px; padding-bottom: 32px; }
.footer__iflow { display: flex; gap: 24px; align-items: flex-start; }
.footer__logo { flex: none; padding-top: 4px; }
.footer__logo img { display: block; }
.footer__iflow p { margin: 0; }
.footer__iflow strong { display: block; margin-bottom: 4px; color: #fff; }
.footer__title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-light); margin-bottom: 10px; }
.footer__links { display: flex; flex-direction: column; gap: 6px; }
.footer__links a { color: rgba(255, 255, 255, .82); text-decoration: none; white-space: nowrap; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: rgba(255, 255, 255, .6); }

/* ======================================================================
   Kleinere schermen
   ====================================================================== */

@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .choices--3 { grid-template-columns: 1fr; }
  .choice__body { flex-direction: row; flex-wrap: wrap; column-gap: 12px; align-items: baseline; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
  .footer__links a { white-space: normal; }
  .footer__iflow { grid-column: 1 / -1; }
}

/* Kleine laptops: smallere zijbalk (de advertentie van 160px past nog) en compactere specificatie,
   zodat de tabel zonder horizontaal scrollen past. */
@media (max-width: 1199px) {
  .page--sidebar { grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
  .result { padding-left: 20px; padding-right: 20px; }
  .table--spec { font-size: 14px; }
  .table--spec th, .table--spec td { padding: 8px 9px; }
  .table--spec .calc-formula { font-size: 13px; }
}

/* Tablets */
@media (max-width: 860px) {
  .table--spec { font-size: 14px; }
  .table--spec th, .table--spec td { padding: 8px 9px; }
  .table--spec .calc-formula { font-size: 13px; }
}

@media (max-width: 1023px) {
  .page--sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-self: start; }
  /* Oneven aantal kaarten: de laatste over de volle breedte (geen los gat rechts). */
  .sidebar > section:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  /* Zijbalkadvertentie niet meer sticky maar onderaan de zijbalk (= onderaan de pagina), over de volle breedte. */
  .sidebar__sticky { position: static; grid-column: 1 / -1; }
  .ad--sidebar .ad__box { height: 250px; }
}

@media (max-width: 1100px) {  /* menu past pas vanaf ± 1080px */
  .nav-toggle { display: inline-flex; }
  .header__inner { flex-wrap: wrap; min-height: 64px; }
  /* De rij met logo en menuknop houdt zijn hoogte als het menu (tweede regel) openklapt;
     anders krimpt die rij tot de hoogte van het logo en schuiven logo en knop omhoog. */
  .brand { min-height: 64px; }
  .nav {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 0 12px; border-top: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { background: var(--brand-50); padding-left: 12px; }
}

@media (max-width: 860px) {
  .hero { padding: 32px 0 36px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: 36px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .lead { font-size: 17px; }
  .page { padding-top: 20px; }
  .info-cards, .choices--2, .totals { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }

  .calc { padding: 4px 16px 20px; border-radius: var(--radius); }
  .calc__submit { flex-direction: column; align-items: stretch; }

  .result { padding: 18px 16px; }
  /* Label en bedrag naast elkaar: het bedrag heeft ruim de helft van de breedte. */
  .total { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; --total-size: 22px; --total-ruimte: 58cqi; }
  .table { font-size: 14px; }
  .table th, .table td { padding: 8px 10px; }
  .table thead th { white-space: normal; letter-spacing: 0; font-size: 12px; }
}

@media (max-width: 480px) {
  .hide-sm { display: none; }
  /* "Ontwikkeld door iFlow" nooit midden in de tekst afbreken; past het niet naast de percentages,
     dan gaan die als geheel naar een tweede regel. */
  .topbar__inner { flex-wrap: wrap; row-gap: 0; }
  .topbar__iflow { white-space: nowrap; }
  .topbar__rates { gap: 12px; }
  .header__inner { column-gap: 12px; }  /* logo en menuknop naast elkaar, ook op 320 px */
  .footer__iflow { flex-direction: column; gap: 16px; }
  .brand__name { font-size: 19px; }
  .brand__mark { width: 34px; height: 34px; }
  .result__actions .btn { flex: 1 1 auto; }
}

/* Topbar op één regel tot ± 345 px (360 = veelgebruikt Android-formaat, 375 = kleinere iPhones);
   daaronder twee gecentreerde regels. */
@media (max-width: 400px) {
  .topbar { font-size: 12px; }
  .topbar__inner { column-gap: 12px; }
}
@media (max-width: 350px) {
  .topbar__inner { justify-content: center; padding-top: 4px; padding-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
