/* ============================================================================
   answer.css — Burgerzaken Assistent (herontwerp)
   Gelaagd antwoord: VERDICT (laag 1) → ONDERBOUWING (laag 2) → VERDIEPING (laag 3).
   Doel: lage cognitieve last, progressive disclosure, vertrouwen ook bij twijfel.
   ============================================================================ */

/* ============================================================================
   HOE WERKT HET? — onboarding-modal
   ============================================================================ */
.howto-backdrop {
  position: fixed; inset: 0; z-index: 85;
  background: color-mix(in oklch, var(--ink-900) 26%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: set-fade 140ms ease;
}
.howto-modal {
  width: min(540px, 100%); max-height: 88vh; overflow-y: auto; overflow-x: hidden;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); box-shadow: var(--sh-lg);
  animation: palette-in var(--dur-slow) var(--ease);
}
.howto-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  padding: 20px 20px 14px; border-bottom: 1px solid var(--line);
}
.howto-kicker {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}
.howto-head h2 {
  margin: 5px 0 0; font-family: var(--f-display); font-weight: 600;
  font-size: 21px; letter-spacing: -0.01em; color: var(--ink-900);
}
.howto-steps { list-style: none; margin: 0; padding: 14px 20px 6px; display: flex; flex-direction: column; gap: 2px; }
.howto-step { display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 12px; padding: 12px 0; border-top: 1px solid color-mix(in oklch, var(--line) 60%, transparent); }
.howto-step:first-child { border-top: 0; }
.howto-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 99px; margin-top: 2px;
  background: var(--accent-wash); color: var(--accent);
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
}
.howto-ico {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--field-sunk); color: var(--ink-700);
}
.howto-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.howto-title { font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink-900); }
.howto-body { font-size: 13.5px; line-height: 1.55; color: var(--ink-700); }
.howto-foot {
  display: flex; align-items: center; gap: var(--s4); justify-content: space-between;
  padding: 14px 20px 18px; border-top: 1px solid var(--line); margin-top: 8px;
}
.howto-note { font-size: 12px; line-height: 1.45; color: var(--ink-500); max-width: 34ch; }
.howto-btn {
  flex-shrink: 0; height: 40px; padding: 0 18px; border: 0; border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent); cursor: pointer;
  font: 540 13.5px var(--f-body);
  transition: background var(--dur) var(--ease);
}
.howto-btn:hover { background: var(--accent-hover); }
@media (prefers-reduced-motion: reduce) { .howto-modal, .howto-backdrop { animation: none; } }
@media (max-width: 560px) { .howto-foot { flex-direction: column; align-items: stretch; } .howto-btn { width: 100%; } }

/* ============================================================================
   ZOEK-PALET (command palette)
   ============================================================================ */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in oklch, var(--ink-900) 24%, transparent);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px; animation: set-fade 140ms ease;
}
.palette {
  width: min(560px, 100%); max-height: 64vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); box-shadow: var(--sh-lg); overflow: hidden;
  animation: palette-in var(--dur-slow) var(--ease);
}
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.palette-input {
  display: flex; align-items: center; gap: var(--s3);
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.palette-input > svg { color: var(--ink-500); flex-shrink: 0; }
.palette-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--f-body); font-size: 16px; color: var(--ink-900);
}
.palette-input input::placeholder { color: var(--ink-400); }
.palette-esc {
  flex-shrink: 0; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-500);
  border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  padding: 2px 6px; background: var(--field-sunk);
}
.palette-results { overflow-y: auto; padding: 8px; }
.palette-action, .palette-item {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  padding: 9px 11px; border: 0; border-radius: var(--r-md); background: transparent;
  cursor: pointer; color: var(--ink-900); font-family: var(--f-body); font-size: 14px;
  transition: background 120ms ease;
}
.palette-action:hover, .palette-item:hover { background: var(--accent-wash); }
.palette-action { color: var(--accent); font-weight: 540; }
.pa-ico, .pi-ico {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--field-sunk); color: var(--ink-700);
}
.palette-action .pa-ico { background: var(--accent-wash); color: var(--accent); }
.pi-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-title mark { background: color-mix(in oklch, var(--blue-200) 60%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.palette-group { margin-top: 6px; }
.palette-group-label {
  font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-500); padding: 8px 11px 4px;
}
.palette-empty { padding: 22px 12px; text-align: center; color: var(--ink-500); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .palette, .palette-backdrop { animation: none; } }

/* ---- message column ---------------------------------------------------- */
.thread { padding: var(--s7) 0 var(--s4); }
.msg { width: 100%; max-width: var(--rail); margin: 0 auto var(--s6); padding: 0 var(--s5); }
.msg-user { display: flex; justify-content: flex-end; }
.user-bubble {
  max-width: 84%; padding: 11px 16px;
  border-radius: var(--r-lg) var(--r-lg) var(--r-xs) var(--r-lg);
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  color: var(--ink-900); font-size: 15px; line-height: 1.55;
}
.msg-assistant { display: flex; gap: var(--s4); align-items: flex-start; }
.msg-assistant.full { display: block; }
.avatar {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px; box-shadow: var(--sh-sm);
}
.assistant-body { min-width: 0; flex: 1; }

/* ============================================================================
   LAAG 1 — VERDICT  (altijd zichtbaar: status, zekerheid, antwoord, vervolgstap)
   ============================================================================ */
.verdict {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); overflow: hidden; box-shadow: var(--sh-sm);
  /* --vc = verdict-kleur, per status gezet */
  --vc: var(--ok); --vc-wash: var(--ok-wash); --vc-line: var(--ok-line);
}
.verdict.gegrond     { --vc: var(--ok);    --vc-wash: var(--ok-wash);    --vc-line: var(--ok-line); }
.verdict.let-op      { --vc: var(--warn);  --vc-wash: var(--warn-wash);  --vc-line: var(--warn-line); }
.verdict.onvoldoende { --vc: var(--neutral-status); --vc-wash: color-mix(in oklch, var(--ink-500) 8%, var(--surface)); --vc-line: var(--line-strong); }

/* statusregel bovenaan — rustig: hairline-scheiding, gekleurd icoon, geen wash */
.v-status {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 15px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.v-status::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--vc);
}
.v-status-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--vc);
}
.v-status-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.v-status-label {
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  color: var(--ink-900); letter-spacing: -0.005em;
}
.v-status-sub { font-size: 12.5px; color: var(--ink-500); }

/* zekerheid — rustige typografische aanduiding, geen signaalbalken */
.v-zeker {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: baseline; gap: 6px;
}
.v-zeker-k {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-500);
}
.v-zeker-v {
  font-family: var(--f-display); font-weight: 600; font-size: 13.5px; color: var(--ink-900);
  position: relative; padding-left: 13px;
}
.v-zeker-v::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 99px; background: var(--vc);
}
.v-zeker.z-midden .v-zeker-v::before { background: color-mix(in oklch, var(--vc) 55%, var(--line-strong)); }
.v-zeker.z-laag .v-zeker-v::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--vc); }

/* body van de verdict-kaart */
.v-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: var(--s5); }

/* conflict / gewijzigd-recht banner */
.v-conflict {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r-md);
  background: var(--warn-wash); border: 1px solid var(--warn-line);
}
.v-conflict svg { color: var(--orange-600); flex-shrink: 0; margin-top: 1px; }
.v-conflict-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.v-conflict-title {
  font-family: var(--f-display); font-weight: 600; font-size: 14px;
  color: var(--warn); letter-spacing: 0.02em;
}
.v-conflict-text { font-size: 13.5px; line-height: 1.55; color: var(--ink-700); }
.v-conflict-text b { color: var(--ink-900); }
.v-conflict-ident {
  align-self: flex-start; font: var(--mono-sm); letter-spacing: var(--mono-sm-ls);
  color: var(--ink-700); background: var(--surface); border: 1px solid var(--warn-line);
  border-radius: var(--r-xs); padding: 2px 7px;
}

/* het korte antwoord — leesbaar, kalm, het verdict */
.v-kort {
  font-family: var(--f-body); font-size: 17.5px; line-height: 1.62; color: var(--ink-900);
  max-width: 60ch;
}
.v-kort b { font-weight: 600; }

/* vervolgstap — oranje accent dat stuurt, geen schreeuwende callout.
   Eén hairline + smalle oranje kantlijn, geen getint vlak. */
.next-step {
  display: flex; flex-direction: column; gap: 4px;
  padding: 2px 0 2px 16px; margin-top: 2px;
  border-left: 2px solid var(--accent);
}
.next-step-kicker {
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--orange-700);
}
.dark .next-step-kicker { color: var(--orange-400); }
.next-step-label { font-family: var(--f-display); font-weight: 600; font-size: 15.5px; color: var(--ink-900); }
.next-step-sub { font-size: 13.5px; line-height: 1.55; color: var(--ink-700); max-width: 56ch; }
.next-step-btn {
  margin-top: 9px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-md);
  background: transparent; color: var(--accent); cursor: pointer;
  border: 1px solid var(--accent-line);
  font: 540 13px var(--f-body);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.next-step-btn:hover { background: var(--orange-050); border-color: var(--accent); }
.next-step-btn svg { flex-shrink: 0; }

/* ============================================================================
   LAGEN 2 & 3 — accordions (onderbouwing, verdieping)
   ============================================================================ */
.layer { border-top: 1px solid var(--line); }
.layer > summary {
  display: flex; align-items: center; gap: var(--s3); padding: 14px 20px; cursor: pointer;
  list-style: none; user-select: none;
}
.layer > summary::-webkit-details-marker { display: none; }
.layer-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-md); flex-shrink: 0;
  background: var(--field-sunk); color: var(--ink-700);
}
.layer-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.layer-title { font-family: var(--f-display); font-weight: 600; font-size: 14.5px; color: var(--ink-900); }
.layer-hint { font-size: 12px; color: var(--ink-500); }
.layer-meta {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-family: var(--f-mono); font-size: 11px; color: var(--ink-500);
}
.layer-meta .chev { transition: transform var(--dur) var(--ease); }
.layer[open] > summary .chev { transform: rotate(180deg); }
.layer[open] > summary .layer-ico { background: var(--accent-wash); color: var(--accent); }
.layer:hover > summary .layer-ico { background: var(--accent-wash); color: var(--accent); }
.layer-body { padding: 2px 20px 22px; }
@media (prefers-reduced-motion: no-preference) {
  .layer[open] > .layer-body { animation: layer-reveal var(--dur-slow) var(--ease); }
}
@keyframes layer-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- zekerheidssplitsing (laag 2 boven) — rustig, met relevantie-hiërarchie:
   "Dit is zeker" is de focus; interpretatie en controlepunten treden terug. */
.split { display: flex; flex-direction: column; gap: var(--s5); }
.split-col { display: flex; flex-direction: column; }
.split-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  --sc: var(--ink-500);
}
.split-col.zeker         { --sc: var(--ok); }
.split-col.interpretatie { --sc: var(--blue-600); }
.split-col.controleren   { --sc: var(--warn); }
.split-rule { width: 7px; height: 7px; border-radius: 99px; background: var(--sc); flex-shrink: 0; }
.split-title {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-500);
}
.split-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.split-item {
  display: flex; gap: 11px; padding: 7px 0; line-height: 1.55;
  font-size: 14px; color: var(--ink-700);
}
/* focus: wat zeker is leest groter en donkerder dan de kanttekeningen */
.split-col.zeker .split-item { font-size: 15px; color: var(--ink-900); padding: 8px 0; }
.split-item .si-tick { color: var(--sc); flex-shrink: 0; margin-top: 3px; display: inline-flex; }
.split-col.zeker .si-tick { margin-top: 4px; }
.si-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--sc); margin: 7px 5px; }
.si-text { min-width: 0; }
.si-ref {
  margin-left: 7px; font: var(--mono-sm); letter-spacing: var(--mono-sm-ls);
  color: var(--ink-700); background: transparent; border: 0;
  border-bottom: 1px dotted var(--ink-400); border-radius: var(--r-xs);
  padding: 0 0 1px; cursor: pointer; vertical-align: 1px; white-space: nowrap;
}
.si-ref:hover { color: var(--link); border-bottom-color: var(--link); }

/* ---- bronnen (laag 2 onder) — modulaire source-cards ------------------- */
.bronnen-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  margin: var(--s5) 0 var(--s3);
}
.bronnen-head-title {
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
}
.bronnen-grid { display: grid; gap: var(--s3); }
.bron-card {
  display: grid; grid-template-columns: 4px 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  --lc: var(--layer-procedure);
}
.bron-card.procedure   { --lc: var(--layer-procedure); }
.bron-card.wet         { --lc: var(--layer-wet); }
.bron-card.rechtspraak { --lc: var(--layer-rechtspraak); }
.bron-card:hover { border-color: var(--accent-line); box-shadow: var(--sh-sm); }
.bron-strip { background: var(--lc); }
.bron-main { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.bron-top { display: flex; align-items: flex-start; gap: var(--s3); }
.bron-layer {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--lc);
}
.bron-layer svg { color: var(--lc); }
.bron-status {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--ink-500);
  background: transparent; border: 0; padding: 0;
}
.bron-status::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--ink-400); flex-shrink: 0; }
.bron-status.geldig    { color: var(--ok); }
.bron-status.geldig::before    { background: var(--ok); }
.bron-status.vervallen { color: var(--warn); }
.bron-status.vervallen::before { background: var(--warn); }
.bron-title { font-weight: 600; font-size: 14.5px; color: var(--ink-900); line-height: 1.35; }
.bron-ident {
  font: var(--mono-sm); letter-spacing: var(--mono-sm-ls); color: var(--ink-500);
  background: transparent; border: 0; border-radius: var(--r-xs);
  padding: 0; align-self: flex-start;
}
.bron-snippet {
  font-size: 13px; line-height: 1.55; color: var(--ink-500);
  padding-left: 11px; border-left: 2px solid color-mix(in oklch, var(--lc) 32%, var(--line));
}
.bron-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: 1px; }
.bron-datum { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-500); }
.bron-open {
  display: inline-flex; align-items: center; gap: 6px;
  font: 540 12.5px var(--f-body); color: var(--link);
  background: transparent; border: 0; cursor: pointer; padding: 4px 2px;
}
.bron-open:hover { text-decoration: underline; text-underline-offset: 2px; }
.bron-open svg { flex-shrink: 0; }

/* ---- trace (laag 3) ---------------------------------------------------- */
.trace-list { display: flex; flex-direction: column; }
.trace-row { display: flex; align-items: flex-start; gap: var(--s3); padding: 10px 0; border-top: 1px solid color-mix(in oklch, var(--line) 70%, transparent); }
.trace-row:first-child { border-top: 0; }
.ts-check {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: var(--r-pill);
  background: var(--ok-wash); color: var(--ok); margin-top: 1px;
}
.ts-label { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-900); display: flex; flex-direction: column; gap: 3px; }
.ts-out { font-size: 12.5px; color: var(--ink-500); }
.ts-dur { font-family: var(--f-mono); font-size: 11px; color: var(--ink-500); flex-shrink: 0; }
.trace-foot {
  margin-top: var(--s4); padding: 11px 13px; border-radius: var(--r-md);
  background: var(--blue-050); border: 1px solid var(--accent-line);
  font-size: 12.5px; line-height: 1.5; color: var(--ink-700);
  display: flex; gap: 9px; align-items: flex-start;
}
.trace-foot svg { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ---- actiebalk onderaan de kaart --------------------------------------- */
.v-actions {
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.v-act {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-700); font: 540 13px var(--f-body); cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.v-act:hover { border-color: var(--accent-line); color: var(--ink-900); box-shadow: var(--sh-sm); }
.v-act svg { flex-shrink: 0; }
.v-act-spacer { flex: 1; }
.v-iconbtn {
  width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--ink-500); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.v-iconbtn:hover { background: color-mix(in oklch, var(--ink-900) 6%, transparent); color: var(--ink-900); }
.v-iconbtn.on { color: var(--ok); }

/* AI-disclosure strip onder de kaart */
.ai-disclosure {
  display: flex; align-items: center; gap: 8px; margin: var(--s3) 0 0; padding-left: 2px;
  font-size: 11.5px; color: var(--ink-500); font-family: var(--f-mono); letter-spacing: 0.01em;
}
.ai-disclosure svg { color: var(--ink-400); flex-shrink: 0; }

/* ---- privacy-strook bovenaan eerste antwoord --------------------------- */
.privacy-note {
  display: flex; align-items: center; gap: 9px; max-width: var(--rail);
  margin: 0 auto var(--s4); padding: 0 var(--s5);
}
.privacy-note-inner {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 13px; border-radius: var(--r-md);
  background: var(--blue-050); border: 1px solid var(--accent-line);
  font-size: 12.5px; color: var(--ink-700);
}
.privacy-note-inner svg { color: var(--accent); flex-shrink: 0; }
.privacy-note-inner b { color: var(--ink-900); font-weight: 600; }

/* ============================================================================
   PROGRESS (streaming) — kalme lichtblauwe voortgang
   ============================================================================ */
.progress { margin: var(--s2) 0 var(--s4); }
.progress-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.progress-head .pulse { position: relative; width: 9px; height: 9px; }
.progress-head .pulse::before { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--accent); animation: ping 1.6s cubic-bezier(0,0,0.2,1) infinite; }
.progress-head .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--accent); }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
.progress-head .ph-text { font-size: 14.5px; font-weight: 600; color: var(--ink-900); }
.steps { list-style: none; margin: 0; padding: 0; }
.step-row { display: flex; gap: var(--s3); }
.step-marker { position: relative; display: flex; flex-direction: column; align-items: center; width: 18px; flex-shrink: 0; }
.step-marker .sm-dot { width: 16px; height: 16px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; color: #fff; }
.step-marker .sm-line { flex: 1; width: 1.5px; background: var(--line); margin: 3px 0; }
.step-row.complete .sm-dot { background: var(--ok); }
.step-row.complete .sm-line { background: color-mix(in oklch, var(--ok) 45%, var(--line)); }
.step-row.active .sm-dot { background: var(--accent); animation: dotpulse 1.4s ease-in-out infinite; }
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 40%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 0%, transparent); } }
.step-row.pending .sm-dot { background: var(--line); }
.step-content { flex: 1; min-width: 0; padding-bottom: var(--s4); }
.step-label { font-size: 14px; font-weight: 500; color: var(--ink-900); display: flex; align-items: baseline; gap: var(--s2); }
.step-row.pending .step-label { color: var(--ink-400); font-weight: 400; }
.step-label .sl-timer { font-family: var(--f-mono); font-size: 11px; color: var(--ink-500); margin-left: auto; }
.step-outcome { font-size: 12.5px; color: var(--ink-500); margin-top: 3px; display: flex; gap: 6px; }
.step-outcome .so-arrow { color: var(--ink-400); }
.answer-skel { padding-left: 30px; margin-top: var(--s2); display: flex; flex-direction: column; gap: 9px; }
.skel-bar { height: 11px; border-radius: 4px; background: linear-gradient(90deg, var(--line) 0%, color-mix(in oklch, var(--line) 50%, var(--surface)) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.step-row.active .step-label .sl-text {
  color: var(--accent);
}
@keyframes scan { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) {
  .progress-head .pulse::before, .step-row.active .sm-dot, .skel-bar, .layer[open] > .layer-body { animation: none !important; }
  .step-row.active .step-label .sl-text { -webkit-text-fill-color: var(--ink-900); color: var(--ink-900); }
}

/* ============================================================================
   BRON-PANEEL (bewijs-rail) — slide-in drawer
   ============================================================================ */
.drawer-scrim { position: fixed; inset: 0; z-index: 70; background: color-mix(in oklch, var(--ink-900) 26%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: set-fade 140ms ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 72;
  width: min(460px, 92vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: var(--sh-lg);
  animation: drawer-in var(--dur-slow) var(--ease);
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; gap: var(--s3); padding: 16px 18px;
  border-bottom: 1px solid var(--line); --lc: var(--layer-wet);
}
.drawer-head .dh-layer {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: var(--r-md); background: color-mix(in oklch, var(--lc) 14%, var(--surface)); color: var(--lc); flex-shrink: 0;
}
.drawer-head-titles { flex: 1; min-width: 0; }
.dh-kicker { font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lc); }
.dh-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--ink-900); line-height: 1.25; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: var(--s4); }
.drawer-field { display: flex; flex-direction: column; gap: 6px; }
.drawer-field-label { font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-500); }
.drawer-ident { font: var(--mono); letter-spacing: var(--mono-ls); color: var(--ink-900); background: var(--field-sunk); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 7px 10px; align-self: flex-start; }
.drawer-passage {
  font-size: 15px; line-height: 1.65; color: var(--ink-900);
  padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid color-mix(in oklch, var(--lc) 34%, var(--line));
}
.drawer-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.drawer-meta { padding: 11px 13px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.drawer-meta-k { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 3px; }
.drawer-meta-v { font-size: 13.5px; font-weight: 540; color: var(--ink-900); }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.drawer-link {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; white-space: nowrap;
  border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer;
  font: 540 13.5px var(--f-body); text-decoration: none;
}
.drawer-link:hover { background: var(--accent-hover); }

/* ---- toast ------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: var(--s3); padding: 12px 18px; border-radius: 99px;
  background: var(--ink-900); color: var(--paper); font-size: 13.5px; box-shadow: var(--sh-lg);
  animation: toast-in 240ms var(--ease);
}
.dark .toast { background: var(--surface-raised); border: 1px solid var(--line-strong); }
.toast svg { color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes set-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast, .drawer, .drawer-scrim { animation: none; } }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .rail, .msg, .composer-tray, .empty, .privacy-note { padding-left: var(--s4); padding-right: var(--s4); }
  .starters { grid-template-columns: 1fr; }
  .hd-sub { display: none; }
  .user-bubble { max-width: 92%; }
  .v-status { flex-wrap: wrap; row-gap: 8px; }
  .v-zeker { margin-left: 0; }
  .drawer-meta-grid { grid-template-columns: 1fr; }
}
@media (min-width: 721px) { .mobile-only { display: none !important; } }
