/* Rekentool houten balklaag — Figma "Concept 1 · Plattegrond" (desktop 39:5, mobiel 40:1353).
 * Regel: nooit een rand om iets met een eigen achtergrondkleur (ook niet bij gekozen/hover).
 * Alleen de toetsenbord-focusring is toegestaan. */

.hb {
	--hero-mint: #dcf4f2;
	--hero-teal: #054958;
	--hero-diep: #032a32;
	--hero-grijs: #687f84;
	--hero-geel: #ffe26f;
	--hero-geel-hover: #ffd83d;
	--hb-wit: #fff;
	--hb-vlak: #f5fbfa;
	--hb-zijmuur: #c9e6e2;
	--hb-hout: #d9b27c;
	--hb-mint-hover: #c8ece8;
	--hb-vlak-hover: #e6f4f2;
	--hb-fout: #ffb4a8;
	--hb-schaduw: 0 8px 16px rgba(5, 74, 89, .08);
	--hb-gutter: 120px;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--hero-diep);
	background: var(--hb-wit);
	overflow-x: clip;
}
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }
.hb :where(p, h1, h2, ul, li, dl, dt, dd) { margin: 0; padding: 0; }
.hb :where(ul) { list-style: none; }
.hb :where(button) { font: inherit; color: inherit; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: none; text-transform: none; letter-spacing: normal; }
.hb button { border: 0; }
.hb [hidden] { display: none !important; }
.hb :focus { outline: none; }
.hb :focus-visible { outline: 3px solid var(--hero-teal); outline-offset: 2px; }
.hb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; }
.hb-binnen { max-width: 1440px; margin: 0 auto; padding-inline: var(--hb-gutter); }
.hb-alleen-smal { display: none !important; }

/* ── Kop ─────────────────────────────────────────────────────────────── */
.hb-kop { background: var(--hero-mint); padding: 56px 0 40px; }
.hb-kop .hb-binnen { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hb-oogje { font-size: 13px; line-height: normal; font-weight: 700; letter-spacing: .78px; text-transform: uppercase; color: var(--hero-teal); }
.hb-titel { font-size: 44px; line-height: 54px; font-weight: 400; color: var(--hero-teal); letter-spacing: 0; }
.hb-toepassing-rol { max-width: 100%; }
.hb-toepassing { display: inline-flex; gap: 6px; padding: 4px; background: var(--hb-wit); border-radius: 999px; }
.hb-toepassing .hb-chip { padding: 10px 18px; font-size: 15px; background: var(--hb-wit); }
.hb-toepassing .hb-chip:hover { background: var(--hero-mint); }
.hb-toepassing .hb-chip[aria-pressed="true"] { background: var(--hero-teal); color: var(--hb-wit); font-weight: 600; }

/* ── Chips ───────────────────────────────────────────────────────────── */
.hb-chip {
	display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
	padding: 8px 14px; border-radius: 999px; background: var(--hero-mint);
	font-size: 14px; line-height: 17px; font-weight: 500; color: var(--hero-teal); white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.hb button.hb-chip { color: var(--hero-teal); }
.hb button.hb-chip:hover { background: var(--hb-mint-hover); }
.hb button.hb-chip[aria-pressed="true"] { background: var(--hero-teal); color: var(--hb-wit); font-weight: 600; }
.hb-chip--waarde, .hb button.hb-chip--waarde { background: var(--hb-vlak); }
.hb button.hb-chip--waarde:hover { background: var(--hb-vlak-hover); }
.hb-chip--invoer { padding-block: 6px; gap: 6px; }
.hb .hb-chip--invoer input {
	width: 4.2em; padding: 2px 6px; border: 0; border-radius: 6px; background: var(--hb-wit);
	font: 600 14px/17px Inter, sans-serif; color: var(--hero-diep); text-align: right;
}
.hb-chip--select { position: relative; padding: 0; }
.hb-chip--select select {
	-webkit-appearance: none; appearance: none; border: 0; background: transparent; cursor: pointer;
	padding: 8px 32px 8px 14px; border-radius: 999px; max-width: 100%;
	font: 500 14px/17px Inter, sans-serif; color: var(--hero-teal);
}
.hb-chip--select:hover { background: var(--hb-mint-hover); }
.hb-chip__pijl { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 10px; pointer-events: none; }
.hb-waarde { display: inline-flex; }

/* ── Werkvlak ────────────────────────────────────────────────────────── */
.hb-werk { background: var(--hero-mint); padding: 8px 0 64px; }
.hb-raster { display: grid; grid-template-columns: minmax(0, 736fr) minmax(360px, 432fr); gap: 32px; align-items: start; }
.hb-kaart { background: var(--hb-wit); border-radius: 32px; box-shadow: var(--hb-schaduw); }

.hb-plan { display: flex; flex-direction: column; gap: 24px; padding: 24px 20px; min-width: 0; }
.hb-plan__kop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hb-plan__titel { font-size: 17px; line-height: normal; font-weight: 600; color: var(--hero-diep); }
.hb-plan__maat { font-size: 15px; font-weight: 500; color: var(--hero-grijs); font-variant-numeric: tabular-nums; }

/* Tekening */
.hb-teken { position: relative; height: 470px; background: var(--hb-vlak); border-radius: 20px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hb-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hb-svg .hb-muur { cursor: ns-resize; touch-action: none; }
.hb-svg text { font-family: Inter, sans-serif; }
.hb-greep {
	position: absolute; left: 0; top: 0; z-index: 3; touch-action: none; cursor: ns-resize;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 6px 14px; border-radius: 999px; background: var(--hero-geel);
	font-size: 16px; line-height: 19px; font-weight: 700; color: var(--hero-diep);
	box-shadow: 0 4px 5px rgba(3, 41, 51, .18);
	transform: translate(-50%, -50%); transition: background-color .15s ease;
}
.hb-greep::before { content: ""; position: absolute; inset: -10px -6px; }
.hb-greep:hover, .hb-greep.is-actief { background: var(--hero-geel-hover); }
.hb-greep--wand { padding: 3px 10px; font-size: 13px; line-height: 16px; }
.hb-spanmaat { position: absolute; left: 0; top: 0; z-index: 2; transform: translate(-50%, -50%); }
.hb-spanmaat__knop, .hb-spanmaat__invoer {
	display: block; padding: 6px 12px; border-radius: 999px; background: var(--hero-teal); color: var(--hb-wit);
	font: 600 15px/18px Inter, sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.hb button.hb-spanmaat__knop { color: var(--hb-wit); cursor: text; }
.hb input.hb-spanmaat__invoer { width: 5.4em; border: 0; padding: 6px 12px; border-radius: 999px; font: 600 15px/18px Inter, sans-serif; text-align: center; color: var(--hb-wit); background: var(--hero-teal); }
.hb-pil {
	position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; transform: translate(-50%, -50%);
	display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
	background: var(--hero-diep); box-shadow: 0 8px 12px rgba(3, 41, 51, .25); white-space: nowrap;
}
.hb-pil__vink { display: inline-flex; padding: 2px 7px; border-radius: 999px; background: var(--hero-geel); font-size: 13px; line-height: 16px; font-weight: 700; color: var(--hero-diep); }
.hb-pil.is-fout .hb-pil__vink { background: var(--hb-fout); }
.hb-pil__maat { font-size: 18px; line-height: 22px; font-weight: 600; color: var(--hb-wit); font-variant-numeric: tabular-nums; }
.hb-pil__klasse { font-size: 15px; line-height: 18px; font-weight: 500; color: var(--hero-mint); }

/* Instellingen */
.hb-inst { position: relative; display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: flex-start; }
.hb-groep { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.hb-groep__label { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--hero-grijs); }
.hb-chips { display: flex; gap: 6px; align-items: center; }
.hb-chip--select { flex: 0 0 auto; }
.hb-pop {
	position: absolute; z-index: 5; right: 0; top: calc(100% + 8px);
	display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 20px;
	background: var(--hb-wit); box-shadow: 0 12px 28px rgba(3, 42, 50, .16);
}
.hb-pop__label { font-size: 13px; font-weight: 500; color: var(--hero-grijs); }

/* ── Advies ──────────────────────────────────────────────────────────── */
.hb-uit { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hb-advies { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--hero-teal); box-shadow: none; color: var(--hb-wit); }
.hb-advies__kop { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.hb-advies__maat { display: flex; flex-direction: column; gap: 4px; }
.hb-advies__label { font-size: 13px; line-height: normal; font-weight: 700; letter-spacing: .78px; text-transform: uppercase; color: var(--hero-mint); }
.hb-advies__profiel { font-size: 56px; line-height: 64px; font-weight: 400; color: var(--hb-wit); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-advies__sub { font-size: 15px; line-height: normal; font-weight: 500; color: var(--hero-mint); }
.hb-status { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--hero-geel); font-size: 14px; line-height: 17px; font-weight: 600; color: var(--hero-diep); white-space: nowrap; }
.hb-status.is-fout { background: var(--hb-fout); }
.hb-advies__melding { font-size: 14px; line-height: 20px; color: var(--hero-mint); }
.hb-toetsen { display: flex; flex-direction: column; gap: 10px; }
.hb-toets { display: flex; flex-direction: column; gap: 6px; }
.hb-toets__rij { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--hb-wit); }
.hb-toets__pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-toets__balk { position: relative; height: 6px; border-radius: 3px; background: var(--hero-diep); overflow: hidden; }
.hb-toets__balk span { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 3px; background: var(--hero-mint); transform-origin: left center; transform: scaleX(0); transition: transform .12s linear; }
.hb-toets.is-maatgevend .hb-toets__rij { color: var(--hero-geel); font-weight: 600; }
.hb-toets.is-maatgevend .hb-toets__balk span { background: var(--hero-geel); }
.hb-knop {
	display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%;
	padding: 12px 14px; border-radius: 4px; background: var(--hero-geel); color: var(--hero-diep);
	font-family: "Hind Madurai", Inter, sans-serif; font-weight: 500; font-size: 18px; line-height: 25px;
	text-align: center; text-decoration: none; white-space: nowrap; transition: background-color .15s ease;
}
.hb-knop__kort { display: none; }
@media (max-width: 1099px) { .hb-knop__lang { display: none; } .hb-knop__kort { display: inline; } }
@media (max-width: 379px) { .hb-knop { white-space: normal; } }
.hb a.hb-knop, .hb a.hb-knop:visited { color: var(--hero-diep); text-decoration: none; }
.hb a.hb-knop:hover { background: var(--hero-geel-hover); color: var(--hero-diep); }

/* Ook goed */
.hb-alt { display: flex; flex-direction: column; gap: 10px; padding: 28px; }
.hb-alt__titel { font-size: 17px; line-height: normal; font-weight: 600; color: var(--hero-diep); }
.hb-alt__lijst { display: flex; flex-direction: column; gap: 10px; }
.hb-alt__knop {
	display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px 10px 12px;
	border-radius: 16px; background: var(--hb-vlak); text-align: left; transition: background-color .15s ease;
}
.hb .hb-alt__knop:hover { background: var(--hero-mint); }
.hb-alt__icoon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.hb-alt__icoon span { display: block; background: var(--hb-hout); border-radius: 2px; }
.hb-alt__maat { flex: 1 1 auto; font-size: 16px; line-height: 19px; font-weight: 600; color: var(--hero-diep); font-variant-numeric: tabular-nums; }
.hb-alt__pct { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--hero-grijs); font-variant-numeric: tabular-nums; }
.hb-alt__punt { display: none; }

/* ── Onderbouwing ────────────────────────────────────────────────────── */
.hb-onder { background: var(--hb-wit); padding: 64px 0 96px; }
.hb-onder__raster { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.hb-uitklap { background: var(--hero-mint); border-radius: 32px; padding: 32px; }
.hb-uitklap summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; cursor: pointer; border-radius: 12px; }
.hb-uitklap summary::-webkit-details-marker { display: none; }
.hb-uitklap__titel { font-size: 22px; line-height: 27px; font-weight: 400; color: var(--hero-teal); }
.hb-uitklap__plus { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.hb-uitklap__plus::before, .hb-uitklap__plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 1px; background: var(--hero-teal); }
.hb-uitklap__plus::after { transform: rotate(90deg); transition: transform .15s ease; }
.hb-uitklap[open] .hb-uitklap__plus::after { transform: rotate(0); }
.hb-rijen { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.hb-rij { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; line-height: 18px; }
.hb-rij dt { color: var(--hero-grijs); font-weight: 400; }
.hb-rij dd { color: var(--hero-diep); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.hb-noscript { padding-block: 24px; }

/* ── Tussenmaten ─────────────────────────────────────────────────────── */
@media (max-width: 1439px) { .hb { --hb-gutter: clamp(16px, 8.33vw, 120px); } }
@media (max-width: 1099px) {
	.hb-raster { grid-template-columns: minmax(0, 1fr); max-width: 736px; margin-inline: auto; }
	.hb-onder__raster { max-width: 736px; margin-inline: auto; grid-template-columns: 1fr; }
	.hb-uit { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 600px) and (max-width: 1099px) {
	.hb-teken { height: auto; aspect-ratio: 696 / 470; min-height: 300px; max-height: 470px; }
	.hb-knop { white-space: normal; }
}
@media (min-width: 900px) and (max-width: 1099px) {
	.hb-uit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
	.hb-advies__profiel { font-size: 48px; line-height: 56px; }
}

/* ── Mobiel (ontwerp 390) ────────────────────────────────────────────── */
@media (max-width: 599px) {
	.hb { --hb-gutter: 16px; background: var(--hero-mint); }
	.hb-alleen-breed { display: none !important; }
	.hb-alleen-smal { display: revert !important; }
	.hb-groep.hb-alleen-smal { display: flex !important; }
	.hb-kop { padding: 32px 0 4px; }
	.hb-kop .hb-binnen { gap: 14px; }
	.hb-oogje { font-size: 12px; letter-spacing: .72px; }
	.hb-titel { font-size: 30px; line-height: 36px; }
	.hb-toepassing-rol { align-self: stretch; margin-right: calc(-1 * var(--hb-gutter)); overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
	.hb-toepassing-rol::-webkit-scrollbar, .hb-chips::-webkit-scrollbar { display: none; }
	.hb-toepassing { display: flex; width: max-content; padding: 0 var(--hb-gutter) 0 0; background: none; border-radius: 0; }
	.hb-toepassing .hb-chip { padding: 8px 14px; font-size: 14px; }
	.hb-toepassing .hb-chip:hover { background: var(--hb-wit); }
	.hb-toepassing .hb-chip[aria-pressed="true"]:hover { background: var(--hero-teal); }

	.hb-werk { padding: 16px 0 0; }
	.hb-raster { gap: 16px; }
	.hb-plan { padding: 16px; gap: 16px; }
	.hb-plan__kop { display: none; }
	.hb-teken { height: 300px; }
	.hb-greep { padding: 4px 12px; font-size: 14px; line-height: 17px; }
	.hb-greep--wand { padding: 2px 9px; font-size: 12px; }
	.hb-spanmaat__knop, .hb input.hb-spanmaat__invoer { padding: 5px 9px; font-size: 13px; line-height: 16px; }
	.hb-pil { gap: 8px; padding: 9px 14px; }
	.hb-pil__vink { display: none; }
	.hb-pil__maat { font-size: 16px; line-height: 19px; }
	.hb-pil__klasse { font-size: 13px; line-height: 16px; }
	.hb-inst { flex-direction: column; flex-wrap: nowrap; gap: 16px; }
	.hb-groep { gap: 6px; align-self: stretch; }
	.hb-groep__label { font-size: 12px; line-height: 15px; }
	.hb-chips { overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
	.hb-pop { left: 0; right: auto; top: auto; bottom: calc(100% + 8px); }

	.hb-uit { gap: 16px; }
	.hb-advies { padding: 20px; gap: 12px; }
	.hb-advies__kop { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
	.hb-advies__maat { gap: 2px; }
	.hb-advies__label { font-size: 12px; letter-spacing: .72px; }
	.hb-advies__profiel { font-size: 40px; line-height: 46px; }
	.hb-advies__sub { font-size: 14px; }
	.hb-status { padding: 6px 10px; font-size: 13px; line-height: 16px; }
	.hb-toetsen { gap: 8px; }
	.hb-toets { gap: 4px; }
	.hb-toets__rij { font-size: 13px; line-height: 16px; }
	.hb-knop { padding: 12px; }

	.hb-alt { background: none; box-shadow: none; border-radius: 0; padding: 4px 0 0; gap: 8px; }
	.hb-alt__titel { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--hero-grijs); }
	.hb-alt__lijst { flex-direction: row; flex-wrap: wrap; gap: 6px; }
	.hb-alt__knop { width: auto; gap: 0; padding: 8px 14px; border-radius: 999px; background: var(--hb-wit); }
	.hb .hb-alt__knop:hover { background: var(--hb-vlak-hover); }
	.hb-alt__icoon { display: none; }
	.hb-alt__maat, .hb-alt__pct { flex: none; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--hero-teal); }
	.hb-alt__punt { display: inline; color: var(--hero-teal); font-size: 14px; white-space: pre; }

	.hb-onder { background: var(--hero-mint); padding: 16px 0 24px; }
	.hb-onder__raster { gap: 8px; }
	.hb-uitklap { background: var(--hb-wit); border-radius: 20px; padding: 16px 20px; }
	.hb-uitklap__titel { font-size: 16px; line-height: 19px; font-weight: 600; color: var(--hero-diep); }
	.hb-rij { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.hb *, .hb *::before, .hb *::after { transition: none !important; }
}
