:root {
  --ink: #17233d;
  --muted: #5b667a;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --line: #d8dee9;
  --primary: #2457c5;
  --primary-dark: #173b8c;
  --accent: #00a38c;
  --accent-soft: #dff7f1;
  --warning-soft: #fff4d5;
  --danger: #a42323;
  --shadow: 0 14px 36px rgba(29, 45, 82, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #eef2fa 0, var(--paper) 24rem); line-height: 1.55; }
a { color: var(--primary-dark); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f2a900; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .75rem 1rem; background: #fff; font-weight: 800; border: 2px solid var(--ink); }
.skip-link:focus { top: 1rem; }
.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.header-inner, .nav-inner, .page { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.header-inner { min-height: 5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; gap: .8rem; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: .8rem; background: var(--primary); color: white; font-size: 1.45rem; font-weight: 850; }
.brand span:last-child, .user-panel > span { display: flex; flex-direction: column; }
.brand small, .user-panel small, td small { color: var(--muted); display: block; }
.user-panel { display: flex; align-items: center; gap: 1rem; text-align: right; }
nav { border-top: 1px solid var(--line); }
.nav-inner { display: flex; gap: .2rem; overflow-x: auto; padding-block: .4rem; }
.nav-inner a { padding: .65rem .8rem; white-space: nowrap; text-decoration: none; border-radius: .5rem; font-weight: 650; }
.nav-inner a:hover { background: #edf2ff; }
.page { padding-block: 2.7rem 5rem; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.page-heading { margin-bottom: 2rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: .2rem 0 .7rem; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
.lead { max-width: 52rem; color: var(--muted); font-size: 1.08rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--primary-dark); font-size: .75rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.phase-badge, .text-status { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #aadfd4; background: var(--accent-soft); color: #075d50; border-radius: 999px; padding: .3rem .65rem; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.text-status-grey { border-color: #cbd1dc; background: #edf0f5; color: #414a5d; }
.notice, .error { padding: 1rem 1.2rem; border-radius: .7rem; margin-bottom: 1.5rem; font-weight: 700; }
.notice { background: var(--accent-soft); border-left: 5px solid var(--accent); }
.error { background: #feecec; border-left: 5px solid var(--danger); color: #771818; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.stat-card { min-height: 8rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow); }
.stat-card strong { display: block; color: var(--primary); font-size: 2.4rem; line-height: 1; }
.stat-card span { color: var(--muted); }
.section { margin-top: 3.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.instrument-card, .theme-card, .panel, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
.instrument-card, .theme-card { padding: 1.3rem; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: .8rem; color: var(--muted); font-size: .83rem; }
.compact-meta { display: flex; gap: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.compact-meta div { display: flex; flex-direction: column; }
.compact-meta dt { color: var(--muted); font-size: .8rem; }
.compact-meta dd { margin: 0; font-size: 1.25rem; font-weight: 800; }
.next-step { margin-top: 3rem; padding: 1.7rem; display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; background: var(--ink); color: white; border-radius: 1rem; }
.next-step .eyebrow { color: #8ee1d3; }
.next-step p:last-child { margin: 0; font-size: 1.05rem; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(19rem, .8fr); align-items: start; gap: 1.2rem; }
.panel { padding: 1.4rem; }
.panel-wide { min-width: 0; }
.stacked-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
label, legend { font-weight: 750; }
label span { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 2.7rem; padding: .62rem .7rem; color: var(--ink); background: #fff; border: 1px solid #9da8bb; border-radius: .45rem; font: inherit; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: .6rem; padding: .8rem; }
.check-field { display: flex; align-items: flex-start; gap: .6rem; }
.check-field input { width: 1.2rem; height: 1.2rem; min-height: auto; margin-top: .15rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.55rem; padding: .55rem .9rem; border-radius: .5rem; border: 1px solid transparent; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.button-primary { color: white; background: var(--primary); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: var(--primary-dark); background: #edf2ff; border-color: #a9bde9; }
.button-quiet { color: var(--ink); background: white; border-color: var(--line); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f7f8fb; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.tree-name { display: inline-block; padding-left: calc(var(--depth) * 1.2rem); font-weight: 750; }
summary { color: var(--primary-dark); cursor: pointer; font-weight: 750; }
.inline-edit, .inline-form { display: grid; gap: .45rem; margin-top: .75rem; }
.inline-form { grid-template-columns: 1fr auto; align-items: end; border-top: 1px solid var(--line); padding-top: 1rem; }
.inline-form label { grid-column: 1 / -1; }
.reference { color: var(--muted); font-size: .88rem; }
.theme-card ol { padding-left: 1.3rem; }
.theme-card li + li { margin-top: .65rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.setting-card { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: end; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; }
.setting-card label { grid-column: 1 / -1; }
.table-input { min-width: 7rem; }
.login-card { max-width: 31rem; margin: 3rem auto; padding: clamp(1.5rem, 5vw, 2.5rem); }
code { font-size: .78rem; overflow-wrap: anywhere; }
footer { padding: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .85rem; background: white; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.stat-grid-four { grid-template-columns: repeat(4, 1fr); }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.action-card { height: 100%; }
.action-card h2 { margin-bottom: .6rem; }
.form-assurance, .field-help { color: var(--muted); font-size: .88rem; }

/* Mobiele medewerkersroute */
.pulse-body { background: linear-gradient(160deg, #edf3ff 0, #f7f9fd 42%, #e7f8f4 100%); }
.pulse-header { width: min(44rem, calc(100% - 2rem)); margin-inline: auto; padding: max(1rem, env(safe-area-inset-top)) 0 1rem; }
.pulse-page { width: min(44rem, calc(100% - 2rem)); margin-inline: auto; padding: 1rem 0 4rem; }
.pulse-card { padding: clamp(1.35rem, 5vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1.35rem; box-shadow: 0 24px 60px rgba(29, 45, 82, .12); }
.pulse-card h1 { font-size: clamp(1.8rem, 7vw, 3rem); }
.pulse-welcome { margin-top: min(8vh, 4rem); }
.pulse-progress { color: var(--muted); font-size: .9rem; font-weight: 750; }
.pulse-context { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.privacy-note { margin: 1.5rem 0; padding: 1rem 1.1rem; border-radius: .8rem; background: var(--accent-soft); border-left: 5px solid var(--accent); }
.privacy-note p { margin: .35rem 0 0; }
.pulse-form { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.score-fieldset { border: 0; padding: 0; }
.score-fieldset legend { font-size: 1.05rem; }
.score-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: .55rem; margin-top: .8rem; }
.score-option { position: relative; display: grid; place-items: center; min-width: 0; cursor: pointer; }
.score-option input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.score-option span[aria-hidden="true"] { display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 3.25rem; border: 2px solid #8190aa; border-radius: .8rem; background: white; color: var(--ink); font-size: 1.25rem; font-weight: 850; }
.score-option input:checked + span { border-color: var(--primary); background: var(--primary); color: white; box-shadow: 0 0 0 3px #b8cbf4; }
.score-option input:focus-visible + span { outline: 3px solid #f2a900; outline-offset: 3px; }
.score-ends { display: flex; justify-content: space-between; gap: 1rem; margin-top: .45rem; color: var(--muted); font-size: .78rem; }
.pulse-form textarea { min-height: 8rem; font-size: 1rem; }
.pulse-submit, .install-app-button { width: 100%; min-height: 3.25rem; font-size: 1.03rem; }
.pulse-footer { background: transparent; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
.pulse-state { margin-top: min(10vh, 5rem); }
.success-mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--accent); color: white; font-size: 2rem; font-weight: 900; }
.team-feedback, .published-feedback { margin: 1.5rem 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.team-score { display: flex; align-items: center; gap: 1rem; }
.team-score strong { color: var(--primary); font-size: 3rem; line-height: 1; }
.team-score span { max-width: 13rem; color: var(--muted); }
.ios-install-help { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; }
.ios-install-help p { margin-bottom: 0; }
.result-filter { display: grid; grid-template-columns: minmax(14rem, .7fr) minmax(0, 1.3fr); gap: 2rem; align-items: end; }
.filter-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.result-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.result-summary .stat-card strong { font-size: 2rem; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.result-card { padding: 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
.result-card-protected { background: #f8f9fc; }
.result-average { display: flex; align-items: center; gap: 1rem; }
.result-average strong { color: var(--primary); font-size: 3rem; line-height: 1; }
.result-average span { color: var(--muted); }
.score-distribution { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin: 1rem 0; }
.score-distribution div { padding: .55rem .35rem; border-radius: .55rem; background: #edf2ff; text-align: center; }
.score-distribution dt { color: var(--muted); font-size: .7rem; }
.score-distribution dd { margin: 0; font-size: 1.2rem; font-weight: 850; }
.protected-result { padding: .9rem 1rem; border-left: 5px solid #8792a5; background: #edf0f5; }
.protected-result p { margin-bottom: 0; }
.feedback-form-wrap { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.feedback-form-wrap form { margin-top: 1rem; }
.feedback-history article + article { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.feedback-history article p { margin: .25rem 0; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .result-filter, .results-grid { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr 1fr; }
  .filter-form .button { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .header-inner, .page-heading, .section-heading { align-items: stretch; flex-direction: column; }
  .user-panel { justify-content: space-between; text-align: left; }
  .card-grid, .stat-grid, .settings-grid, .next-step { grid-template-columns: 1fr; }
  .phase-badge { align-self: flex-start; }
  .page { padding-top: 1.5rem; }
  .result-summary, .filter-form { grid-template-columns: 1fr; }
  .filter-form .button { grid-column: auto; }
  .pulse-header .brand small { display: none; }
  .pulse-page { width: min(100% - 1rem, 44rem); padding-top: .25rem; }
  .pulse-card { border-radius: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-contrast: more) {
  :root { --line: #788397; --muted: #3c4659; }
}
