/* ===========================================================
   Podiumtechniek — naslagwerk licht & geluid
   =========================================================== */

:root {
  --bg: #0e1016;
  --bg2: #141822;
  --card: #181d29;
  --card2: #1e2432;
  --line: #2a3143;
  --line2: #363f56;
  --txt: #e6e9f2;
  --txt2: #a6b0c6;
  --txt3: #7c8804;
  --muted: #8590a8;
  --acc: #ffb02e;      /* licht / amber */
  --acc2: #35c6f4;     /* geluid / cyaan */
  --acc3: #b06bff;     /* techniek / paars */
  --ok: #3ddc97;
  --warn: #ff9f43;
  --bad: #ff6b6b;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f5f6fa;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f0f2f8;
  --line: #dfe3ee;
  --line2: #c8cfe0;
  --txt: #171c28;
  --txt2: #48536b;
  --muted: #67718a;
  --acc: #c67c00;
  --acc2: #0a86b8;
  --acc3: #7a3fd0;
  --ok: #12915f;
  --warn: #b96b00;
  --bad: #cc3333;
  --shadow: 0 6px 24px rgba(20,30,60,.09);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--acc); color: #000; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); flex-shrink: 0; }
.brand-mark { font-size: 24px; line-height: 1; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 16px; letter-spacing: .2px; }
.brand-txt i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.iconbtn {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  color: var(--txt2); cursor: pointer; padding: 0;
}
.iconbtn:hover { color: var(--txt); border-color: var(--line2); }
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menubtn { display: none; }

#themebtn .i-sun { display: none; }
html[data-theme="light"] #themebtn .i-sun { display: block; }
html[data-theme="light"] #themebtn .i-moon { display: none; }

/* ------------------------------------------------------- zoeken */
.searchwrap { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.searchicon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
#q {
  width: 100%; height: 40px; padding: 0 14px 0 36px;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  color: var(--txt); font: inherit; font-size: 15px;
}
#q:focus { outline: none; border-color: var(--acc2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc2) 22%, transparent); }
#q::-webkit-search-cancel-button { filter: invert(.5); }

.results {
  position: absolute; top: 48px; left: 0; right: 0; z-index: 80;
  max-height: min(65vh, 520px); overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 13px;
  box-shadow: var(--shadow); padding: 6px;
}
.results a {
  display: block; padding: 9px 12px; border-radius: 9px;
  text-decoration: none; color: var(--txt); line-height: 1.4;
}
.results a:hover, .results a.sel { background: var(--card2); }
.results .rt { font-weight: 650; font-size: 15px; }
.results .rc { font-size: 11.5px; color: var(--acc2); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.results .rx { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results mark { background: color-mix(in srgb, var(--acc) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.results .empty { padding: 16px; color: var(--muted); text-align: center; font-size: 14px; }

/* ------------------------------------------------------- layout */
.layout { display: flex; align-items: flex-start; }

.sidebar {
  position: sticky; top: 61px; flex: 0 0 268px; width: 268px;
  height: calc(100vh - 61px); overflow-y: auto;
  padding: 20px 12px 60px 18px;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.navgroup { margin-bottom: 22px; }
.navtitle {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; padding-left: 8px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--muted); font-weight: 800;
}
.navicon { font-size: 13px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block; padding: 7px 10px; margin-bottom: 1px;
  border-radius: 8px; text-decoration: none;
  color: var(--txt2); font-size: 14.7px; line-height: 1.35;
}
.sidebar li a:hover { background: var(--card); color: var(--txt); }
.sidebar li a.on {
  background: color-mix(in srgb, var(--acc2) 15%, transparent);
  color: var(--txt); font-weight: 650;
  box-shadow: inset 3px 0 0 var(--acc2);
}
.scrim { display: none; }

main { flex: 1; min-width: 0; padding: 0 clamp(16px, 4vw, 56px) 80px; }
.page { max-width: 860px; margin: 0 auto; padding-top: 28px; }

/* ------------------------------------------------------- typografie */
h1 {
  font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -.6px;
  margin: 0 0 10px; font-weight: 800;
}
.lead { font-size: 18.5px; color: var(--txt2); margin: 0 0 26px; max-width: 62ch; }

h2 {
  font-size: clamp(21px, 3.4vw, 27px); line-height: 1.25; letter-spacing: -.3px;
  margin: 46px 0 14px; padding-top: 14px; font-weight: 750;
  border-top: 1px solid var(--line);
}
h2::before {
  content: ""; display: block; width: 42px; height: 3px; border-radius: 2px;
  background: var(--acc2); margin-bottom: 12px;
}
h3 { font-size: 19px; margin: 30px 0 8px; font-weight: 700; letter-spacing: -.1px; }
h4 { font-size: 16px; margin: 20px 0 6px; font-weight: 700; color: var(--txt2); }

p { margin: 0 0 15px; }
a { color: var(--acc2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
strong, b { font-weight: 680; color: var(--txt); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--muted); }

code {
  font-family: var(--mono); font-size: .89em;
  background: var(--card2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; white-space: nowrap;
}
kbd {
  font-family: var(--mono); font-size: .82em; background: var(--card2);
  border: 1px solid var(--line2); border-bottom-width: 2px;
  padding: 2px 6px; border-radius: 5px;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
abbr { text-decoration: underline dotted; cursor: help; }

/* ------------------------------------------------------- tabellen */
.tablewrap { overflow-x: auto; margin: 0 0 20px; border-radius: var(--radius); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--card); }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--card2); font-weight: 700; font-size: 13.5px; letter-spacing: .2px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--acc2) 5%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------- blokken */
.box {
  border: 1px solid var(--line); border-left: 4px solid var(--acc2);
  background: var(--card); border-radius: 12px;
  padding: 14px 18px; margin: 0 0 20px;
}
.box > :last-child { margin-bottom: 0; }
.box .bt {
  display: flex; align-items: center; gap: 7px;
  font-weight: 750; font-size: 14px; letter-spacing: .3px;
  margin-bottom: 6px; color: var(--acc2); text-transform: uppercase;
}
.box.tip { border-left-color: var(--ok); } .box.tip .bt { color: var(--ok); }
.box.let { border-left-color: var(--warn); } .box.let .bt { color: var(--warn); }
.box.gevaar { border-left-color: var(--bad); } .box.gevaar .bt { color: var(--bad); }
.box.onthoud { border-left-color: var(--acc); background: color-mix(in srgb, var(--acc) 8%, var(--card)); }
.box.onthoud .bt { color: var(--acc); }

/* formule */
.formule {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 0 20px;
}
.formule .fnaam { font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.formule .f {
  font-family: var(--mono); font-size: clamp(17px, 3vw, 22px); font-weight: 600;
  color: var(--acc); letter-spacing: .3px; line-height: 1.5; overflow-x: auto;
}
.formule .fuitleg { font-size: 14.5px; color: var(--txt2); margin-top: 10px; line-height: 1.6; }
.formule .fuitleg b { color: var(--txt); font-family: var(--mono); font-weight: 600; }

/* voorbeeldsom */
.som {
  border: 1px dashed var(--line2); border-radius: 12px; background: var(--card);
  padding: 14px 18px; margin: 0 0 20px;
}
.som .st { font-weight: 750; font-size: 13.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--acc3); margin-bottom: 8px; }
.som .stap { font-family: var(--mono); font-size: 14.5px; color: var(--txt2); margin: 3px 0; }
.som .antw { margin-top: 10px; font-weight: 700; color: var(--ok); }
.som > :last-child { margin-bottom: 0; }

/* kaartenraster */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0 0 26px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--acc2); }
.card .ct { font-weight: 700; font-size: 16px; margin-bottom: 3px; display: block; }
.card .cd { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.card .cn { font-family: var(--mono); font-size: 11px; color: var(--acc2); font-weight: 700; }

/* sectiekop op homepage */
.homesec { display: flex; align-items: baseline; gap: 10px; margin: 38px 0 14px; }
.homesec h2 { border: 0; padding: 0; margin: 0; }
.homesec h2::before { display: none; }
.homesec .tag { font-size: 12px; color: var(--muted); }

/* inhoudsopgave */
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 30px;
}
.toc .tt { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.toc ol { columns: 2; column-gap: 26px; margin: 0; padding-left: 20px; font-size: 15px; }
.toc li { margin-bottom: 3px; break-inside: avoid; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.chip {
  font-size: 13px; padding: 4px 11px; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--line); color: var(--txt2);
}
.chip b { color: var(--acc); }

/* signaalketen / stroomdiagram */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 14px; }
.flow span {
  background: var(--card); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 12px; font-weight: 600;
}
.flow i { color: var(--acc2); font-style: normal; font-weight: 800; }

/* twee kolommen */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }

/* kleurstaal */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line2); vertical-align: -2px; margin-right: 6px; }

/* ------------------------------------------------------- rekenmachine */
.calc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 22px;
}
.calc h3 { margin: 0 0 4px; font-size: 17.5px; }
.calc .cdesc { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.calcrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.calc label { display: block; font-size: 12.5px; font-weight: 700; color: var(--txt2); margin-bottom: 4px; letter-spacing: .2px; }
.calc input, .calc select {
  width: 100%; height: 40px; padding: 0 11px; font: inherit; font-size: 15px;
  background: var(--bg2); color: var(--txt);
  border: 1px solid var(--line2); border-radius: 9px;
}
.calc input:focus, .calc select:focus { outline: none; border-color: var(--acc2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc2) 20%, transparent); }
.calcout {
  background: var(--card2); border: 1px solid var(--line2); border-radius: 11px;
  padding: 13px 16px; font-size: 15px; line-height: 1.7;
}
.calcout .big { font-family: var(--mono); font-size: 21px; font-weight: 700; color: var(--acc); display: block; }
.calcout .sub { font-size: 13.5px; color: var(--muted); }
.calcout .warnmsg { color: var(--bad); font-weight: 650; }
.calcout .okmsg { color: var(--ok); font-weight: 650; }

/* ------------------------------------------------------- vorige/volgende */
.pagenav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
}
.pn {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
}
.pn:hover { border-color: var(--acc2); }
.pn span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.pn b { font-size: 15px; font-weight: 650; }
.pn.next { text-align: right; }

.foot { max-width: 860px; margin: 40px auto 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.foot p { margin: 0 0 6px; }
.foot .small { font-size: 12.5px; }

/* ------------------------------------------------------- mobiel */
@media (max-width: 900px) {
  body { font-size: 16.5px; }
  .menubtn { display: grid; }
  .brand-txt i { display: none; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: 280px; z-index: 100;
    background: var(--bg2); transform: translateX(-102%); transition: transform .22s ease;
    padding-top: 72px; box-shadow: var(--shadow);
  }
  body.navopen .sidebar { transform: none; }
  body.navopen .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90; }
  main { padding-left: 16px; padding-right: 16px; }
  .pagenav { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  .searchwrap { max-width: none; }
  .brand-txt b { font-size: 15px; }
}
@media (max-width: 560px) {
  .brand-txt { display: none; }
}

/* ------------------------------------------------------- print */
@media print {
  .topbar, .sidebar, .pagenav, .scrim { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; }
  .box, .formule, .som, table, .calc { break-inside: avoid; border-color: #999; }
  a { color: #000; text-decoration: none; }
}
