/* Doll.shop Keuzehulp — mobiel eerst, gebruikt de designtokens van het thema (site.css). */
.kh { --kh-gap: 16px; margin: 8px 0 40px; color: var(--body, #3d3a37); }
.kh [hidden] { display: none !important; }
.kh h2 { margin: 4px 0 8px; font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.2; color: var(--ink, #1a1917); }
.kh .eyebrow { display: inline-block; }

/* Zonder JavaScript: één lange gids; met JavaScript: één scherm tegelijk. */
.kh-screen { padding: 20px 0; border-top: 1px solid var(--line, #e6e4e0); }
.kh-screen:first-of-type { border-top: 0; }
.kh--js .kh-screen { border-top: 0; padding-top: 12px; animation: kh-in 220ms ease both; }
.kh:not(.kh--js) .kh-grid, .kh:not(.kh--js) .kh-skip { display: none; }
@keyframes kh-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kh--js .kh-screen { animation: none; } }

/* Intro */
.kh-intro { max-width: 760px; }
.kh-intro__lead { font-size: 1.05rem; line-height: 1.6; }
.kh-intro__list { margin: 16px 0 20px; padding: 0; list-style: none; counter-reset: kh; display: grid; gap: 6px; }
.kh-intro__list li { counter-increment: kh; display: flex; gap: 10px; align-items: baseline; }
.kh-intro__list li::before { content: counter(kh); flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--brand-soft, #efe9e7); color: var(--brand-deep, #4a3b39); font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.kh-intro__list a { color: inherit; text-decoration: none; }
.kh-intro__list a:hover { text-decoration: underline; }
.kh-intro__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kh-intro__actions .btn { flex: 1 1 220px; justify-content: center; }
.kh-intro__note { margin-top: 14px; font-size: .9rem; color: var(--muted, #6b6762); }

/* Voortgang */
.kh-progress { position: sticky; top: var(--kh-top, 0px); z-index: 5; background: var(--page, #fff); padding: 10px 0 8px; margin: 0 calc(var(--gutter, 16px) * -1); padding-inline: var(--gutter, 16px); border-bottom: 1px solid var(--line, #e6e4e0); }
.kh-progress__bar { height: 4px; border-radius: 4px; background: var(--tint-2, #e9e7e4); overflow: hidden; }
.kh-progress__bar span { display: block; height: 100%; width: 0; background: var(--accent, #b23b2e); transition: width 300ms ease; }
.kh-progress__row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kh-progress__steps { flex: 1; min-width: 0; display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.kh-progress__steps::-webkit-scrollbar { display: none; }
.kh-progress__steps button { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border: 0; border-radius: var(--r-pill, 999px); background: none; font: inherit; font-size: .82rem; color: var(--muted, #6b6762); cursor: pointer; white-space: nowrap; }
.kh-progress__n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--tint, #f3f2f0); font-weight: 700; font-size: .75rem; }
.kh-progress__steps .is-done .kh-progress__n { background: var(--brand-soft, #efe9e7); color: var(--brand-deep, #4a3b39); }
.kh-progress__steps .is-current { color: var(--ink, #1a1917); background: var(--tint, #f3f2f0); font-weight: 600; }
.kh-progress__steps .is-current .kh-progress__n { background: var(--brand-deep, #4a3b39); color: #fff; }
.kh-progress__label { display: none; }
.kh-reset { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line-strong, #c8c4be); border-radius: var(--r-pill, 999px); background: var(--surface, #fff); font: inherit; font-size: .82rem; font-weight: 600; color: var(--brand-deep, #4a3b39); cursor: pointer; }
.kh-reset:hover:not(:disabled) { border-color: var(--brand, #624e4c); }
.kh-reset:disabled { opacity: .45; cursor: default; }
.kh-reset__long { display: none; }
@media (min-width: 560px) { .kh-reset__long { display: inline; } .kh-reset__short { display: none; } }
/* Telefoon: alleen nummers (de vraag noemt het onderwerp al), zodat 'Opnieuw' er altijd naast past. */
@media (max-width: 719px) { .kh-progress__steps { gap: 2px; } .kh-progress__steps button { padding: 3px; } }
@media (min-width: 720px) { .kh-progress__label { display: inline; } }

/* Stap */
.kh-step { display: grid; gap: 24px; }
.kh-step__lead { margin: 0 0 12px; line-height: 1.55; }
.kh-step__multi { margin: 0 0 10px; font-size: .88rem; color: var(--muted, #6b6762); }
.kh-group { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.kh-group legend { margin-bottom: 8px; padding: 0; font-weight: 700; color: var(--ink, #1a1917); }
.kh-opts { display: grid; gap: 10px; }
.kh-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1.5px solid var(--line-strong, #c8c4be); border-radius: var(--r, 8px); background: var(--surface, #fff); color: inherit; text-decoration: none; cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .kh-opt:hover { border-color: var(--brand, #624e4c); } }
.kh-opt:focus-visible { outline: 3px solid var(--focus, #2f6fed); outline-offset: 2px; }
.kh-opt__check { flex: 0 0 22px; height: 22px; border: 2px solid var(--line-strong, #c8c4be); border-radius: 50%; display: grid; place-items: center; transition: inherit; }
[data-kh-multi] .kh-opt__check { border-radius: 6px; }
.kh-opt__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.kh-opt__label { font-weight: 700; color: var(--ink, #1a1917); font-size: 1.02rem; }
.kh-opt__hint { font-size: .86rem; line-height: 1.4; color: var(--muted, #6b6762); }
.kh-opt__count { flex: 0 0 auto; min-width: 34px; padding: 3px 8px; border-radius: var(--r-pill, 999px); background: var(--tint, #f3f2f0); font-size: .82rem; font-weight: 700; text-align: center; color: var(--body, #3d3a37); }
.kh:not(.kh--js) .kh-opt__count { display: none; }
.kh-opt.is-on { border-color: var(--brand-deep, #4a3b39); background: var(--brand-soft, #efe9e7); box-shadow: inset 0 0 0 1px var(--brand-deep, #4a3b39); }
.kh-opt.is-on .kh-opt__check { background: var(--brand-deep, #4a3b39); border-color: var(--brand-deep, #4a3b39); }
.kh-opt.is-on .kh-opt__check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.kh-opt.is-on .kh-opt__count { background: var(--brand-deep, #4a3b39); color: #fff; }
.kh-opt.is-off { opacity: .45; cursor: not-allowed; border-style: dashed; }
.kh-opt.is-off:hover { border-color: var(--line-strong, #c8c4be); }
.kh-skip { display: block; width: 100%; padding: 12px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--brand, #624e4c); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Uitleg */
.kh-explain { min-width: 0; container: kh-explain / inline-size; }
.kh-details { border-radius: var(--r, 8px); background: var(--zebra, #f7f7f5); border: 1px solid var(--line, #e6e4e0); }
.kh-details summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; color: var(--ink, #1a1917); cursor: pointer; list-style: none; }
.kh-details summary::-webkit-details-marker { display: none; }
.kh-details__title { margin: 0; font-size: 1rem; line-height: 1.35; color: inherit; }
.kh-details summary::after { content: ""; flex: 0 0 10px; height: 10px; border: solid var(--brand, #624e4c); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); transition: transform 160ms ease; }
.kh-details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.kh-details__body { padding: 0 16px 16px; font-size: .95rem; line-height: 1.6; }
.kh-details__body > p:first-child { margin-top: 0; }
.kh-points { margin: 14px 0; padding-left: 20px; display: grid; gap: 6px; list-style: disc; }
.kh-advice { margin: 14px 0; padding: 12px 14px; border-left: 4px solid var(--accent, #b23b2e); background: var(--surface, #fff); border-radius: 0 var(--r-sm, 6px) var(--r-sm, 6px) 0; }
.kh-advice p { margin: 4px 0 0; }
.kh-links { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.kh-links a { font-weight: 600; }

/* Vergelijking: tabel op brede schermen, blokken met labels op de telefoon. */
.kh-compare { margin: 14px 0; }
.kh-compare table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface, #fff); border-radius: var(--r-sm, 6px); overflow: hidden; }
.kh-compare th, .kh-compare td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line, #e6e4e0); }
.kh-compare thead th { background: var(--brand-deep, #4a3b39); color: #fff; font-size: .85rem; }
.kh-compare tbody th { color: var(--ink, #1a1917); font-weight: 700; width: 28%; }
.kh-compare tr:last-child > * { border-bottom: 0; }
@container kh-explain (max-width: 559px) {
  .kh-compare table, .kh-compare tbody, .kh-compare tr, .kh-compare th, .kh-compare td { display: block; width: auto; }
  .kh-compare thead { display: none; }
  .kh-compare tr { padding: 10px 12px; border-bottom: 1px solid var(--line, #e6e4e0); }
  .kh-compare tr:last-child { border-bottom: 0; }
  .kh-compare tbody th { padding: 0 0 6px; border: 0; width: auto; }
  .kh-compare td { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; gap: 10px; padding: 4px 0; border: 0; }
  .kh-compare td::before { content: attr(data-label); font-weight: 600; color: var(--muted, #6b6762); }
}

/* Video: laadt pas na een klik */
.kh-video { margin: 14px 0; }
.kh-video__play, .kh-video__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r, 8px); overflow: hidden; background: var(--brand-deep, #4a3b39); padding: 0; cursor: pointer; }
.kh-video__play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kh-video__icon { position: absolute; inset: 50% auto auto 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--sh-2); }
.kh-video__icon::after { content: ""; position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--accent, #b23b2e); }
.kh-video figcaption { margin-top: 6px; font-size: .85rem; color: var(--muted, #6b6762); }

/* Onderbalk: altijd binnen duimbereik */
.kh-bar:has(.kh-bar__next[hidden]) { grid-template-columns: auto 1fr; }
.kh-bar { position: sticky; bottom: 0; z-index: 6; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 12px calc(var(--gutter, 16px) * -1) 0; padding: 10px var(--gutter, 16px) calc(10px + env(safe-area-inset-bottom)); background: var(--page, #fff); border-top: 1px solid var(--line, #e6e4e0); box-shadow: 0 -6px 18px rgba(20, 20, 20, .06); }
.kh-bar__count { margin: 0; text-align: center; font-size: .9rem; line-height: 1.25; color: var(--ink, #1a1917); font-weight: 600; }
.kh-bar__count.is-none { color: var(--accent, #b23b2e); }
.kh-bar .btn { min-height: 46px; }
.kh-bar__back { padding-inline: 10px; }

/* Resultaten */
.kh-results__head { margin-bottom: 12px; }
.kh-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kh-choices p { margin: 0; color: var(--muted, #6b6762); }
.kh-choice { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; max-width: 100%; padding: 7px 34px 7px 12px; border: 1px solid var(--line-strong, #c8c4be); border-radius: var(--r, 8px); background: var(--surface, #fff) no-repeat right 12px center / 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.5 1.5l3 3L5 14H2v-3z' fill='none' stroke='%23624e4c' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); font: inherit; text-align: left; color: var(--ink, #1a1917); cursor: pointer; }
.kh-choice:hover { border-color: var(--brand, #624e4c); }
.kh-choice small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #6b6762); }
.kh-choice span { font-weight: 600; font-size: .92rem; }
.kh-results__tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-block: 1px solid var(--line, #e6e4e0); margin-bottom: 16px; }
.kh-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.kh-switch input { width: 20px; height: 20px; accent-color: var(--brand-deep, #4a3b39); }
.kh-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.kh-sort select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong, #c8c4be); border-radius: var(--r-sm, 6px); background: var(--surface, #fff); font: inherit; }
.kh-widen { margin-bottom: 16px; padding: 12px 14px; background: var(--warn-soft, #fbf0d9); border-radius: var(--r, 8px); }
.kh-widen p { margin: 0 0 8px; font-weight: 600; }
.kh-widen__list { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-widen .chip { cursor: pointer; }
.kh-results__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.kh-results__actions .btn { flex: 1 1 240px; justify-content: center; }

@media (min-width: 960px) {
  .kh-step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .kh-explain { position: sticky; top: calc(var(--header-h, 56px) + 90px); }
  .kh-bar { margin-inline: 0; border-radius: var(--r, 8px) var(--r, 8px) 0 0; }
  .kh-skip { width: auto; padding-inline: 0; }
}
