/* CoreBot — licht en donker via kleurschema van het apparaat. Geen externe lettertypen of scripts. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --ink: #0d1b2a; --muted: #56657a; --line: #dde3ec;
  --accent: #2f3dff; --accent-ink: #ffffff; --accent-soft: #e8eaff;
  --ok: #0b8f6a; --warn: #9a5b00; --warn-bg: #fff4de; --bad: #c92a2a; --bad-bg: #ffe9e9;
  --r1: #dfe3ff; --r2: #b9c0ff; --r3: #2f3dff;
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1d; --surface: #111a2e; --ink: #e8edf7; --muted: #93a1b8; --line: #243350;
    --accent: #8c97ff; --accent-ink: #0a0f1d; --accent-soft: #1b2350;
    --ok: #3ecf9f; --warn: #ffc666; --warn-bg: #3a2c10; --bad: #ff8a8a; --bad-bg: #3b1818;
    --r1: #1b2350; --r2: #2c3a8c; --r3: #8c97ff;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1d; --surface: #111a2e; --ink: #e8edf7; --muted: #93a1b8; --line: #243350;
  --accent: #8c97ff; --accent-ink: #0a0f1d; --accent-soft: #1b2350;
  --ok: #3ecf9f; --warn: #ffc666; --warn-bg: #3a2c10; --bad: #ff8a8a; --bad-bg: #3b1818;
  --r1: #1b2350; --r2: #2c3a8c; --r3: #8c97ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 760; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
code { font: .9em ui-monospace, Menlo, Consolas, monospace; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; word-break: break-all; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }

/* kop */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1.5px color-mix(in srgb, #3fd4ff 55%, transparent), 0 0 12px color-mix(in srgb, #3fd4ff 35%, transparent); }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font: inherit; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--accent-soft); }
.nav a[aria-current="page"] { background: var(--accent-soft); font-weight: 650; }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; padding-inline: 6px; }
.who img, .ava { width: 26px; height: 26px; border-radius: 50%; background: var(--line); object-fit: cover; }

/* knoppen en velden */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.f { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
label.f small, .hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=number], select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.sw { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; min-height: 44px; }
.sw input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw input:checked { background: var(--accent); }
.sw input:checked::after { transform: translateX(18px); }
.sw input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: grid; gap: 16px; }

/* hero */
.hero { display: grid; gap: 40px; grid-template-columns: 1.05fr .95fr; align-items: center; padding-block: clamp(32px, 7vw, 84px); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }
/* banner en mascotte */
.banner { margin: 0; border-radius: 14px; overflow: hidden; background: #02080f; border: 1px solid color-mix(in srgb, #3fd4ff 30%, var(--line)); box-shadow: 0 18px 50px -24px color-mix(in srgb, #3fd4ff 55%, transparent); }
.banner img { display: block; width: 100%; height: auto; aspect-ratio: 1584 / 672; object-fit: cover; }
.hero { padding-block: clamp(24px, 5vw, 56px); }
.mascot { width: 100%; height: auto; max-width: 440px; justify-self: center; filter: drop-shadow(0 18px 34px color-mix(in srgb, #3fd4ff 35%, transparent)); animation: cb-float 6s ease-in-out infinite; }
@keyframes cb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 800px) { .mascot { max-width: 300px; } }

.facts { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding-block: 24px 40px; }
.facts > div { border-top: 3px solid var(--c, var(--accent)); padding-top: 14px; }
.facts p { color: var(--muted); }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { font-weight: 650; cursor: pointer; min-height: 32px; }
details p { margin-top: 8px; color: var(--muted); }
.foot { border-top: 1px solid var(--line); margin-top: 64px; padding-block: 24px 40px; color: var(--muted); font-size: .92rem; }

/* inhoud */
main { padding-block: 28px 96px; min-height: 60vh; }
.head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0; }
.head .grow { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.rows { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 160px; }
.row .name { font-weight: 650; }
.gicon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; object-fit: cover; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 650; background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 12px 14px; border-radius: 9px; background: var(--warn-bg); color: var(--warn); margin-bottom: 14px; }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.info { background: var(--accent-soft); color: var(--ink); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.chan { border-top: 1px solid var(--line); }
.chan:first-child { border-top: 0; }
.chan .bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.chan .cn { font-weight: 650; flex: 1; min-width: 140px; }
.chan .open { padding: 4px 16px 18px; }
.chan .open[hidden] { display: none; }
.cmd { display: grid; grid-template-columns: auto 150px 1fr auto; gap: 10px; align-items: start; margin-bottom: 10px; }
.cmd textarea { min-height: 44px; }
@media (max-width: 640px) { .cmd { grid-template-columns: 1fr 1fr; } .cmd textarea { grid-column: 1 / -1; } }
.faqlist { display: grid; gap: 14px; }
.faq { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.faq:last-child { border-bottom: 0; padding-bottom: 0; }
.faq .faqon { min-height: 44px; }
.faqbody { min-width: 0; gap: 4px; }
.faqbody textarea { min-height: 84px; }
.faqbtns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .faq { grid-template-columns: 1fr auto; } .faqbody { grid-column: 1 / -1; grid-row: 2; } }
.save { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
.save .wrap { display: flex; gap: 12px; align-items: center; padding-block: 10px; }
.save .grow { flex: 1; font-weight: 600; }
.save[hidden] { display: none; }
.meter { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); }
.meter.hot > i { background: var(--bad); }
.bars { display: flex; gap: 8px; align-items: flex-end; height: 120px; }
.bars div { flex: 1; display: grid; gap: 4px; align-content: end; text-align: center; font-size: .8rem; color: var(--muted); height: 100%; }
.bars i { display: block; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 20px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats b { display: block; font-size: 1.7rem; letter-spacing: -0.02em; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 9px; font-weight: 600; max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
.toast[hidden] { display: none; }
body.plain main.install, .install { width: min(560px, 100% - 32px); margin: 32px auto; }
.install form { display: grid; gap: 12px; }
.install label { display: grid; gap: 4px; font-weight: 600; }
.install input { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; background: var(--surface); color: var(--ink); }
.checks { list-style: none; padding: 0; } .checks .ok { color: var(--ok); } .checks .bad, p.bad { color: var(--bad); } .ok { color: var(--ok); } .warn { color: var(--warn); }
.legal { max-width: 70ch; }
.legal h2 { margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.mt { margin-top: 12px; } .mt2 { margin-top: 32px; }

/* ---------- v0.3.0: animaties, routeplan, wiki, ScriptSpace, footer ---------- */
:root { --glow: #3fd4ff; }

/* zacht in beeld schuiven (alleen als het apparaat beweging toestaat) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d2 { transition-delay: .08s; } .reveal.d3 { transition-delay: .16s; }
  .banner { position: relative; }
  .banner::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--glow) 22%, transparent) 50%, transparent 65%);
    transform: translateX(-100%); animation: cb-sweep 7s ease-in-out 1.2s infinite; }
  @keyframes cb-sweep { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
  .btn { transition: transform .15s ease, box-shadow .2s ease, border-color .15s, filter .15s; }
  .btn:hover { transform: translateY(-1px); }
  .btn.primary:hover { box-shadow: 0 8px 22px -10px var(--accent); }
}

/* koptekst met gloed */
.hero h1, .pagehead h1 { background: linear-gradient(100deg, var(--ink) 30%, color-mix(in srgb, var(--glow) 70%, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pagehead { padding-block: 12px 28px; }
.pagehead .lead { font-size: 1.12rem; color: var(--muted); }

/* teaser naar routeplan */
.teaser { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 22px 24px; margin-block: 8px 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.teaser h2 { margin-bottom: .25em; } .teaser p { margin: 0; }

/* ScriptSpace-blok */
.cms { display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr; align-items: center; margin-block: 16px 48px; padding: clamp(20px, 4vw, 36px);
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--glow) 30%, var(--line));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--glow) 14%, var(--surface)), var(--surface) 60%); }
.cms .chip { margin-bottom: 10px; }
.cms-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cms-feats li { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.cms-feats li:hover { border-color: var(--glow); }
.cms-feats h3 { margin-bottom: .2em; } .cms-feats p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 800px) { .cms { grid-template-columns: 1fr; } }

/* routeplan */
.roadmap { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); align-items: start; }
@media (max-width: 960px) { .roadmap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }
.rp-col h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 12px; }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-item { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; }
.rp-item h3 { font-size: 1rem; margin-bottom: .3em; } .rp-item p { margin: 0; color: var(--muted); font-size: .93rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.klaar, .rp-item.klaar { --c: var(--ok); } .dot.bezig, .rp-item.bezig { --c: var(--glow); }
.dot.gepland, .rp-item.gepland { --c: var(--accent); } .dot.idee, .rp-item.idee { --c: var(--muted); }
.dot { background: var(--c); } .rp-item { border-left-color: var(--c); }
@media (prefers-reduced-motion: no-preference) { .dot.bezig { animation: cb-pulse 1.8s ease-in-out infinite; } }
@keyframes cb-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 60%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* wiki */
.wiki { display: grid; gap: 32px; grid-template-columns: 230px 1fr; align-items: start; }
.wiki-toc { position: sticky; top: 76px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.wiki-toc h2 { font-size: .95rem; color: var(--muted); margin-bottom: 8px; }
.wiki-toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.wiki-toc a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; }
.wiki-toc a:hover { color: var(--accent); }
.wiki-sec, .wiki-anchor { scroll-margin-top: 80px; }
.wiki-sec { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.wiki-sec h2 { font-size: 1.3rem; }
.steps { padding-left: 1.3em; display: grid; gap: 6px; max-width: 68ch; }
@media (max-width: 800px) { .wiki { grid-template-columns: 1fr; } .wiki-toc { position: static; } }

/* footer */
.foot { margin-top: 48px; padding-block: 36px 24px; }
.footgrid { display: grid; gap: 24px; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.footgrid nav { display: grid; gap: 6px; align-content: start; }
.footgrid h4 { margin: 0 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.footgrid a { color: var(--muted); text-decoration: none; } .footgrid a:hover { color: var(--accent); }
.footbrand p { margin-top: 10px; max-width: 34ch; }
.footbrand p a { color: var(--accent); }
.footbrand .brand { margin: 0; }
.footline { display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }
@media (max-width: 800px) { .footgrid { grid-template-columns: 1fr 1fr; } .footbrand { grid-column: 1 / -1; } }

/* ---------- v0.3.1: feestkleuren, confetti en "Zo werkt het" ---------- */
:root { --c-red: #ff5d6c; --c-orange: #ff9f43; --c-yellow: #ffd43b; --c-green: #3ddc84; --c-blue: #4dabf7; --c-violet: #b197fc;
  --rainbow: linear-gradient(90deg, var(--c-red), var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-violet)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --c-red: #e03131; --c-orange: #e8590c; --c-yellow: #d4a106; --c-green: #2b8a3e; --c-blue: #1971c2; --c-violet: #7048e8; } }
.c-red { --c: var(--c-red); } .c-orange { --c: var(--c-orange); } .c-yellow { --c: var(--c-yellow); }
.c-green { --c: var(--c-green); } .c-blue { --c: var(--c-blue); } .c-violet { --c: var(--c-violet); }

/* dunne regenbooglijn onder de kopbalk en boven de footer */
.top { border-bottom: 0; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rainbow); opacity: .85; }
.foot { border-top: 0; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rainbow); opacity: .6; }
.footgrid nav:nth-of-type(1) h4 { color: var(--c-blue); } .footgrid nav:nth-of-type(2) h4 { color: var(--c-green); } .footgrid nav:nth-of-type(3) h4 { color: var(--c-orange); }

/* koptekst: kleine kleurstreep onder de h2's */
.flow-head h2::after, .stack > h2::after, .cms h2::after, .teaser h2::after, .wiki-sec h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--rainbow); }
.kicker { display: inline-block; font-weight: 750; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
  color: var(--c-yellow); background: color-mix(in srgb, var(--c-yellow) 14%, transparent); }

/* "Gratis"-badge in de hero */
.party { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: .9rem; padding: 5px 14px 5px 10px; border-radius: 999px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--c-green) 14%, transparent); color: var(--c-green); border: 1px solid color-mix(in srgb, var(--c-green) 40%, transparent); }

/* confetti: vaste snippers in de hero (CSS), en een knal bij "Bot toevoegen" (JS) */
.hero { position: relative; isolation: isolate; }
.sprinkles { position: absolute; inset: -10px 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sprinkles i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; background: var(--c); opacity: .0; }
@media (prefers-reduced-motion: no-preference) {
  .sprinkles i { animation: cb-fall var(--d, 9s) linear var(--w, 0s) infinite; }
  @keyframes cb-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 8% { opacity: .55; } 85% { opacity: .45; } 100% { transform: translateY(520px) rotate(540deg); opacity: 0; } }
}
.sprinkles i:nth-child(1) { left: 4%; --c: var(--c-red); --d: 10s; --w: .2s; }
.sprinkles i:nth-child(2) { left: 13%; --c: var(--c-yellow); --d: 12s; --w: 3s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(3) { left: 24%; --c: var(--c-blue); --d: 9s; --w: 6s; }
.sprinkles i:nth-child(4) { left: 37%; --c: var(--c-green); --d: 13s; --w: 1.5s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(5) { left: 49%; --c: var(--c-orange); --d: 11s; --w: 4.5s; }
.sprinkles i:nth-child(6) { left: 58%; --c: var(--c-violet); --d: 10s; --w: 7s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(7) { left: 68%; --c: var(--c-red); --d: 12s; --w: 2.2s; }
.sprinkles i:nth-child(8) { left: 79%; --c: var(--c-yellow); --d: 9.5s; --w: 5.4s; }
.sprinkles i:nth-child(9) { left: 88%; --c: var(--c-green); --d: 11.5s; --w: .8s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(10) { left: 95%; --c: var(--c-blue); --d: 13s; --w: 3.8s; }
.sprinkles i:nth-child(11) { left: 8%; --c: var(--c-orange); --d: 10.5s; --w: 6.6s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(12) { left: 19%; --c: var(--c-violet); --d: 12.5s; --w: 2.7s; }
.sprinkles i:nth-child(13) { left: 31%; --c: var(--c-red); --d: 9.8s; --w: 8.1s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(14) { left: 43%; --c: var(--c-yellow); --d: 11s; --w: 0.4s; }
.sprinkles i:nth-child(15) { left: 54%; --c: var(--c-blue); --d: 13.5s; --w: 5.9s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(16) { left: 63%; --c: var(--c-green); --d: 10s; --w: 3.3s; }
.sprinkles i:nth-child(17) { left: 74%; --c: var(--c-orange); --d: 12s; --w: 7.6s; width: 6px; height: 6px; border-radius: 50%; }
.sprinkles i:nth-child(18) { left: 84%; --c: var(--c-violet); --d: 9.2s; --w: 1.1s; }
.boom { position: fixed; z-index: 60; width: 9px; height: 13px; border-radius: 2px; pointer-events: none; background: var(--c); }

/* ScriptSpace-blok en routeplan in kleur */
.cms-feats li:nth-child(1) { border-left: 4px solid var(--c-red); } .cms-feats li:nth-child(2) { border-left: 4px solid var(--c-violet); } .cms-feats li:nth-child(3) { border-left: 4px solid var(--c-blue); }
.dot.gepland, .rp-item.gepland { --c: var(--c-yellow); } .dot.idee, .rp-item.idee { --c: var(--c-violet); } .dot.bezig, .rp-item.bezig { --c: var(--c-blue); }
.teaser { border-left: 4px solid var(--c-orange); }
.wiki-sec:nth-of-type(6n+1) h2::after { background: var(--c-red); } .wiki-sec:nth-of-type(6n+2) h2::after { background: var(--c-orange); }
.wiki-sec:nth-of-type(6n+3) h2::after { background: var(--c-yellow); } .wiki-sec:nth-of-type(6n+4) h2::after { background: var(--c-green); }
.wiki-sec:nth-of-type(6n+5) h2::after { background: var(--c-blue); } .wiki-sec:nth-of-type(6n) h2::after { background: var(--c-violet); }

/* ---------- Zo werkt het ---------- */
.flow { padding-block: 24px 48px; }
.flow-head { max-width: 62ch; margin-bottom: 26px; }
.flow-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.flow-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)) 28px minmax(0, 1.25fr); align-items: stretch; }
.lay { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--accent)); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.lay header { display: flex; gap: 10px; align-items: center; }
.lay h3 { margin: 0; font-size: 1.02rem; } .lay header p { margin: 0; font-size: .82rem; color: var(--muted); }
.step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; flex: none; background: var(--c); color: #0a0f1d; }
.lay ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lay li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: .9rem; background: color-mix(in srgb, var(--c, var(--accent)) 9%, transparent); }
.lay li span { color: var(--muted); } .lay li b { font-weight: 650; text-align: right; }
.lay li.inherit { background: transparent; border: 1px dashed var(--line); } .lay li.inherit b { color: var(--muted); font-weight: 450; font-style: italic; }
.flow-arrow { align-self: center; height: 4px; border-radius: 2px; background: var(--rainbow); position: relative; }
.flow-arrow::after { content: ""; position: absolute; right: -2px; top: 50%; width: 10px; height: 10px; border-top: 4px solid var(--c-violet); border-right: 4px solid var(--c-violet); transform: translateY(-50%) rotate(45deg); }
.lay.result { --c: var(--glow); border-top: 0; position: relative; overflow: hidden;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--rainbow) border-box; border: 2px solid transparent;
  box-shadow: 0 18px 44px -24px color-mix(in srgb, var(--glow) 60%, transparent); }
.resava { width: 40px; height: 40px; border-radius: 50%; }
.botchip { font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; vertical-align: 2px; }
.bubble { margin: 0; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: color-mix(in srgb, var(--glow) 12%, var(--bg)); min-height: 2.6em; }
.origin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.origin li { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; padding: 6px 10px; border-left: 4px solid var(--c); border-radius: 6px; background: color-mix(in srgb, var(--c) 9%, transparent); }
.origin li span { color: var(--muted); font-size: .85rem; } .origin li b { text-align: right; }
.origin li small { grid-column: 1 / -1; color: var(--c); font-size: .76rem; font-weight: 650; }
@media (max-width: 1000px) { .flow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .flow-arrow { grid-column: 1 / -1; width: 4px; height: 28px; justify-self: center; background: linear-gradient(var(--c-orange), var(--c-violet)); }
  .flow-arrow::after { right: auto; left: 50%; top: auto; bottom: -2px; transform: translateX(-50%) rotate(135deg); } .lay.result { grid-column: 1 / -1; } }
@media (max-width: 640px) { .flow-grid { grid-template-columns: 1fr; } }

/* animatie: lagen vallen één voor één op hun plek, daarna typt Kees zijn antwoord */
@media (prefers-reduced-motion: no-preference) {
  .flow .lay, .flow .flow-arrow { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1.15); }
  .flow.in .lay, .flow.in .flow-arrow { opacity: 1; transform: none; }
  .flow.in .s2 { transition-delay: .25s; } .flow.in .s3 { transition-delay: .5s; } .flow.in .flow-arrow { transition-delay: .75s; } .flow.in .s4 { transition-delay: .95s; }
  .flow .lay li.set { transition: box-shadow .4s ease .2s; }
  .flow .origin li { opacity: 0; transform: translateX(-10px); transition: opacity .4s ease, transform .4s ease; }
  .flow.in .origin li { opacity: 1; transform: none; }
  .flow.in .origin li:nth-child(1) { transition-delay: 1.3s; } .flow.in .origin li:nth-child(2) { transition-delay: 1.45s; }
  .flow.in .origin li:nth-child(3) { transition-delay: 1.6s; } .flow.in .origin li:nth-child(4) { transition-delay: 1.75s; }
  .lay:not(.result):hover { transform: translateY(-3px); box-shadow: 0 12px 30px -18px var(--c); }
}
.typed.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--glow); animation: cb-caret .8s step-end infinite; }
@keyframes cb-caret { 50% { opacity: 0; } }

/* ---------- v0.3.2: SBWebUI ---------- */
.sbw { display: grid; gap: 28px; grid-template-columns: 1.15fr .85fr; align-items: center; margin-block: 0 48px; padding: clamp(20px, 4vw, 36px); border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--c-yellow) 30%, var(--line));
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c-yellow) 10%, var(--surface)), var(--surface) 60%); }
.sbw h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--rainbow); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; padding: 0; }
.tags li { padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.wink { color: var(--muted); font-style: italic; }
.sbw-chat { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.msg { margin: 0; padding: 9px 13px; border-radius: 14px; max-width: 88%; font-size: .95rem; }
.msg.me { justify-self: end; background: color-mix(in srgb, var(--c-blue) 22%, var(--surface)); border-bottom-right-radius: 4px; }
.msg.ai { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-yellow); }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: cb-dot 1.2s ease-in-out infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
  @keyframes cb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
  .sbw .msg { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
  .sbw.in .msg { opacity: 1; transform: none; } .sbw.in .msg:nth-child(2) { transition-delay: .6s; } .sbw.in .msg:nth-child(3) { transition-delay: 2.2s; }
}
@media (max-width: 800px) { .sbw { grid-template-columns: 1fr; } }

/* v0.4.0: plugins */
.plughead { display: flex; align-items: flex-start; gap: 12px; }
.plughead .sw { flex: 1; }
.tier { font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tier.premium { background: var(--warn-bg); color: var(--warn); }
.sched { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.schedhead { display: flex; align-items: center; gap: 10px; }
.schedhead .grow { flex: 1; }
.colorin { display: flex; gap: 8px; align-items: center; }
.colorin input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.colorin input[type=text] { flex: 1; min-width: 0; }
[hidden] { display: none !important; }

/* v0.5.0: Embed-bouwer */
.embedgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.embedprev { border-left: 4px solid #3FD4FF; background: #2b2d31; color: #dbdee1; border-radius: 4px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; overflow-wrap: anywhere; }
.embedprev .ep-title { font-weight: 700; color: #f2f3f5; }
.embedprev .ep-text { line-height: 1.45; }
.embedprev a { color: #00a8fc; }
.embedprev .ep-img { max-width: 100%; border-radius: 4px; }
.embedprev .ep-foot { font-size: .78rem; color: #b5bac1; }
.embedprev .hint { color: #b5bac1; }
.acthist { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.acthist:first-child { border-top: 0; }
.acthist .grow { flex: 1; min-width: 180px; }
.acticon { font-size: 1.1rem; }

/* v0.5.0: rollenpaneelbouwer */
.rolebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.rolebtn { background: #4e5058; color: #fff; border-radius: 4px; padding: 6px 14px; font-size: .9rem; font-weight: 500; }
.rolerow { display: grid; grid-template-columns: minmax(140px, 1.4fr) 70px minmax(120px, 1fr) auto; gap: 8px; align-items: center; }
.rolerow .emoji-in { text-align: center; }
@media (max-width: 640px) { .rolerow { grid-template-columns: 1fr 70px; } .rolerow > input:not(.emoji-in), .rolerow > button { grid-column: 1 / -1; } }

/* v0.5.4: hitlijst */
.hitlist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.hitlist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.hitplek { flex: none; width: 2rem; text-align: right; font-weight: 700; font-size: 1.2rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.hitlist img, .hitgeen { flex: none; width: 48px; height: 48px; border-radius: 6px; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.hittekst { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
