:root {
  --brand: #1f5f8b;
  --ink: #1a1a1a;
  --muted: #666;
  --bg: #f6f7f9;
  --card: #fff;
  --line: #e3e6ea;
  --ok: #2e7d32;
  --bad: #b00020;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.2rem; background: var(--card); border-bottom: 3px solid var(--brand); }
.brand .logo { max-height: 44px; max-width: 220px; display: block; }
.logo-text { font-weight: 700; color: var(--brand); font-size: 1.2rem; }
.top-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.wrap { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 1.2rem; }
.wrap.wide { max-width: 1200px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; margin-bottom: 1.2rem; }
.card.two, .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .card.two, .two { grid-template-columns: 1fr; } }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.big { font-size: 1.25rem; }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); margin: 0 0 .4rem; }
.alert { background: #fdecea; color: var(--bad); padding: .6rem .9rem; border-radius: 8px; }
.ok { color: var(--ok); }
.conclusion { border-left: 4px solid var(--brand); padding: .4rem .9rem; margin: 1rem 0 0; background: color-mix(in srgb, var(--brand) 6%, white); }
button, .button { font: inherit; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: .7rem 1.2rem; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost, .button.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
button.primary { font-size: 1.15rem; padding: .9rem 1.6rem; }
button.link { background: none; color: var(--brand); padding: 0; text-decoration: underline; }
button.link.danger { color: var(--bad); }
.button.small, button.small { padding: .4rem .8rem; font-size: .9rem; }
form.inline { display: inline; }
.join { display: flex; gap: .6rem; justify-content: center; margin: 1rem 0; }
.join input { font: inherit; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .15em; padding: .6rem .8rem; width: 11ch; border: 2px solid var(--line); border-radius: 10px; text-align: center; }
.form { display: grid; gap: .8rem; }
.form label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; color: var(--ink); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.form button { justify-self: start; }
.options { display: grid; gap: .6rem; margin-top: 1rem; }
.option { text-align: left; background: var(--card); color: var(--ink); border: 2px solid var(--line); font-size: 1.05rem; padding: .9rem 1rem; }
.option:hover { border-color: var(--brand); }
.option.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, white); }
.bars { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .5rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) 2fr auto; gap: .8rem; align-items: center; }
.bars.big li { font-size: 1.15rem; }
.bars .bar { background: var(--line); border-radius: 6px; height: 14px; overflow: hidden; }
.bars .bar span { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.bars li.correct .label { font-weight: 700; }
.bars li.correct .bar span { background: var(--ok); }
.bars li.own .label em { color: var(--brand); font-style: normal; }
.bars .pct { min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.choices { font-size: 1.3rem; display: grid; gap: .5rem; padding-left: 1.4rem; }
.actions { display: flex; gap: .8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; margin-right: .3rem; }
.badge { font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; background: var(--line); }
.badge.open { background: #e6f4ea; color: var(--ok); }
.plain { list-style: none; padding: 0; }
.plain li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.logo-preview { max-height: 60px; }
.adminnav { display: flex; gap: 1rem; align-items: center; }
.adminnav .grow { flex: 1; }
.present-grid { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .present-grid { grid-template-columns: 1fr; } }
.joinbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-align: center; position: sticky; top: 1rem; }
.joinbox .qr svg { width: 100%; height: auto; }
.joincode { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; letter-spacing: .2em; margin: .4rem 0 0; }
.present h1 { font-size: 2.2rem; }
.scroll { overflow-x: auto; }
.trend { border-collapse: collapse; width: 100%; font-size: .9rem; }
.trend th, .trend td { border-bottom: 1px solid var(--line); padding: .4rem .5rem; text-align: left; vertical-align: top; white-space: nowrap; }
.trend th { font-weight: 600; }
.mini { display: inline-block; width: 60px; height: 8px; background: var(--line); border-radius: 4px; vertical-align: middle; margin-right: .3rem; overflow: hidden; }
.mini span { display: block; height: 100%; background: var(--brand); }
.delta { font-size: .8rem; color: var(--muted); margin-left: .2rem; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.trend tr.mean td { font-weight: 600; }
/* Quiz */
.radios { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; display: grid; gap: .5rem; }
.radios legend { font-size: .9rem; color: var(--muted); padding: 0 .3rem; }
.radios .radio { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--ink); }
.radios .radio input { margin-top: .3rem; }
.feedback { font-size: 1.15rem; padding: .7rem .9rem; border-radius: 10px; }
.feedback.good { background: #e6f4ea; color: var(--ok); }
.feedback.bad { background: #fdecea; color: var(--bad); }
.feedback.neutral { background: var(--bg); color: var(--muted); }
.lb { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.lb th, .lb td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.lb .rank, .lb .score { text-align: right; font-variant-numeric: tabular-nums; width: 3ch; }
.lb .score { font-weight: 700; }
.lb tr.podium .rank { color: var(--brand); font-weight: 700; }
.lb tr.me td { background: color-mix(in srgb, var(--brand) 10%, white); }
.present .lb { font-size: 1.3rem; }
/* Telefoon: label boven de balk, anders wrappen lange antwoorden in een smalle kolom. */
@media (max-width: 520px) {
  .bars li { grid-template-columns: 1fr auto; row-gap: .15rem; }
  .bars .label { grid-column: 1 / -1; }
}
/* Teamquiz */
.intro { white-space: pre-line; margin: .4rem 0 1rem; }
.intro.left { text-align: left; }
.media { margin: 1rem 0; }
.media video, .media img { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; display: block; object-fit: contain; }
.media img { background: transparent; }
.media audio { width: 100%; }
.media .yt { position: relative; aspect-ratio: 16 / 9; }
.media .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.teams { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.teams li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; }
.teams li.me { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, white); font-weight: 600; }
.trophy { font-size: 3.5rem; margin: 0; line-height: 1; }
.winner { font-size: 1.8rem; font-weight: 800; color: var(--brand); margin: .3rem 0 .8rem; }
