/*
 * Ontwerpsysteem — richting B "Atelier", merkpalet (§23, register 45).
 * Eén licht thema. Enkel tokens gebruiken; nooit losse hexwaarden in modulestijlen.
 */

/* ---------- Lettertype (§23.2, zelf gehost) ---------- */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("/static/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/figtree-latin-wght-normal.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: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("/static/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/static/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens (§23.1) ---------- */
:root {
	color-scheme: light;

	--ground: #FBF8F2;
	--surface: #FFFFFF;
	--surface-2: #FCF3E2;
	--sand: #EFC47F;
	--sand-text: #7A4E0E;
	--photo: #D9CFC0;
	--photo-text: #5A4E42;
	--ink: #23303A;
	--accent-strong: #003A57;
	--muted: #5E6B74;
	--line: #E6DCCB;
	--accent: #004E71;
	--accent-ring: rgba(0, 78, 113, .15);
	--ok: #3C6B4F;
	--ok-text: #2F5A42;
	--ok-soft: #E6F0E9;
	--warn: #B5482A;
	--warn-soft: #FBEDE7;
	--warn-text: #8F371F;
	--danger: #A3271B;
	--danger-soft: #FBE9E7;
	--info-soft: #E8F1F5;

	--radius-xl: 20px;
	--radius-lg: 16px;
	--radius-md: 12px;
	--radius-sm: 8px;
	--radius-pill: 999px;
	--shadow-hover: 0 6px 20px rgba(0, 58, 87, .10);
	--shadow-pop: 0 12px 40px rgba(0, 58, 87, .18);

	--font: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
	--fs-body: 17px;
	--fs-small: 14px;
	--fs-caps: 12px;
	--lh-body: 1.55;

	--gutter: 18px;
	--container: 1200px;
	--header-h: 80px;
	--btn-h: 50px;
	--field-h: 50px;

	--ease: cubic-bezier(.2, .7, .2, 1);
	--t-fast: 150ms;
	--t-page: 200ms;
	--t-reveal: 300ms;
}

@media (max-width: 720px) {
	:root {
		--fs-body: 16px;
		--btn-h: 54px;
		--header-h: 64px;
	}
}

/* ---------- Basis ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

/* Gsm: een vaste actiebalk onderaan mag een veld (of zijn foutmelding) nooit bedekken bij focus of scrollen naar een anker. */
@media (max-width: 720px) {
	html:has(.actionbar) {
		scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
	}
}

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1 0 auto;
	display: block;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font);
	color: var(--accent-strong);
	font-weight: 800;
	letter-spacing: -.025em;
	line-height: 1.08;
	margin: 0 0 .5em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(28px, 3.4vw, 42px);
}

.h-display {
	font-size: clamp(36px, 4.4vw, 68px);
	line-height: 1.02;
}

h2 {
	font-size: clamp(24px, 2.6vw, 36px);
}

h3 {
	font-size: clamp(19px, 1.6vw, 22px);
	line-height: 1.2;
}

h4 {
	font-size: 17px;
	letter-spacing: -.01em;
}

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

a {
	color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--accent-strong);
}

strong,
b {
	font-weight: 700;
}

small,
.small {
	font-size: var(--fs-small);
}

.lead {
	font-size: clamp(18px, 1.5vw, 21px);
	line-height: 1.5;
	color: var(--ink);
	max-width: 62ch;
}

.muted {
	color: var(--muted);
}

.caps {
	font-size: var(--fs-caps);
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}

.num,
.tabular {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.ref {
	font-weight: 600;
	letter-spacing: .06em;
	font-variant-numeric: tabular-nums;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 24px 0;
}

::selection {
	background: var(--surface-2);
	color: var(--accent-strong);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 1000;
	background: var(--accent-strong);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--radius-pill);
	font-weight: 600;
	transition: top var(--t-fast) var(--ease);
}

.skip-link:focus {
	top: 12px;
	color: #fff;
}

[hidden] {
	display: none !important;
}

/* ---------- Lay-out (§23.6) ---------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin: 0 auto;
	padding-left: max(var(--gutter), env(safe-area-inset-left));
	padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.container--narrow {
	max-width: calc(720px + 2 * var(--gutter));
}

.container--app {
	max-width: calc(980px + 2 * var(--gutter));
}

@media (min-width: 900px) {
	:root {
		--gutter: 32px;
	}
}

.section {
	padding: 56px 0;
}

@media (min-width: 900px) {
	.section {
		padding: 88px 0;
	}
}

.section--sand {
	background: var(--surface-2);
}

.stack > * + * {
	margin-top: var(--stack, 16px);
}

.stack-lg > * + * {
	margin-top: 28px;
}

.cluster {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gap, 12px);
}

.grid {
	display: grid;
	gap: var(--gap, 20px);
}

.grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid--3 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid--4 {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.app-grid {
	display: grid;
	gap: 28px;
}

@media (min-width: 960px) {
	.app-grid {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		gap: 40px;
		align-items: start;
	}

	.app-grid__side {
		position: sticky;
		top: 24px;
	}
}

/* ---------- Kop en voettekst ---------- */
.site-header {
	height: var(--header-h);
	display: flex;
	align-items: center;
	background: var(--ground);
	position: relative;
	z-index: 20;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-header__nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.site-header__nav a:not(.btn) {
	color: var(--accent-strong);
	text-decoration: none;
	font-weight: 600;
	padding: 10px 14px;
	border-radius: var(--radius-pill);
	transition: background var(--t-fast) var(--ease);
}

.site-header__nav a:not(.btn):hover {
	background: var(--surface-2);
}

@media (max-width: 860px) {
	.site-header__nav .hide-mobile {
		display: none;
	}
}

/* Inloggen / Mijn aanvragen / Mijn dashboard: ook op gsm zichtbaar, compact. */
.site-header__account {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	white-space: nowrap;
}

.site-header__account .icon {
	width: 18px;
	height: 18px;
	flex: none;
}

@media (max-width: 860px) {
	.site-header__nav {
		gap: 2px;
	}

	.site-header__nav a.site-header__account {
		padding: 10px 10px;
	}
}

@media (max-width: 480px) {
	.site-header .container {
		gap: 8px;
	}

	.site-header__nav a.site-header__account {
		min-width: 44px;
		justify-content: center;
		padding: 10px 8px;
	}

	.site-header__account-label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.site-header__nav .btn--sm {
		padding: 0 14px;
	}

	.site-header .logo-link {
		min-width: 0;
	}

	.site-header .logo__img {
		max-width: 100%;
		height: auto;
		max-height: 26px;
	}
}

/* Korte CTA-tekst waar de lange niet past (Franse tekst is langer). */
.site-header__cta-short {
	display: none;
}

@media (max-width: 480px) {
	html[lang^="fr"] .site-header__cta-long {
		display: none;
	}

	html[lang^="fr"] .site-header__cta-short {
		display: inline;
	}
}

@media (max-width: 359px) {
	.site-header__cta-long {
		display: none;
	}

	.site-header__cta-short {
		display: inline;
	}
}

.layout-app .site-header {
	height: 64px;
	border-bottom: 1px solid var(--line);
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	line-height: 1;
	min-height: 44px;
}

.logo__img {
	height: 34px;
	width: auto;
	display: block;
}

.layout-app .logo__img,
.layout-dashboard .logo__img {
	height: 28px;
}

.site-footer .logo__img {
	height: 30px;
}

@media (max-width: 420px) {
	.logo__img {
		height: 26px;
	}
}

.logo__mark {
	width: 34px;
	height: 34px;
	flex: none;
}

.logo__word {
	font-weight: 800;
	font-size: 25px;
	letter-spacing: -.035em;
	white-space: nowrap;
}

.logo__a,
.logo__c {
	color: var(--accent);
}

.logo__b {
	color: var(--sand);
}

.logo--dark .logo__a,
.logo--dark .logo__c {
	color: #fff;
}

.layout-app .logo__word {
	font-size: 22px;
}

.layout-app .logo__mark {
	width: 28px;
	height: 28px;
}

@media (max-width: 420px) {
	.logo__word {
		font-size: 21px;
	}

	.logo__mark {
		width: 26px;
		height: 26px;
	}
}

.site-footer {
	background: var(--accent-strong);
	color: var(--ground);
	padding: 56px 0 32px;
	margin-top: 64px;
	font-size: 15px;
}

.site-footer a {
	color: var(--sand);
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
	color: var(--sand);
}

.site-footer__grid {
	display: grid;
	gap: 32px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.site-footer h2 {
	color: #fff;
	font-size: 15px;
	letter-spacing: .02em;
	margin-bottom: 12px;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer li {
	margin: 6px 0;
}

.site-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, .18);
	margin-top: 40px;
	padding-top: 20px;
	font-size: 13px;
	color: rgba(251, 248, 242, .8);
}

.layout-app .site-footer,
.layout-dashboard .site-footer {
	background: transparent;
	color: var(--muted);
	padding: 24px 0;
	margin-top: 40px;
	border-top: 1px solid var(--line);
	font-size: 13px;
}

.layout-app .site-footer a,
.layout-dashboard .site-footer a {
	color: var(--muted);
}

/* ---------- Knoppen (§23.3) ---------- */
.btn {
	--btn-bg: transparent;
	--btn-fg: var(--accent-strong);
	--btn-bd: var(--accent-strong);
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: var(--btn-h);
	padding: 0 26px;
	border-radius: var(--radius-pill);
	border: 1.5px solid var(--btn-bd);
	background: var(--btn-bg);
	color: var(--btn-fg);
	font: 600 16px/1.1 var(--font);
	letter-spacing: -.005em;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}

.btn:hover {
	background: var(--surface-2);
	color: var(--accent-strong);
}

.btn:active {
	transform: translateY(1px);
}

.btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.btn .icon {
	width: 20px;
	height: 20px;
}

.btn--primary {
	--btn-bg: var(--accent);
	--btn-fg: #fff;
	--btn-bd: var(--accent);
}

.btn--primary:hover {
	background: var(--accent-strong);
	border-color: var(--accent-strong);
	color: #fff;
}

.btn--ok {
	--btn-bg: var(--ok);
	--btn-fg: #fff;
	--btn-bd: var(--ok);
}

.btn--ok:hover {
	background: var(--ok-text);
	border-color: var(--ok-text);
	color: #fff;
}

.btn--danger {
	--btn-bg: transparent;
	--btn-fg: var(--danger);
	--btn-bd: var(--danger);
}

.btn--danger:hover {
	background: var(--danger-soft);
	color: var(--danger);
}

.btn--link {
	--btn-bd: transparent;
	--btn-fg: var(--accent);
	padding: 0 6px;
	min-height: 44px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.btn--link:hover {
	background: transparent;
	color: var(--accent-strong);
}

.btn--block {
	width: 100%;
}

.btn--sm {
	min-height: 40px;
	padding: 0 16px;
	font-size: 14px;
}

/* Aanraakschermen: ook kleine knoppen 44 px hoog (§23.6, audit golf 7). */
@media (pointer: coarse) {
	.btn--sm {
		min-height: 44px;
	}
}

.btn[disabled],
.btn[aria-disabled="true"] {
	opacity: .5;
	cursor: not-allowed;
	transform: none;
}

.btn.is-loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent transparent;
	border-radius: 50%;
	animation: ep-spin .7s linear infinite;
}

.btn:not(.btn--primary):not(.btn--ok).is-loading::after {
	border-color: var(--accent) var(--accent) transparent transparent;
}

@keyframes ep-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Kaarten, tegels (§23.3) ---------- */
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 20px;
	transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

@media (min-width: 720px) {
	.card {
		padding: 24px;
	}
}

.card--lg {
	border-radius: var(--radius-xl);
}

.card--featured {
	border: 1.5px solid var(--accent-strong);
}

.card--sand {
	background: var(--surface-2);
	border-color: transparent;
}

.card--hover:hover {
	box-shadow: var(--shadow-hover);
}

.card__title {
	margin: 0 0 6px;
	font-size: 20px;
}

.card__meta {
	color: var(--muted);
	font-size: var(--fs-small);
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 20px;
	color: var(--ink);
	text-decoration: none;
	font: inherit;
	cursor: pointer;
	min-height: 112px;
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
	width: 100%;
}

.tile:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-hover);
	color: var(--ink);
}

.tile:active {
	transform: translateY(1px);
}

.tile__title {
	font-weight: 700;
	font-size: 18px;
	color: var(--accent-strong);
	letter-spacing: -.01em;
	line-height: 1.25;
}

.tile__text {
	color: var(--muted);
	font-size: 15px;
}

.tile .icon {
	width: 26px;
	height: 26px;
	color: var(--accent);
}

/* ---------- Keuzeknoppen intake (§23.3 velden) ---------- */
.choices {
	display: grid;
	gap: 10px;
}

.choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 58px;
	padding: 14px 18px;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius-md);
	cursor: pointer;
	font-weight: 600;
	color: var(--accent-strong);
	text-align: left;
	font: 600 16px/1.3 var(--font);
	width: 100%;
	transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.choice:hover {
	border-color: var(--accent);
}

.choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.choice__dot {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1.5px solid var(--line);
	background: var(--surface);
	display: grid;
	place-items: center;
	transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.choice__dot::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	transform: scale(0);
	transition: transform var(--t-fast) var(--ease);
}

.choice:has(input:checked),
.choice.is-selected {
	border-color: var(--accent);
	background: var(--info-soft);
}

.choice:has(input:checked) .choice__dot,
.choice.is-selected .choice__dot {
	border-color: var(--accent);
	background: var(--accent);
}

.choice:has(input:checked) .choice__dot::after,
.choice.is-selected .choice__dot::after {
	transform: scale(1);
}

.choice:has(input:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.choice--check .choice__dot {
	border-radius: 6px;
}

/* ---------- Velden (§23.3) ---------- */
.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field + .field {
	margin-top: 18px;
}

.field__label {
	font-size: 14px;
	font-weight: 600;
	color: var(--accent-strong);
}

.field__label .optional {
	font-weight: 400;
	color: var(--muted);
}

.field__input,
.field select,
.field textarea,
input.field__input,
select.field__input,
textarea.field__input {
	width: 100%;
	min-height: var(--field-h);
	padding: 12px 16px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--ink);
	font: 400 16px/1.4 var(--font);
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
	-webkit-appearance: none;
	appearance: none;
}

textarea.field__input {
	min-height: 120px;
	resize: vertical;
	line-height: 1.5;
}

select.field__input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23003A57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 44px;
}

.field__input:focus,
.field__input:focus-within, /* datumvelden: de focus zit op een deelveld (audit golf 7) */
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-ring);
}

.field__input::placeholder {
	color: #8A949B;
}

.field__hint {
	font-size: 14px;
	color: var(--muted);
}

.field__error {
	font-size: 14px;
	color: var(--danger);
	font-weight: 500;
}

.field.has-error .field__input,
.field__input[aria-invalid="true"] {
	border-color: var(--danger);
}

.field__counter {
	font-size: 13px;
	color: var(--muted);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.code-input {
	font-size: 28px !important;
	font-weight: 700 !important;
	letter-spacing: .3em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.check {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
	font-size: 15px;
	line-height: 1.45;
}

.check input {
	flex: none;
	width: 24px; /* WCAG 2.5.8: minstens 24 × 24 px (audit golf 7). */
	height: 24px;
	margin: 1px 0 0;
	accent-color: var(--accent);
}

.switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 600;
}

.switch input {
	appearance: none;
	-webkit-appearance: none;
	width: 46px;
	height: 28px;
	border-radius: var(--radius-pill);
	background: var(--line);
	position: relative;
	cursor: pointer;
	transition: background var(--t-fast) var(--ease);
	flex: none;
	margin: 0;
}

.switch input::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	transition: transform var(--t-fast) var(--ease);
}

.switch input:checked {
	background: var(--ok);
}

.switch input:checked::after {
	transform: translateX(18px);
}

/* ---------- Chips en badges (§23.3) ---------- */
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 3px 12px;
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	background: var(--surface-2);
	color: var(--accent-strong);
	white-space: nowrap;
}

.chip .icon {
	width: 14px;
	height: 14px;
}

.chip--ok {
	background: var(--ok-soft);
	color: var(--ok-text);
}

.chip--level {
	background: var(--surface-2);
	color: var(--accent-strong);
}

.chip--warn {
	background: var(--warn-soft);
	color: var(--warn-text);
}

.chip--danger {
	background: var(--danger-soft);
	color: var(--danger);
}

/* Gewone volgende stap ("Kies je expert", "Klaar om te betalen"): zandtint, rood blijft voor echte problemen. */
.chip--next {
	background: var(--surface-2);
	border: 1.5px solid var(--sand);
	color: var(--sand-text);
}

.chip--package {
	background: var(--surface-2);
	border: 1.5px solid var(--sand);
	color: var(--sand-text);
}

.chip--field {
	background: var(--surface);
	border: 1.5px solid var(--line);
	color: var(--ink);
}

.badge-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: var(--radius-pill);
	background: var(--accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* ---------- Meldingen (§23.3) ---------- */
.notice {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 18px;
	border-radius: var(--radius-md);
	background: var(--info-soft);
	color: var(--accent-strong);
	font-size: 15px;
	line-height: 1.5;
}

.notice .icon {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 2px;
}

.notice--warn {
	background: var(--warn-soft);
	color: var(--warn-text);
}

.notice--ok {
	background: var(--ok-soft);
	color: var(--ok-text);
}

.notice--danger {
	background: var(--danger-soft);
	color: var(--danger);
}

.notice--sand {
	background: var(--surface-2);
	color: var(--accent-strong);
}

.notice p:last-child {
	margin-bottom: 0;
}

/* ---------- Voortgang (§23.3) ---------- */
.progress {
	height: 6px;
	border-radius: 3px;
	background: var(--line);
	overflow: hidden;
}

.progress__bar {
	height: 100%;
	background: var(--sand);
	border-radius: 3px;
	width: var(--value, 0%);
	transition: width var(--t-reveal) var(--ease);
}

.progress-label {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
	font-variant-numeric: tabular-nums;
}

.steps {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.steps li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
	font-weight: 500;
}

.steps li::before {
	content: "";
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--line);
	flex: none;
}

.steps li.is-done {
	color: var(--ok-text);
}

.steps li.is-done::before {
	background: var(--ok);
}

.steps li.is-now {
	color: var(--accent-strong);
	font-weight: 700;
}

.steps li.is-now::before {
	background: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-ring);
}

.steps--vertical {
	flex-direction: column;
	gap: 14px;
}

/* ---------- Statistieken en zandstrook (§23.3) ---------- */
.strip {
	background: var(--surface-2);
	border-radius: var(--radius-lg);
	padding: 20px;
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.stat__label {
	font-size: var(--fs-caps);
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}

.stat__value {
	font-weight: 800;
	font-size: clamp(26px, 2.4vw, 34px);
	line-height: 1.1;
	color: var(--accent-strong);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
	margin: 4px 0 2px;
}

.stat__value.is-warn {
	color: var(--warn);
}

.stat__note {
	font-size: 13px;
	color: var(--muted);
}

/* ---------- Tabellen ---------- */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--surface);
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.table th,
.table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.table th {
	background: var(--surface-2);
	color: var(--accent-strong);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.table tr:last-child td {
	border-bottom: 0;
}

.table td.num,
.table th.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Definitielijst label → waarde */
.dl {
	display: grid;
	grid-template-columns: minmax(120px, max-content) 1fr;
	gap: 8px 20px;
	margin: 0;
}

.dl dt {
	color: var(--muted);
	font-size: 14px;
}

.dl dd {
	margin: 0;
	font-weight: 500;
}

@media (max-width: 480px) {
	.dl {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.dl dd {
		margin-bottom: 10px;
	}
}

/* ---------- Navigatie (dashboards, §23.3) ---------- */
.nav-pills {
	display: flex;
	flex-direction: column;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-pills a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: var(--radius-pill);
	color: var(--accent-strong);
	font-weight: 600;
	text-decoration: none;
	transition: background var(--t-fast) var(--ease);
}

.nav-pills a:hover {
	background: var(--surface-2);
}

.nav-pills a[aria-current="page"] {
	background: var(--accent-strong);
	color: #fff;
}

.nav-pills a[aria-current="page"] .badge-count {
	background: #fff;
	color: var(--accent-strong);
}

.tabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 2px;
	margin-bottom: 20px;
	-webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
	display: none;
}

.tabs a,
.tabs button {
	flex: none;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: var(--radius-pill);
	border: 1.5px solid var(--line);
	background: var(--surface);
	color: var(--accent-strong);
	font: 600 14px/1 var(--font);
	text-decoration: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tabs [aria-selected="true"],
.tabs [aria-current="page"] {
	background: var(--accent-strong);
	border-color: var(--accent-strong);
	color: #fff;
}

.dashboard {
	display: grid;
	gap: 24px;
	padding-top: 24px;
}

@media (min-width: 960px) {
	.dashboard {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 40px;
		padding-top: 32px;
	}

	.dashboard__nav {
		position: sticky;
		top: 24px;
		align-self: start;
		max-height: calc(100vh - 48px);
		max-height: calc(100dvh - 48px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}

	.pill-scroller__hint {
		display: none;
	}
}

@media (max-width: 959px) {
	.dashboard__nav .nav-pills {
		flex-direction: row;
		overflow-x: auto;
		scrollbar-width: none;
		gap: 6px;
		margin: 0 calc(-1 * var(--gutter));
		padding: 0 var(--gutter) 4px;
		scroll-padding-inline: 56px;
	}

	/* Strook met meer tabs dan er passen: vervaging en pijl aan de kant waar nog tabs staan (common.js). */
	.pill-scroller {
		position: relative;
	}

	.pill-scroller__hint {
		position: absolute;
		top: 0;
		bottom: 4px;
		z-index: 2;
		display: none;
		align-items: center;
		width: 64px;
		padding: 0;
		border: 0;
		cursor: pointer;
		color: var(--accent-strong);
	}

	.pill-scroller__hint--end {
		right: calc(-1 * var(--gutter));
		justify-content: flex-end;
		padding-right: max(8px, env(safe-area-inset-right));
		background: linear-gradient(to right, rgba(251, 248, 242, 0), var(--ground) 55%);
	}

	.pill-scroller__hint--start {
		left: calc(-1 * var(--gutter));
		justify-content: flex-start;
		padding-left: max(8px, env(safe-area-inset-left));
		background: linear-gradient(to left, rgba(251, 248, 242, 0), var(--ground) 55%);
	}

	.pill-scroller.has-end .pill-scroller__hint--end,
	.pill-scroller.has-start .pill-scroller__hint--start {
		display: flex;
	}

	.pill-scroller__arrow {
		position: relative;
		display: grid;
		place-items: center;
		width: 34px;
		height: 34px;
		border-radius: 50%;
		background: var(--surface);
		border: 1.5px solid var(--line);
		box-shadow: 0 2px 8px rgba(0, 58, 87, .10);
	}

	.pill-scroller__arrow .icon {
		width: 18px;
		height: 18px;
	}

	.pill-scroller__hint--start .pill-scroller__arrow .icon {
		transform: scaleX(-1);
	}

	/* Badge op een tab buiten beeld: stip op de pijl. */
	.pill-scroller__dot {
		position: absolute;
		top: -3px;
		right: -3px;
		width: 12px;
		height: 12px;
		border-radius: 50%;
		background: var(--accent);
		border: 2px solid var(--surface);
		display: none;
	}

	.pill-scroller__hint.has-dot .pill-scroller__dot {
		display: block;
	}

	.dashboard {
		grid-template-columns: minmax(0, 1fr);
	}

	.dashboard__nav {
		min-width: 0;
	}

	.dashboard__nav .nav-pills a {
		white-space: nowrap;
		border: 1.5px solid var(--line);
		background: var(--surface);
	}

	.dashboard__nav .nav-pills a[aria-current="page"] {
		background: var(--accent-strong);
		border-color: var(--accent-strong);
		color: var(--surface);
	}
}

/* ---------- Actiebalk gsm (§23.6) ---------- */
.actionbar {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 28px;
}

@media (max-width: 720px) {
	.actionbar {
		position: sticky;
		bottom: 0;
		z-index: 30;
		margin: 28px calc(-1 * var(--gutter)) 0;
		padding: 12px max(var(--gutter), env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
		background: var(--surface);
		border-top: 1px solid var(--line);
	}

	.actionbar .btn--primary,
	.actionbar .btn--ok {
		flex: 1;
	}
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: var(--accent-strong);
	font-weight: 600;
	text-decoration: none;
}

.back-link .icon {
	width: 18px;
	height: 18px;
}

/* ---------- Modal en toast ---------- */
.modal {
	border: 0;
	padding: 0;
	border-radius: var(--radius-xl);
	background: var(--surface);
	color: var(--ink);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	box-shadow: var(--shadow-pop);
}

.modal::backdrop {
	background: rgba(35, 48, 58, .45);
}

.modal__body {
	padding: 24px;
	overflow-y: auto;
}

.modal__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 24px 24px 0;
}

.modal__head h2 {
	font-size: 22px;
	margin: 0;
}

.modal__close {
	appearance: none;
	border: 0;
	background: var(--surface-2);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--accent-strong);
	flex: none;
}

.modal__foot {
	padding: 0 24px 24px;
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

@media (max-width: 560px) {
	.modal {
		width: 100vw;
		max-width: 100vw;
		margin: auto 0 0;
		border-radius: var(--radius-xl) var(--radius-xl) 0 0;
	}
}

.toast-region {
	position: fixed;
	z-index: 200;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(480px, calc(100vw - 32px));
	pointer-events: none;
}

.toast {
	pointer-events: auto;
	background: var(--accent-strong);
	color: #fff;
	padding: 14px 18px;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-pop);
	font-weight: 500;
	font-size: 15px;
	display: flex;
	gap: 10px;
	align-items: center;
	animation: ep-rise var(--t-page) var(--ease);
}

.toast--ok {
	background: var(--ok);
}

.toast--warn,
.toast--danger {
	background: var(--danger);
}

@keyframes ep-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Skeletten (§23.4: skeletten i.p.v. spinners) ---------- */
.skeleton {
	position: relative;
	overflow: hidden;
	background: var(--surface-2);
	border-radius: var(--radius-sm);
	min-height: 16px;
}

.skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
	animation: ep-shimmer 1.4s infinite;
}

@keyframes ep-shimmer {
	to {
		transform: translateX(100%);
	}
}

.skeleton--card {
	height: 140px;
	border-radius: var(--radius-lg);
}

.skeleton--line {
	height: 14px;
	margin: 8px 0;
}

/* ---------- Beeld en markering (§23.5) ---------- */
.photo {
	position: relative;
	border-radius: var(--radius-xl);
	overflow: hidden;
	background: var(--photo);
	color: var(--photo-text);
}

.photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo--placeholder {
	display: grid;
	place-items: center;
	text-align: center;
	padding: 24px;
	font-size: 14px;
	font-weight: 600;
	aspect-ratio: 4 / 3;
}

.marker {
	position: absolute;
	pointer-events: none;
	overflow: visible;
	filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .6));
}

.marker path {
	fill: none;
	stroke: var(--accent);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.marker.is-drawing path {
	stroke-dasharray: var(--len, 1000);
	stroke-dashoffset: var(--len, 1000);
	animation: ep-draw 600ms var(--ease) forwards;
}

@keyframes ep-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.avatar {
	width: 64px;
	height: 64px;
	border-radius: var(--radius-lg);
	object-fit: cover;
	background: var(--photo);
	flex: none;
}

.initial {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: var(--radius-lg);
	background: var(--accent);
	color: #fff;
	font-weight: 800;
	font-size: 26px;
	letter-spacing: -.02em;
	flex: none;
}

/* ---------- Pictogrammen (§23.3) ---------- */
.icon {
	width: 20px;
	height: 20px;
	flex: none;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- Beweging (§23.4) ---------- */
.reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

.fade-in {
	animation: ep-fade var(--t-page) var(--ease);
}

@keyframes ep-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}

	.marker.is-drawing path {
		stroke-dashoffset: 0;
		animation: none;
	}
}

/* ---------- Foutpagina's ---------- */
.error-page {
	min-height: 70vh;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 48px var(--gutter);
}

.error-page__code {
	font-size: clamp(64px, 12vw, 128px);
	font-weight: 800;
	line-height: 1;
	color: var(--sand-text); /* §23.1: zand nooit als tekst; zandtekst haalt AA (audit golf 7). */
	letter-spacing: -.04em;
	margin-bottom: 8px;
}

/* ---------- Hulpklassen ---------- */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-s { margin-top: 8px; }
.mt-m { margin-top: 16px; }
.mt-l { margin-top: 28px; }
.mt-xl { margin-top: 48px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.no-wrap { white-space: nowrap; }
.hidden-mobile { display: none; }

@media (min-width: 720px) {
	.hidden-mobile { display: initial; }
	.only-mobile { display: none !important; }
}

/* ---------- Banners (staging, impersonatie, coming soon) ---------- */
.site-banner {
	background: var(--surface-2);
	color: var(--accent-strong);
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	padding: 8px var(--gutter);
	border-bottom: 1px solid var(--line);
}

.site-banner--warn {
	background: var(--warn-soft);
	color: var(--warn-text);
}

/* ---------- Print ---------- */
@media print {
	.site-header,
	.site-footer,
	.actionbar,
	.toast-region {
		display: none !important;
	}

	body {
		background: #fff;
	}
}
