/*
 * De schermen voor vakbedrijven. Stijl volgens DESIGN.md: geel en marineblauw,
 * ronde knoppen, kaarten in de vorm van een bericht (één scherpe hoek).
 * Geel is voor wat nieuw of het belangrijkste is; marineblauw voor tekst en acties.
 */
@font-face { font-family: "Figtree"; font-weight: 400 800; font-display: swap; src: url("../fonts/rankbase/figtree-latin-wght-normal.woff2") format("woff2"); }

.k {
  --wit: #FFFFFF; --marine: #0F2460; --nacht: #0A1838; --geel: #FFD400; --creme: #FDF6E0;
  --lucht: #D9E5FF; --tekst: #33406B; --zacht: #D6DDF0; --rood: #B3261E; --groen: #1B6B3A;
  --balk: 80px;
  min-height: 100vh; margin: 0; background: var(--creme); color: var(--marine);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.1875rem; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
html, body { margin: 0; }
.k *, .k *::before, .k *::after { box-sizing: border-box; }
.k ::selection { background: var(--marine); color: var(--geel); }
.k :focus-visible { outline: 3px solid var(--marine); outline-offset: 3px; border-radius: 10px; }
/* :where houdt deze basisregels zwak, zodat elke class hieronder ze kan overschrijven. */
:where(.k h1, .k h2, .k h3, .k p, .k ul, .k ol, .k fieldset) { margin: 0; padding: 0; }
:where(.k ul, .k ol) { list-style: none; }
:where(.k fieldset) { border: 0; min-width: 0; }
:where(.k a) { color: var(--marine); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.k-tab-num { font-variant-numeric: tabular-nums; }

/* Kop */
.k-kop { background: var(--marine); }
.k-kop__bak { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.k-kop__logo { display: block; height: 34px; width: auto; }
.k-kop__uit { display: inline-flex; align-items: center; min-height: 56px; padding: 0 0.25rem; border: 0; background: none; color: #fff; font: inherit; font-size: 1.0625rem; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer; }
.k-bak { width: min(100% - 2rem, 40rem); margin-inline: auto; }

/* Inhoud */
.k-inhoud { padding: 1.75rem 0 calc(var(--balk) + 2.5rem); }
.k-inhoud--los { padding-bottom: 3rem; }
.k-titel { font-size: clamp(1.9rem, 6vw + 0.5rem, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.k-onder { margin-top: 0.6rem; color: var(--tekst); }
.k-lijst { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.k-tussen { margin-top: 2.25rem; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }

/* Kaart: een bericht met één scherpe hoek */
.k-kaart { background: var(--wit); border-radius: 28px 28px 28px 8px; padding: 1.35rem; box-shadow: 0 22px 40px -28px rgba(10, 24, 56, 0.55); }
.k-kaart--vers { box-shadow: 0 0 0 4px var(--geel), 0 22px 40px -28px rgba(10, 24, 56, 0.55); }
.k-rij { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; color: var(--tekst); font-size: 1.0625rem; font-weight: 600; }
.k-kaart__titel { margin-top: 0.6rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.k-plek { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.4rem; font-weight: 700; }
.k-plek svg { flex: none; }
.k-regels { display: grid; gap: 0.3rem; margin-top: 0.9rem; color: var(--tekst); }
.k-regels b { color: var(--marine); font-weight: 700; }
.k-prijs { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 3px solid var(--marine); }
.k-prijs b { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.k-prijs span { color: var(--tekst); font-size: 1.0625rem; }

/* Pillen: status, niet alleen op kleur */
.k-pil { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.8rem; border-radius: 99px; font-size: 0.9375rem; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.k-pil--geel { background: var(--geel); color: var(--marine); }
.k-pil--marine { background: var(--marine); color: var(--wit); }
.k-pil--lucht { background: var(--lucht); color: var(--marine); }
.k-pil--rand { background: var(--wit); color: var(--marine); box-shadow: inset 0 0 0 2px var(--marine); }

/* Knoppen */
.k-knop { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; min-height: 68px; margin-top: 1.1rem; padding: 0.8rem 1.5rem; border: 2px solid var(--marine); border-radius: 99px; background: var(--marine); color: var(--geel); font: inherit; font-size: 1.3125rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, transform .18s cubic-bezier(.16, 1, .3, 1); }
.k .k-knop { color: var(--geel); }
.k-knop:hover { background: var(--nacht); border-color: var(--nacht); }
.k-knop:active { transform: translateY(1px) scale(0.99); }
.k-knop--rustig, .k .k-knop--rustig { min-height: 60px; background: var(--wit); color: var(--marine); font-size: 1.1875rem; }
.k-knop--rustig:hover { background: var(--marine); border-color: var(--marine); color: var(--geel); }
.k-link { display: inline-flex; align-items: center; min-height: 56px; font-weight: 800; }
.k-terug { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 56px; margin-bottom: 0.5rem; font-weight: 800; text-decoration: none; }

/* Klant: het belangrijkste van een genomen klus */
.k-klant { margin-top: 1.1rem; padding: 1.1rem; border-radius: 22px 22px 22px 6px; background: var(--creme); }
.k-klant__naam { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.015em; }
.k-klant__nummer { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-klant__rest { margin-top: 0.4rem; color: var(--tekst); overflow-wrap: anywhere; }
.k-notitie { margin-top: 0.9rem; padding: 0.9rem 1.1rem; border-radius: 20px 20px 6px 20px; background: var(--lucht); }
.k-notitie small { display: block; font-size: 0.9375rem; font-weight: 800; }

/* Meldingen bovenaan */
.k-bericht { margin-bottom: 1.25rem; padding: 0.9rem 1.2rem; border-radius: 22px 22px 22px 6px; background: var(--marine); color: var(--wit); font-weight: 600; }
.k-uitkomst { margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: 20px 20px 20px 6px; background: var(--lucht); font-weight: 600; }

/* Leeg */
.k-leeg { margin-top: 1.5rem; padding: 2rem 1.35rem; text-align: center; }
.k-leeg svg { color: var(--marine); }
.k-leeg h2 { margin-top: 0.75rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.k-leeg p { margin-top: 0.4rem; color: var(--tekst); }

/* Totaal */
.k-totaal { margin-top: 1.5rem; padding: 1.5rem 1.35rem; border-radius: 28px 28px 28px 8px; background: var(--marine); color: var(--wit); }
.k-totaal p { color: var(--zacht); font-weight: 600; }
.k-totaal b { display: block; margin-top: 0.2rem; font-size: 3rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; color: var(--geel); font-variant-numeric: tabular-nums; }
.k-posten { margin-top: 1rem; overflow: hidden; border-radius: 24px 24px 24px 8px; background: var(--wit); }
.k-posten li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 1.35rem; border-top: 2px solid var(--creme); }
.k-posten li:first-child { border-top: 0; }
.k-post__wat { font-weight: 700; }
.k-post__bij { display: block; color: var(--tekst); font-size: 1.0625rem; font-weight: 500; }
.k-post__bedrag { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-post--weg .k-post__naam, .k-post--weg .k-post__bedrag { text-decoration: line-through; color: var(--tekst); font-weight: 600; }

/* Formulieren */
.k-blok { margin-top: 1.1rem; }
.k-blok > h2, .k-blok > legend { padding: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.k-blok__uitleg { margin-top: 0.3rem; color: var(--tekst); }
.k-velden { display: grid; gap: 1rem; margin-top: 1rem; }
.k-veld { display: grid; gap: 0.35rem; }
.k-veld label, .k-label { font-weight: 800; }
.k-veld input, .k-veld select, .k-veld textarea { width: 100%; min-height: 60px; padding: 0.6rem 0.9rem; border: 2px solid var(--marine); border-radius: 14px; background: var(--wit); color: var(--marine); font: inherit; font-weight: 600; caret-color: var(--marine); }
.k-veld textarea { min-height: 7rem; resize: vertical; }
.k-veld input:hover, .k-veld select:hover, .k-veld textarea:hover { background: var(--creme); }
.k-veld input::placeholder { color: #5E6A90; font-weight: 500; }
.k-veld__hulp { color: var(--tekst); font-size: 1.0625rem; }
.k-fout { color: var(--rood); font-weight: 700; }
.k-fouten { margin-bottom: 1.25rem; padding: 0.9rem 1.2rem; border-radius: 22px 22px 22px 6px; background: var(--wit); box-shadow: inset 0 0 0 2px var(--rood); color: var(--rood); font-weight: 700; }
.k-keuzes { display: grid; gap: 0.6rem; margin-top: 1rem; }
/* Twee naast elkaar pas als elke naam op één regel past, ook "Uitbouw en aanbouw (prefab)". Daaronder onder elkaar. */
@media (min-width: 46rem) { .k-keuzes--twee { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.k-keuze { position: relative; display: flex; align-items: center; gap: 0.8rem; min-height: 60px; padding: 0.6rem 1rem; border: 2px solid #8F9BC4; border-radius: 18px; background: var(--wit); font-weight: 700; cursor: pointer; }
.k-keuze:hover { border-color: var(--marine); }
.k-keuze input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--marine); }
.k-keuze:has(input:checked) { border-color: var(--marine); background: var(--geel); border-radius: 18px 18px 18px 6px; }
/*
 * Vakken en provincies zijn tegels zonder vierkantje: je tikt op het woord. Gekozen is
 * geel, met één scherpe hoek en een vinkje in een marineblauw rondje op de hoek,
 * zoals de melding in het logo. Zo past de naam op één regel.
 */
.k-keuzes--twee .k-keuze { justify-content: center; min-height: 60px; padding: 0.5rem 0.9rem; text-align: center; line-height: 1.2; transition: background-color .15s ease, border-color .15s ease; }
.k-keuzes--twee .k-keuze input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.k-keuzes--twee .k-keuze:has(input:focus-visible) { outline: 3px solid var(--marine); outline-offset: 3px; }
.k-keuzes--twee .k-keuze:has(input:checked)::after { content: ""; position: absolute; top: -11px; right: -11px; width: 30px; height: 30px; border-radius: 50%; background: var(--marine) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD400' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 0 0 3px var(--wit); }
/* Het aanmelden krijgt een bredere kaart, zodat twee tegels naast elkaar ruimte hebben. */
.k-los__bak:has(.k-aanmelden) { width: min(100% - 2rem, 44rem); }
/* Op een smalle telefoon wat minder binnenruimte, zodat de langste naam op één regel blijft. */
@media (max-width: 25rem) {
  .k-los__bak:has(.k-aanmelden) .k-kaart { padding-inline: 1.1rem; }
  .k-keuzes--twee .k-keuze { padding-inline: 0.5rem; }
}
.k-cirkel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0.7rem; align-items: end; }

/* Tabbalk */
.k-tabs { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; background: var(--wit); border-top: 2px solid var(--marine); padding-bottom: env(safe-area-inset-bottom, 0px); }
.k-tabs ul { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 40rem; margin: 0 auto; }
.k-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; height: var(--balk); color: var(--marine); font-size: 0.9375rem; font-weight: 800; text-decoration: none; }
.k-tab svg { width: 28px; height: 28px; }
.k-tab__icoon { position: relative; display: grid; place-items: center; width: 56px; height: 34px; border-radius: 99px; }
.k-tab[aria-current="page"] .k-tab__icoon { background: var(--geel); }
.k-tab__aantal { position: absolute; top: -6px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--marine); color: var(--geel); font-size: 0.9375rem; font-weight: 800; line-height: 24px; text-align: center; font-variant-numeric: tabular-nums; }

/* Losse pagina's: inloggen, aanmelden, wachten */
.k-los { position: relative; overflow: hidden; min-height: 100vh; background: var(--geel); }
/* Het crème rondje ligt onderaan, niet achter het logo, zodat de witte melding op geel staat. */
.k-los::before { content: ""; position: absolute; right: -16rem; bottom: -20rem; width: 36rem; height: 36rem; border-radius: 50%; background: var(--creme); }
.k-los__bak { position: relative; width: min(100% - 2rem, 34rem); margin-inline: auto; padding: 2rem 0 3rem; }
.k-los__logo { display: block; height: 44px; width: auto; }
.k-los .k-kaart { margin-top: 1.75rem; padding: clamp(1.4rem, 5vw, 2.25rem); border-radius: 40px 40px 40px 12px; box-shadow: 0 40px 60px -40px rgba(10, 24, 56, 0.6); }
.k-los__onder { margin-top: 1.5rem; font-weight: 600; }

/* Aanmelden in stappen. Zonder JavaScript staan de stappen gewoon onder elkaar. */
.k-onzichtbaar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Terug en de teller op één rij, de balk eronder over de hele breedte: op een telefoon is naast elkaar te krap. */
.k-voortgang { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.k-voortgang[hidden], .k-stapterug[hidden] { display: none; }
.k-stapterug { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 56px; padding: 0 1.1rem 0 0.8rem; border: 2px solid var(--marine); border-radius: 99px; background: var(--wit); color: var(--marine); font: inherit; font-size: 1.0625rem; font-weight: 800; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.k-stapterug:hover { background: var(--marine); color: var(--geel); }
.k-balk { order: 3; flex: 1 0 100%; height: 12px; border-radius: 99px; background: var(--lucht); overflow: hidden; }
.k-balk span { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--marine); transition: width .35s cubic-bezier(.16, 1, .3, 1); }
.k-teller { flex: none; margin-left: auto; padding: 0.2rem 0.8rem; border-radius: 99px; background: var(--geel); color: var(--marine); font-size: 1rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-stap .k-blok { margin-top: 0; }
.k-stap h1 + .k-onder + .k-blok { margin-top: 1.25rem; }
.k-stap .k-blok > legend { font-size: clamp(1.75rem, 5.5vw + 0.6rem, 2.4rem); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.k-stap .k-blok > legend:focus, .k-stap h1:focus { outline: none; }
.k-stap > .k-knop { margin-top: 1.5rem; }
.k-aanmelden:not(.k-stappen) .k-stap + .k-stap { margin-top: 2.5rem; padding-top: 2rem; border-top: 3px solid var(--marine); }
.k-aanmelden:not(.k-stappen) [data-volgende] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .k-stap--in { animation: k-stap-in .4s cubic-bezier(.16, 1, .3, 1); }
  .k-stap--uit { animation: k-stap-uit .4s cubic-bezier(.16, 1, .3, 1); }
  @keyframes k-stap-in { from { opacity: 0; transform: translateX(18px); } }
  @keyframes k-stap-uit { from { opacity: 0; transform: translateX(-18px); } }
}

@media (min-width: 48rem) {
  .k-inhoud { padding: 2.5rem 0 3.5rem; }
  .k-tabs { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 2px solid var(--marine); }
  .k-tab { flex-direction: row; gap: 0.6rem; height: 68px; font-size: 1.0625rem; }
  .k-keuzes--drie { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  .k-kaart--vers { animation: k-binnen 0.5s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes k-binnen { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
}

/* Werkgebied: adres, kaart, straal en provincies. */
.k-gebied .k-blok__uitleg { max-width: 34rem; }
.k-adres { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0.75rem; margin-top: 1.1rem; }
.k-adres input[name="postcode"] { text-transform: uppercase; }
.k-kaartvak { margin-top: 1.25rem; padding: 1rem 1rem 0.9rem; border-radius: 24px 24px 24px 6px; background: var(--creme); }
.k-kaartvak__plek { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin-top: 0.6rem; font-weight: 600; text-align: center; }
.k-kaartvak__plek[hidden] { display: none; }
.k-kaartvak__plek svg { flex: none; }
.k-kaart-nl { display: block; width: 100%; max-width: 24rem; height: auto; margin: 0 auto; overflow: visible; }
.k-kaart-nl__provincie { fill: var(--wit); stroke: var(--marine); stroke-width: 1.25px; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .15s ease; }
.k-kaart-nl__provincie.is-gekozen { fill: var(--geel); }
[data-kaart] .k-kaart-nl__provincie { cursor: pointer; }
@media (hover: hover) { [data-kaart] .k-kaart-nl__provincie:not(.is-gekozen):hover { fill: var(--lucht); } }
.k-kaart-nl__straal { fill: rgba(15, 36, 96, 0.14); stroke: var(--marine); stroke-width: 2px; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; pointer-events: none; transition: r .2s cubic-bezier(.16, 1, .3, 1); }
.k-kaart-nl__speld { pointer-events: none; }
.k-kaart-nl__speld-rand { fill: var(--wit); }
.k-kaart-nl__speld-kern { fill: var(--marine); }
.k-kaart-nl--klein { max-width: 15rem; margin-top: 1rem; }

.k-straal { margin-top: 1.5rem; }
.k-straal__vraag { display: block; font-weight: 800; }
.k-straal__rij { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.k-straal__waarde { flex: none; min-width: 5.5rem; padding: 0.35rem 0.9rem; border-radius: 99px; background: var(--marine); color: var(--geel); font-size: 1.25rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.k-straal input[type="range"] { flex: 1; min-width: 0; height: 56px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
/* Het gevulde deel van de baan loopt mee met de straal (--vol zet het script en de pagina). */
.k-straal input[type="range"]::-webkit-slider-runnable-track { height: 12px; border-radius: 99px; background: linear-gradient(to right, var(--marine) var(--vol, 25%), var(--lucht) var(--vol, 25%)); }
.k-straal input[type="range"]::-moz-range-track { height: 12px; border-radius: 99px; background: var(--lucht); }
.k-straal input[type="range"]::-moz-range-progress { height: 12px; border-radius: 99px; background: var(--marine); }
.k-straal input[type="range"]::-webkit-slider-thumb { width: 36px; height: 36px; margin-top: -12px; border: 4px solid var(--marine); border-radius: 50%; background: var(--geel); -webkit-appearance: none; appearance: none; }
.k-straal input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border: 4px solid var(--marine); border-radius: 50%; background: var(--geel); }
.k-straal input[type="range"]:focus-visible { outline: 3px solid var(--marine); outline-offset: 2px; }

.k-gebied__zin { margin-top: 1.1rem; padding: 0.9rem 1.1rem; border-radius: 20px 20px 20px 6px; background: var(--lucht); font-weight: 700; }
.k-gebied__kop { margin-top: 1.5rem; }
.k-gebied .k-gebied__kop + .k-keuzes { margin-top: 0.6rem; }

/* Na het aanmelden: wat er nu gebeurt en wat je hebt opgegeven. */
.k-volgorde { display: grid; gap: 0.9rem; margin-top: 1rem; }
.k-volgorde li { display: flex; align-items: flex-start; gap: 0.9rem; }
.k-volgorde__nummer { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--geel); color: var(--marine); font-weight: 800; font-variant-numeric: tabular-nums; }
.k-volgorde p { padding-top: 0.4rem; }
.k-opgave { display: grid; gap: 0.75rem; margin: 1rem 0 0; }
.k-opgave div { display: grid; gap: 0.1rem; }
.k-opgave dt { font-size: 1.0625rem; font-weight: 800; }
.k-opgave dd { margin: 0; color: var(--tekst); }
