/* kennis.css - Kennisbank-laag bovenop design-system.css
   THE REAL MAG. design system: scherp/vlak, radius 2px, 1px borders, koperen accent,
   geen schaduwen, geen pillen. Leesbaarheid boven breedte: tekst smal, tabellen breed. */

:root {
  --kb-maat: 74ch;
}

/* ---------- layout ---------- */
.kb-article { padding-block: clamp(48px, 7vw, 96px); }
.kb-narrow { max-width: 980px; }
.kb-article h1 {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--ruimte-4, 24px);
  max-width: 22ch;
  overflow-wrap: anywhere;
}

/* ---------- kruimelpad ---------- */
.kb-crumbs {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--ruimte-4, 24px);
  color: var(--tekst-zacht, #6b6a67);
}
.kb-crumbs a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.kb-crumbs a:hover { border-bottom-color: var(--accent, #a07050); color: var(--accent, #a07050); }
.kb-crumbs span { opacity: 0.5; margin: 0 6px; }

/* ---------- het antwoord (de alinea die LLM's overnemen) ---------- */
.kb-answer {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  font-weight: 500;
  max-width: var(--kb-maat);
  padding: var(--ruimte-4, 24px) 0 var(--ruimte-4, 24px) var(--ruimte-4, 24px);
  border-left: 3px solid var(--accent, #a07050);
  margin-bottom: var(--ruimte-5, 32px);
}

/* ---------- auteur ---------- */
.kb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  padding-bottom: var(--ruimte-4, 24px);
  border-bottom: 1px solid var(--lijn, #d9d8d4);
  margin-bottom: var(--ruimte-5, 32px);
  font-size: 14px;
}
.kb-author { font-weight: 600; }
.kb-role, .kb-date { color: var(--tekst-zacht, #6b6a67); }
.kb-role::before { content: "— "; }

/* ---------- inhoudsopgave ---------- */
.kb-toc {
  border: 1px solid var(--lijn, #d9d8d4);
  border-top: 3px solid var(--accent, #a07050);
  padding: var(--ruimte-4, 24px);
  margin-bottom: var(--ruimte-6, 40px);
  max-width: var(--kb-maat);
}
.kb-toc h2 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--tekst-zacht, #6b6a67);
}
.kb-toc ol { margin: 0; padding-left: 1.2em; }
.kb-toc li { margin-bottom: 6px; font-size: 15px; }
.kb-toc a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.kb-toc a:hover { border-bottom-color: var(--accent, #a07050); }

/* ---------- artikeltekst ---------- */
.kb-body { max-width: var(--kb-maat); }
.kb-body h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin-top: var(--ruimte-7, 56px);
  margin-bottom: var(--ruimte-3, 16px);
  scroll-margin-top: 90px;
  overflow-wrap: anywhere;
}
.kb-body h3 {
  font-size: clamp(17px, 2vw, 21px);
  margin-top: var(--ruimte-5, 32px);
  margin-bottom: 10px;
  scroll-margin-top: 90px;
}
.kb-body p { margin-bottom: var(--ruimte-3, 16px); line-height: 1.7; }
.kb-body ul, .kb-body ol { margin: 0 0 var(--ruimte-3, 16px) 1.25em; }
.kb-body li { margin-bottom: 8px; line-height: 1.65; }
.kb-body a { color: inherit; border-bottom: 1px solid var(--accent, #a07050); text-decoration: none; }
.kb-body a:hover { color: var(--accent, #a07050); }
.kb-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--vlak, #f2f1ee);
  padding: 1px 5px;
  border: 1px solid var(--lijn, #d9d8d4);
}
.kb-body blockquote {
  border-left: 3px solid var(--accent, #a07050);
  padding-left: var(--ruimte-4, 24px);
  margin: var(--ruimte-5, 32px) 0;
  font-size: 18px;
}
.kb-body blockquote p { margin: 0; }

/* ---------- tabellen: mogen breder dan de tekstkolom ---------- */
.tbl-wrap {
  overflow-x: auto;
  margin: var(--ruimte-5, 32px) 0;
  border: 1px solid var(--lijn, #d9d8d4);
  border-top: 3px solid var(--accent, #a07050);
}
.tbl-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl-wrap th, .tbl-wrap td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lijn, #d9d8d4);
  vertical-align: top;
}
.tbl-wrap th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--vlak, #f2f1ee);
  white-space: nowrap;
}
.tbl-wrap tbody tr:last-child td { border-bottom: none; }
.tbl-wrap td:first-child { font-weight: 500; }

/* ---------- FAQ ---------- */
.kb-faq { max-width: var(--kb-maat); margin-top: var(--ruimte-7, 56px); }
.kb-faq details {
  border-bottom: 1px solid var(--lijn, #d9d8d4);
  padding: var(--ruimte-3, 16px) 0;
}
.kb-faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.kb-faq summary::-webkit-details-marker { display: none; }
.kb-faq summary::after { content: "+"; color: var(--accent, #a07050); font-size: 20px; line-height: 1; }
.kb-faq details[open] summary::after { content: "–"; }
.kb-faq details p { margin: 12px 0 0; line-height: 1.7; color: var(--tekst-zacht, #4a4947); }

/* ---------- bronnen ---------- */
.kb-sources { max-width: var(--kb-maat); margin-top: var(--ruimte-7, 56px); }
.kb-sources h2 { font-size: 18px; margin-bottom: var(--ruimte-3, 16px); }
.kb-sources ul { margin-left: 1.1em; }
.kb-sources li { font-size: 14px; color: var(--tekst-zacht, #6b6a67); margin-bottom: 8px; line-height: 1.6; }

/* ---------- kaarten / clusters ---------- */
.kb-related { margin-top: var(--ruimte-7, 56px); }
.kb-related > h2 { font-size: clamp(20px, 2.4vw, 26px); margin-bottom: var(--ruimte-4, 24px); }
.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ruimte-3, 16px);
}
.kb-grid > * { min-width: 0; }
.kb-card {
  display: block;
  border: 1px solid var(--lijn, #d9d8d4);
  border-top: 3px solid transparent;
  padding: var(--ruimte-4, 24px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.kb-card:hover { border-top-color: var(--accent, #a07050); background: var(--vlak, #f2f1ee); }
.kb-card h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.kb-card p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: var(--tekst-zacht, #6b6a67);
}
.kb-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #a07050);
}
.kb-grid-pillars .kb-card { border-top-color: var(--accent, #a07050); }

/* ---------- CTA ---------- */
.kb-cta {
  margin-top: var(--ruimte-7, 56px);
  padding: var(--ruimte-6, 40px);
  border: 1px solid var(--lijn, #d9d8d4);
  border-top: 3px solid var(--accent, #a07050);
  background: var(--vlak, #f2f1ee);
}
.kb-cta h2 { font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 8px; }
.kb-cta p { margin: 0 0 var(--ruimte-4, 24px); color: var(--tekst-zacht, #4a4947); max-width: 52ch; }

/* ---------- mobiel ---------- */
@media (max-width: 640px) {
  .kb-article { padding-block: clamp(36px, 9vw, 56px); }
  .kb-answer { padding-left: var(--ruimte-3, 16px); font-size: 17px; }
  .kb-cta { padding: var(--ruimte-4, 24px); }
  .tbl-wrap th, .tbl-wrap td { padding: 10px 12px; font-size: 14px; }
}
