/* ============================================================
   Mubien — مبين · Design System v3
   Strak, rustig, duidelijk. Crème · diepgroen · goud (spaarzaam).
   ============================================================ */

:root {
  /* Kleur */
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-2: #fbf9f3;
  --line: #e6e0d0;
  --line-strong: #d5cdb8;

  --ink: #1e2823;
  --muted: #68736d;
  --faint: #97a09a;

  --green-975: #05201b;
  --green-950: #082923;
  --green-900: #0b332c;
  --green-800: #104238;
  --green-700: #155245;
  --green-600: #1d6a58;
  --green-100: #dcebe2;
  --green-50: #edf3ef;

  --gold-700: #8c6d2a;
  --gold-600: #a8842f;
  --gold-500: #bf9a44;
  --gold-400: #d4b269;
  --gold-100: #f4ecd6;

  --cream: #f7eedd;

  --red: #9c3a30;
  --red-bg: #faf0ee;

  /* Vorm */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-pop: 0 8px 30px rgba(8, 41, 35, 0.14);
  --shadow-soft: 0 1px 2px rgba(8, 41, 35, 0.05);

  /* Typografie */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "Amiri", "Scheherazade New", serif;

}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
button { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.arabic { font-family: var(--font-arabic); }
::selection { background: var(--gold-100); color: var(--green-950); }

/* ============================================================
   Knoppen & velden
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-weight: 600; font-size: 0.9rem;
  padding: 0.55rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--green-800); color: #fff; }
.btn--primary:hover { background: var(--green-700); }
.btn--gold { background: var(--gold-500); color: var(--green-975); }
.btn--gold:hover { background: var(--gold-400); }
.btn--subtle { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--subtle:hover { background: var(--surface-2); border-color: var(--faint); }
.btn--ghost { background: transparent; color: var(--green-800); }
.btn--ghost:hover { background: var(--green-50); }
.btn--outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn--outline:hover { background: var(--green-800); color: #fff; }
.btn--light-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn--light-outline:hover { background: rgba(255,255,255,0.1); }
.btn--sm { padding: 0.38rem 0.8rem; font-size: 0.83rem; }

.input, .field input, .field select, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 0.93rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem; background: var(--surface); color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .field input:focus, .field select:focus {
  outline: none; border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.12);
}

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 650; color: var(--ink); margin-bottom: 0.3rem; }
.field .helptext { font-size: 0.75rem; color: var(--faint); display: block; margin-top: 0.3rem; }
.field ul.errorlist { list-style: none; color: var(--red); font-size: 0.79rem; margin-top: 0.3rem; }
.field ul:not(.errorlist) { list-style: none; font-size: 0.75rem; color: var(--faint); margin-top: 0.3rem; }

.form-errors {
  background: var(--red-bg); border: 1px solid #ecd3cf; color: var(--red);
  border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.85rem; margin-bottom: 1.1rem;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.71rem; font-weight: 700;
  padding: 0.14rem 0.55rem; border-radius: 999px;
  background: var(--gold-100); color: var(--gold-700);
}
.badge--green { background: var(--green-50); color: var(--green-700); }

.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress__bar {
  height: 100%; background: var(--gold-500); border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-label { display: flex; justify-content: space-between; font-size: 0.79rem; color: var(--muted); margin-bottom: 0.4rem; }
.progress-label strong { color: var(--ink); }

.chip, .chip--light {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 550; color: var(--muted);
  padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.chip svg, .chip--light svg { width: 13px; height: 13px; color: var(--gold-600); }

/* ============================================================
   App-shell: zijbalk + topbalk
   ============================================================ */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1rem 0.8rem;
  overflow-y: auto;
}
.side__brand {
  display: flex; align-items: center;
  padding: 0.6rem 0.6rem 1rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.side__brand img { height: 46px; width: auto; }
.side__label {
  font-size: 0.67rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); padding: 1rem 0.7rem 0.3rem;
}
.side__item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.7rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 550; color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
  margin-bottom: 1px;
}
.side__item svg { width: 17px; height: 17px; flex: none; }
.side__item:hover { background: var(--surface-2); color: var(--ink); }
.side__item.active { background: var(--green-50); color: var(--green-800); font-weight: 650; }
.side__dot {
  margin-left: auto; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500); flex: none;
}
.side__foot { margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.side__logout { margin: 0; }
.side__logout .side__item {
  width: 100%; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 0.9rem; font-weight: 550; text-align: left;
}

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  height: 56px; padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.searchbox { position: relative; width: min(420px, 100%); }
.searchbox__input {
  width: 100%; font-family: var(--font-body); font-size: 0.88rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem 0.45rem 2.1rem;
  background: var(--bg); color: var(--ink);
  transition: all 0.15s ease;
}
.searchbox__input:focus {
  outline: none; background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.08);
}
.searchbox__icon {
  position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--faint); pointer-events: none;
}
.searchbox__kbd {
  position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  font-size: 0.68rem; font-weight: 700; color: var(--faint);
  border: 1px solid var(--line-strong); border-radius: 5px;
  padding: 0 0.35rem; background: var(--surface);
  pointer-events: none;
}

.search-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-pop);
  max-height: 420px; overflow-y: auto; z-index: 60;
}
.search-pop:empty { display: none; }
.search-pop__label {
  font-size: 0.67rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); padding: 0.7rem 0.9rem 0.25rem;
}
.search-pop__item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.9rem; font-size: 0.88rem; color: var(--ink);
}
.search-pop__item:hover { background: var(--surface-2); }
.search-pop__item strong { font-weight: 600; color: var(--ink); display: block; line-height: 1.3; }
.search-pop__item small { color: var(--faint); font-size: 0.75rem; }
.search-pop__type {
  flex: none; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
}
.search-pop__type svg { width: 14px; height: 14px; }
.search-pop__empty { padding: 0.9rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
.search-pop__all {
  display: block; text-align: center; font-size: 0.8rem; font-weight: 650;
  color: var(--green-700); padding: 0.6rem; border-top: 1px solid var(--line);
}
.search-pop__all:hover { background: var(--surface-2); }

.top__right { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: hsl(var(--hue, 168) 42% 19%); color: var(--gold-400);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.avatar--sm { width: 26px; height: 26px; font-size: 0.68rem; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar--xl { width: 76px; height: 76px; font-size: 1.7rem; }

.user-menu { position: relative; }
.user-menu__btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer; padding: 0.2rem;
  border-radius: var(--radius-sm);
}
.user-menu__btn:hover { background: var(--surface-2); }
.user-menu__pop {
  position: absolute; right: 0; top: calc(100% + 6px); width: 210px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-pop);
  padding: 0.4rem; z-index: 60;
}
.user-menu__pop[hidden] { display: none; }
.user-menu__head { padding: 0.5rem 0.7rem 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.35rem; }
.user-menu__head strong { display: block; font-size: 0.88rem; }
.user-menu__head span { font-size: 0.75rem; color: var(--faint); }
.user-menu__item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.45rem 0.7rem; border-radius: var(--radius-sm);
  font-size: 0.86rem; color: var(--ink); background: none; border: none;
  cursor: pointer; text-align: left;
}
.user-menu__item svg { width: 15px; height: 15px; color: var(--muted); }
.user-menu__item:hover { background: var(--surface-2); }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main > .content { flex: 1; }
.footnote {
  text-align: center; font-size: 0.78rem; color: var(--faint);
  padding: 1.1rem; border-top: 1px solid var(--line);
}
.footnote .arabic { color: var(--gold-600); }

/* ============================================================
   Pagina-opbouw
   ============================================================ */
.page { max-width: 1040px; margin: 0 auto; padding: 2.2rem 1.5rem 3.5rem; }
.page--narrow { max-width: 780px; }

.page-head { padding: 0 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.8rem; }
.page-head__crumb { font-size: 0.79rem; color: var(--faint); margin-bottom: 0.35rem; }
.page-head__crumb a { color: var(--muted); }
.page-head__crumb a:hover { color: var(--green-700); }
.page-head h1 { font-size: 1.7rem; }
.page-head__sub { color: var(--muted); font-size: 0.92rem; margin-top: 0.3rem; max-width: 46rem; }
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.page-head__meta { display: flex; gap: 1.1rem; margin-top: 0.7rem; font-size: 0.84rem; color: var(--muted); flex-wrap: wrap; }
.page-head__meta strong { color: var(--ink); font-weight: 650; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem 1.5rem;
}
.grid { display: grid; gap: 1.1rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.empty {
  text-align: center; padding: 2.6rem 1.5rem; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.empty .arabic { font-size: 1.9rem; color: var(--gold-500); display: block; margin-bottom: 0.5rem; }

/* ============================================================
   Cursussen: filters + kaarten
   ============================================================ */
/* Filters: gelabelde dropdowns + zoekveld + teller */
.filters {
  display: flex; align-items: flex-end; gap: 0.9rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem; margin-bottom: 1.5rem;
}
.filters__field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 150px; }
.filters__field > label {
  font-size: 0.68rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--faint);
}
.filters__field--search { flex: 1; min-width: 200px; }
.select { position: relative; }
.select select {
  width: 100%; appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 550; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem 2.1rem 0.5rem 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select::after {
  content: ""; position: absolute; right: 0.8rem; top: 50%;
  width: 7px; height: 7px; pointer-events: none;
  border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}
.select select:hover { border-color: var(--line-strong); }
.select select:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.1); }
.select--active select { border-color: var(--green-700); background: var(--green-50); color: var(--green-800); font-weight: 650; }
.filters__search { position: relative; }
.filters__search svg {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--faint); pointer-events: none;
}
.filters__search input {
  width: 100%;
  font-family: var(--font-body); font-size: 0.88rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filters__search input:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.1); background: var(--surface); }
.filters__end { margin-left: auto; display: flex; align-items: center; gap: 0.9rem; padding-bottom: 0.45rem; }
.filters__count { font-size: 0.82rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filters__count strong { color: var(--ink); font-weight: 700; }
.filters__clear {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 650; color: var(--gold-700); white-space: nowrap;
}
.filters__clear:hover { color: var(--gold-600); }
.filters__clear svg { width: 12px; height: 12px; }

.c-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.c-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-pop); }
.c-card__banner {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 1.3rem 1.4rem 1.1rem; min-height: 108px;
}
.c-card__banner .arabic {
  position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: 3rem; line-height: 1; color: rgba(16, 66, 56, 0.16);
}
.c-card__cat {
  font-size: 0.68rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.25rem;
}
.c-card__banner h3 { color: var(--ink); font-size: 1.13rem; max-width: 82%; }
.c-card__body { padding: 1.1rem 1.4rem 1.3rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.c-card__desc { color: var(--muted); font-size: 0.87rem; flex: 1; }
.c-card__meta { font-size: 0.8rem; color: var(--faint); }
.c-card__meta strong { color: var(--ink); font-weight: 650; }

/* ============================================================
   Cursusdetail: curriculum
   ============================================================ */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }

.chapter { margin-bottom: 1.9rem; }
.chapter__head { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 0.75rem; }
.chapter__num { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--gold-600); }
.chapter__head h3 { font-size: 1.08rem; }
.chapter__count { margin-left: auto; font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.chapter__desc { color: var(--muted); font-size: 0.86rem; margin-bottom: 0.8rem; }

.lesson-row {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lesson-row:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.lesson-row:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.lesson-row:only-of-type { border-radius: var(--radius); }
.lesson-row + .lesson-row { margin-top: -1px; }
.lesson-row:hover { background: var(--surface-2); border-color: var(--line-strong); z-index: 1; position: relative; }
.lesson-row__node {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 750;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--line-strong);
}
.lesson-row--done .lesson-row__node { background: var(--green-800); color: var(--gold-400); border-color: var(--green-800); }
.lesson-row__title { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.lesson-row__sub { font-size: 0.79rem; color: var(--faint); }
.lesson-row__end { margin-left: auto; display: flex; align-items: center; gap: 0.8rem; font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.lesson-row__end svg { width: 13px; height: 13px; vertical-align: -2px; }
.lesson-row__play {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
}
.lesson-row__play svg { width: 9px; height: 9px; margin-left: 1px; }
.timeline { position: relative; }

.ring-wrap { display: flex; align-items: center; gap: 1rem; }
.ring { transform: rotate(-90deg); }
.ring__track { stroke: var(--line); }
.ring__bar { stroke: var(--gold-500); stroke-linecap: round; transition: stroke-dasharray 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.ring-wrap__pct { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; color: var(--ink); }
.ring-wrap__sub { font-size: 0.78rem; color: var(--muted); }

/* ============================================================
   Les-inhoud (speler-content & gedeelde stukken)
   ============================================================ */
.tabs { display: flex; gap: 0.15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.tab {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  padding: 0.55rem 0.95rem;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab::after {
  content: ""; position: absolute; left: 0.95rem; right: 0.95rem; bottom: -1px; height: 2px;
  background: var(--gold-500); transform: scaleX(0); transition: transform 0.2s ease;
}
.tab.active::after { transform: scaleX(1); }
.tab__count {
  font-size: 0.68rem; font-weight: 750; color: var(--gold-700);
  background: var(--gold-100); border-radius: 999px; padding: 0.03rem 0.45rem;
  margin-left: 0.35rem; vertical-align: 1px;
}
.tab-panel { animation: fadeIn 0.25s ease; }
.tab-panel[hidden] { display: none; }

.prose { max-width: 44rem; }
.lesson-summary {
  font-family: var(--font-display); font-size: 1.08rem; font-style: italic;
  color: var(--green-800); line-height: 1.6;
  padding-left: 1rem; border-left: 3px solid var(--gold-400);
  margin-bottom: 1.4rem;
}
.lesson-details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.6rem;
  white-space: pre-line; font-size: 0.93rem;
}

.attachment {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 0.55rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.attachment:hover { border-color: var(--line-strong); background: var(--surface-2); }
.attachment__ext {
  flex: none; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em;
  background: var(--green-800); color: var(--gold-400);
  border-radius: 7px; padding: 0.42rem 0.5rem; min-width: 42px; text-align: center;
}
.attachment__name { font-weight: 600; color: var(--ink); font-size: 0.89rem; }
.attachment__sub { font-size: 0.75rem; color: var(--faint); }
.attachment__dl { margin-left: auto; color: var(--gold-600); flex: none; }
.attachment__dl svg { width: 16px; height: 16px; }


.outline { display: flex; flex-direction: column; gap: 1px; }
.outline__item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.84rem; color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.outline__item:hover { background: var(--surface-2); color: var(--ink); }
.outline__item--current { background: var(--gold-100); color: var(--ink); font-weight: 600; }
.outline__dot {
  width: 21px; height: 21px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.63rem; font-weight: 800;
  background: var(--bg); color: var(--faint);
  border: 1px solid var(--line-strong);
}
.outline__item--current .outline__dot { border-color: var(--gold-500); color: var(--gold-700); background: var(--surface); }
.outline__dot--done { background: var(--green-800); border-color: var(--green-800); color: var(--gold-400); }
.outline__text { min-width: 0; flex: 1; }
.outline__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline__sub { display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: var(--faint); }
.outline__sub svg { color: var(--gold-600); }

/* ============================================================
   Dashboard
   ============================================================ */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; padding: 2rem 0 1.4rem; }
.dash-head h1 { font-size: 1.55rem; }
.dash-head__sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.dash-head__ayah { font-size: 1.3rem; color: var(--gold-500); white-space: nowrap; }

.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); margin: 1.4rem 0;
}
.stat { padding: 1.1rem 1.4rem; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 650; color: var(--ink); line-height: 1.15; }
.stat__label { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.stat--ring { display: flex; align-items: center; gap: 0.9rem; }
.stat--ring .ring { flex: none; }

.dash-side { display: flex; flex-direction: column; gap: 1.6rem; }
.dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.dash-panel__empty { padding: 1.2rem 1.3rem; font-size: 0.87rem; color: var(--muted); text-align: center; }
.dash-quiz {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.8rem 1rem;
  transition: background 0.15s ease;
}
.dash-quiz + .dash-quiz { border-top: 1px solid var(--line); }
.dash-quiz:hover { background: var(--surface-2); }
.dash-quiz__info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dash-quiz__info strong { font-size: 0.88rem; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-quiz__info > span { font-size: 0.77rem; color: var(--faint); }
.dash-quiz__go { color: var(--faint); font-weight: 650; flex: none; }
.dash-quiz:hover .dash-quiz__go { color: var(--green-700); }
.dash-quiz .q-card__kind { flex: none; font-size: 0.62rem; padding: 0.22rem 0.55rem; }
.dash-agenda__date {
  flex: none; width: 40px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.25rem 0; line-height: 1.2;
}
.dash-agenda__date strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.dash-agenda__date span { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.05rem 1.2rem;
}
.stat-card__num { font-family: var(--font-display); font-size: 1.55rem; font-weight: 650; color: var(--ink); line-height: 1.15; }
.stat-card__label { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.stat-card--ring { display: flex; align-items: center; gap: 0.9rem; }
.stat-card--ring .ring { flex: none; }

.continue-card {
  display: flex; align-items: center; gap: 1.6rem;
  position: relative; overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.9rem; margin-bottom: 0;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.continue-card > * { position: relative; }
.continue-card:hover { box-shadow: var(--shadow-pop); border-color: var(--line-strong); }
.continue-card__body { min-width: 0; flex: 1; }
.continue-card__kicker {
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.3rem;
}
.continue-card h2 { color: var(--ink); font-size: 1.25rem; margin-bottom: 0.2rem; }
.continue-card__sub { font-size: 0.83rem; color: var(--muted); margin-bottom: 0.8rem; }
.continue-card__progress { display: flex; align-items: center; gap: 0.8rem; max-width: 340px; }
.continue-card__progress .progress { flex: 1; background: var(--line); }
.continue-card__progress span { font-size: 0.78rem; font-weight: 700; color: var(--gold-700); }
.continue-card__play {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-500); color: var(--green-975);
}
.continue-card__play svg { width: 21px; height: 21px; margin-left: 2px; }

.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.8rem; align-items: start; }
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.dash-section-head h2 { font-size: 1.08rem; }
.dash-section-head a { font-size: 0.8rem; font-weight: 650; color: var(--green-700); }

.dash-course {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.dash-course:first-of-type { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.dash-course:last-of-type { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.dash-course:only-of-type { border-radius: var(--radius-lg); }
.dash-course + .dash-course { margin-top: -1px; }
.dash-course:hover { background: var(--surface-2); }
.dash-course__accent {
  width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--green-900); color: var(--gold-400); font-size: 1rem;
}
.dash-course__info { min-width: 0; flex: 1; }
.dash-course__cat { display: block; font-size: 0.63rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-700); }
.dash-course__info strong { display: block; color: var(--ink); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-course__meta { font-size: 0.75rem; color: var(--faint); }
.dash-course__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex: none; }
.dash-course__pct { font-weight: 700; color: var(--ink); font-size: 0.85rem; }
.dash-course__right .progress { display: block; width: 84px; }
.dash-course__right .progress__bar { display: block; }

.mini-post {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 1rem; margin-bottom: 0.6rem;
  transition: background 0.15s ease;
}
.mini-post:hover { background: var(--surface-2); }
.mini-post strong { font-size: 0.83rem; color: var(--ink); }
.mini-post__time { font-size: 0.7rem; color: var(--faint); margin-left: 0.35rem; }
.mini-post__text { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ============================================================
   Cursussen — uitgelicht, kaarten, hero, curriculum, notitieblok
   ============================================================ */
.feature {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.4rem;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature:hover { box-shadow: var(--shadow-pop); border-color: var(--line-strong); }
.feature__art {
  position: relative; min-height: 210px;
  background: var(--cream);
  border-right: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.feature__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.feature__art .arabic { position: relative; font-size: 4rem; color: var(--green-800); opacity: 0.9; }
.feature__body { padding: 1.5rem 1.7rem; display: flex; flex-direction: column; justify-content: center; }
.feature__kicker {
  font-size: 0.68rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.35rem;
}
.feature__body h2 { font-size: 1.5rem; }
.feature__sub { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; max-width: 40rem; }
.feature__meta { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 0.9rem; font-size: 0.82rem; color: var(--faint); }
.feature__meta strong { color: var(--ink); font-weight: 700; }
.feature__progress { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; max-width: 320px; }
.feature__progress .progress { flex: 1; }
.feature__progress span { font-size: 0.8rem; font-weight: 700; color: var(--gold-700); }
.feature__cta { margin-top: 1.1rem; align-self: flex-start; }
.feature--quiz { margin-bottom: 1.4rem; }
.feature--quiz .feature__art { min-height: 170px; }
.feature--quiz .feature__art .arabic { font-size: 2.6rem; }

.c-card__banner { position: relative; overflow: hidden; }
.c-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.16; }
.c-card__banner > * { position: relative; }
.c-card__flag {
  position: absolute; top: 0.8rem; right: 0.9rem; z-index: 2;
  font-size: 0.65rem; font-weight: 750; letter-spacing: 0.05em;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.12rem 0.6rem;
}
.c-card__flag--done { background: var(--gold-500); color: var(--green-975); border-color: var(--gold-500); }
.c-card__facts { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--faint); }
.c-card__facts span { display: inline-flex; align-items: center; gap: 0.3rem; }
.c-card__facts svg { width: 13px; height: 13px; color: var(--gold-600); }
.c-card__teacher { display: flex; align-items: center; gap: 0.45rem; font-size: 0.79rem; color: var(--muted); }
.teacher-dot {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.65rem; font-weight: 800;
  background: var(--green-50); color: var(--green-800);
}

.player__aside-label { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.player__aside-label span { font-size: 0.68rem; font-weight: 700; color: var(--gold-600); }

/* Dashboard-aanvullingen */
.stat-strip--4 { grid-template-columns: repeat(4, 1fr); }
.stat__unit { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 0.15rem; }
.discover { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.discover__card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1rem; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.discover__card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.discover__accent {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--green-50); color: var(--green-800); font-size: 0.85rem; margin-bottom: 0.5rem;
}
.discover__card strong { display: block; font-size: 0.87rem; color: var(--ink); line-height: 1.35; }
.discover__meta { font-size: 0.74rem; color: var(--faint); }
.dash-cues { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.dash-cue {
  font-size: 0.78rem; font-weight: 650; color: var(--green-800);
  background: var(--green-50); border: 1px solid var(--green-100);
  border-radius: 999px; padding: 0.25rem 0.75rem;
}
.dash-cue--alert { color: var(--gold-700); background: var(--gold-100); border-color: var(--gold-400); }
.mini-post__stats { display: block; font-size: 0.72rem; color: var(--faint); margin-top: 0.2rem; }

@media (max-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature__art { min-height: 150px; }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .discover { grid-template-columns: minmax(0, 1fr); }
  .stat-strip--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-strip--4 .stat:nth-child(3) { border-left: none; }
}

.dash-course__lock {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.74rem; font-weight: 650; color: var(--faint); white-space: nowrap;
}
.dash-course__lock svg { width: 13px; height: 13px; }
.dash-panel__empty--lock {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  flex-wrap: wrap; font-size: 0.83rem;
}
.dash-panel__empty--lock svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.dash-panel__empty--lock a { font-weight: 650; }

/* ============================================================
   Ghost: nepinhoud voor vergrendelde pagina's
   ============================================================ */
.ghost { padding-top: 2.2rem; }
.ghost__title {
  height: 26px; width: 34%; border-radius: 7px;
  background: var(--line); margin-bottom: 0.7rem;
}
.ghost__line {
  height: 12px; border-radius: 6px;
  background: var(--line); margin-bottom: 0.55rem;
}
.ghost__line--w25 { width: 25%; }
.ghost__line--w50 { width: 50%; }
.ghost__line--w70 { width: 70%; }
.ghost__line--w85 { width: 85%; }
.ghost__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem 0.7rem;
  margin-top: 0.8rem;
}
.ghost__row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.ghost__row .ghost__line { margin-bottom: 0; }
.ghost__dot {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--line);
}

/* ============================================================
   Paywall: wazige pagina met premiumkaart voor gratis leden
   ============================================================ */
.paywall-blur {
  filter: blur(7px) saturate(0.85);
  pointer-events: none;
  user-select: none;
}
.paywall {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: rgba(30, 40, 35, 0.28);
  animation: fadeIn 0.25s ease;
}
.paywall__card {
  width: min(430px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  padding: 2.1rem 2rem 1.8rem; text-align: center;
}
.paywall__mark {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--green-900); color: var(--gold-400);
  font-size: 1.25rem; margin-bottom: 1rem;
}
.paywall__card h2 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.paywall__card p {
  font-size: 0.9rem; color: var(--muted); line-height: 1.65;
  margin-bottom: 1.4rem;
}
.paywall__card .btn { width: 100%; }
.paywall__back {
  display: inline-block; margin-top: 0.9rem;
  font-size: 0.83rem; font-weight: 600; color: var(--muted);
}
.paywall__back:hover { color: var(--ink); }

.side__lock {
  width: 12px; height: 12px; flex: none;
  margin-left: auto; color: var(--faint);
}
.side__lock + .side__dot { margin-left: 0.3rem; }

/* Vergrendelde cursussen */
.lock-note {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--gold-100); border: 1px solid var(--gold-400);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  font-size: 0.86rem; color: var(--gold-700); margin-bottom: 1.1rem;
}
.lock-note svg { width: 15px; height: 15px; flex: none; }
.lesson-row--locked .lesson-row__title { color: var(--muted); }
.lesson-row__lock { width: 14px; height: 14px; color: var(--faint); }

/* ============================================================
   Community
   Eén kolom, platte vlakken, haarlijnen in plaats van kaders.
   Geen tweede navigatiekolom en geen zijkolom.
   ============================================================ */
.cm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* Kop */
.cm-head { padding: 2.4rem 0 1rem; }
.cm-head h1 {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 600;
  color: var(--ink); letter-spacing: -0.015em;
}
.cm-head p {
  font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem;
  max-width: 34rem; line-height: 1.6;
}

/* Tabbladen */
.cm-tabs {
  display: flex; gap: 1.4rem;
  border-bottom: 1px solid var(--line); margin-bottom: 1.6rem;
}
.cm-tab {
  position: relative; padding: 0.55rem 0;
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  transition: color 0.15s ease;
}
.cm-tab:hover { color: var(--ink); }
.cm-tab.active { color: var(--ink); }
.cm-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--green-800); border-radius: 2px;
}
.cm-tab__dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500); vertical-align: 0.35em; margin-left: 0.3rem;
}

/* Composer */
.cm-composer { margin-bottom: 1.4rem; }
.cm-composer__bar {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  padding: 0.7rem 0.9rem; cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--faint); font-size: 0.9rem;
  transition: border-color 0.15s ease;
}
.cm-composer__bar:hover { border-color: var(--line-strong); color: var(--muted); }
.cm-composer__open {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 0.9rem 1rem 0.7rem;
}
.cm-composer.is-open .cm-composer__open { border-color: var(--green-700); }
.cm-composer__title {
  display: block; width: 100%; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 1.02rem; font-weight: 650; color: var(--ink);
  padding: 0 0 0.4rem;
}
.cm-composer__title::placeholder { color: var(--faint); font-weight: 400; }
.cm-composer textarea {
  width: 100%; border: none; outline: none; resize: vertical; background: transparent;
  font-family: var(--font-body); font-size: 0.93rem; line-height: 1.65; color: var(--ink);
  min-height: 84px;
}
.cm-composer textarea::placeholder { color: var(--faint); }
.cm-composer__foot {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 0.7rem; padding-top: 0.6rem;
}
.cm-composer__tools { display: flex; gap: 0.1rem; margin-right: auto; }
.cm-select {
  font-family: var(--font-body); font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.28rem 0.5rem; background: var(--surface); outline: none; cursor: pointer;
}
.cm-select:focus { border-color: var(--green-700); }
.cm-icon {
  display: grid; place-items: center; width: 30px; height: 28px;
  background: none; border: none; border-radius: var(--radius-sm);
  color: var(--faint); cursor: pointer; transition: all 0.15s ease;
}
.cm-icon svg { width: 16px; height: 16px; }
.cm-icon:hover { color: var(--ink); background: var(--surface-2); }
.cm-icon.on { color: var(--green-700); background: var(--green-50); }

.cm-panel { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.cm-panel label {
  display: block; font-size: 0.78rem; font-weight: 650; color: var(--muted);
  margin-bottom: 0.4rem;
}
.cm-panel select,
.cm-panel input[type="text"] {
  width: 100%; font-family: var(--font-body); font-size: 0.88rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem; background: var(--surface); color: var(--ink); outline: none;
}
.cm-panel select:focus, .cm-panel input[type="text"]:focus { border-color: var(--green-700); }
.cm-panel input[type="file"] { font-size: 0.83rem; color: var(--muted); }
.cm-panel__stack { display: flex; flex-direction: column; gap: 0.4rem; }
.cm-panel #lesson-select-wrap:not(:empty) { margin-top: 0.4rem; }

.poll-opt-row { display: flex; align-items: center; gap: 0.4rem; }
.poll-opt-row input { flex: 1; }
.poll-opt-row__remove {
  flex: none; width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--line); color: var(--faint);
  font-size: 0.95rem; line-height: 1; cursor: pointer;
}
.poll-opt-row__remove:hover { color: var(--red); border-color: var(--red); }

.cm-linkbtn {
  background: none; border: none; cursor: pointer; padding: 0.3rem 0.4rem;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--muted);
  border-radius: var(--radius-sm);
}
.cm-linkbtn:hover { color: var(--ink); background: var(--surface-2); }

/* Filters en sortering */
.cm-filters { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.chipf {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 0.25rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  transition: all 0.15s ease;
}
.chipf:hover { border-color: var(--line-strong); color: var(--ink); }
.chipf.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.cm-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.6rem; margin-bottom: 0.2rem;
}
.cm-sort { display: flex; gap: 1rem; }
.cm-sort a {
  font-size: 0.85rem; font-weight: 600; color: var(--faint);
  transition: color 0.15s ease;
}
.cm-sort a:hover { color: var(--ink); }
.cm-sort a.active { color: var(--green-800); }
.cm-sort--sm a { font-size: 0.8rem; }

.cm-search { position: relative; width: 180px; }
.cm-search svg {
  position: absolute; left: 0.55rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--faint); pointer-events: none;
}
.cm-search input {
  width: 100%; font-family: var(--font-body); font-size: 0.84rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 0.32rem 0.6rem 0.32rem 1.85rem;
  background: var(--surface-2); color: var(--ink); outline: none;
  transition: all 0.15s ease;
}
.cm-search input:focus { border-color: var(--green-700); background: var(--surface); }

/* De lijst: één vlak met haarlijnen */
.cm-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.cm-item { padding: 1.1rem 1.2rem; }
.cm-item + .cm-item { border-top: 1px solid var(--line); }
.cm-item--pinned { background: var(--surface-2); }

.cm-item__top {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.79rem; color: var(--faint);
}
.cm-who {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 650; color: var(--muted);
}
.cm-who:hover { color: var(--green-700); }
.cm-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.cm-space { color: var(--faint); font-weight: 600; }
.cm-space:hover { color: var(--green-700); }
.cm-space::before { content: "in "; color: var(--faint); font-weight: 400; }
.cm-flag {
  font-size: 0.7rem; font-weight: 650; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.05rem 0.35rem;
}
.cm-item__menu { margin-left: auto; }

.cm-item__title {
  display: block; margin: 0.45rem 0 0.3rem;
  font-size: 1rem; font-weight: 650; color: var(--ink); line-height: 1.4;
}
.cm-item__title:hover { color: var(--green-800); }
.cm-item__text {
  font-size: 0.89rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cm-mark {
  display: inline-block; vertical-align: 0.1em;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--gold-700); background: var(--gold-100);
  border-radius: 4px; padding: 0.1rem 0.4rem; margin-left: 0.3rem;
}
.cm-mark--ok { color: var(--green-800); background: var(--green-100); }

/* Verwijzing naar een les of cursus */
.cm-ref {
  display: flex; align-items: center; gap: 0.6rem;
  margin-top: 0.7rem; padding: 0.55rem 0.75rem;
  background: var(--surface-2); border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.cm-ref:hover { background: var(--green-50); }
.cm-ref > svg { width: 16px; height: 16px; flex: none; color: var(--gold-600); }
.cm-ref strong { display: block; font-size: 0.85rem; font-weight: 650; color: var(--ink); line-height: 1.35; }
.cm-ref span span { font-size: 0.76rem; color: var(--faint); }

.cm-files { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.cm-file {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.79rem; color: var(--muted);
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.28rem 0.6rem;
}
.cm-file svg { width: 13px; height: 13px; color: var(--gold-600); }
.cm-file:hover { color: var(--ink); background: var(--green-50); }

/* Acties onder een bericht */
.cm-item__foot { display: flex; align-items: center; gap: 0.15rem; margin-top: 0.75rem; }
.cm-vote { display: inline-flex; align-items: center; gap: 0.1rem; }
.cm-act {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer; border-radius: var(--radius-sm);
  padding: 0.28rem 0.5rem;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; color: var(--faint);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease, background 0.15s ease;
}
.cm-act svg { width: 15px; height: 15px; }
.cm-act:hover { color: var(--ink); background: var(--surface-2); }
.cm-act.on { color: var(--green-700); }
.cm-act--vote.on { color: var(--green-700); }
.cm-act--down { padding-left: 0.35rem; padding-right: 0.35rem; }
.cm-act--down.on { color: var(--red); }
.cm-act--down:hover { color: var(--red); }
.cm-act--danger:hover { color: var(--red); background: var(--red-bg); }
.cm-act--plain { cursor: default; }
.cm-act--plain:hover { background: none; color: var(--faint); }

.cm-more { padding: 0.9rem; text-align: center; border-top: 1px solid var(--line); }
.cm-empty {
  padding: 2.4rem 1.4rem; text-align: center;
  font-size: 0.89rem; color: var(--muted); line-height: 1.6;
}
.cm-back {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.83rem; font-weight: 600; color: var(--muted); margin-bottom: 1rem;
}
.cm-back svg { width: 14px; height: 14px; }
.cm-back:hover { color: var(--green-700); }
.cm-rightact { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.cm-note {
  padding: 0.7rem 0.9rem; background: var(--surface-2); border-radius: var(--radius-sm);
  font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem;
}

/* Optiemenu */
.omenu { position: relative; }
.omenu summary { list-style: none; cursor: pointer; }
.omenu summary::-webkit-details-marker { display: none; }
.omenu__btn {
  display: grid; place-items: center; width: 26px; height: 22px; border-radius: var(--radius-sm);
  color: var(--faint); transition: all 0.15s ease;
}
.omenu__btn svg { width: 15px; height: 15px; }
.omenu__btn:hover { background: var(--surface-2); color: var(--ink); }
.omenu__pop {
  position: absolute; right: 0; top: 100%; z-index: 40; min-width: 168px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop); padding: 0.25rem; margin-top: 0.25rem;
}
.omenu__item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 0.4rem 0.55rem; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.83rem; font-weight: 600; color: var(--ink);
}
.omenu__item:hover { background: var(--surface-2); }
.omenu__item--danger { color: var(--red); }
.omenu__item--danger:hover { background: var(--red-bg); }

/* Berichtpagina */
.cm-post {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.4rem 1.1rem;
}
.cm-post__title {
  font-family: var(--font-display); font-size: 1.42rem; font-weight: 600;
  color: var(--ink); line-height: 1.3; letter-spacing: -0.015em;
  margin: 0.55rem 0 0.8rem;
}
.cm-post__body { font-size: 0.95rem; line-height: 1.7; color: var(--ink); }

.prose p { margin-bottom: 0.8rem; }
.prose p:last-child { margin-bottom: 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em;
  background: var(--surface-2); border-radius: 4px; padding: 0.05rem 0.3rem;
}
.body-list { margin: 0 0 0.8rem 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.body-list li { list-style: disc; }
.body-quote {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem; margin-bottom: 0.8rem;
  color: var(--muted);
}
.mention { font-weight: 650; color: var(--green-700); }

/* Reacties */
.cm-comments { margin-top: 1.8rem; }
.cm-comments__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 0.8rem;
}
.cm-comments__head h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }

.cmt-form { margin-bottom: 1.4rem; }
.cmt-form textarea {
  width: 100%; resize: vertical; font-family: var(--font-body); font-size: 0.9rem;
  line-height: 1.6; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; background: var(--surface); color: var(--ink); outline: none;
  transition: border-color 0.15s ease;
}
.cmt-form textarea:focus { border-color: var(--green-700); }
.cmt-form--reply { margin: 0.7rem 0 0.2rem; }
.cmt-form__files { margin-top: 0.45rem; }
.cmt-form__files input { font-size: 0.82rem; color: var(--muted); }
.cmt-form__foot { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.45rem; }
.cmt-form__foot .btn { margin-left: auto; }
.cmt-form__foot .cm-linkbtn + .btn { margin-left: auto; }

.cm-thread { display: flex; flex-direction: column; }
.cmt { padding: 0.9rem 0; animation: fadeIn 0.2s ease; }
.cm-thread > .cmt + .cmt { border-top: 1px solid var(--line); }
.cmt--best { background: var(--green-50); border-radius: var(--radius-sm); padding: 0.9rem; }
.cmt__head { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--faint); }
.cmt__gone { font-style: italic; }
.cmt__text { font-size: 0.9rem; line-height: 1.65; color: var(--ink); margin-top: 0.35rem; }
.cmt__acts { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; margin-top: 0.35rem; }
.cmt__inline { display: inline; }
.cmt__replies { margin: 0 0 0 1.5rem; }
.cmt__replies:empty { display: none; }
.cmt__replies .cmt { padding-bottom: 0; }

/* Poll */
.poll { margin-top: 0.8rem; }
.poll__question { font-size: 0.9rem; font-weight: 650; color: var(--ink); margin-bottom: 0.55rem; }
.poll__question svg { display: none; }
.poll-option {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 0.45rem 0.8rem; margin-bottom: 0.35rem;
  font-size: 0.87rem; color: var(--ink); overflow: hidden;
  transition: border-color 0.15s ease;
}
.poll-option:hover { border-color: var(--line-strong); }
.poll-option__fill {
  position: absolute; inset: 0; width: var(--pct, 0%);
  background: var(--green-50);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.poll-option__row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.poll-option__stats { color: var(--muted); font-size: 0.76rem; font-weight: 650; white-space: nowrap; }
.poll-option--chosen { border-color: var(--green-600); }
.poll__meta { font-size: 0.75rem; color: var(--faint); margin-top: 0.3rem; }

/* Meldingen */
.cm-notif { display: flex; align-items: flex-start; gap: 1rem; padding: 0.85rem 1.2rem; }
.cm-notif + .cm-notif { border-top: 1px solid var(--line); }
.cm-notif:hover { background: var(--surface-2); }
.cm-notif.is-new { background: var(--green-50); }
.cm-notif.is-new:hover { background: var(--green-100); }
.cm-notif__text { min-width: 0; flex: 1; }
.cm-notif__text strong { display: block; font-size: 0.86rem; font-weight: 650; color: var(--ink); }
.cm-notif__text span { font-size: 0.82rem; color: var(--muted); }
.cm-notif time { font-size: 0.75rem; color: var(--faint); white-space: nowrap; flex: none; }

/* Profiel van een lid */
.cm-profile {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1.2rem; margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.cm-profile h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.cm-profile p { font-size: 0.84rem; color: var(--muted); margin-top: 0.25rem; line-height: 1.6; }

@media (max-width: 620px) {
  .cm { padding: 0 1rem 3rem; }
  .cm-head { padding-top: 1.6rem; }
  .cm-head h1 { font-size: 1.3rem; }
  .cm-bar { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .cm-search { width: 100%; }
  .cm-item { padding: 1rem; }
  .cm-post { padding: 1.1rem 1rem 0.9rem; }
  .cm-post__title { font-size: 1.2rem; }
  .cmt__replies { margin-left: 0.9rem; }
}

/* ============================================================
   Profiel, instellingen, abonnement
   ============================================================ */
.profile-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.4rem; }
.profile-head h2 { font-size: 1.3rem; }
.profile-head p { color: var(--muted); font-size: 0.86rem; }

.settings-section { margin-bottom: 1.4rem; }
.settings-section h2 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.settings-section > p { color: var(--muted); font-size: 0.84rem; margin-bottom: 1rem; }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem 1.5rem 1.4rem;
  position: relative;
}
.plan--highlight { border-color: var(--green-800); box-shadow: 0 0 0 1px var(--green-800); }
.plan__flag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--green-800); color: #fff; border-radius: 999px; padding: 0.14rem 0.8rem;
  white-space: nowrap;
}
.plan__name { font-size: 1.02rem; font-weight: 650; font-family: var(--font-body); color: var(--ink); }
.plan__price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 650; color: var(--ink); margin-top: 0.4rem; line-height: 1.1; }
.plan__period { font-size: 0.78rem; color: var(--faint); margin-bottom: 1rem; }
.plan__features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.3rem; flex: 1; }
.plan__features li { display: flex; gap: 0.55rem; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.plan__features li::before { content: "✓"; color: var(--green-600); font-weight: 800; flex: none; }
.plan__current {
  text-align: center; font-size: 0.82rem; font-weight: 650; color: var(--green-700);
  background: var(--green-50); border-radius: var(--radius-sm); padding: 0.5rem;
}

.info-note {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--gold-100); border: 1px solid var(--gold-400);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
  font-size: 0.84rem; color: var(--gold-700); margin-top: 1.4rem;
}

/* ============================================================
   Resources: uitklapbare groepen
   ============================================================ */
.rgroup {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin-bottom: 0.8rem;
  overflow: hidden;
}
.rgroup summary {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.95rem 1.3rem; cursor: pointer; list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}
.rgroup summary::-webkit-details-marker { display: none; }
.rgroup summary:hover { background: var(--surface-2); }
.rgroup__title { font-weight: 650; color: var(--ink); font-size: 0.95rem; }
.rgroup__desc { font-size: 0.79rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgroup__count {
  margin-left: auto; flex: none;
  font-size: 0.72rem; font-weight: 750; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.08rem 0.6rem;
}
.rgroup__chev { width: 16px; height: 16px; flex: none; color: var(--faint); transition: transform 0.2s ease; }
.rgroup[open] .rgroup__chev { transform: rotate(180deg); }
.rgroup__body { padding: 0.2rem 1.3rem 1.2rem; animation: fadeIn 0.25s ease; }
.rgroup .attachment { border-color: var(--line); }

.attachment__ext--link { background: var(--gold-100); color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--gold-400); }

.rsearch { position: relative; margin-bottom: 1rem; max-width: 480px; }
.rsearch__icon {
  position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--faint); pointer-events: none;
}
.rsearch input {
  width: 100%; font-family: var(--font-body); font-size: 0.9rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem 0.55rem 2.3rem; background: var(--surface); color: var(--ink);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rsearch input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.1); }
.rresult { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; }

/* Poll-optierijen in de composer */
.poll-opt-row { display: flex; align-items: center; gap: 0.45rem; }
.poll-opt-row input { flex: 1; }
.poll-opt-row__remove {
  flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--line-strong); color: var(--muted);
  font-size: 1rem; line-height: 1; cursor: pointer;
  transition: all 0.15s ease;
}
.poll-opt-row__remove:hover { color: var(--red); border-color: var(--red); background: var(--red-bg); }

/* ============================================================
   Agenda
   ============================================================ */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1.5rem; align-items: start; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cal__toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line);
}
.cal__nav { display: flex; align-items: center; gap: 0.5rem; }
.cal__nav-btn {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--muted); transition: all 0.15s ease;
}
.cal__nav-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.cal__nav-btn svg { width: 15px; height: 15px; }
.cal__month { font-size: 1.15rem; margin-left: 0.5rem; }

.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__weekday {
  padding: 0.55rem 0.6rem; text-align: right;
  font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px solid var(--line);
}
.cal__day {
  position: relative; min-height: 96px; padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: background 0.12s ease;
}
.cal__grid > *:nth-child(7n) { border-right: none; }
.cal__day:hover { background: var(--surface-2); }
.cal__day--out { background: var(--surface-2); }
.cal__day--out .cal__num { color: var(--faint); opacity: 0.6; }
.cal__day--out:hover { background: var(--bg); }
.cal__num {
  align-self: flex-end;
  display: grid; place-items: center; min-width: 24px; height: 24px;
  font-size: 0.8rem; font-weight: 650; color: var(--muted);
  border-radius: 50%;
}
.cal__day--today .cal__num { background: var(--green-800); color: #fff; }
.cal__day--selected { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-700); }
.cal__day--selected:hover { background: var(--green-50); }
.cal__events { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal__event {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.7rem; font-weight: 600; line-height: 1.5;
  padding: 0.1rem 0.4rem; border-radius: 5px;
}
.cal__event em { font-style: normal; font-weight: 750; opacity: 0.75; margin-right: 0.15rem; }
.cal__event--les { background: var(--green-100); color: var(--green-800); }
.cal__event--nieuwe_les { background: var(--gold-100); color: var(--gold-700); }
.cal__event--toets { background: var(--red-bg); color: var(--red); }
.cal__event--anders { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.cal__more { font-size: 0.66rem; font-weight: 650; color: var(--faint); padding-left: 0.4rem; }
.cal__dots { display: none; gap: 3px; justify-content: center; }
.cal__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.cal__dot--les { background: var(--green-600); }
.cal__dot--nieuwe_les { background: var(--gold-500); }
.cal__dot--toets { background: var(--red); }
.cal__dot--anders { background: var(--faint); }
.cal__legend {
  display: flex; gap: 1.1rem; flex-wrap: wrap;
  padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-2);
}
.cal__legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--muted); }

.cal-side { display: flex; flex-direction: column; gap: 0.8rem; }
.cal-side__head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.2rem; }
.cal-side__head h2 { font-size: 1.08rem; }
.cal-side__close {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted);
  transition: all 0.15s ease;
}
.cal-side__close:hover { color: var(--ink); border-color: var(--line-strong); }
.cal-side__close svg { width: 13px; height: 13px; }
.cal-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.cal-card--link { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.cal-card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.cal-card__kind {
  font-size: 0.66rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 0.15rem;
}
.cal-card--les .cal-card__kind { color: var(--green-700); }
.cal-card--nieuwe_les .cal-card__kind { color: var(--gold-700); }
.cal-card--toets .cal-card__kind { color: var(--red); }
.cal-card h3 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.15rem; }
.cal-card__meta { font-size: 0.78rem; color: var(--muted); }
.cal-card__desc { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin: 0.5rem 0 0.2rem; }
.cal-card .btn { margin-top: 0.6rem; }
.cal-side__empty {
  text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.88rem;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.cal-side__empty .arabic { display: block; font-size: 1.6rem; color: var(--gold-500); margin-bottom: 0.4rem; }

/* ============================================================
   Toetsomgeving
   ============================================================ */
.q-card {
  display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.25rem 1.4rem 1.3rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.q-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-pop); }
.q-card__top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.q-card__kind {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-700); background: var(--green-50);
  padding: 0.28rem 0.7rem; border-radius: 999px;
}
.q-card__kind svg { width: 13px; height: 13px; }
.q-card__kind--review { color: var(--gold-700); background: var(--gold-100); }
.q-card__badge {
  font-size: 0.74rem; font-weight: 700; padding: 0.22rem 0.65rem; border-radius: 999px;
  white-space: nowrap;
}
.q-card__badge svg { width: 12px; height: 12px; flex: none; }
.q-card__badge--pass { color: var(--green-700); background: var(--green-100); }
.q-card__badge--fail { color: var(--gold-700); background: var(--gold-100); }
.q-card__badge--done { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.q-card__badge--lock {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
}
.q-card h3 { font-size: 1.08rem; }
.q-card__desc { color: var(--muted); font-size: 0.87rem; flex: 1; }
.q-card__meta { font-size: 0.8rem; color: var(--faint); }
.q-card__cat { color: var(--gold-700); font-weight: 650; }

.q-detail__back { padding: 1.6rem 0 1rem; }
.q-detail__back a { color: var(--muted); font-size: 0.88rem; font-weight: 550; }
.q-detail__back a:hover { color: var(--ink); }
.q-detail {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  max-width: 880px; margin: 0 auto;
}
.q-detail__head {
  padding: 2rem 2.2rem 1.6rem; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.q-detail__head h1 { font-size: 1.55rem; margin: 0.8rem 0 0.5rem; }
.q-detail__desc { color: var(--muted); font-size: 0.94rem; margin-bottom: 1.1rem; max-width: 36rem; }
.q-detail__facts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.q-detail__body { padding: 1.8rem 2.2rem 2rem; }
.q-detail__body h2 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.8rem; }
.q-detail__rules { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.6rem; }
.q-detail__rules li { position: relative; padding-left: 1.5rem; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.q-detail__rules li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold-600); font-weight: 800; }
.q-detail__start { padding: 0.65rem 1.6rem; }
.q-detail__attempts { padding: 1.6rem 2.2rem 2rem; border-top: 1px solid var(--line); }
.q-detail__attempts h2 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.8rem; }
.q-attempt {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.65rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 0.5rem; transition: border-color 0.15s ease, background 0.15s ease;
}
.q-attempt:hover { background: var(--surface-2); border-color: var(--line-strong); }
.q-attempt__date { font-size: 0.84rem; color: var(--muted); flex: 1; }
.q-attempt__score { font-size: 0.86rem; font-weight: 650; color: var(--ink); }

/* Gesloten toetsweergave */
.exam-page { background: var(--bg); }
.exam { min-height: 100vh; display: flex; flex-direction: column; }
.exam__bar {
  display: flex; align-items: center; gap: 1rem;
  background: var(--green-950); color: #fff;
  padding: 0 1.2rem; height: 58px; flex: none;
}
.exam__quit {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: var(--radius-sm); color: rgba(255, 255, 255, 0.75);
  transition: background 0.15s ease, color 0.15s ease;
}
.exam__quit:hover { background: rgba(255, 255, 255, 0.08); color: var(--gold-400); }
.exam__quit svg { width: 16px; height: 16px; }
.exam__info { display: flex; flex-direction: column; min-width: 0; }
.exam__kind { font-size: 0.66rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-400); }
.exam__title { font-size: 0.92rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam__status { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.exam__timer {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08); padding: 0.25rem 0.7rem; border-radius: 999px;
}
.exam__timer.urgent { background: var(--red); }
.exam__count { font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); font-variant-numeric: tabular-nums; }
.exam__progress { height: 4px; background: var(--line); flex: none; }
.exam__progress-bar { height: 100%; width: 0; background: var(--gold-500); transition: width 0.25s ease; }

.exam__body { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 2rem; }
.exam-q { display: block; padding: 1.6rem 0 1.8rem; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.exam-q:last-of-type { border-bottom: 0; }
.exam-q__num { font-size: 0.78rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-700); margin-bottom: 0.9rem; }
.exam-q__arabic { font-size: 2rem; color: var(--green-800); margin-bottom: 0.7rem; line-height: 1.8; }
.exam-q__text { font-size: 1.25rem; font-family: var(--font-display); margin-bottom: 1.5rem; line-height: 1.45; }
.exam-q__choices { display: flex; flex-direction: column; gap: 0.6rem; counter-reset: choice; }
.exam-choice {
  position: relative; display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 1.1rem; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.exam-choice:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.exam-choice input { position: absolute; opacity: 0; pointer-events: none; }
.exam-choice__letter {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
}
.exam-choice__letter::before { counter-increment: choice; content: counter(choice, upper-alpha); }
.exam-choice__text { font-size: 0.95rem; line-height: 1.5; }
.exam-choice__mark { margin-left: auto; font-size: 0.9rem; font-weight: 800; flex: none; }
.exam-choice:has(input:checked) { border-color: var(--green-700); background: var(--green-50); }
.exam-choice:has(input:checked) .exam-choice__letter { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.exam-choice.locked { cursor: default; }
.exam-choice.locked:hover { box-shadow: none; }
.exam-choice.correct { border-color: var(--green-700); background: var(--green-50); }
.exam-choice.correct .exam-choice__mark::before { content: "✓"; color: var(--green-700); }
.exam-choice.correct .exam-choice__letter { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.exam-choice.wrong { border-color: var(--red); background: var(--red-bg); }
.exam-choice.wrong .exam-choice__mark::before { content: "✕"; color: var(--red); }
.exam-q__open { width: 100%; resize: vertical; }
.exam-q__reveal { margin-top: 0.9rem; }
.exam-q__feedback {
  margin-top: 1.2rem; padding: 1.1rem 1.3rem;
  background: var(--gold-100); border: 1px solid var(--gold-400); border-radius: var(--radius);
  font-size: 0.92rem; line-height: 1.6;
}
.exam-q__feedback-label {
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.2rem;
}
.exam-q__feedback p + .exam-q__feedback-label { margin-top: 0.9rem; }

.exam__nav {
  display: flex; align-items: center; gap: 1rem;
  padding-top: 2rem; margin-top: auto;
}
.exam__dots { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; flex: 1; }
.exam__dot {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.76rem; font-weight: 650; color: var(--muted); font-family: var(--font-body);
  transition: all 0.15s ease;
}
.exam__dot:hover { border-color: var(--line-strong); }
.exam__dot.answered { background: var(--green-100); border-color: var(--green-100); color: var(--green-800); }
.exam__dot.current { border-color: var(--green-800); color: var(--green-800); box-shadow: 0 0 0 1px var(--green-800); }
.exam__dot.current.answered { background: var(--green-800); color: #fff; }
/* In de navigatiebalk zelf: één rij dunne tikjes, één per vraag. De nummers
   staan in het vragenblad (knop "1/20"), zodat de rij nooit hoeft te breken. */
.exam__nav > .exam__dots { flex-wrap: nowrap; gap: 5px; max-width: 480px; margin: 0 auto; }
.exam__nav > .exam__dots .exam__dot {
  flex: 1 1 0; min-width: 6px; max-width: 30px; width: auto; height: 24px;
  padding: 8px 0; border: 0; border-radius: 999px; font-size: 0; color: transparent;
  background: var(--line-strong); background-clip: content-box; box-shadow: none;
}
.exam__nav > .exam__dots .exam__dot:hover { background-color: var(--faint); }
.exam__nav > .exam__dots .exam__dot.answered { background-color: var(--green-600); }
.exam__nav > .exam__dots .exam__dot.current { padding: 5px 0; background-color: var(--green-900); }

/* Resultaat */
.q-result__head { text-align: center; padding: 2.2rem 0 2rem; }
.q-result__ring { position: relative; display: inline-block; margin-bottom: 1rem; }
.q-result__track { stroke: var(--line); }
.q-result__bar {
  stroke: var(--gold-500); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
}
.q-result__ring.pass .q-result__bar { stroke: var(--green-600); }
.q-result__pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
}
.q-result__head h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.q-result__sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.5rem; }
.q-result__actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

.q-review { padding-bottom: 2rem; }
.q-review h2 { font-size: 1.15rem; margin-bottom: 1.1rem; }
.q-review__item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem; margin-bottom: 1rem;
}
.q-review__num {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.78rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.7rem;
}
.q-review__question { font-weight: 650; font-size: 1rem; margin-bottom: 0.9rem; }
.q-review__choices { display: flex; flex-direction: column; gap: 0.45rem; }
.q-review__choice {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem; font-size: 0.9rem;
}
.q-review__choice em { font-style: normal; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.q-review__choice.correct { border-color: var(--green-600); background: var(--green-50); }
.q-review__choice.correct em { color: var(--green-700); }
.q-review__choice.wrong { border-color: var(--red); background: var(--red-bg); }
.q-review__choice.wrong em { color: var(--red); }
.q-review__none { color: var(--faint); font-size: 0.85rem; font-style: italic; }
.q-review__open { font-size: 0.92rem; line-height: 1.6; }
.q-review__open .exam-q__feedback-label { margin-top: 0.6rem; }
.q-review__open .exam-q__feedback-label:first-child { margin-top: 0; }
.q-review__explain {
  margin-top: 0.9rem; padding: 0.9rem 1.1rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.88rem; line-height: 1.6;
}

/* ============================================================
   Landingspagina
   ============================================================ */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.lp-container { max-width: 1120px; margin: 0 auto; padding: 0 1.6rem; }

.lp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lp-nav__inner { display: flex; align-items: center; gap: 2rem; height: 66px; }
.lp-nav__brand { display: flex; align-items: center; }
.lp-nav__brand img { height: 38px; width: auto; display: block; }
.lp-nav__links { display: flex; gap: 1.6rem; }
.lp-nav__links a { font-size: 0.9rem; font-weight: 550; color: var(--muted); }
.lp-nav__links a:hover { color: var(--ink); }
.lp-nav__actions { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.lp-nav__login { font-size: 0.9rem; font-weight: 600; color: var(--green-800); }
.lp-nav__login:hover { color: var(--green-600); }

.lp-hero {
  position: relative; overflow: hidden; color: var(--ink);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.lp-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 420px at 78% 18%, rgba(212, 178, 105, 0.12), transparent 70%);
}
.lp-hero__inner {
  position: relative; z-index: 1;
  padding-top: 5.2rem; padding-bottom: 5.2rem;
}
.lp-hero__copy { max-width: 46rem; }
.lp-hero__kicker {
  font-size: 0.76rem; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 1.1rem;
}
.lp-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.14; color: var(--ink); margin-bottom: 1.2rem; }
.lp-hero h1 em { font-style: italic; color: var(--gold-600); }
.lp-hero__lead { font-size: 1.05rem; color: var(--muted); max-width: 44rem; margin-bottom: 1.9rem; }
.lp-hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.9rem; }
.lp-hero__points { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lp-hero__points li {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.84rem; color: var(--muted);
}
.lp-hero__points li::before { content: "✓"; color: var(--gold-600); font-weight: 800; }
.lp-hero__art { text-align: center; }
.lp-hero__art img {
  width: 100%; max-width: 400px; border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 178, 105, 0.45);
  box-shadow: 0 24px 60px rgba(8, 41, 35, 0.18);
}
.lp-hero__ayah { font-size: 1.7rem; color: var(--gold-600); margin-top: 1.3rem; }
.lp-hero__caption { font-size: 0.82rem; color: var(--faint); margin-top: 0.2rem; }

.lp-section { padding: 4.6rem 0; }
.lp-section--tint { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-section__head { max-width: 620px; margin: 0 auto 2.6rem; text-align: center; }
.lp-section__kicker {
  font-size: 0.74rem; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.6rem;
}
.lp-section__head h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 0.5rem; }
.lp-section__head p { color: var(--muted); font-size: 0.94rem; }

/* Scroll-reveal */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
[data-reveal="left"] { transform: translateX(-42px); }
[data-reveal="right"] { transform: translateX(42px); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Twee sporen: Qur'aan- en taalwetenschappen */
.lp-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
.lp-track {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 2.4rem 2.2rem;
}
.lp-track--quran {
  background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.lp-track--taal { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.lp-track > * { position: relative; }
.lp-track__kicker {
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-700); margin-bottom: 0.5rem;
}
.lp-track h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.lp-track__intro { font-size: 0.92rem; margin-bottom: 1.5rem; max-width: 26rem; }
.lp-track__intro { color: var(--muted); } /* beide sporen */
.lp-track__list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.lp-track__list li { display: flex; flex-direction: column; gap: 0.15rem; padding-left: 1.15rem; position: relative; }
.lp-track__list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--gold-500);
}
.lp-track__list strong { font-size: 0.95rem; font-weight: 700; }
.lp-track__list strong { color: var(--green-800); }
.lp-track__list span { font-size: 0.87rem; line-height: 1.55; }
.lp-track__list span { color: var(--muted); }

/* Zo werkt het: stappen */
.lp-steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem;
  max-width: 960px; margin: 0 auto;
}
.lp-step { position: relative; padding-top: 0.4rem; }
.lp-step__num {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-900); color: var(--gold-400);
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 650;
  margin-bottom: 1rem;
}
.lp-step:not(:last-child)::after {
  content: ""; position: absolute; top: 1.75rem; left: 60px; right: -1.6rem;
  border-top: 1.5px dashed var(--line-strong);
}
.lp-step h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.4rem; }
.lp-step p { color: var(--muted); font-size: 0.89rem; line-height: 1.6; }

.lp-courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }

.lp-cta { padding: 4.6rem 0; }
.lp-cta__band {
  position: relative; overflow: hidden; text-align: center;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 3.4rem 2rem;
}
.lp-cta__band > * { position: relative; }
.lp-cta__ayah { font-size: 2rem; color: var(--gold-600); }
.lp-cta__caption { font-size: 0.82rem; color: var(--faint); margin-bottom: 1.7rem; }
.lp-cta__band h2 { color: var(--ink); font-size: 1.55rem; margin-bottom: 0.5rem; }
.lp-cta__lead { color: var(--muted); font-size: 0.94rem; margin-bottom: 1.7rem; }

.lp-foot { background: var(--green-975); padding: 2.6rem 0; }
.lp-foot__inner { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.lp-foot__mark { font-family: var(--font-arabic); font-size: 1.8rem; line-height: 1; color: var(--gold-400); }
.lp-foot__tag { font-size: 0.84rem; color: rgba(255, 255, 255, 0.55); }
.lp-foot__nav { margin-left: auto; display: flex; gap: 1.3rem; }
.lp-foot__nav a { color: rgba(255, 255, 255, 0.75); font-size: 0.86rem; }
.lp-foot__nav a:hover { color: var(--gold-400); }
.lp-foot__copy { font-size: 0.8rem; color: rgba(255, 255, 255, 0.4); }

/* ============================================================
   Auth
   ============================================================ */
.auth-wrap { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.auth-side {
  position: relative; overflow: hidden;
  background: var(--cream);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 3rem; text-align: center;
}
.auth-side > * { position: relative; }
.auth-side__art {
  max-width: 300px; width: 100%; border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: 0 24px 60px rgba(8, 41, 35, 0.16), 0 0 0 1px rgba(212, 178, 105, 0.35);
}
.auth-side__ayah { font-size: 1.7rem; color: var(--gold-600); margin-bottom: 0.4rem; }
.auth-side__caption { color: var(--muted); font-size: 0.85rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-form__card { width: 100%; max-width: 420px; }
.auth-form__logo { height: 52px; width: auto; margin-bottom: 1.2rem; }
.auth-form__card h1 { font-size: 1.65rem; margin-bottom: 0.3rem; }
.auth-form__card > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.7rem; }
.auth-form__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.auth-form__submit { width: 100%; margin-top: 0.4rem; padding: 0.7rem; font-size: 0.95rem; }
.auth-form__alt {
  text-align: center; font-size: 0.87rem; color: var(--muted);
  margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.auth-form__alt a { font-weight: 650; }

.gender-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.gender-picker input { position: absolute; opacity: 0; }
.gender-picker label {
  display: block; text-align: center; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.7rem; font-weight: 650; color: var(--ink); font-size: 0.9rem;
  background: var(--surface); transition: all 0.15s ease; margin-bottom: 0;
}
.gender-picker label:has(input:checked) {
  border-color: var(--green-700); background: var(--green-50); color: var(--green-800);
  box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.1);
}

/* ============================================================
   Meldingen
   ============================================================ */
.messages { position: fixed; top: 68px; right: 1.2rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; }
.message {
  background: var(--green-900); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: var(--radius);
  box-shadow: var(--shadow-pop); font-size: 0.88rem;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.htmx-swapping { opacity: 0; transition: opacity 0.2s ease; }
.htmx-added { animation: fadeIn 0.3s ease; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* ============================================================
   Immersive cursusspeler (behouden)
   ============================================================ */
.player-page { background: var(--green-975); }
.player { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

.player__bar {
  flex: none; display: flex; align-items: center; gap: 1.2rem;
  padding: 0 1.1rem; height: 60px;
  background: var(--green-950);
  border-bottom: 1px solid rgba(212, 178, 105, 0.2);
  position: relative; z-index: 5;
}
.player__back {
  display: flex; align-items: center; gap: 0.55rem;
  color: rgba(255, 255, 255, 0.7); padding: 0.35rem 0.5rem; border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.player__back svg { width: 17px; height: 17px; }
.player__back img {
  height: 26px;
  width: auto;
  /* Het donkergroene logo is op de donkere balk slecht zichtbaar; licht het op. */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.player__back:hover { color: var(--gold-400); background: rgba(255, 255, 255, 0.06); }

.player__course { min-width: 0; flex: 1; }
.player__course-title {
  display: block; font-family: var(--font-display); font-weight: 600;
  color: #fff; font-size: 0.95rem; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player__progress { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.2rem; max-width: 320px; }
.player__progress .progress { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.16); }
.player__progress span { font-size: 0.7rem; font-weight: 750; color: var(--gold-400); }

.player__actions { display: flex; align-items: center; gap: 0.4rem; }
.player__nav-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75); cursor: pointer;
  transition: all 0.15s ease;
}
.player__nav-btn svg { width: 16px; height: 16px; }
.player__nav-btn:hover { background: rgba(255, 255, 255, 0.13); color: var(--gold-400); }

.player-complete {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.84rem; font-weight: 700;
  background: var(--gold-500); color: var(--green-975); border: 1px solid transparent;
  transition: all 0.15s ease;
}
.player-complete svg { width: 14px; height: 14px; }
.player-complete:hover { background: var(--gold-400); }
.player-complete.is-done {
  background: rgba(42, 138, 114, 0.22); color: #7fd6b8;
  border-color: rgba(42, 138, 114, 0.45);
}
.player-complete.is-done:hover { background: rgba(42, 138, 114, 0.32); }

.player__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.player--no-panel .player__body { grid-template-columns: minmax(0, 1fr) 0; }
.player--no-panel .player__aside { display: none; }

.player__main { overflow-y: auto; background: var(--bg); min-width: 0; }
.player__stage {
  background-color: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 1.6rem clamp(1rem, 4vw, 2.8rem) 2rem;
}
.player__video {
  max-width: 1000px; margin: 0 auto;
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  background: #000;
  box-shadow: 0 18px 50px rgba(8, 41, 35, 0.22), 0 0 0 1px rgba(212, 178, 105, 0.35);
}
.player__video iframe { width: 100%; height: 100%; border: 0; display: block; }

.player__content { max-width: 820px; margin: 0 auto; padding: 2rem clamp(1.2rem, 4vw, 2rem) 3rem; }
.player__content h1 { font-size: clamp(1.4rem, 3vw, 1.85rem); }

.player__aside {
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 1rem 0.8rem 1.4rem;
}
.player__aside-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.25rem 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line); margin-bottom: 0.7rem;
}
.player__aside-head h2 { font-size: 1rem; }
.player__aside-close {
  background: none; border: none; cursor: pointer; color: var(--faint);
  width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center;
  transition: all 0.15s ease;
}
.player__aside-close svg { width: 14px; height: 14px; }
.player__aside-close:hover { background: var(--surface-2); color: var(--ink); }
.player__aside-label {
  font-size: 0.65rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-700); padding: 0.85rem 0.6rem 0.3rem;
}
.player__aside .outline__item { padding: 0.5rem 0.6rem; }
.player__aside .outline__title { white-space: normal; font-size: 0.85rem; line-height: 1.35; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .searchbox__kbd { display: none; }

  .grid--3, .grid--2, .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid, .stat-strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .two-col, .dash-cols { grid-template-columns: minmax(0, 1fr); }
  .lp-nav__links { display: none; }
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal__day { min-height: 52px; padding: 0.3rem; gap: 0.2rem; }
  .cal__num { align-self: center; }
  .cal__events, .cal__more { display: none; }
  .cal__dots { display: flex; }
  .filters { align-items: stretch; }
  .filters__field { flex: 1 1 45%; min-width: 130px; }
  .filters__field--search { flex-basis: 100%; }
  .filters__end { margin-left: 0; width: 100%; justify-content: space-between; padding-bottom: 0; }
  .exam__body { padding: 1.6rem 1rem 1.2rem; }
  .exam__nav { flex-wrap: wrap; }
  .exam__dots { order: -1; width: 100%; flex: none; margin-bottom: 0.6rem; }
  .exam__nav .btn { flex: 1; }
  .q-detail__head, .q-detail__body, .q-detail__attempts { padding-left: 1.3rem; padding-right: 1.3rem; }
  .lp-hero__inner { padding-top: 3.4rem; padding-bottom: 3.4rem; }
  .lp-tracks, .lp-courses { grid-template-columns: minmax(0, 1fr); }
  .lp-steps { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .lp-step:not(:last-child)::after { display: none; }
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(26px); }
  .lp-foot__inner { flex-direction: column; text-align: center; }
  .lp-foot__nav { margin-left: 0; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .dash-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .continue-card { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.3rem; }
  .lesson-row__end .hide-sm { display: none; }

  .player__body { grid-template-columns: minmax(0, 1fr); }
  .player__aside {
    position: fixed; top: 60px; right: 0; bottom: 0; width: min(85vw, 330px);
    box-shadow: var(--shadow-pop); z-index: 40;
  }
  .player--no-panel .player__aside { display: none; }
  .player__course-title { font-size: 0.88rem; }
}

/* Extra verfijning voor telefoons */
@media (max-width: 620px) {
  .page, .page--wide { padding-left: 1rem; padding-right: 1rem; }
  .searchbox { width: 100%; min-width: 0; }

  .feature__body { padding: 1.2rem 1.1rem; }
  .feature__body h2 { font-size: 1.25rem; }
}


/* Wachtwoord tonen/verbergen */
.pw-wrap { position: relative; }
.pw-wrap .input,
.pw-wrap input { width: 100%; padding-right: 2.7rem; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  padding: 0.3rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--faint);
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 19px; height: 19px; }
.pw-toggle .pw-toggle__off { display: none; }
.pw-toggle.is-shown .pw-toggle__on { display: none; }
.pw-toggle.is-shown .pw-toggle__off { display: block; }

/* Keuzestap: eerst een cursus selecteren (toetsen & resources) */
.pick h2 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.pick__sub { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.5rem; }
.pick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem;
  padding: 1.6rem 1.5rem 1.4rem; min-height: 190px;
}
.pick-card:hover { transform: translateY(-3px); }
.pick-card__accent {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
  border: 1px solid var(--green-100); border-radius: 14px;
  font-size: 1.25rem; line-height: 1; margin-bottom: 0.4rem;
}
.pick-card h3 { font-size: 1.08rem; }
.pick-card .q-card__meta { flex: 1; }

/* Landingspagina: cursuskaarten */
.lpc-card {
  display: flex; flex-direction: column; gap: 0.45rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.7rem 1.6rem 1.5rem;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.lpc-card:hover { box-shadow: var(--shadow-pop); border-color: var(--line-strong); transform: translateY(-3px); }
.lpc-card__accent {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
  border: 1px solid var(--green-100); border-radius: 14px;
  font-size: 1.3rem; line-height: 1; margin-bottom: 0.5rem;
}
.lpc-card__cat {
  font-size: 0.71rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--gold-600);
}
.lpc-card h3 { font-size: 1.12rem; line-height: 1.3; }
.lpc-card__desc { color: var(--muted); font-size: 0.9rem; line-height: 1.55; flex: 1; }
.lpc-card__meta { color: var(--muted); font-size: 0.84rem; }
.lpc-card__meta strong { color: var(--ink); font-weight: 650; }
.lpc-card__cta { color: var(--green-700); font-weight: 650; font-size: 0.88rem; margin-top: 0.35rem; }
.lpc-card:hover .lpc-card__cta { color: var(--green-600); }

/* Kruimelpad (toetsen & resources) */
.crumbs {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.86rem; margin-bottom: 1.7rem;
}
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--green-700); }
.crumbs__sep { color: var(--faint); }
.crumbs__here { color: var(--ink); font-weight: 650; }

/* Keuzekaarten: pijltje onderaan */
.pick-card__go { color: var(--green-700); font-weight: 650; font-size: 0.86rem; margin-top: 0.35rem; }
.pick-card:hover .pick-card__go { color: var(--green-600); }

/* Toetsen onder elkaar */
.t-list { display: flex; flex-direction: column; gap: 0.7rem; }
.t-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1rem 1.2rem;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.t-row:hover { box-shadow: var(--shadow-pop); border-color: var(--line-strong); }
.t-row__num {
  flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100);
  border-radius: 50%; font-weight: 700; font-size: 0.86rem;
}
.t-row__info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.t-row__info strong { font-size: 0.98rem; }
.t-row__meta { color: var(--muted); font-size: 0.83rem; }
.t-row__end { display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; }
.t-row__go { color: var(--faint); font-weight: 700; transition: transform 0.18s ease, color 0.18s ease; }
.t-row:hover .t-row__go { color: var(--green-700); transform: translateX(3px); }

/* Lesmateriaal per les, als verticale flow */
.lesson-flow { display: flex; flex-direction: column; }
.lesson-flow__item { position: relative; padding: 0 0 1.6rem 3rem; }
.lesson-flow__item::before {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 0;
  width: 2px; background: var(--line);
}
.lesson-flow__item:last-child::before { display: none; }
.lesson-flow__num {
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100);
  border-radius: 50%; font-weight: 700; font-size: 0.88rem;
}
.lesson-flow__head { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.7rem; padding-top: 0.35rem; }
.lesson-flow__titles { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.lesson-flow__titles strong { font-size: 1.02rem; }
.lesson-flow__mod { color: var(--muted); font-size: 0.82rem; }
.lesson-flow__lesson { color: var(--green-700); font-weight: 650; font-size: 0.86rem; white-space: nowrap; }
.lesson-flow__lesson:hover { color: var(--green-600); }
.lesson-flow__files { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
@media (max-width: 700px) {
  .lesson-flow__files { grid-template-columns: minmax(0, 1fr); }
}

/* Compacte filterbalk in stap 3 van de toetsomgeving */
.filters--compact { margin-bottom: 1.1rem; }

/* ============ Bibliotheek (resources) ============ */
.page--wide { max-width: 1180px; }

.lib { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.8rem; align-items: start; }

/* Zijnavigatie */
.lib__nav { position: sticky; top: 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; }
.lib__nav-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 0.5rem 0.35rem;
}
.lib-vak {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.7rem; border-radius: 12px;
  color: var(--ink); font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lib-vak:hover { background: var(--surface); border-color: var(--line); }
.lib-vak--active { background: var(--green-900); color: #fff; }
.lib-vak--active:hover { background: var(--green-900); border-color: transparent; }
.lib-vak__accent {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
  border-radius: 10px; font-size: 1rem; line-height: 1;
  overflow: hidden;
}
.lib-vak--active .lib-vak__accent { background: rgba(255, 255, 255, 0.12); color: var(--gold-400); }
.lib-vak__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-vak__count {
  flex: none; font-size: 0.76rem; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.1rem 0.55rem;
}
.lib-vak--active .lib-vak__count { background: rgba(255, 255, 255, 0.12); border-color: transparent; color: var(--gold-400); }

.lib__sub {
  display: flex; flex-direction: column; gap: 0.1rem;
  margin: 0.25rem 0 0.55rem 1.35rem; padding-left: 0.85rem;
  border-left: 2px solid var(--line);
}
.lib-sub {
  padding: 0.34rem 0.55rem; border-radius: 8px;
  color: var(--muted); font-size: 0.86rem; font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lib-sub:hover { color: var(--ink); background: var(--surface); }
.lib-sub--active { color: var(--green-700); font-weight: 700; background: var(--green-50); }

/* Vak-hero */
.lib-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--green-975), var(--green-800));
  border-radius: var(--radius-lg); padding: 1.9rem 2.1rem 1.8rem;
  margin-bottom: 1.6rem; color: #fff;
}
.lib-hero__mark {
  position: absolute; right: 1.2rem; top: 50%; transform: translateY(-52%);
  font-size: 6.5rem; line-height: 1; color: var(--gold-400); opacity: 0.16;
  pointer-events: none;
}
.lib-hero__kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-400); margin-bottom: 0.45rem;
}
.lib-hero h2 { color: #fff; font-size: 1.5rem; margin-bottom: 0.35rem; }
.lib-hero__meta { color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; }

/* Cursusblok */
.lib-course { margin-bottom: 2.1rem; }
.lib-course__head {
  display: flex; align-items: center; gap: 0.9rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem;
}
.lib-course__accent {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-700);
  border: 1px solid var(--green-100); border-radius: 13px;
  font-size: 1.15rem; line-height: 1;
}
.lib-course__titles { flex: 1; min-width: 0; }
.lib-course__titles h3 { font-size: 1.18rem; line-height: 1.25; }
.lib-course__titles p { color: var(--muted); font-size: 0.84rem; margin-top: 0.15rem; }
.lib-course__link { flex: none; color: var(--green-700); font-weight: 650; font-size: 0.87rem; white-space: nowrap; }
.lib-course__link:hover { color: var(--green-600); }

/* Les binnen een cursus */
.lib-lesson { margin-bottom: 1.35rem; }
.lib-lesson__label {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.lib-lesson__num {
  flex: none; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold-700);
  background: var(--gold-100); border-radius: 999px; padding: 0.16rem 0.6rem;
}
.lib-lesson__title { font-weight: 650; font-size: 0.95rem; color: var(--ink); }
.lib-lesson__desc { color: var(--muted); font-size: 0.84rem; }
.lib-lesson__link { margin-left: auto; color: var(--muted); font-size: 0.83rem; font-weight: 600; white-space: nowrap; }
.lib-lesson__link:hover { color: var(--green-700); }
.lib-empty { color: var(--muted); font-size: 0.9rem; }

/* Resourcekaart */
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.res-card {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.8rem 0.95rem;
  transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.res-card:hover { box-shadow: var(--shadow-pop); border-color: var(--gold-500); transform: translateY(-2px); }
.res-card__ext {
  flex: none; min-width: 46px; height: 40px; display: grid; place-items: center;
  background: var(--green-900); color: var(--gold-400);
  border-radius: 9px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0 0.4rem;
}
.res-card__ext--link { background: var(--gold-100); color: var(--gold-700); }
.res-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.res-card__body strong {
  font-size: 0.9rem; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.res-card__body span {
  color: var(--muted); font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.res-card__go { flex: none; color: var(--faint); transition: color 0.16s ease, transform 0.16s ease; }
.res-card__go svg { width: 17px; height: 17px; }
.res-card:hover .res-card__go { color: var(--green-700); transform: translateY(1px); }

@media (max-width: 940px) {
  .lib { grid-template-columns: minmax(0, 1fr); }
  .lib__nav { position: static; }
  .res-grid { grid-template-columns: minmax(0, 1fr); }
  .lib-hero__mark { font-size: 4.5rem; right: 0.6rem; }
}

/* Hero-chips (bibliotheek & toetsomgeving) */
.lib-hero__chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.lib-hero__chips span {
  font-size: 0.79rem; font-weight: 650; color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; padding: 0.28rem 0.8rem;
}
.lib-hero__chips .lib-hero__chip--gold {
  color: var(--green-975); background: var(--gold-400); border-color: var(--gold-400);
}

/* Filterchips (toetsomgeving) */
.lib-chips {
  display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.lib-chips__group { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.lib-chip {
  font-size: 0.82rem; font-weight: 650; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.34rem 0.9rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lib-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.lib-chip--active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.lib-chip--active:hover { color: #fff; }

/* Zoekveld in de bibliotheek */
.lib-search {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.55rem 0.9rem; margin-bottom: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lib-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.lib-search svg { flex: none; width: 16px; height: 16px; color: var(--faint); }
.lib-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: 0.92rem; color: var(--ink);
}
.lib-search input::placeholder { color: var(--faint); }
.lib-search__none { flex: none; font-size: 0.8rem; color: var(--gold-700); font-weight: 650; }

/* Vloeiend wisselen in bibliotheek & toetsomgeving (geen flits) */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.15s; }
.lib__main { transition: opacity 0.15s ease; }
#quiz-area.htmx-request .lib__main,
#resource-area.htmx-request .lib__main { opacity: 0.55; }
#quiz-area.htmx-request, #resource-area.htmx-request { cursor: progress; }

/* Subnavigatie: label en herkenbare cursuslinks */
.lib__sub-label {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--faint);
  margin: 0.55rem 0 0.2rem 0.55rem;
}
.lib-sub--course { display: flex; align-items: center; gap: 0.5rem; }
.lib-sub--course svg { flex: none; width: 13px; height: 13px; color: var(--gold-600); }
.lib-sub--course span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Paginatitels tijdelijk verborgen (op verzoek — terugzetten door deze regel te verwijderen) */
.page-head { display: none; }

/* Vergrendelde cursus in de bibliotheek (gratis leden) */
.lib-locked {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg); padding: 1.1rem 1.3rem;
}
.lib-locked > svg { flex: none; width: 22px; height: 22px; color: var(--gold-700); }
.lib-locked__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.lib-locked__text strong { font-size: 0.93rem; }
.lib-locked__text span { color: var(--muted); font-size: 0.84rem; }

/* ============================================================
   ============================================================
   MOBIEL & TABLET
   Alles hieronder maakt Mubien volwaardig bruikbaar op telefoon
   en tablet: app-balk, onderbalk, navigatielade, bottom sheets,
   modals en per-pagina verfijningen.
   ============================================================
   ============================================================ */

:root {
  --appbar-h: 54px;
  --botnav-h: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tap: 44px;
}

/* ------------------------------------------------------------
   Basishygiëne voor aanraakschermen
   ------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; overscroll-behavior-y: none; }

a, button, label, summary, [role="button"], input, select, textarea {
  -webkit-tap-highlight-color: rgba(21, 82, 69, 0.12);
}
button, [role="button"], .btn, a.btn { touch-action: manipulation; }

/* Scrollvergrendeling terwijl een laag open staat */
html.is-locked { overflow: hidden; }
html.is-locked body {
  position: fixed; left: 0; right: 0; width: 100%;
  overflow: hidden;
}

/* Direct-naar-inhoud-link voor toetsenbord en schermlezers */
.skip-link {
  position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
  z-index: 400; background: var(--green-800); color: #fff;
  padding: 0.6rem 1.1rem; border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.86rem; font-weight: 650;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; outline: none; }

/* Zichtbare focus op alle bedienbare elementen */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------
   Lagensysteem: scrim, paneel, bottom sheet, lade, volledig scherm
   ------------------------------------------------------------ */
.layer {
  position: fixed; inset: 0; z-index: 220;
  display: flex;
  padding-left: var(--safe-l); padding-right: var(--safe-r);
}
.layer__scrim {
  position: absolute; inset: 0;
  background: rgba(6, 26, 21, 0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.3s ease;
}
.layer.is-open .layer__scrim { opacity: var(--drag, 1); }

.layer__panel {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: 0 -8px 44px rgba(6, 26, 21, 0.22);
  will-change: transform;
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
  outline: none;
  max-height: 100%;
}
.layer__body {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.5rem 0.7rem 0.9rem;
}
.layer__handle {
  display: block; flex: none;
  width: 40px; height: 4px; border-radius: 999px;
  background: var(--line-strong);
  margin: 0.55rem auto 0.15rem;
}
.layer__head {
  flex: none; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.layer__head-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.layer__head-text strong { font-size: 0.95rem; font-weight: 700; }
.layer__head-text small { font-size: 0.78rem; color: var(--faint); }
.layer__title { font-size: 1.1rem; margin-bottom: 0.35rem; }
.layer__text { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.layer__x {
  flex: none; margin-left: auto;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; background: var(--surface-2); border-radius: 50%;
  color: var(--muted); cursor: pointer;
}
.layer__x svg { width: 15px; height: 15px; }
.layer__x:hover { background: var(--line); color: var(--ink); }
.layer__actions {
  flex: none; display: flex; gap: 0.6rem;
  padding: 0.9rem 1rem calc(1rem + var(--safe-b));
  border-top: 1px solid var(--line);
}
.layer__actions .btn { flex: 1; min-height: var(--tap); }

.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #85312a; }

/* Bottom sheet (telefoon) */
.layer--sheet { align-items: flex-end; justify-content: center; }
.layer--sheet .layer__panel {
  width: 100%; max-width: 640px;
  border-radius: 22px 22px 0 0;
  max-height: 88vh; max-height: 88dvh;
  padding-bottom: var(--safe-b);
  transform: translateY(101%);
}
.layer--sheet.is-open .layer__panel { transform: none; }
.layer--sheet .layer__body { padding-bottom: 1rem; }

/* Navigatielade (schuift van links) */
.layer--drawer { align-items: stretch; justify-content: flex-start; }
.layer--drawer .layer__panel {
  width: min(86vw, 328px); height: 100%; max-height: none;
  border-radius: 0 20px 20px 0;
  transform: translateX(-101%);
}
.layer--drawer.is-open .layer__panel { transform: none; }

/* Paneel dat van rechts schuift */
.layer--right { align-items: stretch; justify-content: flex-end; }
.layer--right .layer__panel {
  width: min(88vw, 360px); height: 100%; max-height: none;
  border-radius: 20px 0 0 20px;
  transform: translateX(101%);
}
.layer--right.is-open .layer__panel { transform: none; }

/* Volledig scherm (zoeken) */
.layer--full { align-items: stretch; justify-content: center; }
.layer--full .layer__panel {
  width: 100%; height: 100%; max-height: none;
  border-radius: 0; background: var(--bg);
  transform: translateY(1.5rem); opacity: 0;
}
.layer--full.is-open .layer__panel { transform: none; opacity: 1; }

/* Vanaf tablet-liggend worden bladen nette gecentreerde dialogen */
@media (min-width: 901px) {
  .layer--sheet { align-items: center; }
  .layer--sheet .layer__panel {
    max-width: 440px; border-radius: var(--radius-lg);
    max-height: 84vh; padding-bottom: 0;
    transform: translateY(14px) scale(0.985); opacity: 0;
    box-shadow: 0 24px 70px rgba(6, 26, 21, 0.3);
  }
  .layer--sheet.is-open .layer__panel { transform: none; opacity: 1; }
  .layer--sheet .layer__handle { display: none; }
  .layer--full { align-items: center; }
  .layer--full .layer__panel {
    width: min(660px, 92vw); height: min(680px, 82vh);
    border-radius: var(--radius-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer__panel, .layer__scrim { transition: opacity 0.12s linear; transform: none !important; }
}

/* Items binnen een blad */
.sheet-item {
  position: relative;
  display: flex; align-items: center; gap: 0.85rem; width: 100%;
  min-height: var(--tap);
  padding: 0.8rem 0.9rem; border-radius: 12px;
  font-size: 0.95rem; font-weight: 550; color: var(--ink);
  background: none; border: 0; text-align: left; cursor: pointer;
}
.sheet-item svg { width: 19px; height: 19px; flex: none; color: var(--muted); }
.sheet-item:hover, .sheet-item:active { background: var(--surface-2); }
.sheet-item--danger { color: var(--red); }
.sheet-item--danger svg { color: var(--red); }
.sheet-item__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-500); margin-left: auto;
}
.sheet-item form { margin: 0; }

/* ------------------------------------------------------------
   App-balk (telefoon en tablet-staand)
   ------------------------------------------------------------ */
.appbar { display: none; }
.botnav { display: none; }

@media (max-width: 900px) {
  .appbar {
    display: flex; align-items: center; gap: 0.2rem;
    position: sticky; top: 0; z-index: 70;
    height: calc(var(--appbar-h) + var(--safe-t));
    padding: var(--safe-t) calc(0.4rem + var(--safe-r)) 0 calc(0.25rem + var(--safe-l));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: transform 0.25s ease;
  }
  body.appbar-hidden .appbar { transform: translateY(-100%); }

  .appbar__btn {
    position: relative; flex: none;
    width: 42px; height: 42px; display: grid; place-items: center;
    border: 0; background: none; border-radius: 12px;
    color: var(--ink); cursor: pointer;
  }
  .appbar__btn svg { width: 21px; height: 21px; }
  .appbar__btn:active { background: var(--surface-2); }
  .appbar__btn--avatar .avatar { width: 30px; height: 30px; font-size: 0.76rem; }
  .appbar__dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold-500); box-shadow: 0 0 0 2px #fff;
  }
  .appbar__brand { display: flex; align-items: center; margin-right: auto; padding-left: 0.15rem; }
  .appbar__brand img { height: 30px; width: auto; }

  /* De desktopbalk en -zijbalk verdwijnen volledig */
  .top { display: none; }
  .side { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }

  /* Onderbalk */
  .botnav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  }
  .botnav__item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: var(--botnav-h); padding: 0.45rem 0.15rem 0.4rem;
    border: 0; background: none; cursor: pointer;
    font-family: var(--font-body); font-size: 0.64rem; font-weight: 700;
    letter-spacing: 0.01em; color: var(--faint);
    transition: color 0.15s ease;
  }
  .botnav__item svg { width: 21px; height: 21px; }
  .botnav__item span { line-height: 1; }
  /* Rustige selectie: alleen kleur en gewicht, geen zwevende vlakken. */
  .botnav__item { color: var(--faint); }
  .botnav__item svg { stroke-width: 1.8; transition: transform 0.18s ease; }
  .botnav__item.active { color: var(--green-800); }
  .botnav__item.active span { font-weight: 750; }
  .botnav__item.active svg { stroke-width: 2.3; }
  .botnav__item:active svg { transform: scale(0.9); }
  .botnav__item .botnav__dot {
    position: absolute; top: 7px; left: calc(50% + 8px);
    width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500);
  }

  /* Ruimte onder de inhoud zodat de onderbalk niets afdekt */
  body.has-botnav .main { padding-bottom: calc(var(--botnav-h) + var(--safe-b)); }
  body.has-botnav .footnote { padding-bottom: 1.4rem; }

  /* Meldingen als toast bovenaan */
  .messages {
    top: calc(var(--appbar-h) + var(--safe-t) + 8px);
    left: 0.8rem; right: 0.8rem;
  }
  .message {
    font-size: 0.86rem; padding: 0.75rem 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
}

/* ------------------------------------------------------------
   Navigatielade
   ------------------------------------------------------------ */
.drawer { padding-top: var(--safe-t); }
.drawer__head {
  flex: none; display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 0.9rem 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.drawer__user { display: flex; align-items: center; gap: 0.75rem; min-width: 0; flex: 1; color: var(--ink); }
.drawer__user-text { display: flex; flex-direction: column; min-width: 0; }
.drawer__user-text strong { font-size: 0.95rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__user-text small { font-size: 0.77rem; color: var(--faint); }
.drawer__body { padding: 0.5rem 0.6rem calc(1.2rem + var(--safe-b)); }
.drawer__label {
  font-size: 0.66rem; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--faint); padding: 0.9rem 0.7rem 0.35rem;
}
.drawer__body .side__item {
  min-height: var(--tap);
  padding: 0.62rem 0.7rem; font-size: 0.94rem; border-radius: 11px;
}
.drawer__body .side__item svg { width: 19px; height: 19px; }
.drawer__body .side__logout { margin-top: 0.15rem; }
.drawer__body .side__logout .side__item { color: var(--red); }
.drawer__body .side__logout .side__item svg { color: var(--red); }

/* ------------------------------------------------------------
   Zoeklaag op mobiel
   ------------------------------------------------------------ */
.msearch { background: var(--bg); }
.msearch__bar {
  flex: none; display: flex; align-items: center; gap: 0.4rem;
  padding: calc(0.5rem + var(--safe-t)) 0.7rem 0.5rem 0.35rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.msearch__back {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 50%; color: var(--ink); cursor: pointer;
}
.msearch__back svg { width: 20px; height: 20px; }
.msearch__input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.65rem 1rem;
}
.msearch__input:focus { outline: none; border-color: var(--green-700); background: var(--surface); }
.msearch__results { padding: 0.3rem 0 calc(2rem + var(--safe-b)); }
.msearch__results .search-pop__item { padding: 0.8rem 1rem; min-height: var(--tap); }
.msearch__results .search-pop__label { padding: 0.9rem 1rem 0.3rem; }
.msearch__results .search-pop__all { padding: 0.9rem; }
.msearch__hint { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.msearch__hint .arabic { display: block; font-size: 2.4rem; color: var(--gold-500); margin-bottom: 0.6rem; }
.msearch__hint p { font-size: 0.9rem; }

/* ------------------------------------------------------------
   Tablet: smalle icoonrail in plaats van brede zijbalk
   ------------------------------------------------------------ */
@media (min-width: 901px) and (max-width: 1180px) {
  .shell { grid-template-columns: 82px minmax(0, 1fr); }
  .side { padding: 0.85rem 0.45rem; align-items: stretch; }
  .side__brand { justify-content: center; padding: 0.2rem 0 0.85rem; margin-bottom: 0.5rem; }
  .side__brand img { height: 34px; }
  .side__item {
    position: relative;
    flex-direction: column; gap: 4px; text-align: center;
    justify-content: center; padding: 0.6rem 0.2rem 0.55rem;
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.01em;
    line-height: 1.2; margin-bottom: 3px;
  }
  .side__item svg { width: 20px; height: 20px; }
  .side__text { display: block; }
  .side__lock { position: absolute; top: 6px; right: 8px; margin: 0; width: 11px; height: 11px; }
  .side__dot { position: absolute; top: 8px; right: 10px; margin: 0; }
  .side__logout .side__item {
    text-align: center; font-size: 0.62rem; font-weight: 700; line-height: 1.2;
  }
  .top { padding: 0 1rem; }
}

/* ------------------------------------------------------------
   Formulieren op aanraakschermen
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .input, .field input, .field select, .field textarea, textarea.input,
  .searchbox__input, .filters__search input, .select select,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="search"], input[type="number"], input[type="date"], textarea, select {
    font-size: 16px;                 /* voorkomt inzoomen op iOS */
    min-height: var(--tap);
  }
  textarea, textarea.input { min-height: 96px; }
  .field label { font-size: 0.85rem; }
  .btn { min-height: var(--tap); padding-inline: 1.1rem; }
  .btn--sm { min-height: 38px; }
  .pw-toggle { min-width: var(--tap); }
}

/* ------------------------------------------------------------
   Pagina-opbouw op mobiel
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .page, .page--wide, .page--narrow {
    padding: 1.3rem calc(1rem + var(--safe-l)) 2.4rem calc(1rem + var(--safe-r));
  }
  .page-head { padding-bottom: 1.1rem; margin-bottom: 1.2rem; }
  .page-head h1 { font-size: 1.4rem; }
  .page-head__sub { font-size: 0.88rem; }
  .page-head__row { gap: 0.9rem; }
  .card { padding: 1.1rem 1.1rem; border-radius: var(--radius); }
  .grid { gap: 0.9rem; }
  .empty { padding: 2rem 1.1rem; }

  /* Horizontaal scrollende chiprijen krijgen ruimte tot de schermrand */
  .scroll-row {
    display: flex; gap: 0.45rem; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    margin-inline: -1rem; padding-inline: 1rem;
  }
  .scroll-row::-webkit-scrollbar { display: none; }
  .scroll-row > * { flex: none; scroll-snap-align: start; }
}

/* ------------------------------------------------------------
   Dashboard
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .dash-head__ayah { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .continue-card { padding: 1.1rem; }
  .continue-card__progress { max-width: none; width: 100%; }
  .dash-quiz__info strong { white-space: normal; }
}

/* ------------------------------------------------------------
   Cursussen: filters en kaarten
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .filters {
    padding: 0.8rem 0.9rem; gap: 0.6rem;
    border-radius: var(--radius); margin-bottom: 1.1rem;
  }
  .filters__field { flex: 1 1 100%; min-width: 0; }
  .filters__end {
    margin-left: 0; width: 100%; padding-bottom: 0;
    justify-content: space-between; border-top: 1px solid var(--line);
    padding-top: 0.7rem;
  }
  .c-card__banner { min-height: 92px; padding: 1.1rem 1.1rem 0.9rem; }
  .c-card__banner h3 { font-size: 1.05rem; max-width: 78%; }
  .c-card__body { padding: 1rem 1.1rem 1.1rem; }
  .two-col { gap: 1.2rem; }
  .course-hero__cta { width: 100%; min-width: 0; }
  .lesson-row { padding: 0.75rem 0.8rem; min-height: var(--tap); }
  .mod__head { min-height: var(--tap); }
}

/* ------------------------------------------------------------
   Bibliotheek & toetsomgeving: vaknavigatie als chiprijen
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .lib { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* De zijnavigatie en de filterchips zijn op mobiel te druk; ze verhuizen
     naar twee bladen die je via de filterbalk opent. */
  .lib__nav, .lib-chips { display: none; }
  .lib-hero { padding: 1.3rem 1.1rem; margin-bottom: 1rem; }
  .lib-hero__mark { font-size: 3.6rem; right: 0.4rem; opacity: 0.5; }
  .lib-hero h2 { font-size: 1.15rem; }
  .lib-hero__chips { gap: 0.4rem; margin-top: 0.7rem; }
  .lib-hero__chips span { font-size: 0.74rem; padding: 0.22rem 0.65rem; }
  .res-grid { grid-template-columns: minmax(0, 1fr); }
  .q-card { padding: 1.1rem 1.1rem 1.15rem; }
  .q-detail__head, .q-detail__body, .q-detail__attempts { padding-left: 1.1rem; padding-right: 1.1rem; }
  .q-detail__head h1 { font-size: 1.3rem; }
  .q-detail__start { width: 100%; }
  .q-attempt { flex-wrap: wrap; gap: 0.5rem 0.8rem; }
}

/* ------------------------------------------------------------
   Agenda
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .cal-side--open { order: -1; }
  .cal { border-radius: var(--radius); }
  .cal__toolbar { padding: 0.7rem 0.8rem; }
  .cal__month { font-size: 1rem; margin-left: 0.35rem; }
  .cal__nav-btn { width: 38px; height: 38px; }
  .cal__weekday { padding: 0.45rem 0.3rem; text-align: center; font-size: 0.6rem; }
  .cal__day {
    min-height: 0; aspect-ratio: 1 / 1; padding: 0.2rem;
    align-items: center; justify-content: center; gap: 0.22rem;
  }
  .cal__num { align-self: center; min-width: 28px; height: 28px; font-size: 0.85rem; }
  .cal__events, .cal__more { display: none; }
  .cal__dots { display: flex; }
  .cal__dot { width: 5px; height: 5px; }
  .cal__legend { gap: 0.6rem 0.9rem; padding: 0.6rem 0.8rem; }
  .cal__legend-item { font-size: 0.7rem; }
  .cal-side__head h2 { font-size: 1rem; }
}

/* ------------------------------------------------------------
   Community
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .cm { padding: 0 calc(1rem + var(--safe-l)) 2.5rem calc(1rem + var(--safe-r)); }
  .cm-head { padding-top: 1.4rem; }
  .cm-head h1 { font-size: 1.35rem; }
  .cm-tabs, .cm-filters, .cm-sort {
    overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-inline: -1rem; padding-inline: 1rem;
  }
  .cm-tabs::-webkit-scrollbar, .cm-filters::-webkit-scrollbar, .cm-sort::-webkit-scrollbar { display: none; }
  .cm-tab, .chipf, .cm-sort a { flex: none; white-space: nowrap; min-height: 38px; display: inline-flex; align-items: center; }
  .cm-bar { flex-direction: column; align-items: stretch; gap: 0.55rem; }
  .cm-search { width: 100%; }
  .cm-item, .cm-post { padding: 1rem; }
  .cmt__replies { margin-left: 0.7rem; padding-left: 0.7rem; }
  .cm-composer__foot { flex-wrap: wrap; gap: 0.5rem; }
  .cm-composer__foot .cm-select { flex: 1 1 45%; min-width: 0; }
  .cm-composer__tools { margin-left: auto; }
  .cm-icon { width: 40px; height: 40px; }

  /* De composer wordt op mobiel een volledig scherm */
  .cm-composer.is-open {
    position: fixed; inset: 0; z-index: 210;
    border-radius: 0; border: 0; margin: 0;
    display: flex; flex-direction: column;
    background: var(--surface);
    padding: calc(0.8rem + var(--safe-t)) 1rem calc(0.9rem + var(--safe-b));
    overflow-y: auto; overscroll-behavior: contain;
  }
  .cm-composer.is-open .cm-composer__open {
    flex: 1; display: flex; flex-direction: column;
    border: 0; border-radius: 0; padding: 0; background: transparent;
  }
  .cm-composer.is-open textarea { flex: 1; min-height: 140px; resize: none; }
  .cm-composer.is-open .cm-composer__title { padding-bottom: 0.6rem; }
  .cm-composer.is-open .cm-composer__foot {
    position: sticky; bottom: calc(-0.9rem - var(--safe-b));
    background: var(--surface); padding-top: 0.7rem;
    border-top: 1px solid var(--line); margin-top: 0.7rem;
  }
  body.composer-open { overflow: hidden; }
  body.composer-open .botnav { display: none; }
}

/* ------------------------------------------------------------
   Profiel, instellingen, abonnement
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: 1.3rem 1.2rem 1.2rem; }
  .profile-head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .auth-form__cols { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------
   Toetsomgeving: gesloten weergave
   ------------------------------------------------------------ */
.exam__jump {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 0 0.9rem; height: var(--tap);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 700;
  color: var(--ink); cursor: pointer; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.exam__jump svg { width: 14px; height: 14px; color: var(--muted); }

.exam-dots-sheet { padding: 0.7rem 0.9rem 1rem; }
.exam-dots-sheet .exam__dots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 0.5rem; justify-content: start;
}
.exam-dots-sheet .exam__dot { width: 100%; height: 46px; font-size: 0.9rem; border-radius: 11px; }

@media (max-width: 900px) {
  .exam { min-height: 100vh; min-height: 100dvh; }
  .exam__bar {
    height: calc(56px + var(--safe-t)); padding: var(--safe-t) 0.8rem 0;
    gap: 0.7rem; position: sticky; top: 0; z-index: 30;
  }
  .exam__quit { width: 40px; height: 40px; }
  .exam__status { gap: 0.6rem; }
  .exam__timer { font-size: 0.85rem; padding: 0.2rem 0.55rem; }
  .exam__count { display: none; }
  .exam__progress { position: sticky; top: calc(56px + var(--safe-t)); z-index: 30; }

  .exam__body { padding: 1.4rem 1rem calc(96px + var(--safe-b)); }
  .exam-q__num { font-size: 0.72rem; margin-bottom: 0.7rem; }
  .exam-q__arabic { font-size: 1.65rem; line-height: 1.9; }
  .exam-q__text { font-size: 1.1rem; margin-bottom: 1.2rem; }
  .exam-choice { padding: 0.85rem 0.9rem; gap: 0.7rem; min-height: 56px; }
  .exam-choice__letter { width: 28px; height: 28px; }
  .exam-choice__text { font-size: 0.94rem; }
  .exam-q__feedback { padding: 0.95rem 1rem; font-size: 0.88rem; }

  .exam__nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    margin: 0; padding: 0.6rem calc(0.8rem + var(--safe-r)) calc(0.6rem + var(--safe-b)) calc(0.8rem + var(--safe-l));
    gap: 0.5rem; flex-wrap: nowrap;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .exam__nav > .exam__dots { display: none; }
  .exam__jump { display: inline-flex; flex: none; order: 2; }
  .exam__nav .btn { flex: 1; min-height: var(--tap); padding-inline: 0.6rem; }
  #exam-prev { order: 1; }
  #exam-next, #exam-submit { order: 3; }
}

/* ------------------------------------------------------------
   Cursusspeler
   ------------------------------------------------------------ */
.player__scrim {
  position: fixed; inset: 0; z-index: 37;
  background: rgba(6, 26, 21, 0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.28s ease;
}
.player__scrim[hidden] { display: none !important; }
.player.is-panel-open .player__scrim { opacity: 1; }

@media (max-width: 940px) {
  .player { height: 100vh; height: 100dvh; }
  .player__bar {
    height: calc(56px + var(--safe-t)); padding: var(--safe-t) 0.7rem 0;
    gap: 0.7rem;
  }
  .player__back img { height: 24px; }
  .player__progress { max-width: 190px; }
  .player__aside {
    top: calc(56px + var(--safe-t));
    width: min(88vw, 340px);
    border-left: 1px solid var(--line);
    padding-bottom: calc(1.4rem + var(--safe-b));
    transform: translateX(101%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex !important; flex-direction: column;
  }
  .player.is-panel-open .player__aside { transform: none; }
  .player__aside-head { position: sticky; top: 0; background: var(--surface); z-index: 2; }
  .player__aside-close { width: 38px; height: 38px; }

  .player__stage { padding: 0; background: #000; border-bottom: 0; }
  .player__video { border-radius: 0; box-shadow: none; }
  .player__content { padding: 1.4rem 1.1rem calc(96px + var(--safe-b)); }
  .player-page:has(.staff-fab) .player__content { padding-bottom: calc(136px + var(--safe-b)); }
  .player__content h1 { font-size: 1.3rem; }
  /* De Beheer-knop mag de vaste onderbalk met Voltooien/volgende niet afdekken. */
  .player-page .staff-fab { bottom: calc(62px + var(--safe-b) + 0.75rem); right: 0.9rem; z-index: 35; }
}

@media (max-width: 940px) {
  /* De acties verhuizen naar een vaste onderbalk, weg uit de krappe topbalk */
  .player__actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 36;
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem calc(0.7rem + var(--safe-r)) calc(0.55rem + var(--safe-b)) calc(0.7rem + var(--safe-l));
    background: var(--green-950);
    border-top: 1px solid rgba(212, 178, 105, 0.22);
  }
  .player__actions .player__nav-btn { width: 46px; height: 44px; flex: none; }
  #lesson-prev { order: 1; }
  #complete-btn { order: 2; flex: 1; min-height: 44px; justify-content: center; font-size: 0.88rem; }
  #panel-toggle { order: 3; }
  #lesson-next { order: 4; }

  /* Tabbladen blijven binnen de zijmarges en vullen samen de breedte;
     zijn het er te veel voor het scherm, dan schuiven ze binnen het blok. */
  .tabs { flex-wrap: wrap; width: 100%; margin-inline: 0; padding: 3px; overflow: visible; }
  .tab { flex: 1 0 auto; white-space: nowrap; min-height: 42px; text-align: center; padding-inline: 0.6rem; font-size: 0.84rem; }
}

/* ------------------------------------------------------------
   Landingspagina
   ------------------------------------------------------------ */
.lp-nav__toggle { display: none; }

@media (max-width: 940px) {
  .lp-nav__inner { gap: 0.6rem; height: 60px; }
  .lp-nav__brand img { height: 32px; }
  .lp-nav__actions { gap: 0.6rem; }
  .lp-nav__login { display: none; }
  .lp-nav__toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px; border: 0; background: none;
    border-radius: 11px; color: var(--ink); cursor: pointer;
  }
  .lp-nav__toggle svg { width: 22px; height: 22px; }
  .lp-hero__inner { padding-top: 2.8rem; padding-bottom: 2.8rem; }
  .lp-hero h1 { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .lp-hero__lead { font-size: 0.97rem; }
  .lp-hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .lp-section { padding: 3.2rem 0; }
  .lp-track { padding: 1.6rem 1.2rem; }
  .lp-track h3 { font-size: 1.25rem; }
  .lp-cta { padding: 3rem 0; }
  .lp-cta__band { padding: 2.2rem 1.2rem; }
  .lp-cta__ayah { font-size: 1.6rem; }
  .lp-cta__band h2 { font-size: 1.3rem; }
  .lp-container { padding: 0 calc(1.1rem + var(--safe-l)) 0 calc(1.1rem + var(--safe-r)); }
  .lp-foot { padding: 2.2rem 0 calc(2.2rem + var(--safe-b)); }
}

/* ------------------------------------------------------------
   Inloggen & registreren: blad op mobiel, dialoog op desktop
   ------------------------------------------------------------ */
.auth-overlay { padding: 0; }
.auth-overlay .auth-overlay__panel {
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
}

@media (max-width: 620px) {
  .auth-overlay { display: flex; align-items: flex-end; }
  .auth-overlay__panel {
    width: 100%; display: block;
    transform: translateY(100%);
    max-height: 92vh; max-height: 92dvh; overflow-y: auto;
    overscroll-behavior: contain;
    animation: none;
  }
  .auth-overlay.is-open .auth-overlay__panel { transform: none; }
  .auth-modal, .auth-modal--wide {
    max-width: none; width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 1.6rem 1.2rem calc(1.6rem + var(--safe-b));
    box-shadow: none;
  }
  .auth-modal__close { top: 0.7rem; right: 0.7rem; width: 38px; height: 38px; }
  .auth-modal__submit { min-height: var(--tap); }
  .auth-form { padding: 2rem 1.1rem calc(2rem + var(--safe-b)); }
  .otp-input { font-size: 1.25rem; letter-spacing: 0.35em; text-indent: 0.35em; }
}

/* Paywall als blad op mobiel */
@media (max-width: 620px) {
  .paywall { place-items: end center; padding: 0; }
  .paywall__card {
    width: 100%; border-radius: 22px 22px 0 0;
    padding: 1.9rem 1.3rem calc(1.6rem + var(--safe-b));
    animation: sheet-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  .paywall__card .btn { min-height: var(--tap); }
}

/* ------------------------------------------------------------
   Zeer smalle telefoons
   ------------------------------------------------------------ */
@media (max-width: 380px) {
  .botnav__item { font-size: 0.58rem; }
  .botnav__item svg { width: 20px; height: 20px; }
  .page, .page--wide, .page--narrow { padding-left: 0.85rem; padding-right: 0.85rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .exam__nav .btn { font-size: 0.8rem; }
}

/* ------------------------------------------------------------
   Liggend op een lage telefoon: minder verticale ruimte verspillen
   ------------------------------------------------------------ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  .botnav { display: none; }
  body.has-botnav .main { padding-bottom: 1rem; }
  .layer--sheet .layer__panel { max-height: 94dvh; }
  .layer--sheet .layer__body { padding-bottom: 0.5rem; }
}

/* ------------------------------------------------------------
   Kleine aanvullingen bij de mobiele opzet
   ------------------------------------------------------------ */
/* Menu-acties in het blad van de landingspagina */
.lp-menu__actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 0.9rem 0.4rem 0.3rem;
  border-top: 1px solid var(--line); margin-top: 0.6rem;
}
.lp-menu__actions .btn { width: 100%; min-height: var(--tap); }

/* De scrim van de inlogmodal vloeiend laten opkomen */
.auth-overlay__scrim { opacity: 0; transition: opacity 0.28s ease; }
.auth-overlay.is-open .auth-overlay__scrim { opacity: 1; }
.auth-overlay:not([hidden]) .auth-overlay__scrim { opacity: 1; }

/* Kop van de composer: alleen nodig wanneer die het scherm vult */
.cm-composer__head { display: none; }
.cm-composer__close {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; background: var(--surface-2); border-radius: 50%;
  color: var(--muted); cursor: pointer; flex: none;
}
.cm-composer__close svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .cm-composer.is-open .cm-composer__head {
    display: flex; align-items: center; gap: 0.7rem;
    padding-bottom: 0.8rem; margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
  }
  .cm-composer.is-open .cm-composer__head strong {
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  }
}

/* Tekst die op de smalste schermen wegvalt */
@media (max-width: 359px) {
  .hide-xs { display: none; }
}

/* Wat op mobiel geen ruimte verdient, of juist alleen daar hoort */
.only-mobile { display: none; }
@media (max-width: 900px) {
  .only-mobile { display: initial; }
  .only-desktop { display: none !important; }
}

/* ------------------------------------------------------------
   Rastercellen mogen altijd krimpen. Zonder dit duwt één lange
   titel de hele pagina breder dan het scherm.
   ------------------------------------------------------------ */
.grid > *, .two-col > *, .dash-cols > *, .lib > *, .cal-layout > *,
.stat-grid > *, .stat-strip > *, .plan-grid > *, .res-grid > *,
.lp-tracks > *, .lp-courses > *, .lp-steps > *, .checklist > *,
.discover > *, .feature > *, .player__body > *, .auth-wrap > *,
.lesson-flow__files > * { min-width: 0; }

@media (max-width: 900px) {
  .dash-section-head { gap: 0.6rem; }
  .dash-section-head h2 { min-width: 0; }
  .dash-section-head a { flex: none; white-space: nowrap; }
  .dash-course__right .progress { width: 56px; }
}

/* ============================================================
   Filterbalk + keuzebladen (bibliotheek en toetsomgeving)
   Op mobiel vervangen deze de rijen met chips: één rustige balk
   die twee bladen opent met echte, leesbare keuzelijsten.
   ============================================================ */
.mfilter { display: none; }

@media (max-width: 900px) {
  .mfilter {
    display: flex; gap: 0.5rem; margin-bottom: 1.2rem;
  }
  .mfilter__btn {
    flex: 1 1 0; min-width: 0; min-height: var(--tap);
    display: inline-flex; align-items: center; gap: 0.55rem;
    padding: 0 0.85rem; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line-strong);
    font-family: var(--font-body); font-size: 0.88rem; font-weight: 650;
    color: var(--ink); text-align: left; cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
  }
  .mfilter__btn:active { background: var(--surface-2); }
  .mfilter__btn svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
  .mfilter__label {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mfilter__chev { margin-left: auto; opacity: 0.7; }
  .mfilter__btn--on {
    border-color: var(--green-700); background: var(--green-50); color: var(--green-800);
  }
  .mfilter__btn--on svg { color: var(--green-700); }
  .mfilter__count {
    flex: none; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; background: var(--green-800); color: #fff;
    font-size: 0.68rem; font-weight: 750;
    display: grid; place-items: center;
  }
  .mfilter__btn--filters { flex: 0 0 auto; }
}

/* Keuzerijen binnen een blad */
.opt {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  min-height: 52px; padding: 0.6rem 0.8rem; border-radius: 12px;
  color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left;
}
.opt:active { background: var(--surface-2); }
.opt__accent {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; overflow: hidden;
  background: var(--green-50); color: var(--green-700); font-size: 0.95rem; line-height: 1;
}
.opt__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.opt__text strong {
  font-weight: 600; font-size: 0.95rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opt__text small { font-size: 0.77rem; color: var(--faint); }
.opt__check { flex: none; width: 17px; height: 17px; color: var(--green-700); opacity: 0; }
.opt__lock { flex: none; width: 14px; height: 14px; color: var(--faint); }
.opt--active { background: var(--green-50); }
.opt--active .opt__text strong { color: var(--green-800); font-weight: 750; }
.opt--active .opt__check { opacity: 1; }

.opt__sub {
  display: flex; flex-direction: column; gap: 1px;
  margin: 0.1rem 0 0.5rem 1.5rem; padding-left: 0.7rem;
  border-left: 2px solid var(--line);
}
.opt--sub { min-height: 44px; padding: 0.45rem 0.7rem; }
.opt--sub .opt__text strong { font-weight: 550; font-size: 0.9rem; }

.sheet-label {
  font-size: 0.67rem; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--faint); padding: 1rem 0.8rem 0.35rem;
}
.layer__body > .sheet-label:first-child { padding-top: 0.4rem; }

/* Actieve rij: het accentvierkantje moet zichtbaar blijven op de groene rug */
.opt--active .opt__accent { background: #fff; border: 1px solid var(--green-100); }

@media (max-width: 900px) {
  /* Cursuskop: titel op de eerste regel, de link eronder */
  .lib-course { margin-bottom: 1.6rem; }
  .lib-course__head {
    flex-wrap: wrap; gap: 0.7rem;
    padding-bottom: 0.8rem; margin-bottom: 0.9rem;
  }
  .lib-course__accent { width: 38px; height: 38px; font-size: 1rem; }
  .lib-course__titles h3 { font-size: 1.02rem; }
  .lib-course__titles p { font-size: 0.8rem; }
  .lib-course__link { flex: 1 0 100%; margin-left: 0; }
  /* Onzichtbare regelbreker: zet het slotlabel netjes onder de titel
     zonder het label zelf over de volle breedte te rekken. */
  .lib-course__head::before { content: ""; order: 2; flex: 0 0 100%; height: 0; }
  .lib-course__head .q-card__badge { order: 3; flex: none; margin-left: 0; align-self: flex-start; }

  /* Vergrendelde cursus: tekst en knop onder elkaar */
  .lib-locked { flex-wrap: wrap; gap: 0.75rem; padding: 1rem 1.1rem; }
  .lib-locked__text { flex: 1 1 auto; min-width: 0; }
  .lib-locked .btn { flex: 1 0 100%; }

  .lib-lesson__label { gap: 0.4rem; }
  .lib-lesson__link { margin-left: 0; flex-basis: 100%; }

  /* Toetsrij: nummer en soort bovenaan, titel eronder, uitslag onderaan */
  .t-row {
    flex-wrap: wrap; align-items: center;
    gap: 0.55rem 0.7rem; padding: 0.95rem 1rem;
    border-radius: var(--radius);
  }
  .t-row__num { width: 30px; height: 30px; font-size: 0.8rem; order: 1; }
  .t-row .q-card__kind { order: 2; }
  .t-row__info { order: 3; flex: 1 1 100%; }
  .t-row__info strong { font-size: 0.95rem; }
  .t-row__meta { font-size: 0.8rem; }
  .t-row__end { order: 4; flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; }
  .t-row__go { margin-left: auto; }
}

@media (max-width: 900px) {
  /* Staat er geen uitslag bij? Dan hoeft er ook geen regel met alleen een pijl.
     Geldt niet voor de losse rij op de lespagina: daar zit de startknop in. */
  .t-row:not(.t-row--static) .t-row__end:not(:has(.q-card__badge)) { display: none; }
}

/* ------------------------------------------------------------
   Blad met stappen: eerst het vak, daarna pas de cursus
   ------------------------------------------------------------ */
.drill { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drill[hidden] { display: none !important; }
.layer--drill .layer__panel { min-height: 0; }

.layer__back {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; background: var(--surface-2); border-radius: 50%;
  color: var(--muted); cursor: pointer; margin-right: 0.1rem;
}
.layer__back svg { width: 17px; height: 17px; }
.layer__back:hover { background: var(--line); color: var(--ink); }

.opt__chev { flex: none; width: 16px; height: 16px; color: var(--faint); }
.opt--active .opt__chev { color: var(--green-700); }
/* In stap 1 staat het vinkje naast de pijl; laat ze niet tegen elkaar plakken. */
.opt__check + .opt__chev { margin-left: 0.1rem; }

/* Bevestigende melding in een inlog-/registratiekaart (naast .form-errors) */
.form-note {
  background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-800);
  border-radius: var(--radius); padding: 0.7rem 1rem;
  font-size: 0.85rem; margin-bottom: 1.1rem; text-align: left;
}
/* Terwijl een formulier verstuurt, is de knop even uitgeschakeld */
.auth-modal button[disabled] { opacity: 0.6; cursor: default; }

/* ============================================================
   Gefocuste versie: alleen inloggen en een enkele cursus
   ============================================================ */

/* Smalle balk in plaats van de zijbalk en de topbalk. */
.focus-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.55rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.focus-top__brand { display: flex; align-items: center; flex: none; }
.focus-top__brand img { height: 36px; width: auto; }
.focus-top__course {
  min-width: 0; flex: 1;
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 0.98rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.focus-top__right { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.focus-top__user { display: flex; align-items: center; gap: 0.5rem; }
.focus-top__name { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.focus-top__out {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.7rem; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--line); cursor: pointer;
  font-size: 0.83rem; font-weight: 600; color: var(--muted);
}
.focus-top__out:hover { background: var(--surface-2); color: var(--ink); }
.focus-top__out svg { width: 15px; height: 15px; }

@media (max-width: 700px) {
  .focus-top { padding: 0.5rem 0.9rem; gap: 0.6rem; }
  .focus-top__brand img { height: 30px; }
  .focus-top__course { font-size: 0.88rem; }
  .focus-top__name, .focus-top__out-text { display: none; }
  .focus-top__out { padding: 0.4rem; }
}

/* ------------------------------------------------------------
   Toetsen op de cursuspagina
   ------------------------------------------------------------ */
/* Deze rij is geen link maar een blok met een eigen knop erin. */
.t-row--static { cursor: default; }
.t-row--static:hover { box-shadow: none; border-color: var(--line); }
.t-row--static .t-row__end { gap: 0.6rem; }
@media (max-width: 900px) {
  .t-row--static .t-row__end { display: flex; flex: 1 1 100%; gap: 0.6rem; margin-top: 0.2rem; }
  .t-row--static .t-row__end .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; font-size: 0.9rem; border-radius: 12px; }
  .t-row--static .t-row__end .q-card__badge { flex: none; }
}

/* ============================================================
   ============================================================
   CLEAN: inloggen, cursuspagina en lespagina
   Rustig en licht: witte vlakken met een zachte schaduw, gevulde
   velden, geen lijnen of versiering. De koppen blijven in Fraunces,
   al het andere staat in de gewone tekstletter.
   ============================================================
   ============================================================ */
:root {
  --shadow-card: 0 1px 2px rgba(30, 40, 35, 0.04), 0 12px 32px -20px rgba(30, 40, 35, 0.22);
  --field-bg: #f1eee6;
  --field-bg-focus: #ffffff;
  --divider: rgba(30, 40, 35, 0.07);
}

/* ---------- Inloggen, registreren, wachtwoord vergeten ---------- */
.auth-scene {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem; padding: 2.5rem 1.2rem 3.5rem;
  background: var(--cream);
}
.auth-scene__brand { display: block; }
.auth-scene__brand img { height: 48px; width: auto; }
.auth-scene .auth-modal { box-shadow: var(--shadow-card); }
.auth-scene .auth-modal__logo { display: none; }

.auth-modal {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--surface); border-radius: 22px;
  padding: 2.2rem 2.1rem 2rem; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  max-height: calc(100dvh - 2.6rem);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
.auth-modal--wide { max-width: 520px; }
.auth-modal__logo { display: block; width: 104px; height: auto; margin: 0 auto 1.3rem; }
.auth-modal h1 { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.2; color: var(--green-950); }
.auth-modal__sub { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0.45rem auto 1.6rem; max-width: 30rem; }
.auth-modal__sub strong { color: var(--ink); font-weight: 600; }
.auth-modal form { text-align: left; }
.auth-modal .form-errors, .auth-modal .form-note { text-align: left; border: 0; border-radius: 12px; }
.auth-modal .field { margin-bottom: 0.9rem; }
.auth-modal .field label, .field__label {
  display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem;
}
.auth-modal .field label em { font-style: normal; font-weight: 500; color: var(--faint); margin-left: 0.15rem; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.field__aside { font-size: 0.8rem; font-weight: 500; color: var(--green-700); white-space: nowrap; }
.field__aside:hover { color: var(--green-600); }
.auth-modal .input, .auth-modal .field input {
  padding: 0.78rem 0.95rem; font-size: 0.96rem; border-radius: 12px;
  border: 1px solid transparent; background: var(--field-bg);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-modal .input:focus, .auth-modal .field input:focus {
  background: var(--field-bg-focus); border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.12);
}
.auth-modal .field .helptext { font-size: 0.77rem; color: var(--faint); margin-top: 0.35rem; }
.auth-modal .field ul.errorlist { font-size: 0.78rem; margin-top: 0.35rem; }
.auth-modal .pw-wrap .input { padding-right: 2.8rem; }
.auth-modal__submit { width: 100%; min-height: 50px; margin-top: 0.7rem; font-size: 0.98rem; border-radius: 12px; }
.auth-modal button[disabled] { opacity: 0.6; cursor: default; }
.auth-modal__hints {
  background: var(--field-bg); border-radius: 12px;
  padding: 0.85rem 1rem; font-size: 0.84rem; color: var(--muted); line-height: 1.55; text-align: left;
}
.auth-modal__alt {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 1.5rem; font-size: 0.88rem; color: var(--muted);
}
.auth-modal__alt a { font-weight: 600; color: var(--green-700); }
.auth-modal__alt a:hover { color: var(--green-600); }
.auth-modal__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin: 0 0.3rem; }
.auth-modal__close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; color: var(--faint); background: var(--field-bg);
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-modal__close:hover { background: var(--line); color: var(--ink); }
.auth-modal__close svg { width: 15px; height: 15px; }

.gender-picker {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  padding: 3px; border-radius: 12px; background: var(--field-bg);
}
.gender-picker input { position: absolute; opacity: 0; }
.gender-picker label {
  display: block; text-align: center; cursor: pointer; border: 0; border-radius: 9px;
  padding: 0.6rem 0.5rem; font-weight: 600; font-size: 0.9rem; color: var(--muted);
  background: transparent; transition: all 0.15s ease;
}
.auth-modal .gender-picker label { margin-bottom: 0; }
.gender-picker label:hover { color: var(--ink); }
.gender-picker label:has(input:checked) {
  background: var(--green-800); color: #fff;
  box-shadow: 0 1px 3px rgba(30, 40, 35, 0.16);
}
.auth-form__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.auth-form__note { font-size: 0.77rem; color: var(--faint); margin: -0.25rem 0 0.4rem; line-height: 1.5; }

.otp-input { text-align: center; font-size: 1.5rem; font-weight: 600; letter-spacing: 0.4em; text-indent: 0.4em; }
.otp-resend { display: flex; flex-direction: column; gap: 0.15rem; align-items: center; margin-top: 1.1rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
.otp-resend__btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--green-700); }
.otp-resend__btn:hover { color: var(--green-600); }
.otp-resend__btn:disabled { color: var(--faint); cursor: default; }

/* Modal op de landingspagina */
.auth-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.3rem 1rem; }
.auth-overlay__scrim { position: absolute; inset: 0; background: rgba(4, 18, 15, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.auth-overlay__panel { position: relative; width: 100%; display: grid; place-items: center; animation: modal-in 0.22s ease; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .auth-scene { justify-content: flex-start; padding: 2.5rem 1rem 3rem; gap: 1.4rem; }
  .auth-scene__brand img { height: 42px; }
  .auth-modal, .auth-modal--wide { padding: 1.8rem 1.3rem 1.6rem; border-radius: 20px; }
  .auth-modal h1 { font-size: 1.45rem; }
  .auth-form__cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .auth-modal__submit { min-height: var(--tap); }
  .otp-input { font-size: 1.3rem; letter-spacing: 0.3em; text-indent: 0.3em; }
}

/* ---------- Cursuspagina ---------- */
.ch { position: relative; background: var(--cream); }
.ch__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.08; }
.ch__inner {
  position: relative; max-width: 1040px; margin: 0 auto;
  padding: 2.8rem 1.5rem 2.6rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: center;
}
.ch__main { min-width: 0; }
.ch__crumb { font-size: 0.8rem; color: var(--faint); margin-bottom: 0.9rem; }
.ch__crumb a { color: var(--muted); }
.ch__title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.025em; color: var(--green-950); max-width: 16em; }
.ch__sub { font-size: 1.05rem; color: var(--muted); margin-top: 0.7rem; max-width: 38rem; line-height: 1.6; }
.ch__teacher { display: flex; align-items: center; gap: 0.7rem; margin-top: 1.4rem; font-size: 0.9rem; color: var(--muted); }
.ch__teacher strong { color: var(--ink); font-weight: 600; }
.ch__avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-900); color: var(--gold-400); font-weight: 700; font-size: 0.9rem;
}
.ch__facts { font-size: 0.9rem; color: var(--muted); margin-top: 0.7rem; }

.ch__card { background: var(--surface); border-radius: 20px; padding: 1.5rem 1.5rem 1.4rem; box-shadow: var(--shadow-card); }
.ch__card-label { font-size: 0.85rem; font-weight: 600; color: var(--green-700); margin-bottom: 1rem; }
.ch__card-text { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 1.1rem; }
.ch__card-text em { font-style: normal; font-weight: 600; color: var(--green-700); }
.ch__ring { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.ch__ring .ring { flex: none; }
.ch__pct { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--green-900); }
.ch__pct-sub { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.ch__card .btn { width: 100%; min-height: 48px; font-size: 0.95rem; border-radius: 12px; }
.ch__next { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted); }
.ch__next span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch__next strong { color: var(--ink); font-weight: 600; }
.ch__next em { font-style: normal; color: var(--faint); flex: none; }
.ch__done { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--green-700); background: var(--green-50); border-radius: 12px; padding: 0.8rem 1rem; }
.ch__done svg { width: 16px; height: 16px; flex: none; }

.course-body { padding-top: 2.4rem; }
.course-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.course-main { min-width: 0; }
.course-section { margin-bottom: 2.6rem; }
.course-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.course-section__head h2 { font-size: 1.35rem; letter-spacing: -0.015em; }
.course-section__head span { font-size: 0.82rem; color: var(--faint); white-space: nowrap; }
.course-prose { font-size: 0.97rem; line-height: 1.75; color: var(--ink); max-width: 40rem; }
.course-prose p + p { margin-top: 0.8rem; }
.course-prose__sub { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.checklist { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1.6rem; max-width: 44rem; }
.checklist li { display: flex; gap: 0.6rem; font-size: 0.92rem; color: var(--ink); line-height: 1.5; }
.checklist li::before {
  content: "✓"; flex: none; color: var(--green-800); font-weight: 700;
  background: var(--green-100); width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.7rem; margin-top: 0.1rem;
}
.dotlist { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.dotlist li { font-size: 0.92rem; color: var(--muted); }
.dotlist li::before { content: none; }

.live {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--green-950); color: #fff; border-radius: 18px; padding: 1.3rem 1.5rem; margin-bottom: 2.4rem;
  box-shadow: var(--shadow-card);
}
.live__text { flex: 1; min-width: 0; }
.live__kicker { font-size: 0.8rem; font-weight: 600; color: var(--gold-400); }
.live h2 { font-size: 1.1rem; margin-top: 0.1rem; color: #fff; }
.live__when { font-size: 0.88rem; color: rgba(255, 255, 255, 0.72); margin-top: 0.15rem; }
.live__code { font-weight: 600; color: #fff; }
.live .btn { flex: none; min-height: 44px; border-radius: 12px; padding-inline: 1.3rem; }

.syl { background: var(--surface); border-radius: 18px; margin-bottom: 0.9rem; overflow: hidden; box-shadow: var(--shadow-card); }
.syl__head { display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.3rem; cursor: pointer; list-style: none; user-select: none; }
.syl__head::-webkit-details-marker { display: none; }
.syl__num { font-size: 0.9rem; font-weight: 700; color: var(--gold-600); flex: none; min-width: 2ch; font-variant-numeric: tabular-nums; }
.syl__title { flex: 1; min-width: 0; }
.syl__title strong { display: block; font-size: 1.02rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.syl__title span { font-size: 0.8rem; color: var(--faint); }
.syl__prog { display: flex; align-items: center; gap: 0.6rem; flex: none; font-size: 0.78rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.syl__prog .progress { width: 64px; display: block; }
.syl__prog .progress__bar { display: block; }
.syl__chev { width: 18px; height: 18px; flex: none; color: var(--faint); transition: transform 0.2s ease; }
.syl[open] .syl__chev { transform: rotate(180deg); }
.syl__desc { padding: 0 1.3rem 0.9rem calc(1.3rem + 2ch + 1rem); margin-top: -0.3rem; font-size: 0.88rem; color: var(--muted); }
.syl__list { border-top: 1px solid var(--divider); }
.syl__list--flat { border-top: 0; }

.lrow { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.3rem; color: var(--ink); transition: background 0.15s ease; }
.lrow + .lrow { border-top: 1px solid var(--divider); }
.lrow:hover { background: var(--surface-2); }
.lrow__num {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.78rem; font-weight: 700; color: var(--green-800); font-variant-numeric: tabular-nums;
  background: var(--green-50);
}
.lrow__num svg { width: 13px; height: 13px; }
.lrow--done .lrow__num { background: var(--green-800); color: var(--gold-400); }
.lrow--next .lrow__num { background: var(--gold-100); color: var(--gold-700); }
.lrow__body { flex: 1; min-width: 0; }
.lrow__title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-weight: 600; font-size: 0.96rem; line-height: 1.35; }
.lrow--done .lrow__title { color: var(--muted); font-weight: 500; }
.lrow__tag { font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--gold-100); color: var(--gold-700); }
.lrow__sub { display: block; font-size: 0.82rem; color: var(--faint); margin-top: 0.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__meta { display: flex; align-items: center; gap: 0.9rem; flex: none; font-size: 0.8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.lrow__meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.lrow__meta svg { width: 13px; height: 13px; }
.lrow__go { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--faint); }
.lrow__go svg { width: 14px; height: 14px; }
.lrow:hover .lrow__go { color: var(--gold-600); }
.lrow--locked { color: var(--muted); }
.lrow--locked .lrow__title { font-weight: 500; }

.course-aside { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.aside-card { background: var(--surface); border-radius: 18px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow-card); }
.aside-card__label { font-size: 0.85rem; font-weight: 600; color: var(--green-700); margin-bottom: 0.9rem; }
.teacher { display: flex; align-items: center; gap: 0.9rem; }
.teacher__avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green-900); color: var(--gold-400); font-weight: 700; font-size: 1.1rem; }
.teacher strong { display: block; font-size: 0.98rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.teacher span { font-size: 0.8rem; color: var(--faint); }
.teacher__bio { font-size: 0.87rem; color: var(--muted); line-height: 1.6; margin-top: 0.9rem; }

@media (max-width: 940px) {
  .ch__inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.8rem 1.5rem 0.4rem; align-items: stretch; }
  .course-body { padding-top: 1.5rem; }
  .course-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
/* Dezelfde zijmarges als .page, zodat de kaarten in de kop en de rest van de
   pagina op elke breedte precies even breed zijn. */
@media (max-width: 900px) {
  .ch__inner { padding-left: calc(1rem + var(--safe-l)); padding-right: calc(1rem + var(--safe-r)); }
}
@media (max-width: 940px) {
  .course-aside { position: static; }
  .course-section { margin-bottom: 2.2rem; }
  .syl__prog .progress { display: none; }
  .lrow__extra { display: none; }
}
@media (max-width: 620px) {
  .ch__title { font-size: 1.8rem; }
  .ch__sub { font-size: 0.97rem; }
  .ch__card { padding: 1.25rem 1.2rem 1.1rem; }
  .course-section__head { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .course-section__head h2 { font-size: 1.2rem; }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .live { padding: 1.1rem 1.2rem; gap: 0.9rem; }
  .live .btn { flex: 1 0 100%; }
  .syl__head { padding: 0.95rem 1.1rem; gap: 0.75rem; }
  .syl__desc { padding-left: 1.1rem; }
  .lrow { padding: 0.85rem 1.1rem; gap: 0.75rem; }
  .lrow__sub { white-space: normal; }
  .lrow__meta { gap: 0.6rem; }
  .lrow__go { display: none; }
}

/* ---------- Lespagina ---------- */
.player__bar { gap: 1rem; }
.player__nav-btn { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); border-color: transparent; }
.player__nav-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.16); color: #fff; }
.player-complete {
  min-height: 38px; padding: 0 1rem 0 0.8rem; border-radius: 11px;
  font-size: 0.86rem; font-weight: 600; border: 0;
  background: var(--gold-500); color: var(--green-975);
}
.player-complete:hover { background: var(--gold-400); }
.player-complete svg { width: 15px; height: 15px; }
.player-complete.is-done { background: rgba(255, 255, 255, 0.12); color: #fff; }
.player-complete.is-done:hover { background: rgba(255, 255, 255, 0.18); }

.player__aside { padding: 1rem 0.9rem 1.4rem; border-left: 0; }
.player__aside-head { padding: 0.25rem 0.5rem 0.9rem; border-bottom: 0; }
.player__aside-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); padding: 1rem 0.5rem 0.4rem; }
.player__aside-label span { font-size: 0.75rem; color: var(--faint); }
.player__aside .outline__item { padding: 0.6rem 0.65rem; border-radius: 12px; gap: 0.7rem; }
.player__aside .outline__item--current { background: var(--gold-100); }
.player__aside .outline__dot { width: 24px; height: 24px; font-size: 0.68rem; border: 0; background: var(--field-bg); }
.player__aside .outline__item--current .outline__dot { background: var(--surface); color: var(--gold-700); }
.player__aside .outline__dot--done { background: var(--green-800); color: var(--gold-400); }

.lesson-head__kicker { font-size: 0.85rem; font-weight: 600; color: var(--gold-700); margin-bottom: 0.4rem; }
.player__content h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; line-height: 1.15; }
.lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted); }
.lesson-meta__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.lesson-meta__item svg { display: none; }
.lesson-meta__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.lesson-meta__tag { font-size: 0.75rem; font-weight: 600; color: var(--green-700); background: var(--green-50); padding: 0.1rem 0.55rem; border-radius: 999px; }

.tabs { margin-top: 1.8rem; margin-bottom: 1.4rem; gap: 3px; border-bottom: 0; padding: 3px; border-radius: 12px; background: var(--field-bg); width: max-content; max-width: 100%; }
.tab { padding: 0.5rem 0.95rem; font-size: 0.86rem; font-weight: 600; border-radius: 9px; color: var(--muted); }
.tab::after { content: none; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--green-800); box-shadow: 0 1px 3px rgba(30, 40, 35, 0.12); }
.tab__count { background: transparent; color: var(--faint); font-weight: 600; padding: 0; margin-left: 0.3rem; vertical-align: 0; }
.tab__dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); margin-left: 0.4rem; vertical-align: 2px; }

.lesson-summary { font-size: 1.05rem; color: var(--ink); line-height: 1.65; margin-bottom: 1.2rem; max-width: 40rem; font-family: var(--font-body); font-style: normal; border: 0; padding: 0; }
.lesson-details { background: var(--surface); border: 0; border-radius: 16px; padding: 1.5rem 1.7rem; white-space: pre-line; font-size: 0.95rem; line-height: 1.7; box-shadow: var(--shadow-card); }

.notes { background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); }
.notes__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem 0; }
.notes__title { display: flex; flex-direction: column; min-width: 0; }
.notes__title strong { font-size: 0.95rem; font-weight: 600; color: var(--green-800); }
.notes__title span { font-size: 0.78rem; color: var(--faint); }
.notes__state { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; font-size: 0.78rem; font-weight: 500; }
.notes__saving { color: var(--faint); }
.notes__status { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--green-700); }
.notes__status:empty { display: none; }
.notes__status svg { width: 13px; height: 13px; }
.notes.htmx-request .notes__status { display: none; }
.notes textarea {
  display: block; width: 100%; min-height: 260px; resize: vertical;
  border: 0; outline: 0; padding: 1rem 1.3rem;
  font-family: var(--font-body); font-size: 0.96rem; line-height: 1.75; color: var(--ink); background: transparent;
}
.notes textarea::placeholder { color: var(--faint); }
.notes__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.8rem 0.8rem 1.3rem; font-size: 0.78rem; color: var(--faint); }
.notes__foot kbd { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; border-radius: 5px; padding: 0.05rem 0.4rem; background: var(--field-bg); }
.notes__foot .btn { border-radius: 10px; border: 0; background: var(--field-bg); }
.notes__foot .btn:hover { background: var(--line); }

.transcript { background: var(--surface); border-radius: 18px; padding: 1.4rem 1.8rem 1.9rem; box-shadow: var(--shadow-card); }
.transcript__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--faint); margin-bottom: 1rem; }
.transcript__head span:first-child { font-weight: 600; color: var(--green-800); font-size: 0.95rem; }
.transcript__body { font-size: 0.98rem; line-height: 1.8; color: var(--ink); white-space: pre-line; max-width: 40rem; }

.player__content .attachment { border: 0; border-radius: 14px; padding: 0.9rem 1.1rem; box-shadow: var(--shadow-card); }
.player__content .attachment__ext { border-radius: 8px; }

.lc-form { display: flex; align-items: flex-start; gap: 0.8rem; margin-bottom: 1.6rem; }
.lc-form > .avatar { margin-top: 0.3rem; }
.lc-form__box { flex: 1; min-width: 0; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); transition: box-shadow 0.15s ease; }
.lc-form__box:focus-within { box-shadow: var(--shadow-card), 0 0 0 3px rgba(21, 82, 69, 0.12); }
.lc-form textarea { display: block; width: 100%; border: 0; outline: 0; resize: vertical; min-height: 84px; padding: 0.95rem 1.1rem; background: transparent; color: var(--ink); font-family: var(--font-body); font-size: 0.94rem; line-height: 1.6; }
.lc-form textarea::placeholder { color: var(--faint); }
.lc-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.7rem 0.7rem 1.1rem; font-size: 0.77rem; color: var(--faint); }
.lc-form__foot .btn { border-radius: 10px; margin-left: auto; }
.lc-form--reply { margin: 0.7rem 0 0.4rem; }
.lc-form--reply textarea { min-height: 64px; }
.lc-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.92rem; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-card); }
.lc-thread { display: flex; flex-direction: column; gap: 0.8rem; }
.lc-thread > .cmt { padding: 1.1rem 1.3rem; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-card); }
.lc-thread > .cmt + .cmt { border-top: 0; }
.lc-thread .cmt__head { gap: 0.6rem; font-size: 0.82rem; }
.lc-thread .cm-who { font-weight: 600; color: var(--ink); gap: 0.6rem; }
.lc-thread .cm-who .avatar { width: 30px; height: 30px; font-size: 0.7rem; }
.lc-thread .cmt__text { margin-top: 0.45rem; padding-left: calc(30px + 0.6rem); font-size: 0.94rem; line-height: 1.65; }
.lc-thread .cmt__acts { padding-left: calc(30px + 0.6rem - 0.45rem); margin-top: 0.25rem; }
.lc-thread .cm-act { font-size: 0.8rem; padding: 0.25rem 0.45rem; }
.lc-thread .cmt__replies { margin: 0.6rem 0 0 calc(30px + 0.6rem); padding: 0; border: 0; }
.lc-thread .cmt__replies .cmt { padding: 0.8rem 0 0.2rem; border-top: 1px solid var(--divider); }
.lc-thread .lc-form--reply { margin-left: calc(30px + 0.6rem); }
.lc-thread .cmt__gone { color: var(--faint); }

.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 2.6rem; }
.lnav { display: flex; align-items: center; gap: 0.9rem; min-width: 0; padding: 1rem 1.15rem; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); transition: transform 0.15s ease, background 0.15s ease; }
.lnav:hover { transform: translateY(-1px); }
.lnav--next { flex-direction: row-reverse; text-align: right; background: var(--green-800); color: #fff; }
.lnav--next:hover { background: var(--green-700); }
.lnav__arrow { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green-800); }
.lnav--next .lnav__arrow { background: var(--gold-500); color: var(--green-975); }
.lnav__arrow svg { width: 15px; height: 15px; }
.lnav__text { min-width: 0; flex: 1; }
.lnav__kicker { display: block; font-size: 0.75rem; color: var(--faint); }
.lnav--next .lnav__kicker { color: var(--gold-400); }
.lnav__title { display: block; font-weight: 600; font-size: 0.94rem; margin-top: 0.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 940px) {
  .tabs { margin-top: 1.4rem; width: 100%; }
  .tab { min-height: 40px; }
  .transcript { padding: 1.2rem 1.2rem 1.5rem; }
  .notes textarea { min-height: 220px; padding: 0.9rem 1.1rem; }
  .notes__foot span { display: none; }
  .notes__foot { justify-content: flex-end; }
  .lc-thread > .cmt { padding: 1rem 1.1rem; }
}
@media (max-width: 620px) {
  .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .lc-form > .avatar { display: none; }
  .lc-form__foot > span { display: none; }
  .lc-thread .cmt__replies { margin-left: 0; }
  .lc-thread .lc-form--reply { margin-left: 0; }
}
@media (max-width: 380px) {
  .ch__inner { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* ============================================================
   Cursus afronden, afrondpagina en certificaat
   ============================================================ */

/* Laatste les: afronden (goud), wachten op meer lessen (rustig). */
.lnav-form { min-width: 0; display: flex; }
button.lnav { width: 100%; border: 0; font: inherit; cursor: pointer; text-align: right; }
.lnav--finish { background: var(--gold-500); color: var(--green-975); }
.lnav--finish:hover { background: var(--gold-400); }
.lnav--finish .lnav__arrow { background: var(--green-900); color: var(--gold-400); }
.lnav--finish .lnav__kicker { color: var(--green-800); }
.lnav--wait { flex-direction: row-reverse; text-align: right; background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: default; }
.lnav--wait:hover { transform: none; }
.lnav--wait .lnav__arrow { background: var(--gold-100); color: var(--gold-700); }
.lnav--wait .lnav__title { color: var(--ink); white-space: normal; }

/* Voortgangskaart op de cursuspagina. */
.ch__done > span { display: flex; flex-direction: column; min-width: 0; }
.ch__done em { font-style: normal; font-weight: 500; font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.ch__done--wait { color: var(--gold-700); background: var(--gold-100); }
.ch__done--wait em { color: var(--gold-700); opacity: 0.85; }
.ch__cert { margin-top: 0.8rem; }
.ch__next a { color: inherit; }
.ch__next a:hover strong { color: var(--green-700); }

/* Dashboard en profiel. */
.dash-course__pct--done { color: var(--green-700); }
.lesson-row__node--cert { background: var(--gold-500); color: var(--green-975); border-color: var(--gold-500); }
.lesson-row__node--cert svg { width: 13px; height: 13px; }

/* Afrondpagina. */
.done {
  text-align: center; padding: 2.8rem 1.5rem 3rem; margin-top: 1rem;
  background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-card);
}
.done__mark {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1.4rem;
  display: grid; place-items: center;
  background: var(--green-800); color: var(--gold-400);
}
.done__mark svg { width: 38px; height: 38px; }
.done__kicker { font-size: 0.85rem; font-weight: 600; color: var(--green-700); margin-bottom: 0.5rem; }
.done h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); letter-spacing: -0.02em; color: var(--green-950); }
.done__sub { color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 34rem; margin: 0.8rem auto 0; }
.done__sub strong { color: var(--ink); font-weight: 600; }
.done__facts { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin: 1.8rem auto 0; }
.done__fact { background: var(--surface-2); border-radius: 14px; padding: 0.9rem 1.3rem; min-width: 140px; }
.done__fact strong { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 650; color: var(--ink); line-height: 1.15; }
.done__fact span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.done__actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.9rem; }
.done__actions .btn { min-height: 46px; padding-inline: 1.4rem; border-radius: 12px; }
@media (max-width: 620px) {
  .done { padding: 2.2rem 1.2rem 2.4rem; border-radius: 20px; }
  .done__facts { flex-direction: column; }
  .done__actions { flex-direction: column; }
  .done__actions .btn { width: 100%; }
}

/* Certificaat: losse pagina, liggend, af te drukken. */
.cert-page { background: var(--bg); min-height: 100vh; padding: 1.5rem 1rem 3rem; }
.cert-tools {
  max-width: 1000px; margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.cert-tools__back { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.cert-tools__back:hover { color: var(--green-700); }
.cert-tools__back svg { width: 15px; height: 15px; }
.cert {
  max-width: 1000px; margin: 0 auto; aspect-ratio: 297 / 210;
  background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem);
  display: flex; flex-direction: column;
}
.cert__head { display: flex; align-items: center; justify-content: space-between; }
.cert__logo { height: 44px; width: auto; }
.cert__seal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-500); color: var(--green-975); }
.cert__seal svg { width: 26px; height: 26px; }
.cert__body { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 1.5rem 0; }
.cert__kicker { font-size: 0.9rem; font-weight: 600; color: var(--gold-700); margin-bottom: 1.4rem; }
.cert__intro { font-size: 0.95rem; color: var(--muted); }
.cert__name {
  font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 600;
  color: var(--green-950); letter-spacing: -0.02em; line-height: 1.1; margin: 0.5rem 0 1.3rem;
}
.cert__course { font-family: var(--font-display); font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 600; color: var(--green-800); line-height: 1.2; margin-top: 0.5rem; }
.cert__sub { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }
.cert__foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cert__meta span { display: block; font-size: 0.75rem; color: var(--faint); }
.cert__meta strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); margin-top: 0.15rem; }
.cert__meta--code { text-align: right; }
.cert__meta--code strong { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
@media (max-width: 700px) {
  .cert { aspect-ratio: auto; border-radius: 18px; }
  .cert__body { padding: 2rem 0; }
  .cert__foot { grid-template-columns: 1fr 1fr; }
  .cert__meta--code { text-align: left; }
}
@media print {
  @page { size: A4 landscape; margin: 0; }
  body.cert-page { background: #fff; padding: 0; min-height: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cert-tools { display: none; }
  .cert {
    max-width: none; width: 297mm; height: 210mm; aspect-ratio: auto;
    border-radius: 0; box-shadow: none; margin: 0; padding: 18mm 22mm;
  }
  .cert__foot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cert__meta--code { text-align: right; }
}

/* ============================================================
   Beheer in de site (staf): knop, formulieren, toets-editor
   ============================================================ */
.staff-fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--green-800); color: #fff; font: inherit; font-weight: 650; font-size: 0.86rem;
  box-shadow: 0 10px 28px -10px rgba(8, 41, 35, 0.5);
}
.staff-fab:hover { background: var(--green-700); }
.staff-fab svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  body.has-botnav .staff-fab { bottom: calc(var(--botnav-h) + var(--safe-b) + 0.8rem); }
}
@media print { .staff-fab { display: none; } }

/* Formulieren in het beheer */
.bf__card { margin-bottom: 1rem; }
.bf__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.bf__check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 0.4rem; }
.bf__check input { margin-top: 0.25rem; accent-color: var(--green-800); }
.bf__check small { display: block; font-weight: 400; color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
.bf__checks { display: flex; gap: 2rem; flex-wrap: wrap; }
.bf__note { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.bf__bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.9rem 0; margin-top: 0.5rem;
  background: var(--bg); border-top: 1px solid var(--line);
}
.bf__danger { color: var(--red); margin-left: auto; }
.bf__danger:hover { background: var(--red-bg); }
.bf textarea.input { width: 100%; resize: vertical; }
.bf .field input[type="text"], .bf .field input[type="url"], .bf .field input[type="number"], .bf .field select { width: 100%; }
.bf__section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.8rem 0 0.9rem; }
.bf__section-head h2 { font-size: 1.15rem; }
.bf__count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 0.4rem; border-radius: 999px; background: var(--green-50); color: var(--green-700); font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; vertical-align: 2px; margin-left: 0.3rem; }
.bf__section-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.bf__paste-intro { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.7rem; }
.bf__paste code, .bf__example code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 0.3rem; font-size: 0.85em; }
.bf__example { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; }
.bf__example summary { cursor: pointer; font-weight: 600; color: var(--green-700); }
.bf__example pre { margin: 0.6rem 0; padding: 0.8rem 1rem; background: var(--surface-2); border-radius: 10px; font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; color: var(--ink); }
.bf__paste-errors { margin-top: 0.7rem; padding: 0.7rem 0.9rem; background: var(--red-bg); color: var(--red); border-radius: 10px; font-size: 0.85rem; }
.bf__paste-errors ul { margin: 0.3rem 0 0.3rem 1.1rem; }
.bf__paste-foot { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.form-errors ul { margin: 0.3rem 0 0 1.1rem; }

/* Keuze tussen twee (Toets/Herhaling, Meerkeuze/Open) */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 1rem; }
.seg__item { position: relative; cursor: pointer; }
.seg__item input { position: absolute; opacity: 0; pointer-events: none; }
.seg__item span { display: block; padding: 0.4rem 0.95rem; border-radius: 8px; font-size: 0.86rem; font-weight: 600; color: var(--muted); }
.seg__item input:checked + span { background: var(--surface); color: var(--green-800); box-shadow: var(--shadow-soft); }
.seg--sm { margin-bottom: 0; }
.seg--sm .seg__item span { padding: 0.25rem 0.7rem; font-size: 0.78rem; }

/* Vraagkaarten in de editor */
.qe-list { display: flex; flex-direction: column; gap: 0.9rem; }
.qe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem 1.2rem; }
.qe__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.qe__num { font-weight: 700; font-size: 0.9rem; color: var(--green-800); }
.qe__tools { margin-left: auto; display: flex; gap: 0.2rem; }
.qe__tool { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 0.95rem; }
.qe__tool:hover { background: var(--surface-2); color: var(--ink); }
.qe__tool--del:hover { background: var(--red-bg); color: var(--red); border-color: transparent; }
.qe .input { width: 100%; }
.qe__text { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.5rem; }
.qe__arabic { font-size: 1.15rem; margin-bottom: 0.7rem; }
.qe__arabic::placeholder { font-family: var(--font-body); font-size: 0.85rem; }
.qe[data-kind="open"] .qe__mc { display: none; }
.qe[data-kind="mc"] .qe__open { display: none; }
.qe__choices { display: flex; flex-direction: column; gap: 0.4rem; }
.qe__choice { display: flex; align-items: center; gap: 0.5rem; }
.qe__correct { flex: none; position: relative; width: 26px; height: 26px; cursor: pointer; }
.qe__correct input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qe__correct span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); color: transparent; font-size: 0.8rem; font-weight: 800; }
.qe__correct span::before { content: "✓"; }
.qe__correct input:checked + span { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.qe__choice:has(.qe__correct input:checked) .qe__choice-text { border-color: var(--green-700); background: var(--green-50); }
.qe__x { flex: none; width: 26px; height: 26px; border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 1.1rem; border-radius: 6px; }
.qe__x:hover { color: var(--red); background: var(--red-bg); }
.qe__add-choice { margin-top: 0.5rem; border: 0; background: transparent; color: var(--green-700); font: inherit; font-size: 0.84rem; font-weight: 650; cursor: pointer; padding: 0.2rem 0; }
.qe__add-choice:hover { text-decoration: underline; }
.qe__hint { display: inline-block; margin-left: 0.8rem; font-size: 0.76rem; color: var(--faint); }
.qe__model, .qe__expl { margin-top: 0.6rem; font-size: 0.9rem; }
@media (max-width: 620px) {
  .bf__cols { grid-template-columns: 1fr; }
  .qe { padding: 0.9rem 0.9rem 1rem; }
  .qe__hint { display: none; }
  .bf__bar .btn { flex: 1; }
  .bf__danger { flex: 0 0 100%; margin-left: 0; }
}

/* Toetsen bij een les, op de lespagina */
.lq { margin-top: 2rem; }
.lq__title { font-size: 1.05rem; margin-bottom: 0.7rem; }
.lq .t-row--static { background: var(--surface); }

/* Kop van de beheerformulieren (de gewone paginakop staat site-breed uit) */
.bf__head { margin: 0.2rem 0 1.4rem; }
.bf__crumb { font-size: 0.8rem; font-weight: 600; color: var(--green-700); margin-bottom: 0.3rem; }
.bf__head h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.bf__sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; max-width: 40rem; line-height: 1.55; }

/* ---------- Beheerdashboard ---------- */
.page--wide.bd { max-width: 1180px; }
.bd-muted { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.bd-kpis { display: grid; grid-template-columns: 1.6fr repeat(5, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1.6rem; }
.bd-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.bd .dash-section-head { flex-wrap: wrap; }
.bd-kpi__label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.bd-kpi__value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.bd-kpi__value--hero { font-size: 3rem; }
.bd-kpi__sub { font-size: 0.76rem; color: var(--faint); line-height: 1.4; }
.bd-kpi__sub em { font-style: normal; font-weight: 700; color: var(--muted); }
.bd-up { color: var(--green-700) !important; }
.bd-down { color: var(--red) !important; }

.bd-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 2rem; }
.bd-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem 0.8rem; min-width: 0; }
.bd-chart__head { margin-bottom: 0.9rem; }
.bd-chart__head h3 { font-family: var(--font-body); font-size: 0.92rem; font-weight: 700; }
.bd-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid var(--line); position: relative; }
.bd-bar { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; outline: 0; }
.bd-bar__fill { display: block; width: 100%; max-width: 24px; min-height: 2px; background: var(--green-700); border-radius: 4px 4px 0 0; transition: background 0.12s ease; }
.bd-bar:hover .bd-bar__fill, .bd-bar:focus .bd-bar__fill { background: var(--green-900); }
.bd-bar__val { position: absolute; top: -2px; left: 50%; transform: translate(-50%, -100%); font-size: 0.74rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bd-bar__x { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 0.35rem; font-size: 0.68rem; color: var(--faint); white-space: nowrap; }
.bd-bar__tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 0.35rem 0.6rem; border-radius: 8px; background: var(--green-950); color: #fff; font-size: 0.74rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.1s ease; z-index: 3; }
.bd-bar:hover .bd-bar__tip, .bd-bar:focus .bd-bar__tip { opacity: 1; }
.bd-bar:hover .bd-bar__val, .bd-bar:focus .bd-bar__val { opacity: 0; }
.bd-bars { padding-top: 1.2rem; margin-bottom: 1.6rem; }
.bd-chart__table { margin-top: 0.2rem; font-size: 0.78rem; }
.bd-chart__table summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.bd-chart__table table { margin-top: 0.4rem; }

.bd-section { margin-bottom: 1.8rem; }
.bd-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: start; }
.bd-two > * { min-width: 0; }
.bd-table-wrap { overflow-x: auto; }
.bd-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.bd-table th { text-align: left; font-size: 0.74rem; font-weight: 600; color: var(--muted); padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bd-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bd-table tr:last-child td { border-bottom: 0; }
.bd-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-table a { color: var(--ink); }
.bd-table a:hover { color: var(--green-700); }
.bd-table .q-card__badge, .bd-table .q-card__kind { margin-right: 0.4rem; vertical-align: 1px; }
.bd-table--compact td { padding: 0.3rem 0.4rem; }
.bd-empty { color: var(--muted); text-align: center; padding: 1.4rem !important; }
.bd-meter { display: inline-block; vertical-align: middle; width: 90px; height: 6px; border-radius: 999px; background: var(--green-50); overflow: hidden; margin-right: 0.5rem; }
.bd-meter__bar { display: block; height: 100%; background: var(--green-700); border-radius: 999px; }
.bd-meter__val { font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.bd-facts { display: grid; grid-template-columns: repeat(2, 1fr); }
.bd-facts > div { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.bd-facts > div:nth-child(odd) { border-right: 1px solid var(--line); }
.bd-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.bd-facts strong { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.bd-facts span { font-size: 0.78rem; color: var(--muted); }
.bd-todo { margin-top: 0.8rem; padding: 0.9rem 1.1rem; }
.bd-todo__title { font-size: 0.8rem; font-weight: 700; color: var(--gold-700); margin-bottom: 0.4rem; }
.bd-todo ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.6; color: var(--muted); }
.bd-todo a { font-weight: 600; color: var(--ink); }
@media (max-width: 1000px) {
  .bd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-kpi--hero { grid-column: span 3; }
  .bd-charts { grid-template-columns: 1fr; }
  .bd-two { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bd-kpis { grid-template-columns: 1fr 1fr; }
  .bd .dash-section-head { flex-wrap: wrap; }
  .bd-kpi__value--hero { font-size: 2.4rem; }
  .bd-bar__x { display: none; }
  .bd-bar:first-child .bd-bar__x, .bd-bar:last-child .bd-bar__x { display: block; }
}

/* ---------- Gebruikersbeheer ---------- */
.bu-name { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.bu-name .avatar { flex: none; }
.bu-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.2rem; font-size: 0.85rem; color: var(--muted); }
.bu-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.bu-head__text { flex: 1; min-width: 0; }
.bu-head h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.bu-head__badges { margin-top: 0.4rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.bu-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bd-kpi__value--text { font-size: 1.05rem; font-weight: 600; margin-top: 0.3rem; }
.bu-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.bu-side { display: flex; flex-direction: column; gap: 1rem; }
.bu-panel { padding: 1rem 1.1rem 1.1rem; }
.bu-panel h2 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.7rem; }
.bu-panel .bd-muted { display: block; margin-top: 0.6rem; }
.bu-form { display: flex; gap: 0.5rem; align-items: center; }
.bu-form .select { flex: 1; }
.bu-form--stack { margin-top: 0.5rem; }
.bu-form--stack .btn { width: 100%; }
.bu-btn--danger { color: var(--red); }
.bu-btn--danger:hover { background: var(--red-bg); border-color: transparent; }
.bu-panel .bf .field { margin-bottom: 0.7rem; }
.bu-panel .bf .field label { font-size: 0.76rem; }
.bu-panel .bf .field input, .bu-panel .bf .field select { width: 100%; }
.bu-inline { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; white-space: nowrap; }
.bu-link { border: 0; background: transparent; padding: 0; font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--green-700); cursor: pointer; }
.bu-link:hover { text-decoration: underline; }
.bu-link--danger { color: var(--red); }
.bu-addcourse { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.bu-addcourse .select { min-width: 220px; }
@media (max-width: 1000px) {
  .bu-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bu-kpis { grid-template-columns: 1fr 1fr; }
  .bu-head { flex-wrap: wrap; }
}

/* Toets: alle vragen onder elkaar, alles verplicht */
.exam__intro { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.4rem; }
.exam__alert { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem; }
.exam-q__missing { display: none; margin-top: 0.7rem; font-size: 0.82rem; font-weight: 600; color: var(--red); }
.exam-q--missing .exam-q__missing { display: block; }
.exam-q--missing .exam-choice { border-color: rgba(156, 58, 48, 0.45); }
.exam-q--missing .exam-q__open { border-color: var(--red); }
.exam__nav { justify-content: space-between; padding-bottom: 1rem; }
.exam__nav-count { font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.exam__nav #exam-submit { min-width: 160px; }
@media (max-width: 900px) {
  .exam__body { padding-bottom: 6rem; }
  .exam__nav { justify-content: space-between; }
  .exam__nav .btn { flex: 0 0 auto; }
  .exam__count { display: none; }
}

/* Inklapbare modules in het lespaneel */
.player__module { margin-bottom: 0.3rem; }
.player__module summary { list-style: none; cursor: pointer; user-select: none; }
.player__module summary::-webkit-details-marker { display: none; }
.player__module .player__aside-label { align-items: center; gap: 0.4rem; padding: 0.4rem 0.3rem; border-radius: 8px; }
.player__module .player__aside-label:hover { background: var(--surface-2); }
.player__module-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__module-chev { width: 13px; height: 13px; flex: none; color: var(--faint); transition: transform 0.15s ease; }
.player__module[open] .player__module-chev { transform: rotate(90deg); }
.player__module-body { padding-top: 0.2rem; }

/* ------------------------------------------------------------
   Foutpagina's (400, 403, 404, 500, verlopen formulier)
   Eén rustige kaart. Ingelogd staat hij in de app, anders op het
   cream-veld met het logo erboven, net als bij inloggen.
   ------------------------------------------------------------ */
.oops {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem; padding: 3rem 1.2rem 4rem;
  min-height: calc(100vh - 12rem);
}
.oops--scene {
  min-height: 100vh; min-height: 100dvh;
  padding: 2.5rem 1.2rem 3.5rem;
  background: var(--cream);
}
.oops--scene .auth-scene__brand img { height: 48px; width: auto; }
.oops__card {
  width: 100%; max-width: 440px;
  background: var(--surface); border-radius: 22px;
  padding: 2.4rem 2.1rem 2.2rem; text-align: center;
  box-shadow: var(--shadow-card);
}
.oops__code {
  display: block;
  font-family: var(--font-display); font-weight: 600; font-size: 3.6rem;
  letter-spacing: -0.03em; line-height: 1; color: var(--green-950);
  margin-bottom: 0.9rem;
}
.oops__card h1 { font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.25; color: var(--green-950); }
.oops__text { color: var(--muted); font-size: 0.93rem; line-height: 1.6; margin: 0.6rem auto 1.6rem; max-width: 26rem; }
.oops__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.oops__actions .btn { min-height: 46px; padding: 0.6rem 1.25rem; border-radius: 12px; font-size: 0.93rem; }
.oops__search { margin-top: 1.1rem; }
.oops__search .input {
  padding: 0.78rem 0.95rem; font-size: 0.94rem; border-radius: 12px;
  border: 1px solid transparent; background: var(--field-bg);
}
.oops__search .input:focus {
  background: var(--field-bg-focus); border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(21, 82, 69, 0.12);
}
.oops__path {
  margin-top: 1.4rem; font-size: 0.78rem; color: var(--faint);
  overflow-wrap: anywhere; word-break: break-all;
}
@media (max-width: 600px) {
  .oops { padding: 1.5rem 1rem 3rem; }
  .oops:not(.oops--scene) { min-height: calc(100vh - 9rem); }
  .oops__card { padding: 2rem 1.4rem 1.8rem; border-radius: 18px; }
  .oops__code { font-size: 3rem; }
  .oops__actions { flex-direction: column; }
  .oops__actions .btn { width: 100%; }
}

/* ============================================================
   Nooit inzoomen bij focus op aanraakschermen
   iOS zoomt in zodra een invulveld kleiner is dan 16px. Losse regels
   (.notes textarea, .auth-modal .input, .cm-panel input…) wonnen van de
   algemene 16px-regel; deze regel staat als laatste en wint van alles.
   ============================================================ */
@media (max-width: 940px), (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not(.otp-input),
  textarea,
  select {
    font-size: 16px !important;
  }
  .otp-input { font-size: max(16px, 1.25rem) !important; }
}
