/* Optochtmeester — styling based on DESIGN.md (Apple-inspired).
   One interactive color (Action Blue), SF Pro typography, pill CTAs, flat chrome, hairline cards.
   Themes: light (default), dark; "auto" follows the OS. Set via <html data-theme="light|dark">. */

:root {
  --bg: #f5f5f7;            /* canvas-parchment */
  --surface: #ffffff;       /* canvas */
  --surface-2: #fafafc;     /* surface-pearl */
  --fill: #f5f5f7;
  --text: #1d1d1f;          /* ink */
  --text-2: #333333;        /* ink-muted-80 */
  --muted: #6e6e73;
  --hairline: #e0e0e0;
  --input-border: #d2d2d7;
  --link: #0066cc;          /* primary */
  --btn: #0066cc;
  --focus: #0071e3;         /* primary-focus */
  --selected: rgba(0, 102, 204, .07);
  --danger: #d70015;
  --ok: #248a3d;
  --warn-bg: #fff4e5;
  --warn-ink: #a04a00;
  --nav-bg: rgba(0, 0, 0, .86);
  --subnav-bg: rgba(245, 245, 247, .8);
  --tile-dark: #272729;
  --photo-shadow: rgba(0, 0, 0, .22) 3px 5px 30px 0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --fill: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #d2d2d7;
    --muted: #a1a1a6;
    --hairline: #38383a;
    --input-border: #48484a;
    --link: #2997ff;        /* primary-on-dark */
    --btn: #0071e3;
    --focus: #2997ff;
    --selected: rgba(41, 151, 255, .14);
    --danger: #ff453a;
    --ok: #30d158;
    --warn-bg: #3a2a10;
    --warn-ink: #ffb340;
    --nav-bg: rgba(22, 22, 23, .86);
    --subnav-bg: rgba(0, 0, 0, .72);
    --tile-dark: #1c1c1e;
    --photo-shadow: rgba(0, 0, 0, .5) 3px 5px 30px 0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --fill: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #d2d2d7;
  --muted: #a1a1a6;
  --hairline: #38383a;
  --input-border: #48484a;
  --link: #2997ff;
  --btn: #0071e3;
  --focus: #2997ff;
  --selected: rgba(41, 151, 255, .14);
  --danger: #ff453a;
  --ok: #30d158;
  --warn-bg: #3a2a10;
  --warn-ink: #ffb340;
  --nav-bg: rgba(22, 22, 23, .86);
  --subnav-bg: rgba(0, 0, 0, .72);
  --tile-dark: #1c1c1e;
  --photo-shadow: rgba(0, 0, 0, .5) 3px 5px 30px 0;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text, "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, .display {
  font-family: var(--font-display, "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif);
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: 21px; line-height: 1.19; letter-spacing: 0.011em; }
h3 { font-size: 17px; line-height: 1.24; margin-top: 1.6em; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { background: var(--fill); padding: .1em .4em; border-radius: 5px; font-size: .88em; letter-spacing: 0; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 735px) { .wrap { padding: 0 24px; } }
.main { padding-top: 32px; padding-bottom: 64px; min-height: 70vh; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.43; letter-spacing: -0.016em; }
.center { text-align: center; }
.right { text-align: right; }
.inline { display: inline; }
[hidden] { display: none !important; }
/* Full-bleed band inside the centered layout */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- global nav ---------- */
.topbar {
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--nav-ink, #fff);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--nav-ink, #fff); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; min-width: 0; }
.brand:hover { text-decoration: none; opacity: .85; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { font-size: 16px; line-height: 1; }
.topnav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; letter-spacing: -0.01em; }
.topnav > a:not(.btn), .topnav .muted { color: color-mix(in srgb, var(--nav-ink, #fff) 80%, transparent); }
.topnav > a:not(.btn):hover { color: var(--nav-ink, #fff); text-decoration: none; }
.topbar .btn-ghost { color: var(--nav-ink, #fff); border-color: color-mix(in srgb, var(--nav-ink, #fff) 35%, transparent); background: transparent; }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.theme-toggle {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--nav-ink, #fff) 14%, transparent); color: var(--nav-ink, #fff); cursor: pointer; padding: 0;
  transition: transform .1s;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .22); }
.theme-toggle:active { transform: scale(.95); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ---------- footer ---------- */
.footer { color: var(--muted); font-size: 12px; letter-spacing: -0.01em; padding-top: 24px; padding-bottom: 40px; text-align: center; border-top: 1px solid var(--hairline); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--btn); color: var(--btn-ink, #fff); border: 1px solid transparent;
  border-radius: var(--r-btn, 9999px); padding: 10px 22px; min-height: 44px;
  font: inherit; font-size: 17px; font-weight: 400; letter-spacing: -0.022em; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .1s ease, background-color .15s ease, opacity .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-sm { padding: 6px 15px; min-height: 32px; font-size: 14px; letter-spacing: -0.016em; }
.btn-lg { padding: 14px 28px; font-size: 18px; font-weight: 400; }
.btn-block { width: 100%; }
.btn-accent { background: var(--btn); color: var(--btn-ink, #fff); }           /* single accent: same as primary */
.btn-ghost { background: transparent; color: var(--link); border-color: var(--link); }
.btn-ghost:hover { background: var(--selected); filter: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost.danger { border-color: var(--danger); }
.danger { color: var(--danger) !important; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- cards & layout ---------- */
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card, 18px);
  padding: 24px; margin-bottom: 20px;
}
@media (max-width: 480px) { .card { padding: 18px; border-radius: 14px; } }
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card.empty { text-align: center; padding: 48px 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin-bottom: .15em; }
.page-head p { margin: 0; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; letter-spacing: -0.016em; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--hairline)); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }

/* frosted sub-nav for parade sections */
.tabs {
  position: sticky; top: 48px; z-index: 10;
  display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none;
  background: var(--subnav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  margin: 0 -16px 28px; padding: 0 16px;
}
@media (min-width: 735px) { .tabs { margin: 0 -24px 28px; padding: 0 24px; } }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 14px 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; letter-spacing: -0.016em; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
.tabs .tab-ext { margin-left: auto; color: var(--link); }

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: -0.01em;
  padding: 3px 10px; border-radius: 9999px; background: var(--fill); color: var(--text-2); vertical-align: middle;
}
.badge-owner { background: var(--text); color: var(--surface); }
.badge-admin { background: var(--selected); color: var(--link); }
.badge-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }

.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 15px; border: 1px solid var(--hairline); background: var(--surface); }
.alert-success { border-color: color-mix(in srgb, var(--ok) 40%, var(--hairline)); box-shadow: inset 4px 0 0 var(--ok); }
.alert-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--hairline)); box-shadow: inset 4px 0 0 var(--danger); }
.alert-info { box-shadow: inset 4px 0 0 var(--link); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; letter-spacing: -0.016em; }
.form label small { font-weight: 400; }
/* Label text + its hint form ONE row of the label grid (otherwise the hint becomes an extra row and pushes the field down). */
.label-text { display: block; }
/* Field labels as normal block flow instead of a grid with gaps: elements that browser extensions (password
   managers) inject after a field then don't add an extra grid row + gap, which pushed that field up out of line.
   Label text and inline parts (e.g. "Typ <strong>naam</strong> ter bevestiging") also stay on one line. */
.form label:not(.check):not(.radio-card):not(.color-field) { display: block; }
.form label:not(.check):not(.radio-card):not(.color-field) > :is(input, select, textarea, .url-field, .geo-radius, .date-field) {
  display: block; width: 100%; margin-top: 6px;
}
.form label:not(.check):not(.radio-card):not(.color-field) > :is(.url-field, .geo-radius, .date-field) { display: flex; }
.form label:not(.check):not(.radio-card):not(.color-field) > small { display: block; margin-top: 6px; }
/* Cards inside a form (e.g. Algemeen / Publieksstemming / Geo-blokkering): even spacing between their fields. */
.form > section.card { display: grid; gap: 18px; align-content: start; }
.form > section.card > h2 { margin-bottom: 0; }
.form > section.card > h2 + p { margin-top: -8px; margin-bottom: 0; }
.form > section.card > p { margin-bottom: 0; }
.label-text small { margin-left: 4px; }
/* One height for every single-line field, so fields side by side line up (also when the browser or a
   password manager restyles one of them). */
.form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
.form select { height: 48px; }
.form .url-field input { height: 46px; }
/* Date fields (dd/mm/jjjj [uu:mm]) with a calendar button; the browser's own picker is only used as a helper. */
.date-field { position: relative; align-items: center; }
.date-field > input[data-date] { padding-right: 48px; font-variant-numeric: tabular-nums; }
.date-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.date-btn:hover { background: var(--fill); color: var(--text); }
.date-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.form .date-field > .date-native, .date-native {
  position: absolute; right: 6px; bottom: 0; width: 36px; height: 1px; padding: 0; border: 0; margin: 0;
  opacity: 0; pointer-events: none; min-width: 0;
}
.form .caption-form input, .caption-form input { height: 34px; }
.form .color-input input[type="text"] { height: 40px; }
/* Fields in a row: align on the field, not on the label (labels may differ in length). */
.form .grid-2 { align-items: end; }
input, select, textarea {
  font: inherit; font-size: 17px; color: var(--text); background: var(--surface);
  border: 1px solid var(--input-border); border-radius: var(--r-input, 11px); padding: 11px 14px; width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
input[type="search"] { border-radius: 9999px; padding: 11px 20px; }
input[readonly] { background: var(--fill); }
textarea { resize: vertical; line-height: 1.47; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row .grow { flex: 1 1 220px; }
.w-num { flex: 0 0 110px; }
.form .check { display: flex; align-items: center; gap: 12px; font-weight: 400; font-size: 17px; letter-spacing: -0.022em; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--btn); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.radio-cards { display: grid; gap: 10px; }
.form .radio-card {
  display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--input-border); border-radius: 14px;
  padding: 14px 16px; font-weight: 400; font-size: 17px; letter-spacing: -0.022em; cursor: pointer;
}
.radio-card input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--btn); }
.radio-card:has(input:checked) { border: 2px solid var(--focus); padding: 13px 15px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.bulk { margin: 14px 0 20px; }
.bulk summary { cursor: pointer; color: var(--link); margin-bottom: 12px; font-size: 15px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); padding: 18px 20px; display: grid; gap: 2px; }
.stat-num { font-family: var(--font-display, "SF Pro Display", system-ui, -apple-system, sans-serif); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-num.ok { color: var(--ok); }
.stat-label { color: var(--muted); font-size: 14px; letter-spacing: -0.016em; }

/* ---------- share ---------- */
.share { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.share-text { flex: 1 1 300px; min-width: 0; }
.qr { background: #fff; border-radius: 12px; padding: 8px; width: 140px; height: 140px; }

/* ---------- popups (<dialog>) ---------- */
.modal {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 20px 24px 24px;
  border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.modal::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 8px; margin: -4px -10px 6px 0; }
.modal-head h2 { flex: 1; margin: 0; font-size: 21px; }
.modal-head .icon-btn:first-child { margin-left: -10px; }
.modal > p { margin: 0 0 14px; }
.icon.flip { transform: scaleX(-1); }
.share-url {
  padding: 11px 14px; margin-bottom: 14px; border-radius: 11px; background: var(--fill); font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-actions { display: grid; gap: 2px; }
.share-action {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); font: inherit; font-size: 17px; letter-spacing: -0.022em; text-align: left; cursor: pointer;
}
.share-action:hover { background: var(--fill); text-decoration: none; }
.share-action:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.share-action > span:nth-child(2) { flex: 1; }
.share-ico { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--fill); color: var(--link); }
.share-ico .icon { width: 20px; height: 20px; }
.share-chev { width: 18px; height: 18px; color: var(--muted); }
.share-action.is-done .share-ico { color: var(--ok); }
.embed-code {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5;
  resize: vertical; margin-bottom: 14px; word-break: break-all;
}
.modal .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- embedded public page (iframe on an external website) ---------- */
body.is-embed { background: var(--bg); }
.embed { padding: 20px 16px 16px; max-width: 1100px; margin: 0 auto; }
.embed-hero { padding: 8px 0 24px; }
.embed-hero h1 { font-size: clamp(28px, 6vw, 44px); }
.embed-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 12px; }
.embed-foot > a { font-size: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; letter-spacing: -0.016em; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .nowrap { white-space: nowrap; }
/* Table inside a card that lines up with the card's heading (no extra indent on the outer columns). */
.table-flush th:first-child, .table-flush td:first-child { padding-left: 0; }
.table-flush th:last-child, .table-flush td:last-child { padding-right: 0; }
/* Column with row buttons: as narrow as its content, right-aligned. */
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table .col-actions .inline + .inline { margin-left: 6px; }
/* A .table-stack shows each row as a small block (label: value) when its box is narrow, instead of scrolling sideways.
   Container queries: it follows the space the table has (with or without the sidebar), not the screen width.
   .table-stack-md stacks earlier, for tables with wide button columns (e.g. invitations). */
.table-wrap { container: table / inline-size; }
@container table (max-width: 640px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: auto; }
  .table-stack tr { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td, .table-stack tbody tr:last-child td { padding: 2px 0; border: 0; text-align: left; }
  .table-stack td:first-child { font-weight: 600; }
  .table-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .table-stack td[data-label="Rol"]::before { content: none; }
  .table-stack td.col-actions { width: auto; padding-top: 10px; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
  .table-stack .col-actions .inline + .inline { margin-left: 0; }
}
@container table (max-width: 760px) {
  .table-stack-md thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack-md, .table-stack-md tbody, .table-stack-md tr, .table-stack-md td { display: block; width: auto; }
  .table-stack-md tr { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
  .table-stack-md tbody tr:last-child { border-bottom: 0; }
  .table-stack-md td, .table-stack-md tbody tr:last-child td { padding: 2px 0; border: 0; text-align: left; }
  .table-stack-md td:first-child { font-weight: 600; }
  .table-stack-md td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .table-stack-md td[data-label="Rol"]::before { content: none; }
  .table-stack-md td.col-actions { width: auto; padding-top: 10px; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
  .table-stack-md .col-actions .inline + .inline { margin-left: 0; }
}
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.is-warn td { background: var(--warn-bg); }
.table tr.is-void td { opacity: .5; text-decoration: line-through; }
.table tr.is-void td:last-child { text-decoration: none; opacity: 1; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--hairline); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.list li:last-child { border: 0; padding-bottom: 0; }

/* ---------- participants ---------- */
.pnum { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.participants { list-style: none; padding: 0; margin: 0; display: grid; }
.participants li + li { border-top: 1px solid var(--hairline); }
.participant-row { display: grid; grid-template-columns: 52px 48px 1fr auto; gap: 14px; align-items: center; padding: 10px 6px; color: var(--text); border-radius: 12px; }
.participant-row:hover { background: var(--fill); text-decoration: none; }
.participant-row img, .participant-row .ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.ph, .tile-ph { display: grid; place-items: center; background: var(--fill); color: var(--muted); font-size: 18px; }
.pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
/* drag-and-drop ordering */
.participants.sortable li { display: grid; grid-template-columns: 36px 1fr; align-items: center; background: var(--surface); }
.grip {
  display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: grab; touch-action: none;
}
.grip:hover { color: var(--text); background: var(--fill); }
.grip:active { cursor: grabbing; }
.grip-inline { color: var(--text); }
.participants .is-ghost { opacity: .35; }
.participants .is-chosen { background: var(--surface); }
.participants .is-drag { border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.order-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.order-bar p { margin: 0; }
.order-status { min-height: 1.4em; color: var(--muted); }
.order-status.is-ok { color: var(--ok); }
.order-status.is-error { color: var(--danger); }

@media (max-width: 560px) {
  .participant-row { grid-template-columns: 44px 44px 1fr; gap: 10px; }
  .participant-row > .small { display: none; }
  .hide-sm { display: none; }
}

/* ---------- upload & admin gallery ---------- */
.dropzone {
  border: 1.5px dashed var(--input-border); border-radius: var(--r-card, 18px); padding: 32px 20px; text-align: center; cursor: pointer;
  position: relative; font-weight: 400 !important; font-size: 17px !important; background: var(--surface-2);
}
.dropzone:hover { border-color: var(--focus); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 16px; margin-top: 24px; }
.gallery-admin figure { margin: 0; position: relative; border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); overflow: hidden; display: grid; background: var(--surface-2); }
.gallery-admin img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.cover-badge { position: absolute; top: 10px; left: 10px; background: rgba(29, 29, 31, .8); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.caption-form { display: flex; gap: 6px; padding: 10px; align-items: center; }
.caption-form input { font-size: 14px; padding: 7px 10px; }
.fig-actions { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }

/* ---------- bars & charts ---------- */
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 28px minmax(120px, 1.2fr) 2fr 76px; gap: 12px; align-items: center; }
.bar-rank { font-weight: 600; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label a { color: inherit; }
.bar-track { height: 8px; background: var(--fill); border-radius: 9999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--link); border-radius: 9999px; }
.bar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.podium-1 .bar-rank, .podium-1 .bar-label { color: var(--text); font-weight: 600; }
.podium-1 .bar-track { height: 10px; }
@media (max-width: 560px) {
  .bars li { grid-template-columns: 24px 1fr 64px; row-gap: 6px; }
  .bar-track { grid-column: 2 / 4; grid-row: 2; }
}
.progress { height: 8px; background: var(--fill); border-radius: 9999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--link); border-radius: 9999px; }

/* ---------- jury ---------- */
.criteria-list { display: grid; gap: 12px; }
.criterion { grid-template-columns: 1fr 100px 100px; align-items: end; border: 1px solid var(--hairline); border-radius: 14px; padding: 16px; background: var(--surface-2); }
.criterion .full { grid-column: 1 / -1; }
.criterion-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
@media (max-width: 560px) { .criterion { grid-template-columns: 1fr 1fr; } .criterion .grow { grid-column: 1 / -1; } }
.criteria-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.score-card legend { font-size: 17px; font-weight: 600; padding: 0; }
.score-card legend .small { font-weight: 400; margin-left: 6px; }
.score-card { padding-top: 18px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 14px; margin-top: 8px; }
.score-grid label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-weight: 400; font-size: 14px; }
.score-grid label span { grid-column: 1 / -1; color: var(--text-2); }
.score-grid input { font-size: 21px; font-weight: 600; text-align: center; padding: 10px; font-variant-numeric: tabular-nums; }
.sticky-save {
  position: sticky; bottom: 0; z-index: 5; padding: 12px 0 16px;
  background: linear-gradient(to bottom, transparent, var(--bg) 35%);
}
.results th small { font-weight: 400; }

/* ---------- landing ---------- */
.hero { text-align: center; padding: 56px 0 72px; }
.hero h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1.07; letter-spacing: -0.005em; margin-bottom: 16px; }
.lead { font-family: var(--font-display, "SF Pro Display", system-ui, -apple-system, sans-serif); font-size: clamp(19px, 2.6vw, 24px); font-weight: 300; line-height: 1.4; letter-spacing: 0; color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero .actions { justify-content: center; }
.band-dark { background: var(--tile-dark); color: #f5f5f7; padding: 80px 0; margin-bottom: -64px; }
.band-dark .muted, .band-dark p { color: #a1a1a6; }
.band-dark h2 { color: #f5f5f7; text-align: center; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin-bottom: 48px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 40px; max-width: 1024px; margin: 0 auto; padding: 0 24px; }
.features h3 { margin-top: 0; font-size: 21px; color: #f5f5f7; }
.features p { margin: 0; }

/* ---------- public ---------- */
.public-hero { text-align: center; padding: 24px 0 40px; }
.public-hero h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1.07; letter-spacing: -0.005em; margin-bottom: 10px; }
.public-hero > p.muted { font-size: 21px; letter-spacing: 0.011em; }
.eyebrow { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 8px; letter-spacing: -0.016em; }
.prose { max-width: 680px; margin: 0 auto 24px; text-align: left; }
.prose p:last-child { margin-bottom: 0; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.tile { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); overflow: hidden; color: var(--text); height: 100%; transition: transform .2s ease; }
.tile:hover { text-decoration: none; transform: translateY(-2px); }
.tile:active { transform: scale(.98); }
.tile img, .tile-ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; font-size: 40px; }
.tile-body { padding: 14px 16px 16px; font-weight: 600; }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr 1fr; gap: 12px; } .tile-body { padding: 10px 12px; font-size: 15px; } }

.participant-page header { text-align: center; margin-bottom: 28px; }
.participant-page h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.07; }
.big-num { display: inline-block; font-size: 14px; font-weight: 600; background: var(--text); color: var(--surface); border-radius: 9999px; padding: 4px 14px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 12px; margin-bottom: 28px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; }
.gallery .hero-img { grid-column: 1 / -1; margin-bottom: 12px; }
.gallery .hero-img img { aspect-ratio: auto; max-height: 72vh; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; border-radius: var(--r-card, 18px); box-shadow: var(--photo-shadow); }
.gallery figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px; }
.gallery .hero-img figcaption { text-align: center; padding-top: 14px; }
.pager { display: flex; justify-content: space-between; margin-top: 32px; }

.vote-head { text-align: center; margin-bottom: 24px; }
.vote-head h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.07; }
.vote-head p { margin: 0; font-size: 21px; }
.vote-form { max-width: 640px; margin: 0 auto; }
.field-filter { margin-bottom: 14px; }
.vote-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.vote-option {
  display: grid; grid-template-columns: 22px 52px auto 1fr; gap: 14px; align-items: center;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--input-border); border-radius: var(--r-card, 18px); cursor: pointer;
  transition: transform .1s;
}
.vote-option:active { transform: scale(.98); }
.vote-option input { width: 20px; height: 20px; accent-color: var(--btn); }
.vote-option img, .vote-option .ph { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.vote-option:has(input:checked) { border: 2px solid var(--focus); padding: 11px 15px; background: var(--selected); }
.vote-submit {
  position: sticky; bottom: 0; padding: 28px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}
.vote-submit p { margin: 8px 0 0; }
.vote-msg { min-height: 1.5em; margin-bottom: 8px; text-align: center; font-weight: 600; }
.vote-msg-error { color: var(--danger); }
.code-input { font-size: 26px !important; font-weight: 600; letter-spacing: .12em; text-align: center; text-transform: uppercase; font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   Optochtmeester logo. A CSS mask of the wordmark ("#1" cut out), so it takes the text colour of wherever it
   sits — black on light, white on dark, the nav-ink of an organisation's top bar — and the background shows
   through "#1", exactly like the black and white versions. Source files: /static/img/logo-black.svg / logo-white.svg.
   ===================================================================== */
.om-logo, .om-mark {
  display: inline-block; flex: none; vertical-align: middle; background-color: currentColor;
  -webkit-mask: url(../img/logo-mask.svg) center / contain no-repeat;
  mask: url(../img/logo-mask.svg) center / contain no-repeat;
  aspect-ratio: 1599.671 / 190.926; height: 20px;
}
.om-mark {
  -webkit-mask-image: url(../img/logo-mark-mask.svg);
  mask-image: url(../img/logo-mark-mask.svg);
  aspect-ratio: 299.322 / 190.926;
}
@media (forced-colors: active) { .om-logo, .om-mark { background-color: CanvasText; } }
.brand-wordmark { height: 20px; }
.hero-wordmark { display: block; height: clamp(28px, 5vw, 44px); margin: 0 auto 28px; color: var(--text); }
.onboarding-mark { height: 44px; color: var(--text); margin-bottom: 18px; }
.powered-by { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.footer-logo { display: inline-flex; color: var(--text); opacity: .85; }
.footer-logo:hover { opacity: 1; }
.footer-logo .om-logo { height: 15px; }
.footer-sep { margin: 0 6px; }

/* =====================================================================
   App shell: sidebar navigation (logged-in pages)
   ===================================================================== */
.icon { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.btn .icon { width: 18px; height: 18px; margin-left: -4px; }

.app { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1080px; margin: 0 auto; padding: 36px 40px 72px; }

.sidebar {
  --sb-w: 252px;
  position: sticky; top: 0; height: 100vh; width: var(--sb-w); flex: none;
  display: flex; flex-direction: column; gap: 6px; padding: 14px 10px 10px;
  background: color-mix(in srgb, var(--surface) 72%, var(--bg));
  border-right: 1px solid var(--hairline);
  z-index: 40;
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; }
.sb-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; min-width: 0; }
.sb-brand:hover { text-decoration: none; }
.sb-brand { min-height: 34px; padding-left: 4px; }
.sb-wordmark { height: 23px; }
.sb-mark { height: 27px; display: none; }
.sb-close { display: none; }
.sb-label { min-width: 0; }

.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--fill); color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: 0;
}
.avatar-org { border-radius: 8px; background: var(--text); color: var(--surface); }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }

/* popover menus (organisation switcher, user menu) */
.sb-pop { position: relative; }
.sb-pop > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer;
  color: var(--text); user-select: none;
}
.sb-pop > summary::-webkit-details-marker { display: none; }
.sb-pop > summary:hover, .sb-pop[open] > summary { background: var(--fill); }
.sb-two { display: grid; flex: 1; line-height: 1.25; }
.sb-two strong, .sb-two small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-two strong { font-size: 14px; letter-spacing: -0.016em; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sb-org-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sb-two small { font-size: 12px; color: var(--muted); letter-spacing: -0.01em; }
.sb-caret { color: var(--muted); display: grid; }
.sb-caret .icon { width: 16px; height: 16px; }
.sb-org { margin-bottom: 10px; }

.sb-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  max-height: 70vh; overflow-y: auto;
}
.sb-menu-up { top: auto; bottom: calc(100% + 6px); }
.sb-menu-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; letter-spacing: 0; }
.sb-menu a, .sb-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font: inherit; font-size: 15px; letter-spacing: -0.016em; text-align: left; cursor: pointer;
}
.sb-menu a:hover, .sb-menu button:hover { background: var(--fill); text-decoration: none; }
.sb-menu .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-menu .grow small { display: block; font-size: 12px; color: var(--muted); }
.sb-menu .is-current { font-weight: 600; }
.sb-menu a > .icon:last-child { color: var(--link); }
.sb-menu hr { border: 0; border-top: 1px solid var(--hairline); margin: 6px 4px; }
.sb-menu form { margin: 0; }
[data-theme-icon] { display: inline-grid; }

/* nav items */
.sb-nav { display: grid; gap: 2px; }
.sb-nav a, .sb-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; border: 0; width: 100%;
  background: none; color: var(--text-2); font: inherit; font-size: 15px; letter-spacing: -0.016em; text-align: left; cursor: pointer;
}
.sb-nav a:hover, .sb-item:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.sb-nav a.active, .sb-item.active { background: var(--selected); color: var(--link); font-weight: 600; }
.sb-bottom { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; }
.sb-user { border-top: 1px solid var(--hairline); padding-top: 8px; margin-top: 6px; }
.when-collapsed { display: none; }
.when-expanded, .when-collapsed { line-height: 0; }

/* collapsed (desktop only) */
@media (min-width: 900px) {
  :root[data-sidebar="collapsed"] .sidebar { --sb-w: 68px; }
  :root[data-sidebar="collapsed"] .sb-label { display: none; }
  :root[data-sidebar="collapsed"] .sb-wordmark { display: none; }
  :root[data-sidebar="collapsed"] .sb-mark { display: inline-block; }
  :root[data-sidebar="collapsed"] .sb-brand { padding-left: 0; }
  :root[data-sidebar="collapsed"] .sb-top { justify-content: center; padding-left: 0; padding-right: 0; }
  :root[data-sidebar="collapsed"] .sb-nav a,
  :root[data-sidebar="collapsed"] .sb-item,
  :root[data-sidebar="collapsed"] .sb-pop > summary { justify-content: center; padding-left: 0; padding-right: 0; }
  :root[data-sidebar="collapsed"] .sb-menu { left: calc(100% + 10px); right: auto; top: 0; width: 270px; }
  :root[data-sidebar="collapsed"] .sb-menu-up { top: auto; bottom: 0; }
  :root[data-sidebar="collapsed"] .when-collapsed { display: inline; }
  :root[data-sidebar="collapsed"] .when-expanded { display: none; }
}

/* mobile: off-canvas drawer */
.mobile-bar { display: none; }
.sb-overlay { display: none; }
@media (max-width: 899px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh; width: min(300px, 86vw);
    transform: translateX(-105%); transition: transform .25s ease;
  }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .app.nav-open .sb-overlay { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 35; }
  .sb-close {
    display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: var(--fill); color: var(--text); cursor: pointer;
  }
  .sb-collapse { display: none !important; }
  .mobile-bar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 52px; padding: 0 12px;
    background: var(--subnav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
  }
  .mobile-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 24px 16px 64px; }
}
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--fill); }
.icon-btn .icon { width: 22px; height: 22px; }

/* sub-navigation tabs inside the shell */
.content .tabs { top: 0; margin: 0 -40px 28px; padding: 0 40px; }
@media (max-width: 899px) { .content .tabs { top: 52px; margin: 0 -16px 24px; padding: 0 16px; } }

/* =====================================================================
   Activiteiten
   ===================================================================== */
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9999px; background: var(--fill); }
.segmented a, .segmented button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 9999px; border: 0;
  background: none; color: var(--muted); font: inherit; font-size: 14px; letter-spacing: -0.016em; cursor: pointer;
}
.segmented a:hover, .segmented button:hover { color: var(--text); text-decoration: none; }
.segmented .active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg-count { font-size: 12px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.empty-row { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); padding: 18px 20px; color: var(--text-2); font-size: 15px; }

.activity-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.activity {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-card, 18px); color: var(--text); transition: border-color .15s, transform .1s;
}
.activity:hover { text-decoration: none; border-color: var(--input-border); }
.activity:active { transform: scale(.995); }
.date-chip {
  display: grid; place-items: center; align-content: center; width: 66px; height: 58px; flex: none;
  border-radius: 12px; background: var(--fill); line-height: 1.05;
}
.date-chip.is-empty { color: var(--muted); }
.dc-year { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.dc-day { font-family: var(--font-display, "SF Pro Display", system-ui, -apple-system, sans-serif); font-size: 19px; font-weight: 600;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.activity-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.activity-title { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; letter-spacing: -0.016em; }
.activity-meta span { display: inline-flex; align-items: center; gap: 5px; }
.activity-meta .icon { width: 15px; height: 15px; vertical-align: 0; }
.activity-side { display: flex; align-items: center; gap: 10px; flex: none; }
.chev { color: var(--muted); display: grid; }
@media (max-width: 560px) {
  .activity { padding: 12px 14px; gap: 12px; }
  .activity-side .badge { display: none; }
}

/* insights */
.w-progress { min-width: 170px; }
.w-progress .progress { margin-bottom: 4px; }

/* web address input: [prefix][input][suffix] */
.url-field {
  display: flex; align-items: stretch; border: 1px solid var(--input-border); border-radius: var(--r-input, 11px); overflow: hidden;
  background: var(--surface); font-weight: 400;
}
.url-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.url-field input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 6ch; flex: 1; }
.url-prefix, .url-suffix {
  display: flex; align-items: center; padding: 0 12px; background: var(--fill); color: var(--muted);
  font-size: 15px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis;
}
.url-prefix { border-right: 1px solid var(--input-border); }
.url-suffix { border-left: 1px solid var(--input-border); }

/* public organisation page */
.org-section { margin-bottom: 32px; }
.org-section h2 { margin-bottom: 12px; }

/* =====================================================================
   Branding: logos, theme lock, settings with live preview
   ===================================================================== */
[data-theme-lock] [data-theme-toggle] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { height: 30px; width: auto; max-width: 180px; object-fit: contain; }
.brand-sep { opacity: .45; }
.brand-sub { color: var(--nav-ink, #fff); opacity: .85; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.brand-sub:hover { opacity: 1; text-decoration: none; }
/* Logo centred above the organisation and activity name (public hero). The name stays as text next to it. */
.public-logo {
  display: block; margin: 0 auto 16px; width: auto; height: clamp(64px, 11vw, 112px);
  max-width: min(360px, 70vw); object-fit: contain;
}
.bp-hero-logo { display: block; margin: 0 auto 4px; width: auto; height: 56px; max-width: 60%; object-fit: contain; }
.hero-logo { margin: 0 0 12px; display: flex; justify-content: center; }
.hero-logo img { max-height: 120px; max-width: min(420px, 80vw); width: auto; object-fit: contain; }
.avatar-img { background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; padding: 2px; }
.avatar-img img { width: 100%; height: 100%; object-fit: contain; }

.settings-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-preview { position: sticky; top: 64px; display: grid; gap: 10px; }
@media (max-width: 1100px) { .settings-split { grid-template-columns: 1fr; } .settings-preview { position: static; } }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.segmented-sm a, .segmented-sm button { padding: 4px 12px; font-size: 13px; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; margin-bottom: 12px; }
.form .color-field { gap: 8px; }
.color-field small { display: block; font-weight: 400; }
.color-input { display: flex; align-items: center; gap: 8px; }
.color-input input[type="color"] { width: 44px; height: 40px; padding: 3px; border-radius: 10px; cursor: pointer; flex: none; }
.color-input input[type="text"] { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 15px; text-transform: lowercase; padding: 9px 10px; }
.color-input .check { font-size: 14px; white-space: nowrap; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 10px 16px; }
.form .check-grid .check { font-size: 15px; }
.check-grid + label { margin-top: 10px; }

.logo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-box {
  width: 180px; height: 90px; border-radius: 12px; display: grid; place-items: center; padding: 10px;
  background: repeating-conic-gradient(var(--fill) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--hairline);
}
/* Fill the box and let object-fit scale the logo inside it: percentages of max-height don't work in a grid cell. */
.logo-box { overflow: hidden; box-sizing: border-box; flex: none; }
.logo-box img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.logo-actions { display: grid; gap: 10px; flex: 1; min-width: 220px; }
.logo-actions input[type="file"] { font-size: 14px; padding: 8px; }

/* mini public page in the branding preview (gets its own token set from branding.mjs) */
.brand-preview {
  background: var(--bg); color: var(--text); font-family: var(--font-text); color-scheme: light;
  border: 1px solid var(--hairline); border-radius: 18px; overflow: hidden; font-size: 15px;
}
.brand-preview[data-mode="dark"] { color-scheme: dark; }
.bp-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--nav-bg); color: var(--nav-ink); }
.bp-logo { height: 24px; max-width: 140px; object-fit: contain; }
.bp-name { font-weight: 600; font-size: 14px; }
.bp-nav { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.bp-nav .btn { min-height: 0; padding: 4px 12px; font-size: 13px; }
.bp-body { padding: 22px 18px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.bp-eyebrow { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.bp-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.bp-sub { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.bp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 12px; text-align: left; }
.bp-tiles .tile { font-size: 13px; }
.bp-tiles .tile-ph { font-size: 22px; }
.bp-tiles .tile-body { padding: 8px 10px; }
.bp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.bp-link { color: var(--link); }
.bp-input { border: 1px solid var(--input-border); border-radius: var(--r-input); padding: 6px 12px; color: var(--muted); background: var(--surface); font-size: 13px; }

.card-preview { background: var(--fill); border-radius: 18px; padding: 18px; display: grid; place-items: center; }
.card-preview .om-card {
  width: min(100%, calc(62vh * var(--ar, 210 / 148))); height: auto; aspect-ratio: var(--ar, 210 / 148);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15); border-radius: 4px;
}

/* scaled card preview (settings → Deelnemerskaart). The card is absolutely positioned so its real
   size (mm) never widens the layout; card-thumb.mjs scales it to the available width. */
.settings-preview { min-width: 0; }
.card-thumb {
  position: relative; width: 100%; max-width: 100%; min-width: 0; overflow: hidden;
  border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); background: #fff;
}
.card-thumb-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* primary action at the end of a long settings form: breathing room before the next section (e.g. danger zone) */
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 48px; }

/* test mode (vote security off) */
.test-mode-box { margin-top: 6px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--hairline)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.test-mode-box p { margin: 0; color: var(--text-2); }
.test-mode-box.is-on, .test-mode-box:has(input:checked) { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: var(--danger); }
.test-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 15px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid var(--danger); color: var(--text);
}
.test-banner strong { color: var(--danger); }
.test-banner a { margin-left: auto; white-space: nowrap; }
.badge-test { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* platform admin */
.admin-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-search input { flex: 1 1 260px; max-width: 420px; }
.admin-count { margin-left: auto; }
.admin-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.admin-cols { align-items: start; }
.stat-link { color: var(--text); }
.stat-link:hover { text-decoration: none; border-color: var(--input-border); }
.eyebrow .icon { width: 15px; height: 15px; vertical-align: -2px; }
.role-form select { width: auto; height: 34px; padding: 4px 30px 4px 10px; font-size: 14px; }
.admin-banner { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.admin-banner a { margin-left: auto; }

/* geo blocker (activity settings) */
.geo-picker { display: grid; gap: 12px; margin-top: 14px; transition: opacity .2s; }
.geo-picker.is-off { opacity: .55; }
.geo-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.geo-search { display: flex; gap: 8px; flex: 1 1 280px; }
.geo-search input { flex: 1; }
.geo-results { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); max-height: 220px; overflow-y: auto; }
.geo-results li { padding: 2px; }
.geo-results li.muted { padding: 8px 10px; font-size: 14px; }
.geo-results button { width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; }
.geo-results button:hover { background: var(--fill); }
.geo-map { height: 360px; border-radius: 14px; border: 1px solid var(--hairline); overflow: hidden; z-index: 0; }
.geo-fields { display: grid; gap: 12px; }
.geo-radius { display: flex; align-items: center; gap: 12px; }
.geo-radius input[type="range"] { flex: 1; padding: 0; border: 0; accent-color: var(--btn); box-shadow: none; }
.geo-radius-num { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.geo-radius-num input { width: 100px; }
.geo-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--selected); font-size: 14px; margin-bottom: 14px; }
.geo-notice .icon { color: var(--link); margin-top: 2px; }

/* key/value list (settings pages) */
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 15px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; }
.issue-list { margin: 6px 0 0; padding-left: 18px; }

/* onboarding */
.onboarding { padding: 48px 28px; }
.onboarding-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--text); color: var(--surface); margin-bottom: 16px; }
.onboarding-icon .icon { width: 30px; height: 30px; fill: currentColor; }

/* ---------- Pro ---------- */
.pro-pill {
  display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 7px; border-radius: 9999px;
  background: linear-gradient(135deg, #f5b301, #ff8a00); color: #1d1d1f; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; line-height: 1; text-transform: uppercase; vertical-align: middle;
}
.pro-pill-sm { height: 16px; padding: 0 6px; font-size: 10px; }
.pro-pill-lg { height: 30px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.pro-tag {
  display: inline-flex; align-items: center; height: 16px; padding: 0 6px; margin-left: 6px; border-radius: 9999px;
  border: 1px solid color-mix(in srgb, #f5a000 70%, transparent); color: #c77700; font-size: 10px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; line-height: 1;
}
:root[data-theme="dark"] .pro-tag { color: #ffb340; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pro-tag { color: #ffb340; } }
.pro-lock {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px;
  background: color-mix(in srgb, #f5b301 12%, var(--surface)); border: 1px solid color-mix(in srgb, #f5b301 40%, transparent); font-size: 15px;
}
.pro-lock .grow { flex: 1 1 220px; }
fieldset.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: inherit; }
fieldset.plain-fieldset[disabled] { opacity: .55; }
.form fieldset.plain-fieldset { gap: 20px; }

.pro-status-head { display: flex; gap: 16px; align-items: flex-start; }
.pro-status-head h2 { margin: 0 0 4px; }
.pro-status-head p { margin: 0; }
.pro-status.is-active { border-color: color-mix(in srgb, #f5b301 45%, var(--hairline)); }
.pro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.pro-grid > .card { margin: 0; }
.pro-price { font-family: var(--font-display, "SF Pro Display", system-ui, -apple-system, sans-serif); font-size: 40px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0 0 12px; }
.pro-price .muted { font-size: 17px; font-weight: 400; }
.pro-points, .pro-features { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.pro-points li { display: flex; gap: 8px; align-items: flex-start; }
.pro-points .icon { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 3px; }
.pro-test-note { margin: 10px 0 0; }
.pro-features li { display: flex; gap: 12px; align-items: flex-start; }
.pro-features li > span:last-child { display: grid; gap: 2px; }
.pro-features small { font-size: 13px; }
.pro-feat-ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--fill); color: var(--muted); }
.pro-feat-ico.on { color: var(--ok); }
.pro-feat-ico .icon { width: 16px; height: 16px; }
.pro-toggle-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.form .pro-toggle { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--hairline); }
.pro-toggle-list li:last-child .pro-toggle { border-bottom: 0; }
.pro-toggle > span:nth-of-type(1) { flex: 1; display: grid; gap: 2px; }
.pro-toggle small { font-size: 13px; font-weight: 400; }
.pro-toggle-state::after { content: "Gratis"; font-size: 12px; color: var(--muted); }
.pro-toggle:has(input:checked) .pro-toggle-state::after { content: "Alleen Pro"; color: #c77700; font-weight: 600; }

.pro-welcome .modal-head h2 { display: flex; align-items: center; gap: 10px; }
.pro-welcome .pro-points { margin: 4px 0 14px; gap: 8px; }

.pro-dialog .modal-head h2 { display: flex; align-items: center; gap: 10px; }
.pro-dialog .actions { align-items: center; }
[data-pro] { cursor: pointer; }
input[data-pro][readonly] { color: var(--muted); }

/* ---------- organisation members ---------- */
.members h2 { margin-bottom: 6px; }
.members-intro { margin: 0 0 18px; }
.members-invite { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.members-invite h3 { margin: 0 0 16px; }
.members-invite .form-row { gap: 12px 16px; }
.members-invite .form-row .btn { min-height: 48px; }   /* same height as the fields next to it */
.members-help { margin: 12px 0 0; max-width: 68ch; }

/* Save button at the end of a form that is followed by another card: clear separation from what comes next. */
.form-end { margin-bottom: 40px; }

/* ---------- vote line chart (Inzichten, Publieksstemming) ---------- */
.vchart { margin-top: 16px; }
.vchart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.vchart-plot { position: relative; min-height: 200px; border-radius: 8px; touch-action: pan-y; }
.vchart-plot:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.vchart-svg { display: block; overflow: visible; }
.vchart-grid { stroke: var(--hairline); stroke-width: 1; }
.vchart-base { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.vchart-ylabel, .vchart-xlabel { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.vchart-line { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vchart-area { fill: var(--link); opacity: .08; }
.vchart-cross { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.vchart-dot { fill: var(--link); stroke: var(--surface); stroke-width: 2; }
.vchart-tip {
  position: absolute; z-index: 2; pointer-events: none; display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--hairline); box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  font-size: 13px; line-height: 1.3; white-space: nowrap; color: var(--muted);
}
.vchart-tip strong { color: var(--text); font-size: 15px; font-weight: 600; }
.vchart-note { margin: 8px 0 0; }
.vchart-table { margin-top: 12px; }
.vchart-table summary { cursor: pointer; color: var(--link); width: max-content; }
.vchart-table .table-wrap { max-height: 320px; overflow: auto; margin-top: 8px; }
.vchart-table p { margin: 8px 0 0; }

/* ---------- packages (Pro) ---------- */
.section-title { font-size: 21px; margin: 28px 0 14px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; margin-bottom: 12px; }
.plan-cards > .card { margin: 0; }
.plan-card { display: flex; flex-direction: column; }
.plan-card.is-current { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card-head h3 { margin: 0; font-size: 21px; }
.plan-card .pro-price { margin: 10px 0 16px; font-size: 34px; }
.plan-card .pro-points { gap: 8px; margin-bottom: 16px; font-size: 15px; }
.plan-card .plan-limits { padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.plan-card .pro-points li.is-off { color: var(--muted); }
.plan-card .pro-points li.is-off .icon { color: var(--muted); opacity: .6; }
.plan-card-foot { margin-top: auto; }
.plan-note { margin: 8px 0 0; text-align: center; }
.usage-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.usage-list li { display: grid; gap: 6px; }
.usage-label small { display: block; }
.usage-val { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.usage-val .muted { font-size: 15px; font-weight: 400; }
.usage-list li.is-full .usage-val { color: var(--danger); }
.usage-list li.is-full .progress span { background: var(--danger); }
/* admin: package comparison table */
.plan-matrix { min-width: 640px; }
.plan-matrix th[scope="row"] { font-weight: 500; font-size: 14px; }
.plan-matrix th[scope="row"] small { display: block; font-weight: 400; font-size: 12px; }
.plan-matrix thead th { vertical-align: bottom; }
.plan-matrix thead th small { display: block; margin-top: 4px; font-weight: 400; }
.plan-col-name { font-size: 15px; color: var(--text); }
.plan-matrix td { min-width: 110px; }
.plan-matrix input:not([type="checkbox"]) {
  width: 100%; height: 36px; padding: 6px 10px; border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
.plan-matrix input[type="checkbox"] { width: 18px; height: 18px; }
.plan-matrix td.center { text-align: center; }
.plan-matrix-group th { padding-top: 20px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.plans-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.plans-two > .card { margin: 0 0 20px; }
.limit-note { margin-bottom: 16px; }
.limit-note.is-full { border-color: var(--danger); }

/* ---------- organisation details ---------- */
.req { color: var(--danger); font-weight: 600; }
.form-legend { margin: 0; }
.field-group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.field-group legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 14px; letter-spacing: -0.016em; }
.grid-postcode { display: grid; grid-template-columns: minmax(min(120px, 100%), 1fr) 2fr; gap: 14px; }
@media (max-width: 420px) { .grid-postcode { grid-template-columns: 1fr; } }
.details-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.details-list dt { color: var(--muted); font-size: 14px; }
.details-list dd { margin: 0; }
@media (max-width: 480px) { .details-list { grid-template-columns: 1fr; gap: 2px; } .details-list dd { margin-bottom: 8px; } }
.form label .opt { color: var(--muted); font-weight: 400; }

/* ======================================================================
   Mobile & touch
   ====================================================================== */
/* Long words (e.g. "Carnavalsvereniging") never push a heading past the screen edge. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }

/* Tables wider than the screen scroll sideways inside their own box, with a soft shadow on the side that has more.
   position: relative keeps absolutely positioned helpers (e.g. .sr-only labels) inside the box. */
.table-wrap {
  position: relative;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 32px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .14), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .14), transparent) right / 12px 100% no-repeat scroll;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
  /* columns take their natural width (long text still wraps at 220 px) and the table scrolls sideways,
     instead of squeezing names into one word per line */
  .table-wrap > .table:not(.table-stack):not(.table-stack-md) { width: max-content; min-width: 100%; }
  .table-wrap > .table:not(.table-stack):not(.table-stack-md) :is(th, td) { max-width: 220px; }
}

/* Web address fields: on narrow screens the prefix/suffix goes on its own line, so the input keeps its width. */
@media (max-width: 480px) {
  .form label:not(.check):not(.radio-card):not(.color-field) > .url-field { flex-wrap: wrap; }
  .url-field .url-prefix, .url-field .url-suffix {
    flex: 1 0 100%; max-width: none; order: -1; padding: 6px 12px; font-size: 13px; border: 0; border-bottom: 1px solid var(--input-border);
  }
  .url-field .url-suffix { order: 2; border-bottom: 0; border-top: 1px solid var(--input-border); }
}

/* Touch screens: comfortable tap targets and no automatic zoom when a field gets focus (iOS zooms below 16px). */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea {
    font-size: max(16px, 1em) !important; /* wins over compact field styles: below 16px iOS zooms in on focus */
  }
  .segmented a, .segmented button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
  summary { padding-block: 8px; }
  .form label.check { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-width: 22px; min-height: 22px; }
  input[type="range"] { height: 32px; }
  .topnav > a:not(.btn) { padding: 10px 2px; }
  .btn-sm { min-height: 36px; }
  .icon-btn { min-width: 40px; min-height: 40px; }
}

/* ---------- login, register, password pages ---------- */
.auth {
  width: 100%; max-width: 440px; margin: 0 auto; padding: clamp(8px, 4vh, 48px) 0 24px;
  min-height: calc(100vh - 220px); min-height: calc(100svh - 220px); display: flex; flex-direction: column; justify-content: center;
}
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head h1 { font-size: clamp(28px, 7vw, 36px); margin-bottom: 6px; }
.auth-head p { margin: 0 auto; max-width: 34ch; }
.auth-card { margin: 0; padding: 28px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06); }
.auth-card .form { gap: 18px; }
.auth-card .btn-lg { margin-top: 4px; }
.auth-forgot { margin: -8px 0 0; text-align: right; }
.auth-forgot a { display: inline-block; padding: 4px 0; }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--muted); }
.auth-switch a { font-weight: 500; }
@media (max-width: 560px) {
  .auth { min-height: 0; justify-content: flex-start; padding-top: 12px; }
  .auth-head { margin-bottom: 16px; }
  .auth-card { padding: 22px 18px; }
  .topnav-guest { gap: 12px; flex-wrap: nowrap; }
  .topbar-inner { flex-wrap: nowrap; }
  .brand-wordmark { height: 17px; }
}

/* Show/hide password (button added by app.js to every password field). */
.pw-field { position: relative; }
.form label.pw-field > input[type="password"], .form label.pw-field > input.pw-input { padding-right: 76px; }
.pw-toggle {
  position: absolute; right: 6px; bottom: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
  background: none; color: var(--link); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.pw-toggle:hover { background: var(--fill); }
.lbl-short { display: none; }
@media (max-width: 380px) {
  .topnav-guest .lbl-long { display: none; }
  .topnav-guest .lbl-short { display: inline; }
}

/* admin: "Pakket beëindigen" under the grant form */
.pro-revoke { margin-top: 20px; }

/* ---------- jury per activity ---------- */
.sb-jury { margin-top: 14px; }
.sb-section-title { padding: 6px 12px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sb-jury .sb-two > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.jury-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.jury-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-card, 18px);
  background: var(--surface); border: 1px solid var(--hairline); color: var(--text);
}
.jury-item:hover { text-decoration: none; border-color: var(--link); }
.jury-item .grow { display: grid; gap: 2px; min-width: 0; flex: 1; }
.jury-item small { font-size: 13px; }
@media (max-width: 480px) { .jury-item { flex-wrap: wrap; } .jury-item .btn { width: 100%; } }
