/* Roboto (Frankwatching-huisstijl) — self-hosted variabel font, latin-subset.
   Eén woff2 dekt de hele gewichts-as (100–900); geen externe Google-request
   (AVG/offline-vriendelijk). Bestand: static/fonts/roboto.woff2. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/roboto.woff2") format("woff2");
}

:root {
  /* Frankwatching-huisstijl — zie design/DesignFeedback.MD */
  --primary: #ff9901;        /* oranje — primaire actieknoppen + result-CTA */
  --primary-dark: #e08a00;   /* hover op oranje */
  --brand: #018a00;          /* groen — koppen, voortgang, selectie, vinkje */
  --brand-soft: rgba(1, 138, 0, .08);
  --back: #0e5c8c;           /* blauw — Terug-/secundaire knop */
  --ink: #333333;
  --muted: #5d6b7a;
  --line: #e3e8ee;
  --bg: #ffffff;
  --soft: #f5f8fa;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 40, 60, .08);
  --font: "Roboto", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

.kh {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

.kh-loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* Progress */
.kh-progress { margin-top: 22px; }
.kh-progress-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.kh-progress-fill { height: 100%; background: var(--brand); width: 0; transition: width .35s ease; }
.kh-progress-label { font-size: 13px; color: var(--brand); font-weight: 500; margin-bottom: 8px; }

/* Intro & headings */
.kh-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.kh h1 { font-size: 26px; margin: 0 0 10px; line-height: 1.25; color: var(--brand); }
.kh h2 { font-size: 21px; margin: 0 0 18px; line-height: 1.3; color: var(--brand); }
.kh h2.kh-vraag { font-size: 24px; }   /* vraagkop iets groter dan overige h2's */
.kh .lead { color: var(--ink); margin: 0 0 22px; font-size: 16px; }
.kh .help { color: var(--ink); font-size: 14px; margin: -8px 0 16px; }

/* Options */
.kh-options { display: grid; gap: 10px; }
.kh-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 15.5px; color: var(--ink);
  cursor: pointer; transition: border-color .15s, background .15s, transform .05s;
}
/* Hover-preview alleen op apparaten met een echte aanwijzer (muis/trackpad). Op touch
   zou :hover na een tik blijven 'plakken' -> ogenschijnlijk willekeurig gehighlighte
   opties. Mobiele selectie-feedback loopt via .selected (groene rand/achtergrond, zie onder). */
@media (hover: hover) {
  .kh-option:hover { border-color: var(--brand); background: var(--soft); }
}
.kh-option:active { transform: translateY(1px); }
.kh-option:focus-visible { outline: 3px solid rgba(1, 138, 0, .35); outline-offset: 2px; }
.kh-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.kh-option .opt-main { display: flex; flex-direction: column; }
.kh-option .opt-label { font-weight: 700; }
.kh-option .opt-hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.kh-option .opt-check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
}
/* Vierkante variant voor multi-select; rond = enkele keuze (gestuurd door q.multi in app.js). */
.kh-option .opt-check.is-square { border-radius: 5px; }
.kh-option.selected .opt-check { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Nav */
.kh-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }
.kh-btn {
  border: 0; border-radius: 12px; padding: 12px 22px; font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit;
}
.kh-btn-primary { background: var(--primary); color: var(--ink); }
.kh-btn-primary:hover { background: var(--primary-dark); }
.kh-btn-primary:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.kh-btn-ghost { background: transparent; color: var(--back); padding-left: 4px; }
.kh-btn-ghost:hover { color: #0a4a73; }

/* Results */
.kh-result { display: grid; gap: 16px; }
.kh-rec {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); background: var(--bg);
}
.kh-rec.top { border-color: var(--brand); }
.kh-rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.kh-rec h3 { margin: 0 0 4px; font-size: 18px; }
.kh-badge {
  flex: 0 0 auto; background: var(--brand); color: #fff; font-weight: 700;
  border-radius: 99px; padding: 6px 12px; font-size: 13px; white-space: nowrap;
}
.kh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.kh-tag { background: var(--soft); border: 1px solid var(--line); color: var(--muted);
  border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.kh-motivatie { color: var(--ink); margin: 0 0 16px; }
.kh-cta {
  display: inline-block; background: var(--primary); color: var(--ink); text-decoration: none;
  border-radius: 12px; padding: 11px 20px; font-weight: 500; font-size: 14.5px;
}
.kh-cta:hover { background: var(--primary-dark); }
.kh-foot { text-align: center; margin-top: 8px; }
.kh-error { color: #b3261e; background: #fdeceb; border: 1px solid #f6c9c5;
  border-radius: 10px; padding: 14px 16px; }

/* Defensief: lange, ononderbroken woorden/URLs in data-gestuurde tekst nooit laten overlopen
   (geen horizontale scroll op smalle schermen). min-width:0 laat de titel binnen de flex-rij wrappen. */
.kh h1, .kh h2, .kh-rec h3, .kh-motivatie, .kh-option .opt-label, .kh-option .opt-hint {
  overflow-wrap: break-word;
}
.kh-rec-head > div { min-width: 0; }

@media (max-width: 520px) {
  .kh-card { padding: 22px 18px; }
  .kh h1 { font-size: 23px; }
}
