/* Minimale vormgeving; uitgebreidere huisstijl volgt later. */

body { font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #1a1a1a; }

/* Closeread zet de pagina op volle breedte; houd gewone tekst buiten de scrollsecties leesbaar smal. */
main.column-page > header,
main.column-page section > :not(.cr-section):not(section) {
  max-width: 760px; margin-left: auto; margin-right: auto;
}

/* Achtergrond van de scrollsecties (closeread) */
.cr-section { --cr-section-background-color: #f6f5f2; }

/* Interne notities uit het Google Doc: zichtbaar in het concept, weghalen voor publicatie. */
.notitie {
  background: #fff8db; border-left: 4px solid #e0b400; padding: 8px 14px; margin: 1em auto;
  font-size: 0.9em; color: #5a4a00;
}
.notitie::before { content: "Notitie (niet voor publicatie)"; display: block; font-weight: 600; font-size: 0.8em;
                   text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* Kop en bron rond een figuur */
.fig-titel { font-weight: 700; font-size: 1.15rem; margin: 0 0 2px; line-height: 1.25; }
.fig-sub { color: #666; font-size: 0.9rem; margin: 0 0 10px; }
.fig-bron { color: #777; font-size: 0.75rem; line-height: 1.4; margin-top: 6px; }

/* Lege plek voor een figuur die nog ontworpen moet worden */
.leeg-figuur {
  border: 2px dashed #bbb; border-radius: 8px; min-height: 260px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #888; text-align: center; padding: 20px;
}

/* Knoppen in figuren: Inputs.radio als segmentknop */
form[class^="oi-"] { margin: 0 0 10px; }
form[class^="oi-"] > div { display: inline-flex; flex-wrap: wrap; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
form[class^="oi-"] label { padding: 6px 14px; cursor: pointer; margin: 0; font-size: 0.9rem; }
form[class^="oi-"] label + label { border-left: 1px solid #ccc; }
form[class^="oi-"] input[type=radio] { display: none; }
form[class^="oi-"] label:has(input:checked) { background: #1a1a1a; color: white; }

/* Tabel met modeluitkomsten */
table.modeltabel { border-collapse: collapse; font-size: 0.8rem; width: 100%; }
table.modeltabel th, table.modeltabel td { padding: 4px 6px; text-align: right; border-bottom: 1px solid #eee; }
table.modeltabel th:first-child, table.modeltabel td:first-child { text-align: left; }
/* tint naar significantie: 1, 2 of 3 sterren */
table.modeltabel td.pos1 { background: #e6eff8; }
table.modeltabel td.pos2 { background: #b9d3ec; }
table.modeltabel td.pos3 { background: #7fa9d6; }
table.modeltabel td.neg1 { background: #f8e4e0; }
table.modeltabel td.neg2 { background: #eeb8ad; }
table.modeltabel td.neg3 { background: #df8a79; }

/* Verken-zelf: iframes met de interactieve figuren */
iframe.figuur { width: 100%; border: 0; }

/* Figuur 1: spectrum van negen reguleringsvormen, met de definitie bij aanwijzen */
.spectrum { margin: 1.5em 0; }
.spectrum-rij { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.spectrum-stap { position: relative; text-align: center; padding: 8px 2px 6px; border-radius: 8px; cursor: help;
                 outline: none; }
.spectrum-stap:hover, .spectrum-stap:focus { background: #f2f2f2; }
.spectrum-stap img { display: block; width: 52px; max-width: 85%; height: auto; margin: 0 auto 6px; }
.spectrum-stap .balk { display: block; height: 6px; border-radius: 3px; background: var(--kleur); margin: 0 4px 5px; }
.spectrum-stap .nr { display: block; font-weight: 700; font-size: 0.8rem; color: #666; }
.spectrum-stap .naam { display: block; font-size: 0.75rem; line-height: 1.2; }
.spectrum-stap .uitleg {
  visibility: hidden; opacity: 0; transition: opacity 0.15s; pointer-events: none; position: absolute; z-index: 20;
  bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 250px; padding: 10px 12px;
  background: #1a1a1a; color: white; border-radius: 6px; font-size: 0.85rem; line-height: 1.4; text-align: left;
}
.spectrum-stap .uitleg b { display: block; margin-bottom: 3px; }
.spectrum-stap:nth-child(-n+2) .uitleg { left: 0; transform: none; }
.spectrum-stap:nth-last-child(-n+2) .uitleg { left: auto; right: 0; transform: none; }
.spectrum-stap:hover .uitleg, .spectrum-stap:focus .uitleg { visibility: visible; opacity: 1; }
.spectrum-as { display: flex; justify-content: space-between; color: #666; font-size: 0.8rem; margin: 4px 4px 0; }
.spectrum figcaption { color: #555; font-size: 0.85rem; margin-top: 10px; }
@media (max-width: 600px) {
  .spectrum-rij { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .spectrum-stap:nth-child(n) .uitleg { left: 50%; right: auto; transform: translateX(-50%); }
  .spectrum-stap:nth-child(3n+1) .uitleg { left: 0; transform: none; }
  .spectrum-stap:nth-child(3n) .uitleg { left: auto; right: 0; transform: none; }
}

/* Percentagetabel per middel: tint naar verschil met de referentiegroep (1, 2 of 3 sterren) */
table.pcttabel th img { width: 26px; height: auto; }
table.pcttabel th { text-align: center; font-weight: 600; color: #666; }
table.pcttabel td { padding: 2px 6px; }
table.pcttabel tr.kenmerk td { font-weight: 700; padding-top: 7px; border-bottom: 1px solid #ccc; }
table.pcttabel .ref { color: #888; font-size: 0.9em; }
table.modeltabel td.hoger1 { background: #e5f2e5; }
table.modeltabel td.hoger2 { background: #b8dcb8; }
table.modeltabel td.hoger3 { background: #86c186; }
table.modeltabel td.lager1 { background: #efe6f4; }
table.modeltabel td.lager2 { background: #d4bde3; }
table.modeltabel td.lager3 { background: #b591cf; }

/* Figuur 3 met inklapbare tabel: de knop verschijnt bij de laatste stap en ruilt de figuur in voor de tabel */
.demo-blok .tabel-paneel { display: none; }
.demo-blok.tabel-open .tabel-paneel { display: block; }
.demo-blok.tabel-open > div:first-child { display: none; }
.demo-blok .tabel-knop {
  display: none; width: 100%; margin-top: 14px; padding: 9px 14px; text-align: left; cursor: pointer;
  background: white; border: 1px solid #dee2e6; border-left: 4px solid #2780e3; border-radius: 4px;
  font: inherit; font-size: 0.9rem; font-weight: 600; color: #444;
}
.demo-blok .tabel-knop:hover { background: #f8f9fa; }
.demo-blok.met-tabel .tabel-knop { display: block; }
.demo-blok { display: flex; flex-direction: column; }
.demo-blok.tabel-open .tabel-knop { order: -1; margin: 0 0 10px; }   /* terugknop bovenaan, ook op lage schermen zichtbaar */
table.pcttabel td { padding: 1px 6px; }
table.pcttabel th img { width: 22px; }
