/* Regels op maat — layout en schermonderdelen. Tokens en bouwstenen komen uit stijl.css. */

html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Kop ──────────────────────────────────────────────── */
.kop {
  flex: none; display: flex; align-items: center; gap: 24px;
  min-height: 56px; padding-block: 8px; padding-inline: 24px;
  border-bottom: 1px solid var(--lijn); background: var(--grond);
}
.kop-nav { margin-left: auto; display: flex; gap: 4px; }
.kop-nav a { text-decoration: none; color: var(--inkt-2); font-size: 14px; padding: 6px 10px; border-radius: 3px; }
.kop-nav a:hover { background: var(--grond-2); color: var(--inkt); }
.kop-nav a { display: inline-flex; gap: 7px; align-items: center; }
.kop-nav a[aria-current="page"] { background: var(--inkt); color: var(--blad); font-weight: 700; }
.kop-nav .proto { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 5px; border-radius: 3px; border: 1px solid var(--lijn); color: var(--inkt-3); }
.kop-nav a[aria-current="page"] .proto { border-color: transparent; background: oklch(35% 0.02 262); color: oklch(85% 0.02 262); }
.thema-knop { background: var(--blad); border: 0; box-shadow: var(--blad-schaduw); color: var(--inkt-2); font-size: 13px; padding: 8px 11px; border-radius: 3px; cursor: pointer; flex: none; }
.thema-knop:hover { color: var(--inkt); }
@media (max-width: 1180px) { .kop { flex-wrap: wrap; } .kop-nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; } .thema-knop { margin-left: auto; } }

/* ── Contextbalk ──────────────────────────────────────── */
.context {
  flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-block: 7px; padding-inline: 24px; border-bottom: 1px solid var(--lijn); font-size: 13.5px;
}
.context[hidden] { display: none; }
.context-pil {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  padding: 3px 4px 3px 10px; background: var(--blad); box-shadow: var(--blad-schaduw); border-radius: 3px;
}
.context-pil b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pil-knop { display: grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; color: var(--inkt-3); border-radius: 3px; cursor: pointer; }
.pil-knop:hover { background: var(--grond); color: var(--inkt); }
.weergave { margin-left: auto; display: inline-flex; border-bottom: 1px solid var(--lijn); }
.weergave-knop { border: 0; background: none; padding: 5px 10px; color: var(--inkt-2); cursor: pointer; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.weergave-knop[aria-pressed="true"] { color: var(--inkt); font-weight: 700; border-bottom-color: var(--inkt); }

/* ── Werkvlak: lijst links, kaart rechts ──────────────── */
.werkvlak { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); }
.lijst { overflow-y: auto; padding-block: 18px 0; padding-inline: 20px; display: flex; flex-direction: column; gap: 14px; outline: none; }
.kaartvlak { position: relative; border-left: 1px solid var(--lijn); min-height: 0; }
.kaart { position: absolute; inset: 0; background: oklch(97% 0.006 90); }

@media (max-width: 900px) {
  body { display: block; }
  .werkvlak { grid-template-columns: 1fr; }
  .kaartvlak { order: -1; height: 46vh; border-left: 0; border-bottom: 1px solid var(--lijn); }
  .lijst { overflow: visible; padding-inline: 16px; }
  .kop, .context { padding-inline: 16px; }
  .merk-sub { display: none; }
  .merk-tekst strong { white-space: nowrap; }
  .kop { gap: 12px; }
  .weergave { margin-left: 0; }
}

/* ── Zoeken ───────────────────────────────────────────── */
.zoek { position: relative; display: flex; flex-direction: column; gap: 8px; }
.start h1 { margin: 6px 0 6px; font-size: 22px; line-height: 1.25; }
.start p { margin: 0 0 6px; max-width: 60ch; }
.zoekveld { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 3px; color: var(--inkt-3); }
.zoekveld:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.zoekveld input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15.5px; color: var(--inkt); padding: 10px 0; }
.zoekveld input::placeholder { color: var(--inkt-3); }
.suggesties { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 4px 0 0; padding: 4px 0; list-style: none; box-shadow: var(--paneel-schaduw); }
.suggesties[hidden] { display: none; }
.suggesties li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; cursor: pointer; }
.suggesties li[aria-selected="true"], .suggesties li:hover { background: var(--acc-zacht); }
.suggesties .tag { flex: none; }
.suggesties .sug-leeg { color: var(--inkt-3); cursor: default; }
.suggesties .sug-leeg:hover { background: none; }
.voorbeeld { margin: 0; font-size: 13px; }
.heeft-locatie .start, .heeft-locatie .voorbeeld { display: none; }

/* ── Resultaat ────────────────────────────────────────── */
.res-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.res-kop h1 { margin: 0; font-size: 20px; }
.groep { display: flex; flex-direction: column; gap: 8px; }
.groep > h2 { margin: 10px 0 0; }
.groep-uitleg { margin: -2px 0 2px; font-size: 13px; color: var(--inkt-3); }

.doc { display: flex; flex-direction: column; }
.doc.open { border-top: 3px solid var(--acc); }
.doc-kop {
  display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left;
  padding: 13px 18px 12px; border: 0; background: none; cursor: pointer; color: inherit;
}
.doc-kop:hover .doc-titel { color: var(--acc); }
.doc-titelrij { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.doc-titel { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.28; }
.doc-chevron { color: var(--inkt-3); margin-top: 3px; transition: transform .15s; }
.doc.open .doc-chevron { transform: rotate(180deg); }
.doc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--inkt-2); }
.doc-meta .mono { font-size: 11.5px; color: var(--inkt-3); }
.doc-chips { min-height: 22px; }
.doc.open .doc-chips { display: none; }   /* in de body staan ze als filter */
.doc-body { border-top: 1px solid var(--lijn-2); padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.doc-body[hidden] { display: none; }
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter-uitleg { font-size: 12.5px; color: var(--inkt-3); }

/* Structuur van het document */
.sectie { display: flex; flex-direction: column; }
.sectie > .sectie-kop { margin: 10px 0 2px; }
.sectie .sectie { padding-left: 12px; }
.sectie .sectie > .sectie-kop { margin-top: 6px; }
details.sectie > summary { cursor: pointer; list-style-position: outside; }
.sectie-kop .label { font-size: 10.5px; }
.sectie-titel { font-family: var(--serif); font-size: 14.5px; color: var(--inkt-2); }

.art { border-top: 1px solid var(--lijn-2); }
.art-kop {
  display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer; padding: 7px 0; color: inherit;
}
.art-kop:hover .art-titel { color: var(--acc); }
.art-pijl { color: var(--inkt-3); margin-top: 4px; transition: transform .12s; flex: none; }
.art.open .art-pijl { transform: rotate(90deg); }
.art-dot { width: 8px; height: 8px; border-radius: 2px; margin-top: 7px; flex: none; background: transparent; border: 1px dashed var(--lijn); }
.art-titel { flex: 1; font-family: var(--serif); font-size: 15.5px; line-height: 1.4; }
.art-titel .art-nr { font-weight: 600; }
.art-onderwerp { font-size: 11.5px; color: var(--inkt-3); white-space: nowrap; margin-top: 3px; }
.art.open .art-titel { font-weight: 600; }
.art-inhoud { padding: 2px 0 12px 22px; display: flex; flex-direction: column; gap: 6px; }
.art-inhoud[hidden] { display: none; }
.lid { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px; }
.lid-nr { font: 500 12px/1 var(--mono); color: var(--inkt-3); padding-top: 6px; }
.lid ocd-regeltekst, .lid .platte-tekst { font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--inkt); }
.platte-tekst p { margin: 0 0 .6em; }
.art-voet { font-size: 12.5px; }

.meer { align-self: flex-start; }
.laden { color: var(--inkt-3); font-style: italic; padding: 6px 0; }
.fout { color: var(--no); background: var(--no-bg); padding: 8px 12px; border-radius: 3px; font-size: 13.5px; }

.voet { margin-top: auto; padding-block: 18px 22px; border-top: 1px solid var(--lijn); font-size: 12.5px; }
.voet p { margin: 0 0 8px; max-width: 72ch; }

/* ── Kaart ────────────────────────────────────────────── */
.kaartknoppen { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.kk-groep { display: flex; flex-direction: column; gap: 1px; }
.kk {
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  background: var(--blad); border: 0; box-shadow: var(--blad-schaduw); border-radius: 3px; color: var(--inkt-2); font-size: 18px;
}
.kk:hover { color: var(--inkt); }
.kk:disabled { opacity: .45; cursor: default; }
.kaart-legenda { position: absolute; left: 14px; bottom: 30px; z-index: 5; display: flex; flex-direction: column; gap: 5px; padding: 9px 12px; font-size: 12.5px; }
.kaart-legenda[hidden] { display: none; }
.kaart-legenda > span { display: flex; gap: 8px; align-items: center; }
.kaart-legenda i { width: 14px; height: 14px; display: block; flex: none; }
.lg-perceel { border: 2px solid var(--acc); background: color-mix(in oklch, var(--acc) 14%, transparent); }
.lg-punt { border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--blad); transform: scale(.7); }
.kaart-bron { position: absolute; right: 0; bottom: 0; z-index: 5; font-size: 11px; padding: 2px 8px; background: color-mix(in oklch, var(--blad) 85%, transparent); color: var(--inkt-3); }
.kaart-bron a { color: inherit; }
.ol-viewport { cursor: crosshair; }
.ol-zoom, .ol-rotate, .ol-attribution { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kaart .onderkaart canvas { filter: invert(.9) hue-rotate(180deg) brightness(.95) contrast(.9); }
}

/* Aanvullende regels (voorbescherming) binnen het document waar ze bij horen */
.tag-aanvullend { color: var(--at); border-color: color-mix(in oklch, var(--at) 40%, var(--lijn)); text-transform: none; font-family: var(--sans); font-size: 11.5px; }
.deel { display: flex; flex-direction: column; }
.deel + .deel { margin-top: 14px; }
.deel-kop { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin: 4px 0 2px; background: var(--grond); border-radius: 3px; }
.deel-aanvullend > .deel-kop { background: var(--at-bg); }
.deel-aanvullend > .deel-kop .label { color: var(--at); }
.deel-titel { font-family: var(--serif); font-size: 15.5px; font-weight: 600; color: var(--inkt); text-decoration: none; }
.deel-titel:hover { color: var(--acc); text-decoration: underline; }
.deel-uitleg { font-size: 12.5px; color: var(--inkt-2); }
:root[data-theme="dark"] .kaart .onderkaart canvas { filter: invert(.9) hue-rotate(180deg) brightness(.95) contrast(.9); }

/* ── Onderwerpen op deze locatie (fase 6) ─────────────── */
.terug { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; text-decoration: none; margin-top: 2px; }
.terug:hover { text-decoration: underline; }
.onderwerpen { display: flex; flex-direction: column; gap: 10px; }
.ow-kopregel { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ow-kopregel .muted { font-size: 12.5px; }
.ow-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .ow-raster { grid-template-columns: 1fr; } }
.ow-tegel {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  border: 0; padding: 12px 14px; color: inherit; font: inherit;
}
.ow-tegel:hover { box-shadow: 0 0 0 1px var(--acc), 0 1px 3px oklch(20% 0.02 262 / .08); }
.ow-tegel:hover b { color: var(--acc); }
.ow-tegel > .icoon { color: var(--inkt-3); flex: none; }
.ow-tegel-icoon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--acc-zacht); color: var(--acc); border-radius: 3px; }
.ow-tegel-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ow-tegel-tekst b { font-size: 15px; line-height: 1.25; }
.ow-tegel-tekst .muted { font-size: 13px; }
.ow-klein { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ow-klein-knop {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-size: 13px;
  padding: 6px 10px; border: 0; border-radius: 3px; background: var(--blad); box-shadow: var(--blad-schaduw); color: var(--inkt-2);
}
.ow-klein-knop .ow-icoon { color: var(--inkt-3); }
.ow-klein-knop b { color: var(--inkt); }
.ow-klein-knop:hover { color: var(--inkt); box-shadow: 0 0 0 1px var(--acc); }
.ow-klein-rest { background: none; box-shadow: none; border: 1px dashed var(--lijn); }
.ow-noot { margin: 2px 0 0; font-size: 12.5px; color: var(--inkt-3); }
.ow-alles {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  border: 0; padding: 12px 14px; font: inherit; color: inherit; margin-top: 4px;
}
.ow-alles:hover { box-shadow: 0 0 0 1px var(--acc), 0 1px 3px oklch(20% 0.02 262 / .08); }
.ow-alles:hover b { color: var(--acc); }
.ow-alles > .icoon { color: var(--inkt-3); flex: none; }
.ow-alles-icoon { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--inkt); color: var(--blad); border-radius: 3px; }
.ow-alles-icoon .icoon { grid-area: 1 / 1; width: 22px; height: 22px; }
.ow-res-kop { justify-content: flex-start; align-items: center; gap: 12px; }
.chip .ow-icoon { color: var(--inkt-3); flex: none; }
button.chip[aria-pressed="true"] .ow-icoon { color: var(--blad); }
.chip-vast { background: var(--acc-zacht); color: var(--acc); }
.chip-vast .ow-icoon, .chip-vast b { color: var(--acc); }
.art-icoon { display: flex; flex: none; margin-top: 3px; color: var(--inkt-3); }

/* ── Zoeken op een vraag (fase 7) ──────────────────────
   Het vraagdeel krijgt een eigen accent (paarser), zodat zichtbaar is wat uit
   een zoekslag komt en wat brontekst is. Geen taalmodel in dit scherm. */
.vraagdeel {
  --acc: oklch(48% 0.17 300);
  --acc-zacht: oklch(93% 0.045 300);
  --focus: oklch(48% 0.17 300);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vraagdeel { --acc: oklch(78% 0.13 300); --acc-zacht: oklch(31% 0.06 300); --focus: oklch(78% 0.13 300); }
}
:root[data-theme="dark"] .vraagdeel { --acc: oklch(78% 0.13 300); --acc-zacht: oklch(31% 0.06 300); --focus: oklch(78% 0.13 300); }

.vraagvak { display: flex; gap: 8px; align-items: stretch; }
.vraagvak .vraagveld { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 3px; color: var(--inkt-3); }
.vraagvak .vraagveld:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.vraagvak input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15.5px; color: var(--inkt); padding: 10px 0; }
.vraagvak input::placeholder { color: var(--inkt-3); }
.vraagvak .knop { background: var(--acc); }
.vraagvak .knop:hover { background: var(--inkt); }

.feed { display: flex; flex-direction: column; gap: 8px; }
.stap { padding: 11px 14px 13px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--acc); }
.stap-kop { display: flex; align-items: baseline; gap: 10px; }
.stap-kop .muted { font-size: 12.5px; }
.stap-status { margin-left: auto; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--acc); background: var(--acc-zacht); padding: 4px 6px; border-radius: 3px; }
.stap-body { display: flex; flex-direction: column; gap: 8px; }
.stap-tekst { margin: 0; font-size: 13.5px; color: var(--inkt-2); }
.stap-acties { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stap-acties .knop { min-height: 32px; font-size: 13px; font-weight: 400; padding: 0 12px; }
.chip-begrip { background: var(--acc-zacht); color: var(--acc); font-weight: 700; }
button.chip-term { cursor: pointer; background: var(--blad); box-shadow: var(--blad-schaduw); }
button.chip-term[aria-pressed="false"] { background: none; box-shadow: none; border: 1px dashed var(--lijn); color: var(--inkt-3); text-decoration: line-through; opacity: 1 !important; }

.regel-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.schakel { background: var(--blad); border: 0; box-shadow: var(--blad-schaduw); border-radius: 3px; font-size: 12.5px; padding: 5px 10px; cursor: pointer; color: var(--inkt-2); }
.schakel[aria-pressed="true"] { background: var(--inkt); color: var(--blad); }
.regel { background: var(--blad); box-shadow: var(--blad-schaduw); border-radius: 2px; margin-bottom: 6px; }
.regel.open { border-top: 3px solid var(--acc); }
.regel-kopknop { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 11px 14px; font: inherit; color: inherit; }
.regel-kopknop:hover .regel-titel { color: var(--acc); }
.regel-midden { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.regel-titel { font-family: var(--serif); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.regel-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--inkt-2); }
.regel-route { color: var(--inkt-3); font-style: italic; }
.score { width: 64px; height: 8px; flex: none; margin-top: 6px; background: var(--grond-2); border-radius: 2px; overflow: hidden; }
.score > i { display: block; height: 100%; background: var(--acc); }
.regel-tekst { padding: 0 14px 14px 34px; display: flex; flex-direction: column; gap: 8px; }
.regel-tekst ocd-regeltekst { font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.regel-groep { margin-bottom: 10px; }
.regel-groep-kop { display: flex; align-items: center; gap: 10px; padding: 8px 2px 6px; }
.regel-groep-titel { font-family: var(--serif); font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.regel-groep-kop .muted { font-size: 12.5px; }
.meer { align-self: flex-start; margin: 4px 0 2px; }
.termen { display: flex; flex-direction: column; gap: 6px; }
.syn-toggle { background: none; border: 0; color: var(--acc); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 0 4px; }
.syn-lijst { max-height: 130px; overflow-y: auto; padding: 6px; background: var(--grond); border-radius: 3px; }
.chip-groep { background: var(--acc-zacht); color: var(--acc); cursor: pointer; }
button.chip-groep[aria-pressed="false"] { background: none; border: 1px dashed var(--lijn); color: var(--inkt-3); text-decoration: line-through; }
/* Termchips staan standaard aan; "aan" moet dus rustig zijn en "uit" opvallen. */
button.chip-term[aria-pressed="true"] { background: var(--blad); color: var(--inkt-2); box-shadow: var(--blad-schaduw); }
button.chip-term[aria-pressed="true"] b { color: var(--inkt); }
button.chip-groep[aria-pressed="true"] { background: var(--acc-zacht); color: var(--acc); box-shadow: none; }

/* ── Werkingsgebied bij een artikel (fase 8) ───────────── */
.art-gebied { margin: 0 0 4px; font-size: 13px; color: var(--inkt-2); }
.art-gebied-leeg { color: var(--inkt-3); font-style: italic; }
.werking-legenda { bottom: 96px; }
.werking-legenda b { font-size: 12.5px; }
.lg-ala { border: 2px solid var(--acc); background: color-mix(in oklch, var(--acc) 16%, transparent); }
.lg-ga { border: 2px solid var(--at); background: color-mix(in oklch, var(--at) 16%, transparent); }
.lg-dekkend { background: none; border-style: dashed; }

/* ── Kenmerken bij een artikel (fase 9) ────────────────── */
.kenmerken { border-top: 1px dashed var(--lijn); margin: 2px 0 6px; }
.kenmerken-kop { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; cursor: pointer; padding: 7px 0; font: inherit; color: inherit; }
.kenmerken-kop .icoon { color: var(--inkt-3); transition: transform .12s; }
.kenmerken.open .kenmerken-kop .icoon { transform: rotate(90deg); }
.kenmerken-kop .muted { font-size: 12.5px; }
.kenmerken-body { padding: 2px 0 10px; }
.kenmerken-lijst { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.kenmerken-lijst dt { color: var(--inkt-3); }
.kenmerken-lijst dd { margin: 0; color: var(--inkt); overflow-wrap: anywhere; }
.kenmerken-lijst .muted { font-size: 12.5px; }
.norm-waarde { font-family: var(--mono); font-size: 13px; }
.kw { display: inline-block; font-size: 11.5px; padding: 2px 6px; margin-left: 6px; border-radius: 3px; background: var(--acc-zacht); color: var(--acc); }
