/* Handleiding van Bladwijzer: dezelfde kleuren als de app, rustig en goed leesbaar. */
:root {
  --bg: #f5f2ea; --surface: #fffdf8; --surface-2: #ede8db; --ink: #1c2a1f; --muted: #5b695e; --line: #dcd4c3;
  --primary: #2f6b3f; --primary-ink: #fff; --primary-soft: #dcebdc; --accent: #a5582a;
  --tip: #2f6b3f; --tip-soft: #e3efe3; --note: #2a5b9c; --note-soft: #e4ecf7; --warn: #8a5a00; --warn-soft: #fbefd5; --imp: #8a2f5a; --imp-soft: #f6e3ec;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111913; --surface: #18221b; --surface-2: #213026; --ink: #e4ece5; --muted: #9fb2a4; --line: #2d3d31;
    --primary: #86c894; --primary-ink: #0f1711; --primary-soft: #223a29; --accent: #e3a56f;
    --tip: #86c894; --tip-soft: #1d3324; --note: #8fb6ea; --note-soft: #1b2838; --warn: #f0c46a; --warn-soft: #3a2f17; --imp: #eaa0c4; --imp-soft: #3a1f2c;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
a { color: var(--primary); }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.15rem var(--serif); white-space: nowrap; }
.brand img { border-radius: 8px; }
.brand b { font: 500 .95rem var(--font); color: var(--muted); }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; min-height: 40px; }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgb(0 0 0 / 18%); max-height: 70vh; overflow: auto; }
.results a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.results a[aria-selected='true'], .results a:hover { background: var(--primary-soft); }
.results small { display: block; color: var(--muted); font-size: .8rem; }
.results mark { background: var(--warn-soft); color: inherit; border-radius: 3px; }
.results .empty { padding: 10px; color: var(--muted); }
.to-app { white-space: nowrap; font-weight: 600; text-decoration: none; }
.menu-btn { display: none; font: 600 .95rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 32px; max-width: 1320px; margin: 0 auto; padding: 0 18px; }
.sidebar { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow: auto; padding: 22px 4px 40px 0; }
.nav-section { margin-bottom: 18px; }
.nav-title { margin: 0 0 6px; font: 700 .72rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sidebar ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .94rem; line-height: 1.35; }
.sidebar a:hover { background: var(--surface-2); }
.sidebar a[aria-current='page'] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
main { min-width: 0; padding: 28px 0 40px; outline: none; }
.toc { position: sticky; top: 64px; align-self: start; padding: 28px 0; font-size: .86rem; }
.toc a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--primary); }
.toc .d3 a { padding-left: 12px; }

.doc { max-width: 760px; }
.doc h1 { font: 600 clamp(1.9rem, 4vw, 2.5rem)/1.15 var(--serif); margin: 0 0 10px; }
.doc h2 { font: 600 1.45rem/1.25 var(--serif); margin: 2em 0 .5em; padding-top: .4em; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.doc h2, .doc h3 { position: relative; }
.anchor { position: absolute; left: -1.1em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.crumbs { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.doc code { font: .88em var(--mono); background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.doc pre { background: var(--surface-2); padding: 14px 16px; border-radius: 10px; overflow: auto; }
.doc pre code { background: none; padding: 0; font-size: .86rem; }
.doc kbd { font: .85em var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--surface); }
.doc li { margin: .2em 0; }
.doc figure { margin: 18px 0; }
.doc figure img { display: block; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgb(30 45 32 / 10%); }
.doc figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.callout { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--tip); background: var(--tip-soft); border-radius: 0 10px 10px 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px; font-weight: 700; color: var(--tip); }
.callout.note { border-color: var(--note); background: var(--note-soft); } .callout.note .callout-title { color: var(--note); }
.callout.warning { border-color: var(--warn); background: var(--warn-soft); } .callout.warning .callout-title { color: var(--warn); }
.callout.important { border-color: var(--imp); background: var(--imp-soft); } .callout.important .callout-title { color: var(--imp); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--primary); }
.cards strong { display: block; color: var(--primary); }
.cards span { font-size: .9rem; color: var(--muted); }
.updated { margin-top: 32px; font-size: .85rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; max-width: 760px; margin-top: 36px; }
.pager a { flex: 1; max-width: 48%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--primary); }
.pager .next { text-align: right; margin-left: auto; }
.pager small { display: block; font-weight: 400; color: var(--muted); }
.foot { max-width: 760px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.foot a { color: var(--muted); }

@media (max-width: 1100px) { .layout { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .menu-btn { display: inline-block; }
  .to-app { display: none; }
  .brand b { display: none; }
  .sidebar { display: none; position: fixed; inset: 61px 0 0 0; max-height: none; z-index: 15; background: var(--bg); padding: 18px 16px 60px; }
  body.menu-open .sidebar { display: block; }
  .anchor { display: none; }
  .pager a { max-width: none; }
}
@media (max-width: 480px) { .top { gap: 8px; padding: 8px 12px; } .search input { padding: 7px 12px; } }
@media print { .top, .sidebar, .toc, .pager, .foot { display: none; } .layout { display: block; } body { background: #fff; } }
