/* Gedeelde stijl voor de 3D-vragenpagina's ({categorie}/vragen/), zie shared/quiz3d.js.
   Pagina-specifieke aanvullingen staan in een inline <style> ná deze link. */
:root {
  --c-bg: #f5f5f7;
  --c-text: #1d1d1f;
  --c-text-2: #515154;
  --c-text-3: #86868b;
  --c-accent: #0954a3;
  --c-line: rgba(0,0,0,.08);
  --ease: cubic-bezier(.22,.8,.26,1);
  --dur: .75s;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}

.test-head, .q3d-head {
  max-width: var(--site-max-width, 1240px);
  margin: 0 auto;
  padding: 28px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.q3d-head { flex-direction: column; gap: 0; }
.q3d-intro { max-width: 640px; margin: 8px auto 0; text-align: center; font-size: 15px; line-height: 1.5; color: var(--c-text-2); }
.test-head h1, .q3d-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.test-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-accent) 18%, transparent); border-radius: 999px; padding: 4px 10px;
}

.wrap { max-width: var(--site-max-width, 1240px); margin: 0 auto 56px; padding: 0 16px; }
.shell { position: relative; }

/* ───────── het podium: render + overlays ───────── */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1242.21 / 630.138;
  border-radius: 22px;
  overflow: hidden;
  background: #d9d2c7;
  box-shadow: 0 30px 60px -30px rgba(40,30,15,.35), 0 2px 10px rgba(0,0,0,.05);
  isolation: isolate;
}
.scene { position: absolute; inset: 0; }
.room {
  position: absolute;
  max-width: none;
  opacity: 0;
  transition: opacity var(--dur) ease, transform 1.1s var(--ease);
  user-select: none;
  pointer-events: none;
}
.room.is-on { opacity: 1; }

/* labels die aan de 3D-wereld vastzitten */
.tag {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--c-text);
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: left var(--dur) var(--ease), top var(--dur) var(--ease), opacity .4s ease;
}
.tag.is-on { opacity: 1; }
.tag b { color: var(--c-accent); font-weight: 700; }
.tag .muted { color: var(--c-text-3); font-weight: 500; }

.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* uitleg-chip rechtsonder */
.caption {
  position: absolute; right: 18px; bottom: 18px; z-index: 6;
  max-width: min(400px, 44%);
  background: rgba(20,20,22,.72);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  color: #fff; border-radius: 14px; padding: 11px 15px;
  font-size: 13.5px; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  transition: opacity .35s ease, transform .35s ease;
}
.caption.is-top { top: 18px; bottom: auto; }
.caption.is-swap { opacity: 0; transform: translateY(4px); }
.caption strong { font-weight: 700; display: block; margin-bottom: 1px; }

/* voortgang */
.progress { position: absolute; left: 0; top: 0; right: 0; height: 3px; z-index: 7; background: rgba(255,255,255,.35); }
.progress i { display: block; height: 100%; background: var(--c-accent); width: 0; transition: width .6s var(--ease); }

/* ───────── vraagkaart ───────── */
.card {
  position: absolute; z-index: 8;
  left: 22px; top: 22px;
  max-height: calc(100% - 44px);
  width: min(372px, 34%);
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.80);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 50px -12px rgba(40,30,15,.28);
}
.step { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); margin: 0 0 8px; }
.q-title { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.q-sub { font-size: 13px; color: var(--c-text-2); margin: 0 0 12px; line-height: 1.45; }
.why { background: none; border: 0; padding: 0; margin: 0 0 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--c-text-2); cursor: pointer; text-align: left; display: inline-flex; gap: 5px; align-items: center; }
.why:hover { color: var(--c-accent); }
.why-text { display: none; font-size: 12.5px; line-height: 1.5; color: var(--c-text-2); margin: -4px 0 12px; }
.why-text.is-open { display: block; }
.answers { display: grid; gap: 7px; overflow-y: auto; margin: 0 -4px; padding: 2px 4px 4px; flex: 0 1 auto; align-content: start; }
.answers.two { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92);
  border: 1.5px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px; font-weight: 500; line-height: 1.3;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.opt:hover { border-color: color-mix(in srgb, var(--c-accent) 30%, transparent); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #b9b9bf; flex-shrink: 0; background: #fff; transition: all .2s; }
.opt.is-check .dot { border-radius: 5px; }
.opt:has(input:checked) { border-color: color-mix(in srgb, var(--c-accent) 60%, transparent); background: color-mix(in srgb, var(--c-accent) 6%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 12%, transparent); }
.opt:has(input:checked) .dot { background: var(--c-accent); border-color: var(--c-accent); box-shadow: inset 0 0 0 3px #fff; }
.opt.is-check:has(input:checked) .dot { box-shadow: none; background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.opt:focus-within { outline: 2px solid color-mix(in srgb, var(--c-accent) 45%, transparent); outline-offset: 1px; }
.opt .price { white-space: nowrap; padding-left: 6px; margin-left: auto; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--c-text-3); opacity: .7; }
.opt .advised { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, transparent); padding: 2px 6px; border-radius: 999px; }
.answers.two .opt { padding: 9px 11px; font-size: 13.5px; }
.hint { min-height: 18px; font-size: 12.5px; color: #b3261e; margin: 6px 0 0; }
.nav { display: flex; gap: 8px; margin-top: 8px; }
.btn {
  font: inherit; font-size: 14.5px; font-weight: 600;
  border-radius: 999px; padding: 11px 18px; cursor: pointer; border: 0;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn-back { background: rgba(255,255,255,.9); color: var(--c-accent); border: 1.5px solid color-mix(in srgb, var(--c-accent) 28%, transparent); }
.btn-next { flex: 1; background: var(--c-accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--c-accent) 30%, transparent); }
.btn:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

.q-body { display: flex; flex-direction: column; min-height: 0; flex: 1; transition: opacity .25s ease, transform .25s ease; }
.q-body.is-out { opacity: 0; transform: translateX(-6px); }

.below { max-width: 760px; margin: 22px auto 0; text-align: center; color: var(--c-text-2); font-size: 14px; line-height: 1.6; }
.below a { color: var(--c-accent); font-weight: 600; }

.loading {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
  background: #e7e1d7; transition: opacity .6s ease;
  font-size: 13px; color: #7a7266; font-weight: 600;
}
.loading.is-done { opacity: 0; pointer-events: none; }

@media (max-width: 1100px) {
  .caption { max-width: 40%; font-size: 12.5px; }
  .q-title { font-size: 19px; }
}

/* ───────── mobiel: beeld boven, kaart eronder ───────── */
@media (max-width: 900px) {
  .test-head, .q3d-head { padding: 18px 16px 12px; }
  .test-head h1, .q3d-head h1 { font-size: 21px; }
  .q3d-intro { font-size: 13.5px; margin-top: 6px; }
  /* beeld en kaart sluiten op mobiel als één blok op elkaar aan */
  .stage { aspect-ratio: 1 / 0.92; border-radius: 18px 18px 0 0; overflow: hidden; }
  .shell { position: relative; }
  .card {
    position: relative; left: auto; top: auto; bottom: auto; width: auto;
    margin-top: 0; border-radius: 0 0 18px 18px;
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    padding: 20px 16px 16px;
  }
  .answers { overflow: visible; }
  .caption {
    position: static; max-width: none; margin: 0; padding: 0 2px;
    background: none; color: var(--c-text-2);
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
    font-size: 13px; border-radius: 0; flex: 1;
  }
  .caption strong { color: var(--c-text); }
  .tag { font-size: 11.5px; padding: 5px 10px; }
}
 
/* maatlijnen en hotspots op de koelkast */
.fx line { stroke: var(--c-accent); stroke-width: 1.6; }
.fx .tick { stroke-width: 1.6; }
.fx .dash { stroke-dasharray: 5 4; }
.fx .fade { transition: opacity .45s ease; }
.spot {
  position: absolute; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--c-accent); box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 4px 12px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .35s ease, left .6s var(--ease), top .6s var(--ease);
  pointer-events: none;
}
.spot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--c-accent) 60%, transparent); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.spot.is-on { opacity: 1; }
.spot-label {
  position: absolute; transform: translateY(-50%);
  background: rgba(255,255,255,.95); color: var(--c-text);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  opacity: 0; transition: opacity .35s ease, left .6s var(--ease), top .6s var(--ease);
  pointer-events: none;
}
.spot-label.is-on { opacity: 1; }
.spot-label b { color: var(--c-accent); }
@media (max-width: 900px) {
  .spot-label { font-size: 11px; padding: 4px 8px; }
  .caption { position: static; max-width: none; margin: 0 0 14px; padding: 10px 12px;
    background: #f3f6fa; color: var(--c-text-2); -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: none; font-size: 13px; border-radius: 12px; }
  .caption strong { color: var(--c-text); }
}
 

/* transparante lagen boven de basisrender */
.layers { position: absolute; inset: 0; pointer-events: none; }
.room.layer { transition: opacity .5s ease; }
.fx .leader { stroke: #fff; stroke-width: 1.5; opacity: .9; }

/* tv op de muur */
.tv-glow {
  position: absolute;
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.5);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur) var(--ease), opacity .9s ease;
}
.tv {
  position: absolute;
  background: #0a0a0b;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: left var(--dur) var(--ease), top var(--dur) var(--ease),
              width var(--dur) var(--ease), height var(--dur) var(--ease),
              opacity .5s ease, box-shadow .9s ease;
}
.tv.is-on { opacity: 1; }
.tv::after {           /* dunne lichtrand van het aluminium frame */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 -1px 0 rgba(255,255,255,.12);
  pointer-events: none;
}
.screen {
  position: absolute;
  inset: var(--bezel, 2px);
  overflow: hidden;
  background: #000;
  border-radius: 1px;
}
.screen img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s ease, filter .7s ease;
}
.screen img.is-on { opacity: 1; }
.screen .sheen {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.16) 46%, rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 40%);
  opacity: var(--sheen, .35);
  transition: opacity .9s ease;
}
.screen .letterbox::before, .screen .letterbox::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12.9%; background: #000;
  transition: transform .6s var(--ease);
}
.screen .letterbox::before { top: 0; transform: translateY(-100%); }
.screen .letterbox::after { bottom: 0; transform: translateY(100%); }
.screen .letterbox.is-on::before, .screen .letterbox.is-on::after { transform: none; }
.letterbox { position: absolute; inset: 0; pointer-events: none; }

/* HUD's op het scherm, geschaald op schermbreedte */
.hud {
  position: absolute; inset: 0; pointer-events: none;
  font-size: calc(var(--sw, 400) * 0.026px);
  font-family: 'Inter', sans-serif; color: #fff;
  opacity: 0; transition: opacity .5s ease;
}
.hud.is-on { opacity: 1; }
.hud .score {
  position: absolute; left: 4%; top: 6%;
  display: flex; align-items: stretch; border-radius: .35em; overflow: hidden;
  font-weight: 700; font-size: 1.05em; box-shadow: 0 .2em .6em rgba(0,0,0,.3);
}
.hud .score span { padding: .35em .6em; background: rgba(12,16,28,.86); }
.hud .score .t { background: #f2f2f2; color: #111; }
.hud .score .m { background: var(--c-accent); font-variant-numeric: tabular-nums; }
.hud .speed { position: absolute; right: 5%; bottom: 8%; text-align: right; font-weight: 800; line-height: .9; text-shadow: 0 .1em .4em rgba(0,0,0,.5); }
.hud .speed b { font-size: 3.2em; font-style: italic; letter-spacing: -.02em; }
.hud .speed small { display: block; font-size: .8em; opacity: .85; letter-spacing: .1em; }
.hud .pos { position: absolute; left: 4%; top: 6%; font-weight: 800; font-size: 1.5em; font-style: italic; text-shadow: 0 .1em .4em rgba(0,0,0,.5); }
.hud .pos small { font-size: .55em; opacity: .85; font-style: normal; margin-left: .3em; }
.hud .lap { position: absolute; right: 5%; top: 7%; font-weight: 700; font-size: .95em; background: rgba(0,0,0,.45); padding: .3em .7em; border-radius: .3em; }
.hud .bug { position: absolute; right: 4%; top: 6%; font-weight: 800; font-size: .95em; opacity: .9; letter-spacing: .02em; }
.hud .lower {
  position: absolute; left: 4%; bottom: 9%; display: flex; flex-direction: column; gap: .15em;
}
.hud .lower b { background: #fff; color: #111; font-size: 1em; padding: .25em .6em; border-radius: .2em .2em .2em 0; width: fit-content; }
.hud .lower span { background: color-mix(in srgb, var(--c-accent) 92%, transparent); font-size: .85em; padding: .25em .6em; width: fit-content; border-radius: 0 .2em .2em .2em; }


/* toelichting achter een antwoord, bijv. de inhoud in liters */
.opt .muted { color: var(--c-text-3); font-weight: 400; }

/* uitleg in de kaart (cfg.captionInCard of mobiel) */
.card .caption { position: static; max-width: none; margin: 0 0 14px; padding: 10px 12px;
  background: #f3f6fa; color: var(--c-text-2); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none; font-size: 13px; border-radius: 12px; }
.card .caption strong { color: var(--c-text); }

/* ───────── uitleg onder de keuzehulp: hoe het werkt + alle vragen als gewone tekst (SEO) ───────── */
.uitleg { margin: 26px 0 8px; }   /* staat binnen main.wrap (breedte en marges komen daarvandaan) */
/* uitklapknop zoals op de oude vragenpagina's; de tekst staat gewoon in de HTML (SEO) */
.uitleg > summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 0 auto; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-text-2); background: rgba(255,255,255,.7); border: 1px solid var(--c-line); transition: background .2s ease, color .2s ease; }
.uitleg > summary::-webkit-details-marker { display: none; }
.uitleg > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.uitleg[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.uitleg > summary:hover { color: var(--c-accent); background: #fff; }
.uitleg[open] > summary { margin-bottom: 26px; }
.uitleg h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 10px; }
.uitleg > p { max-width: 820px; color: var(--c-text-2); font-size: 15px; line-height: 1.65; margin: 0 0 22px; }
.uitleg .stappen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 34px; padding: 0; list-style: none; }
.uitleg .stappen li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.uitleg .stappen .nr { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.uitleg .stappen strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.uitleg .stappen span { font-size: 13.5px; color: var(--c-text-2); line-height: 1.45; }
.uitleg .vragen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.uitleg .vraag { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.uitleg .vraag h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; line-height: 1.35; }
.uitleg .vraag p { font-size: 13.5px; color: var(--c-text-2); line-height: 1.55; margin: 0; }
@media (max-width: 900px) {
  .uitleg { margin: 20px 0 4px; }
  .uitleg .stappen, .uitleg .vragen { grid-template-columns: 1fr; }
}
