/* Zelfde stijl als website v1 (Apple-stijl, #8d6db5 als enige accentkleur). */
:root {
  --accent: #8d6db5;
  --accent-dark: #5e4483;
  --accent-soft: #f4f0f9;
  --accent-line: #e3d9f0;
  --accent-strong: #8d6db5;

  --ink: #2c2c34;
  --text: #4a4a55;
  --muted: #72727d;
  --hairline: #ebebf0;
  --canvas: #ffffff;
  --parchment: #f7f7f9;

  --ok: #2e9e5b;
  --ok-soft: #eaf6ef;
  --ok-line: #bfe3cc;
  --ok-text: #237a46;

  color-scheme: light;

  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-lg: 18px;
  --r-pill: 9999px;
}

/* ---------- Donkere modus ----------
   Volgt de systeeminstelling, tenzij de gebruiker via de knop zelf kiest (data-theme).
   De keuze wordt niet bewaard: na herladen geldt weer de systeeminstelling. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #a98ad3;
    --accent-dark: #c6b0e6;
    --accent-soft: #231e2c;
    --accent-line: #3d3350;
    --accent-strong: #7a5aa6;
    --ink: #ececf1;
    --text: #c5c5ce;
    --muted: #9c9ca8;
    --hairline: #2d2d35;
    --canvas: #1b1b20;
    --parchment: #121216;
    --ok-soft: #16271d;
    --ok-line: #2a5a3d;
    --ok-text: #6fd49a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #a98ad3;
  --accent-dark: #c6b0e6;
  --accent-soft: #231e2c;
  --accent-line: #3d3350;
  --accent-strong: #7a5aa6;
  --ink: #ececf1;
  --text: #c5c5ce;
  --muted: #9c9ca8;
  --hairline: #2d2d35;
  --canvas: #1b1b20;
  --parchment: #121216;
  --ok-soft: #16271d;
  --ok-line: #2a5a3d;
  --ok-text: #6fd49a;
  color-scheme: dark;
}

/* ---------- Thema-knop (uit website v1) ---------- */
.top-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  background: var(--canvas);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  letter-spacing: -0.12px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s, border-color 0.2s;
}
@media (hover: hover) {
  .theme-toggle:hover { border-color: var(--accent); }
}
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.theme-toggle__sun { display: none; }
.theme-toggle[aria-pressed="true"] .theme-toggle__sun { display: block; }
.theme-toggle[aria-pressed="true"] .theme-toggle__moon { display: none; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

button, summary, label, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  background: var(--accent-soft);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Links ---------- */
.links {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.links__head { text-align: center; margin-bottom: 36px; }
.links__head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  color: var(--ink);
}
.links__lead {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
}

.links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  background: var(--canvas);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.1s ease, border-color 0.2s;
}
button.link-card {
  width: 100%;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}
.link-card:active { transform: scale(0.98); }
.link-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) {
  .link-card:hover { border-color: var(--accent); }
}

.link-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-strong);
}
.link-card__icon svg { width: 24px; height: 24px; fill: #fff; }

.link-card__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.link-card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.link-card__desc { font-size: 14px; letter-spacing: -0.224px; color: var(--muted); }

.link-card__chevron { flex: none; width: 20px; height: 20px; fill: var(--accent); }

@media (max-width: 640px) {
  .links { padding-top: 24px; }
  .links__head h1 { font-size: 40px; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 16px 32px;
  border-top: 1px solid var(--accent-line);
  text-align: center;
  font-size: 13px;
  letter-spacing: -0.12px;
}
.site-footer__disclaimer {
  margin: 0 auto;
  max-width: 460px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Knoppen (uit website v1) ---------- */
.btn {
  font: inherit;
  letter-spacing: inherit;
  border-radius: var(--r-pill);
  padding: 11px 22px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.95); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: var(--accent-strong); color: #fff; }
.btn--primary:active { background: var(--accent-dark); }
.btn--secondary { background: var(--canvas); color: var(--accent-dark); border-color: var(--accent-line); }
@media (hover: hover) {
  .btn--secondary:hover { border-color: var(--accent); }
}

/* ---------- Popup en PMT-checklist (uit website v1) ---------- */
.dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--canvas);
  color: var(--text);
}
.dialog::backdrop { background: rgba(20, 16, 28, 0.45); }
.dialog__panel { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--hairline);
}
.dialog__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  color: var(--ink);
}
.dialog__meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.dialog__close {
  flex: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--parchment);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.dialog__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dialog__body { overflow-y: auto; padding: 8px 24px 24px; }
.dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--hairline);
}
.dialog__foot .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* PMT-checklist */
.pmt-heading {
  margin: 20px 0 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.pmt-part { border-radius: var(--r-sm); padding: 14px 16px 6px; margin-bottom: 10px; }
.pmt-part--white { border: 1px solid var(--hairline); }
.pmt-part--grey { background: var(--parchment); border: 1px solid var(--hairline); }
.pmt-part__title { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.pmt-part__tag {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 2px;
}
.pmt-group { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pmt-group legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--canvas);
  font-size: 14px;
  letter-spacing: -0.224px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
@media (hover: hover) {
  .chip:hover span { border-color: var(--accent-line); }
}
.chip input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.chip input:checked + span::before { content: "✓ "; font-weight: 600; } /* niet alleen kleur als signaal */
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip--wide { display: inline-block; margin: 6px 0 10px; }

.pmt-footnote { margin: 0 0 6px; font-size: 12px; color: var(--muted); }

.pmt-result {
  margin: 4px 0 8px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--parchment);
  border-left: 3px solid var(--hairline);
}
.pmt-result.is-met { background: var(--ok-soft); border-left-color: var(--ok); }
.pmt-result__count { margin: 0; font-size: 14px; color: var(--muted); }
.pmt-result__verdict { margin: 2px 0 6px; font-weight: 600; color: var(--ink); }
.pmt-result.is-met .pmt-result__verdict { color: var(--ok-text); }
.pmt-result__rule { margin: 0; font-size: 13px; font-style: italic; color: var(--text); }

/* Vaste statusbalk onder de kop van de PMT-popup */
.pmt-live {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}
.pmt-live__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 48px;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--parchment);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.pmt-live__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pmt-live__item.is-met { background: var(--ok-soft); border-color: var(--ok-line); border-left-color: var(--ok); }
.pmt-live__label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pmt-live__value { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pmt-live__item.is-met .pmt-live__value { color: var(--ok-text); }

.pmt-notes { margin-top: 16px; font-size: 14px; }
.pmt-notes summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); }
.pmt-notes ul { margin: 8px 0 0; padding-left: 20px; }
.pmt-notes li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .dialog__panel { max-height: 100dvh; height: 100%; }
  .dialog__head, .dialog__foot { padding-left: 16px; padding-right: 16px; }
  .dialog__body { padding: 8px 16px 20px; flex: 1; overscroll-behavior: contain; }
  .dialog__head { padding-top: 14px; padding-bottom: 12px; }
  .dialog__title { font-size: 19px; }
  .dialog__close { width: 44px; height: 44px; }
  .dialog__foot { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .dialog__foot .btn { flex: 1 1 0; justify-content: center; padding-left: 12px; padding-right: 12px; }
  .pmt-live { padding: 8px 16px; }
  .pmt-heading:first-child { margin-top: 12px; }
  .pmt-group { gap: 8px; }
  .chip span { padding: 10px 16px; font-size: 15px; }
}


.privacy-note { margin: 8px auto 0; max-width: 460px; font-size: 12px; letter-spacing: -0.12px; color: var(--muted); }

/* Broncode-link (uit website v1) */
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) {
  .site-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
}
.site-footer svg { width: 16px; height: 16px; fill: currentColor; }
