/* Doe Maar Dutch portal — the ONE design system.

   Organisation (keep it this way; add rules in the matching section):
     1. tokens          colours (exact brand palette, unchanged), spacing, type, radii
     2. base            reset, typography, links, utilities
     3. layout          main, page-head, rows, grids, sections
     4. nav             sticky portal nav with a no-JS collapse below 821px
     5. components      cards, buttons, pills, chips, search, tabs, tables, forms,
                        lists, tiles, empty state, callouts, dialog, edit-mode, calendar
     6. page modules    woordenlijst (.wl), login, invoice
     7. responsive      ≤ 820px (iPad portrait and below), ≤ 480px (phones)
     8. print

   Rules: no new hues — every colour is a token from section 1 (a handful of
   tints derived from them are marked). Spacing uses the --s-* scale. Page
   templates use classes and the macros in templates/_components.html; they
   carry no private <style> blocks. */

/* =========================================================================
   1. TOKENS
   ========================================================================= */
:root {
  /* brand palette — exact values, never change */
  --black: #1a1a1a;
  --white: #ffffff;
  --grey: #67686a;
  --grey-mid: #9a9b9d;
  --grey-light: #efeff0;
  --grey-line: #e2e2e4;
  --yellow: #ffeb66;
  --pink: #ffc2d0;
  --green: #00953c;
  --green-soft: #66bf8a;
  --blue: #0071ff;
  --blue-grey: #7393b3;
  --burnt-orange: #cc5500;
  --creme: #ffddb8;
  --creme-soft: rgba(255, 221, 184, 0.5);

  /* --c-* aliases (same values; use whichever reads better) */
  --c-black: var(--black);
  --c-white: var(--white);
  --c-grey: var(--grey);
  --c-grey-mid: var(--grey-mid);
  --c-grey-light: var(--grey-light);
  --c-line: var(--grey-line);
  --c-yellow: var(--yellow);
  --c-pink: var(--pink);
  --c-green: var(--green);
  --c-green-soft: var(--green-soft);
  --c-blue: var(--blue);
  --c-blue-grey: var(--blue-grey);
  --c-orange: var(--burnt-orange);
  --c-creme: var(--creme);
  --c-creme-soft: var(--creme-soft);

  /* derived tints (hover / soft backgrounds of the palette above) */
  --creme-hover: #f3c592;     /* creme, darker — button + nav hover */
  --green-hover: #037e34;     /* green, darker */
  --orange-soft: #fff6ee;     /* burnt-orange at ~8% on white — callout bg */
  --blue-grey-soft: #f2f6fa;  /* blue-grey at ~8% on white — info callout bg */
  --yellow-soft: #fffdf0;     /* yellow at ~10% on white — carry-over note bg */
  --green-tint: #f2fbf5;      /* green at ~6% on white — success callout, saved field */
  --row-hover: #fafafa;

  /* spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;

  /* type scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.85rem;
  --fs-md: 0.95rem;
  --fs-lg: 1.1rem;
  --fs-xl: 1.35rem;
  --fs-2xl: 1.6rem;
  --lh: 1.45;
  --lh-tight: 1.2;

  --font-body: "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --font-head: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* shape + layout */
  --radius: 10px;
  --radius-sm: 8px;
  --radius-pill: 9999rem;
  --maxw: 1120px;
  --nav-h: 52px;
  --control-h: 2.3rem;   /* height of one-line inputs, selects and buttons */
}

/* =========================================================================
   2. BASE
   ========================================================================= */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  margin: 0;
  background: var(--white);
  color: var(--black);
  line-height: var(--lh);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-2);
  overflow-wrap: anywhere;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-size: var(--fs-md); }

a { color: var(--blue); }
p { margin: 0 0 var(--s-2); }
p:last-child { margin-bottom: 0; }
img, svg { max-width: 100%; }

/* utilities */
.muted { color: var(--grey); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }   /* keep the line breaks of a stored text (invoice footer) */
.hidden { display: none !important; }
.hr { height: 1px; background: var(--grey-line); border: none; margin: var(--s-4) 0; }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack > * + * { margin-top: var(--s-3); }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: var(--s-2) !important; }
.mt-3 { margin-top: var(--s-3) !important; }
.mt-4 { margin-top: var(--s-4) !important; }
.mb-2 { margin-bottom: var(--s-2) !important; }
.mb-3 { margin-bottom: var(--s-3) !important; }
.mb-4 { margin-bottom: var(--s-4) !important; }
.plain { text-decoration: none; color: inherit; }   /* links that should not look like links */
.plain:hover { text-decoration: underline; }

/* =========================================================================
   3. LAYOUT
   ========================================================================= */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-4) var(--s-4) var(--s-6);
}

/* Page header: crumb, h1, subtitle; optional .actions on the right.
   `.has-actions` (set by the page_head() macro) or the legacy `.spread`
   turn it into a two-side flex row. */
.page-head { margin-bottom: var(--s-4); }
.page-head.has-actions,
.page-head.spread {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2) var(--s-4); flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
.page-head .crumb { font-size: var(--fs-sm); color: var(--grey); margin-bottom: var(--s-1); }
.page-head .crumb a { color: var(--grey); }
.page-head .sub, .page-head p { margin: var(--s-1) 0 0; color: var(--grey); font-size: var(--fs-md); }
.page-head .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; margin-left: auto; }
.page-head-main { min-width: 0; }

.row { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.row > .col { flex: 1 1 320px; min-width: 0; }

.grid { display: grid; gap: var(--s-3); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.section { margin-top: var(--s-4); }
.section:first-child { margin-top: 0; }

/* anchor targets (#nieuw-lesplan, #materialen, a focused input) scroll into
   view just below the sticky topbar instead of underneath it */
[id] { scroll-margin-top: calc(var(--nav-h) + var(--banner-h, 0px) + var(--s-3)); }

/* =========================================================================
   4. NAV
   ========================================================================= */
/* .topbar (base.html) holds the TEST banner + the nav as ONE sticky stack, so
   the banner never covers the nav. The banner include publishes its height as
   --banner-h (0 when absent); sticky page elements offset by
   calc(var(--nav-h) + var(--banner-h)). */
.topbar { position: sticky; top: 0; z-index: 10; }
nav.portalnav { position: relative; }
nav.portalnav.admin { background: var(--creme); }
nav.portalnav.student { background: var(--blue-grey); }

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: var(--s-1) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  position: relative;
}
.nav-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--black);
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  white-space: nowrap;
}
nav.portalnav.student .nav-brand { color: var(--white); }
.nav-brand .tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  background: var(--black);
  color: var(--white);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
}
nav.portalnav.student .nav-brand .tag { background: var(--white); color: var(--blue-grey); }

/* one line always: either it fits, or it is collapsed behind the burger (§7) */
.nav-links { display: flex; gap: var(--s-1); list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; justify-content: flex-end; }
.nav-links a {
  display: block;
  color: var(--black);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
nav.portalnav.student .nav-links a { color: var(--white); }
nav.portalnav.admin .nav-links a:hover { background: var(--creme-hover); }
nav.portalnav.student .nav-links a:hover { background: rgba(255, 255, 255, 0.18); }
nav.portalnav.admin .nav-links a.active { background: var(--blue-grey); color: var(--white); }
nav.portalnav.student .nav-links a.active { background: var(--white); color: var(--blue-grey); }
.nav-links a.logout { opacity: 0.85; }

/* Burger toggle (checkbox + label; no JS). Hidden on desktop, see §7. */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  width: 2.4rem; height: 2.2rem;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: none;
}
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: currentColor; position: relative; content: "";
}
.nav-burger span::before { position: absolute; top: -6px; }
.nav-burger span::after { position: absolute; top: 6px; }
nav.portalnav.admin .nav-burger { color: var(--black); }
nav.portalnav.student .nav-burger { color: var(--white); }
nav.portalnav.admin .nav-burger:hover { background: var(--creme-hover); }
nav.portalnav.student .nav-burger:hover { background: rgba(255, 255, 255, 0.18); }

/* =========================================================================
   5. COMPONENTS
   ========================================================================= */

/* ---- cards ---- */
.card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  min-width: 0;
}
.card.tint-creme { background: var(--creme-soft); border-color: transparent; }
.card.tint-yellow { background: var(--yellow); border-color: transparent; }
.card.tint-pink { background: var(--pink); border-color: transparent; }
.card.tint-grey { background: var(--grey-light); border-color: transparent; }
.card.tint-blue { background: var(--blue-grey-soft); border-color: transparent; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-size: 1.05rem; }   /* a card title sits under the page h1/h2 */
/* stacked cards get a gap — but NOT inside a grid/flex container, where the
   container's own gap already separates them */
.card + .card { margin-top: var(--s-3); }
.grid > .card + .card, .row > .card + .card, .tiles > .card + .card,
.spread > .card + .card, .btn-row > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.card-head > h2, .card-head > h3 { margin: 0; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  background: var(--creme);
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1.2;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  font-family: var(--font-body);
  text-align: center;
  white-space: nowrap;
}
.btn:hover { background: var(--creme-hover); }
.btn.primary { background: var(--green); color: var(--white); }
.btn.primary:hover { background: var(--green-hover); }
.btn.blue { background: var(--blue); color: var(--white); }
.btn.blue:hover { opacity: 0.9; }
.btn.ghost { background: transparent; border-color: var(--grey-line); }
.btn.ghost:hover { background: var(--grey-light); }
.btn.danger-ghost { background: transparent; border-color: var(--grey-line); color: var(--burnt-orange); }
.btn.danger-ghost:hover { background: var(--orange-soft); border-color: var(--burnt-orange); }
.btn.danger { background: var(--burnt-orange); border-color: var(--burnt-orange); color: var(--white); }
.btn.danger:hover { background: var(--burnt-orange); opacity: 0.9; }
.btn.small, .btn.sm { padding: 0.3rem 0.8rem; font-size: var(--fs-xs); }
.btn.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--control-h); height: var(--control-h); padding: 0; line-height: 1;
}
.btn.icon.small, .btn.icon.sm { width: 1.8rem; height: 1.8rem; }
.btn.block { display: block; width: 100%; }
.btn.left { text-align: left; }   /* a full-width button whose label reads like a list item */
.btn[disabled], .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.btn-row.bottom { align-items: flex-end; }
/* a select, text input or search box placed directly in a button row shares the line */
.btn-row > input:not([type=checkbox]):not([type=radio]), .btn-row > select { width: auto; flex: 1 1 10rem; min-width: 0; }
.btn-row > .search { flex: 1 1 12rem; }

/* ---- pills / badges ---- */
.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.12rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--grey-light);
  color: var(--black);
  white-space: nowrap;
}
.pill.level { background: var(--blue-grey); color: var(--white); }
.pill.thema { background: var(--yellow); }
.pill.type { background: var(--pink); }
.pill.new { background: var(--burnt-orange); color: var(--white); }
.pill.ghost { background: transparent; border: 1px solid var(--grey-line); font-weight: 500; color: var(--grey); }
.pill.status-draft { background: var(--grey-light); color: var(--grey); }
.pill.status-sent { background: var(--blue); color: var(--white); }
.pill.status-paid { background: var(--green); color: var(--white); }
.pill.warn { background: var(--yellow); color: var(--black); }   /* generic warning pill */
.pills { display: flex; gap: var(--s-1); flex-wrap: wrap; align-items: center; }
/* legacy alias for the invoice status chips */
.statuschip {
  display: inline-block; font-size: 0.78rem; font-weight: 600; line-height: 1.4;
  padding: 0.12rem 0.6rem; border-radius: var(--radius-pill); white-space: nowrap;
}
.statuschip.draft { background: var(--grey-light); color: var(--grey); }
.statuschip.sent { background: var(--blue); color: var(--white); }
.statuschip.paid { background: var(--green); color: var(--white); }

/* ---- filter chips (buttons, labels or links) ---- */
.filters { display: flex; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3); }
.filtergroup { min-width: 0; }
.filtergroup .glab { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); font-weight: 600; margin-bottom: var(--s-1); }
.chips { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.chip {
  position: relative;
  border: 1px solid var(--grey-line); background: var(--white); border-radius: var(--radius-pill);
  padding: 0.22rem 0.75rem; font-size: 0.82rem; line-height: 1.3; cursor: pointer;
  font-family: var(--font-body); color: var(--black);
}
.chip:hover { background: var(--grey-light); }
.chip.on { background: var(--black); color: var(--white); border-color: var(--black); }
a.chip { display: inline-block; text-decoration: none; }
a.chip.on { color: var(--white); }
.chip input:focus-visible { outline: 2px solid var(--blue-grey); }
/* a chip (or rating dot, below) wrapping its own checkbox/radio: the native
   control is hidden visually and the checked state paints the wrapper, so the
   form works without JS and without the server-side .on/.sel class */
.chip > input, .rating .dot > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip:has(> input:checked) { background: var(--black); color: var(--white); border-color: var(--black); }
/* attached-materials chip on the lesson-plan page (ghost look) */
.matchip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--grey-line); background: transparent;
  border-radius: var(--radius-pill); padding: 0.2rem 0.6rem;
  font-size: 0.82rem; color: var(--grey);
}
.matchip a { color: var(--black); text-decoration: none; }
.matchip a:hover { text-decoration: underline; }
/* a chip the page script just added (JSON API, no reload) fades in green */
.matchip.is-new { animation: matchip-in 1.2s ease-out; }
@keyframes matchip-in {
  from { opacity: 0; border-color: var(--green); background: var(--green-tint); }
  40% { opacity: 1; border-color: var(--green); background: var(--green-tint); }
  to { border-color: var(--grey-line); background: transparent; }
}
/* the one-line "Toegevoegd." / error next to the material picker */
.mat-status:empty { display: none; }
.mat-status.err { color: var(--burnt-orange); }
@media (prefers-reduced-motion: reduce) { .matchip.is-new { animation: none; } }

/* Materialen picker in the "Nieuwe les" create form: a scrollable, tickable
   list filtered client-side by the search box + type select above it. */
.matpick-list {
  margin-top: 0.5rem; max-height: 15rem; overflow-y: auto;
  border: 1px solid var(--grey-line); border-radius: var(--radius);
  padding: 0.3rem;
}
.matpick-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.4rem; border-radius: var(--radius);
}
.matpick-item:hover { background: var(--grey-tint, rgba(0,0,0,0.03)); }
.matpick-item .t { flex: 1; }
.matpick-item[hidden] { display: none; }

/* ---- forms ---- */
label.field, .field { display: block; margin-bottom: var(--s-3); min-width: 0; }
label.field > .lab, .field > .lab { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s-1); }
.field .hint { font-weight: 400; color: var(--grey); font-size: var(--fs-xs); }
.field.mb-0 { margin-bottom: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=number], input[type=time], input[type=url], select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.3;
  min-height: var(--control-h);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
}
select { padding-right: var(--s-4); }
textarea { resize: vertical; min-height: 5rem; line-height: var(--lh); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--blue-grey); outline-offset: 0; border-color: var(--blue-grey); }
input[type=search] { -webkit-appearance: none; appearance: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); align-items: start; }
.form-grid .span-2, .form-grid .wide { grid-column: 1 / -1; }
.form-grid > .field { margin-bottom: var(--s-3); }
.inline-form { display: inline; }

/* ---- rich-text fields (bold, underline + bullet list on the class/debrief fields) ----
   `.richtext` is the read view wherever a stored (already-sanitised) value is
   shown; `.rt-*` is the editor that static/richtext.js builds over the plain
   textarea. pre-wrap keeps the line breaks of older plain-text values while the
   allowed tags (bold, lists, paragraphs) still render. */
.richtext { white-space: pre-wrap; }
.richtext > :first-child { margin-top: 0; }
.richtext > :last-child { margin-bottom: 0; }
.richtext p { margin: 0 0 var(--s-2); }
.richtext ul, .richtext ol { margin: var(--s-1) 0; padding-left: 1.4em; }
.richtext ul { list-style: disc; }
.richtext ol { list-style: decimal; }
.richtext li { margin: 0.1em 0; }
.richtext b, .richtext strong { font-weight: 700; }
:is(.richtext, .rt-editor) u { text-decoration: underline; }

.rt-field { min-width: 0; }
.rt-toolbar { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-1); }
/* Autosave status word (static/autosave.js): small, right end of the toolbar. */
.rt-status { margin-left: auto; align-self: center; font-size: .8rem; color: var(--grey); }
.rt-status.is-error { color: var(--burnt-orange); }
.rt-editor {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh);
  min-height: 5rem;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
}
.rt-editor:focus { outline: 2px solid var(--blue-grey); outline-offset: 0; border-color: var(--blue-grey); }
.rt-editor > :first-child { margin-top: 0; }
.rt-editor p { margin: 0 0 var(--s-2); }
.rt-editor ul, .rt-editor ol { margin: var(--s-1) 0; padding-left: 1.4em; }
.rt-editor ul { list-style: disc; }
.rt-editor ol { list-style: decimal; }
/* Nested lists (Tab in the editor, like Word): each level sits further right
   and changes symbol. Bullets: disc, circle, square, then repeat; numbers:
   1, a, i, then repeat. Same in the editor and everywhere the text is shown. */
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) { margin: 0.1em 0; }
:is(.richtext, .rt-editor) :is(ul, ol) ul { list-style: circle; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) ul { list-style: square; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) ul { list-style: disc; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) ul { list-style: circle; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) ul { list-style: square; }
:is(.richtext, .rt-editor) :is(ul, ol) ol { list-style: lower-alpha; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) ol { list-style: lower-roman; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) ol { list-style: decimal; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) ol { list-style: lower-alpha; }
:is(.richtext, .rt-editor) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) :is(ul, ol) ol { list-style: lower-roman; }

/* ---- lesson date + time picker (lesson_datetime macro): date flexes, the
   15-minute time select sits beside it and both wrap on a narrow screen ---- */
.lesson-dt .dt-row { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.lesson-dt .dt-row > input[type=date] { flex: 1 1 10rem; min-width: 0; }
.lesson-dt .dt-row > select { flex: 0 1 8rem; min-width: 6.5rem; }
.lesson-dt .dt-none { display: inline-flex; gap: var(--s-2); align-items: center; margin-top: var(--s-2); font-weight: normal; cursor: pointer; }
.lesson-dt .dt-none input { width: auto; margin: 0; }
.lesson-dt.is-none .dt-row { opacity: .45; }

/* ---- search box: the magnifier sits INSIDE the input, centred on the input.
   Markup (search_box() macro):
     <div class="search"><svg …></svg><input type="search" …></div>
   The wrapper contains ONLY the icon and the input, never a label. ---- */
.search { position: relative; min-width: 0; }
.search input[type=search] { display: block; padding-left: 2.3rem; }
.search > svg, .search > .search-ic {
  position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--grey); pointer-events: none;
}
/* rounded variant (woordenlijst): `.search.round`; `.search.pill` is accepted
   too and neutralises the badge rules of the shared .pill class */
.search.pill, .search.round { display: block; padding: 0; background: transparent; border-radius: 0; white-space: normal; font-size: inherit; font-weight: inherit; }
.search.pill input[type=search], .search.round input[type=search] { border-radius: var(--radius-pill); background: var(--grey-light); padding-left: 2.5rem; }
.search.pill input[type=search]:focus, .search.round input[type=search]:focus { background: var(--white); }
.search.pill > svg, .search.round > svg { left: 0.95rem; }
/* legacy alias: an icon drawn with ::before, anchored to the BOTTOM so it stays
   centred on the input even when a .lab sits above it inside a label.field */
.searchbar { position: relative; }
.searchbar input[type=search] { padding-left: 2.3rem; }
.searchbar::before {
  content: ""; position: absolute; left: 0.8rem; bottom: calc(var(--control-h) / 2); transform: translateY(50%);
  width: 16px; height: 16px; pointer-events: none; opacity: 0.8;
  background: no-repeat center / 16px 16px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367686a' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
}
label.field.searchbar { margin-bottom: var(--s-3); }

/* ---- readonly rendered markdown-ish box ---- */
.mdbox { background: var(--grey-light); border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3); font-size: 0.92rem; overflow-wrap: anywhere; }
.mdbox p:last-child { margin-bottom: 0; }

/* ---- toggle switch ---- */
.switch { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; user-select: none; font-size: var(--fs-sm); }
.switch .track {
  width: 40px; height: 22px; border-radius: var(--radius-pill);
  background: var(--grey-mid); position: relative; transition: background 0.15s ease; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: var(--white); border-radius: 50%; transition: left 0.15s ease;
}
.switch.on .track { background: var(--green); }
.switch.on .track::after { left: 20px; }
.switch .state { font-weight: 600; }

/* ---- rating selector 1-5 + read-only dots ---- */
.rating { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.rating .dot {
  position: relative;
  border: 1px solid var(--grey-line); border-radius: var(--radius-sm); padding: 0.35rem 0.5rem;
  text-align: center; cursor: pointer; min-width: 3.2rem; background: var(--white); font-size: 0.78rem; line-height: 1.25;
}
.rating .dot .n { display: block; font-weight: 700; font-size: 1.05rem; font-family: var(--font-head); }
.rating .dot.sel, .rating .dot:has(> input:checked) { background: var(--blue-grey); color: var(--white); border-color: var(--blue-grey); }
.rating .dot input:focus-visible + .n { outline: 2px solid var(--blue-grey); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-line); display: inline-block; }
.dots i.f { background: var(--blue-grey); }

/* ---- tabs (buttons or links) ---- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--grey-line); margin-bottom: var(--s-4); flex-wrap: wrap; }
.tabs .tab {
  display: inline-block; padding: var(--s-2) var(--s-4); cursor: pointer; border: none; background: none; font-family: var(--font-body);
  font-size: var(--fs-md); font-weight: 600; color: var(--grey); border-bottom: 3px solid transparent; margin-bottom: -1px;
  text-decoration: none; line-height: var(--lh);
}
.tabs .tab:hover { color: var(--black); }
.tabs .tab.active { color: var(--black); border-bottom-color: var(--burnt-orange); }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ---- data tables ---- */
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--grey-line); vertical-align: middle; }
table.data th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); font-weight: 600; }
table.data tbody tr:hover td { background: var(--row-hover); }
table.data a { text-decoration: none; font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tr.highlight td { background: var(--yellow-soft); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- lists / rows ---- */
.listrow {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--grey-line); flex-wrap: wrap;
}
.listrow:last-child { border-bottom: none; }
.listrow .main { min-width: 0; flex: 1 1 200px; }
.listrow .main .t { font-weight: 600; }
.listrow .main a { text-decoration: none; }
.listrow .main a:hover { text-decoration: underline; }
.listrow.hidden-row { display: none; }
.listrow .side { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }

/* file row (legacy; the material tile replaces it on most pages) */
.file {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--grey-line); border-radius: var(--radius-sm); margin-bottom: var(--s-2); background: var(--white);
}
.file .ic { width: 1.6rem; text-align: center; flex: none; }
.file .fn { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.file .meta { color: var(--grey); font-size: var(--fs-xs); }

/* drag-order rows (lesson plans) */
.dragrow { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border: 1px solid var(--grey-line); border-radius: var(--radius-sm); margin-bottom: var(--s-2); background: var(--white); flex-wrap: wrap; }
.draghandle { color: var(--grey-mid); cursor: grab; font-size: 1.1rem; line-height: 1; flex: none; }
.dragrow .num { font-family: var(--font-head); font-weight: 700; color: var(--burnt-orange); min-width: 3rem; }
.dragrow .main { flex: 1 1 200px; min-width: 0; }

/* ---- material tile: one clickable card = the primary file ----
   Markup (material_tile() macro):
     admin:   <div class="tile-wrap has-icons">
                <div class="tile-icons"> type pill, share </div>
                <a class="tile" href=detail page> .title </a>
     student: <div class="tile-wrap">
                <a class="tile" href=… download="file.pdf" title="file.pdf"> .title .pills .meta </a>
     </div>
   A tile without a file is a <div class="tile">. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-3); }
.tile-wrap {
  position: relative;
  display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* top-right of an admin material tile: the type pill, the share-with-a-student icon */
.tile-icons { position: absolute; top: 6px; right: 6px; z-index: 1; display: flex; gap: var(--s-1); }
.tile-share {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  color: var(--grey); background: var(--white); border: 1px solid var(--grey-line);
}
.tile-share:hover { color: var(--black); border-color: var(--blue-grey); }
.tile-wrap.has-icons > .tile { padding-right: calc(var(--s-3) + 64px); }
/* Admin tiles: as low as their content, a tall neighbour stretches nobody. */
.tiles-compact { gap: var(--s-2); align-items: start; }
.tiles-compact .tile { padding-top: var(--s-2); padding-bottom: var(--s-2); }
/* The icon line has one height with or without a share icon, so the pill sits in the
   same place on every tile. The title keeps out of the room for the widest pill. */
.tiles-compact .tile-icons { top: 4px; right: 4px; min-height: 28px; align-items: center; pointer-events: none; }
.tiles-compact .tile-share { pointer-events: auto; }
.tiles-compact .tile-wrap.has-icons > .tile { padding-right: 108px; }
.tiles-compact .tile-wrap.no-share > .tile { padding-right: 76px; }
.tile-type { font-size: 0.62rem; line-height: 1.3; padding: 0 0.35rem; pointer-events: none; }
.tile-wrap:hover { border-color: var(--blue-grey); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.tile {
  display: block; flex: 1 1 auto; min-width: 0;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius);
  padding: var(--s-3) var(--s-4); color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tile-wrap > .tile { border: none; border-radius: var(--radius) var(--radius) 0 0; }
.tile-wrap > .tile:last-child { border-radius: var(--radius); }
a.tile:hover { border-color: var(--blue-grey); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.tile-wrap > a.tile:hover { box-shadow: none; }
.tile .title { font-weight: 600; line-height: var(--lh-tight); display: flex; gap: var(--s-2); align-items: flex-start; }
.tile .title .ic { flex: none; opacity: 0.8; }
.tile .pills { margin-top: var(--s-2); }
.tile .meta { display: block; margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--grey); }
a.tile .title { color: var(--black); }
a.tile:hover .title { text-decoration: underline; }
/* Inline image preview (tiles + material detail): scales down, never overflows. */
.img-preview { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.tile-image .img-preview { margin-bottom: var(--s-2); }
/* Material detail, Bestand card: the name, the Download button and the copy icon
   sit together; an image preview goes under them. */
.file-row { padding: var(--s-2) 0; border-bottom: 1px solid var(--grey-line); }
.file-row:last-child { border-bottom: none; }
.file-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.file-head .t { font-weight: 600; }
.file-head .file-name { min-width: 0; overflow-wrap: anywhere; }
.file-row .img-preview { margin-top: var(--s-2); }
/* Enlarged image (static/lightbox.js): the whole screen, the page dark behind it. */
a[data-lightbox] { cursor: zoom-in; }
html.lightbox-open, html.lightbox-open body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; overflow: hidden; cursor: zoom-out;
}
.lightbox[open] { display: block; }
.lightbox::backdrop { background: #000; }
.lightbox img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute; top: var(--s-2); right: var(--s-2); width: 36px; height: 36px; padding: 0;
  font-size: 1.5rem; line-height: 1; color: var(--white); cursor: pointer;
  background: rgba(0, 0, 0, 0.55); border: 0; border-radius: 50%;
}
.prompt-box { display: flex; align-items: flex-start; gap: var(--s-2); }
.prompt-box textarea { flex: 1 1 auto; min-width: 0; }
.prompt-text { flex: 1 1 auto; min-width: 0; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.copy-wrap { position: relative; flex: none; display: inline-flex; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; cursor: pointer; border-radius: var(--radius-sm);
  color: var(--grey); background: var(--white); border: 1px solid var(--grey-line);
}
.copy-btn:hover { color: var(--black); border-color: var(--blue-grey); }
/* Floats under the icon, so nothing around it moves when it appears: centred, or
   lined up with the icon's right edge where that sits at the edge of the card. */
.copy-done {
  position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); z-index: 1;
  padding: 0 var(--s-1); white-space: nowrap; font-size: var(--fs-xs); color: var(--grey);
  background: var(--white); border-radius: var(--radius-sm);
}
.prompt-box .copy-done { left: auto; right: 0; transform: none; }
.copy-done[hidden] { display: none; }
.field[hidden], .field input[hidden], .field select[hidden] { display: none; }
/* Secondary "extra info" links under a tile (a file's website link, or a
   link-only material's additional links). */
.tile-extra {
  display: flex; flex-direction: column; gap: var(--s-1);
  padding: var(--s-2) var(--s-4); border-top: 1px solid var(--grey-line);
  font-size: var(--fs-xs);
}
.tile-extra a { color: var(--blue-grey); text-decoration: none; font-weight: 600; }
.tile-extra a:hover { color: var(--black); text-decoration: underline; }
/* Student Materialen tiles only: beige block + orange type tag (admin unaffected). */
.student-mats .tile { background: var(--creme); }
.student-mats a.tile .title { color: var(--black); }
.student-mats .pill.type { background: var(--burnt-orange); color: var(--white); }

/* ---- empty state ---- */
.empty { text-align: center; padding: var(--s-4); color: var(--grey); font-size: var(--fs-md); }
.empty.dashed { border: 1px dashed var(--grey-line); border-radius: var(--radius); }

/* ---- callouts ---- */
.callout {
  border-left: 4px solid var(--burnt-orange); background: var(--orange-soft);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); margin-bottom: var(--s-3);
}
.callout.info { border-left-color: var(--blue-grey); background: var(--blue-grey-soft); }
.callout.success { border-left-color: var(--green); background: var(--green-tint); }
.note-carry { border-left-color: var(--yellow); background: var(--yellow-soft); }
.callout .spread { gap: var(--s-2) var(--s-3); }

/* ---- collapsible panel: <details class="card panel"> with a card-title summary ---- */
details.panel > summary {
  cursor: pointer; font-weight: 700; font-family: var(--font-head); letter-spacing: -0.02em;
  font-size: 1.05rem; list-style: none; display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: "\25B8"; color: var(--grey); font-size: 0.9rem; }
details.panel[open] > summary::before { content: "\25BE"; }
details.panel > summary .muted { font-weight: 400; letter-spacing: 0; }

/* ---- top-right "Les verzetten" corner edit: a small button that reveals a
   floating panel holding the reschedule/header form ---- */
.corner-edit { position: relative; }
.corner-edit > summary { list-style: none; }
.corner-edit > summary::-webkit-details-marker { display: none; }
.corner-edit > summary::marker { content: ""; }
.corner-edit > .corner-edit-panel {
  position: absolute; top: calc(100% + var(--s-2)); right: 0; z-index: 30;
  width: min(460px, 92vw); text-align: left;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

/* several corner buttons side by side (e.g. lesplan: Bewerken / Toewijzen /
   Kopieer): the group is the positioning box, so every panel opens against
   the same right edge instead of under its own button */
.corner-edit-group { position: relative; display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.corner-edit-group > .corner-edit { position: static; }
@media (max-width: 820px) {
  .corner-edit-group { width: 100%; }
  .corner-edit-group > .corner-edit > .corner-edit-panel { left: 0; right: auto; width: min(460px, 100%); }
}
@media (max-width: 480px) {
  /* stays a floating panel (full width of the group) so the buttons keep their row */
  .corner-edit-group > .corner-edit { width: auto; }
  .corner-edit-group > .corner-edit > .corner-edit-panel {
    position: absolute; top: calc(100% + var(--s-2)); left: 0; right: 0; width: auto; margin-top: 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  }
}

/* ---- native dialog ---- */
dialog.dialog {
  border: none; border-radius: var(--radius); padding: var(--s-4);
  max-width: 560px; width: calc(100% - 2 * var(--s-4));
  background: var(--white); color: var(--black);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
dialog.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
/* opened by the server (e.g. ?nieuw=1) without JS the dialog is not modal:
   show it as an inline card at the top of the page instead of an absolute box */
dialog.dialog[open]:not(:modal) {
  position: relative; max-width: none; width: 100%;
  margin: 0 0 var(--s-4); box-shadow: none; border: 1px solid var(--grey-line);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.dialog-head h2, .dialog-head h3 { margin: 0; }
.dialog-body { max-height: 60vh; overflow: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }

/* ---- edit-mode pattern ----
   A wrapper toggles the `data-editmode` attribute (JS: el.toggleAttribute(...)).
   `.view-only` shows outside edit mode, `.edit-only` inside it. `display: revert`
   restores the element's own default (block for div, table-row for tr, …);
   add `.inline` / `.flex` for elements whose normal display is not the default.
   Buttons are covered too: `.btn.edit-only` and `.btn.icon.edit-only` outrank
   the button's own display rules, so a bare button can carry the class. */
.edit-only, .btn.edit-only, .btn.icon.edit-only { display: none; }
[data-editmode] .view-only, [data-editmode] .btn.view-only, [data-editmode] .btn.icon.view-only { display: none; }
[data-editmode] .edit-only { display: revert; }
[data-editmode] .edit-only.inline { display: inline; }
[data-editmode] .edit-only.flex { display: flex; }
[data-editmode] .btn.edit-only { display: inline-block; }
[data-editmode] .btn.icon.edit-only { display: inline-flex; }

/* ---- calendar: month grid + phone day-list ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.cal-head .month { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); margin: 0 var(--s-2); }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: var(--s-1) var(--s-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.03em; color: var(--grey); text-align: left; }
.cal td { border: 1px solid var(--grey-line); vertical-align: top; height: 4.6rem; padding: var(--s-1); }
.cal td .d { font-size: var(--fs-xs); color: var(--grey); display: block; }
.cal td.out { background: var(--row-hover); }
.cal td.out .d { color: var(--grey-mid); }
.cal td.today { outline: 2px solid var(--burnt-orange); outline-offset: -2px; }
.cal td.today .d { color: var(--burnt-orange); font-weight: 700; }
.ev {
  display: block; font-size: 0.74rem; padding: 0.12rem 0.4rem; border-radius: 6px; margin-top: 2px;
  text-decoration: none; color: var(--black); background: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev.adib { background: var(--pink); }
.ev.sofia { background: var(--green-soft); }
.ev.future { opacity: 0.6; border: 1px dashed var(--grey-mid); background: var(--white); }
/* cancelled ("geannuleerd") class: greyed out + struck through, with a small
   Annuleren / Herstel action beneath it. */
.ev-wrap { display: block; margin-top: 2px; }
.ev-wrap .ev { margin-top: 0; }
.ev.cancelled { opacity: 0.55; text-decoration: line-through; background: var(--row-hover); color: var(--grey); border: 1px solid var(--grey-line); }
.ev-tag { display: inline-block; font-size: var(--fs-xs); color: var(--grey); text-transform: uppercase; letter-spacing: 0.03em; }
.ev-actform { display: inline; margin: 0; }
.ev-act { background: none; border: none; padding: 0; font-size: var(--fs-xs); color: var(--grey); cursor: pointer; text-decoration: underline; }
.ev-act:hover { color: var(--black); }
/* per-student colour cycle c0..c7 (events + legend swatches) */
.ev.c0, .sw.c0 { background: var(--pink); color: var(--black); }
.ev.c1, .sw.c1 { background: var(--green-soft); color: #06381d; }
.ev.c2, .sw.c2 { background: var(--yellow); color: var(--black); }
.ev.c3, .sw.c3 { background: var(--blue-grey); color: var(--white); }
.ev.c4, .sw.c4 { background: var(--creme); color: var(--black); }
.ev.c5, .sw.c5 { background: #cbb4e6; color: var(--black); }
.ev.c6, .sw.c6 { background: #a8d5ff; color: var(--black); }
.ev.c7, .sw.c7 { background: #f5b3b3; color: var(--black); }
.callegend { display: flex; gap: var(--s-2) var(--s-4); flex-wrap: wrap; font-size: var(--fs-xs); margin-top: var(--s-2); color: var(--grey); }
.callegend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.callegend .sw { width: 0.9rem; height: 0.9rem; border-radius: 4px; display: inline-block; }
.callegend .sw.future { background: var(--white); border: 1px dashed var(--grey-mid); }
/* day list (phones): <div class="cal-list"><div class="day"><span class="d">ma 3 mrt</span> <a class="ev …">…</a></div>… */
.cal-list { display: block; }
.cal-list .day { display: flex; gap: var(--s-2) var(--s-3); align-items: flex-start; padding: var(--s-2) 0; border-bottom: 1px solid var(--grey-line); flex-wrap: wrap; }
.cal-list .day:last-child { border-bottom: none; }
.cal-list .day .d { flex: 0 0 6.5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--grey); }
.cal-list .day.today .d { color: var(--burnt-orange); }
.cal-list .day .evs { flex: 1 1 10rem; display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.cal-list .ev { font-size: var(--fs-sm); padding: 0.2rem 0.6rem; margin: 0; white-space: normal; }
/* .cal-wrap holds both views; the grid shows on desktop, the list on phones */
.cal-wrap .cal-list { display: none; }

/* day-select: pick a day for a new les (JS highlights it + points the top
   "+ Nieuwe les" button at it); each day also carries its own "+ les" link. */
.cal td.selday { cursor: pointer; }
.cal td.selday:hover { background: var(--row-hover); }
.cal td.sel-day { outline: 2px solid var(--burnt-orange); outline-offset: -2px; background: var(--creme); }
.cal-list .day.selday { cursor: pointer; }
.day-new { display: inline-block; margin-top: 2px; font-size: var(--fs-xs); color: var(--burnt-orange); text-decoration: none; opacity: 0; transition: opacity 0.1s; }
.cal td:hover .day-new, .cal td.sel-day .day-new, .day-new:focus { opacity: 1; }
.day-new:hover { text-decoration: underline; }
.cal-list .day .day-new { opacity: 1; flex: 0 0 auto; align-self: center; }
.sel-hint { font-size: var(--fs-sm); color: var(--grey); align-self: center; }

/* ---- footer ---- */
footer.portal { max-width: var(--maxw); margin: 0 auto; padding: var(--s-5) var(--s-4) var(--s-6); color: var(--grey); font-size: var(--fs-xs); border-top: 1px solid var(--grey-line); }

/* =========================================================================
   6. PAGE MODULES
   ========================================================================= */

/* ---- woordenlijst (.wl) ----
   Wrapper: <div id="wl" class="wl">. The JS builds the rows itself with the
   .wlrow/.term/.lid/.woord/.trans/.meta/.wltag/.lvl classes and toggles
   .study on the wrapper, .reveal on a row, .on on the study button and
   resets #state's className to "state" / "state err" — so those names stay. */
.wl-hero { background: var(--burnt-orange); color: var(--black); text-align: center; padding: var(--s-5) var(--s-4); border-radius: var(--radius); margin-bottom: var(--s-4); }
.wl-hero h1 { margin: 0 auto var(--s-1); max-width: 14em; }
.wl-hero p { font-size: 1.05rem; margin: 0 auto; max-width: 34em; }
.wl-toolbar { position: sticky; top: calc(var(--nav-h) + var(--banner-h, 0px)); z-index: 5; background: var(--white); padding: var(--s-2) 0 var(--s-3); border-bottom: 1px solid var(--grey-line); }
.wl-toolbar .search { margin-bottom: var(--s-2); }
.wl-selects { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.wl-selects .field { margin-bottom: 0; }
.wl-selects .field > .lab { font-size: var(--fs-xs); color: var(--grey); font-weight: 500; }
.wl-statusbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin: var(--s-3) 0 var(--s-2); }
.wl-count { color: var(--grey); font-size: var(--fs-md); }
.wl-count b { color: var(--black); }
.wl-controls { display: flex; gap: var(--s-2); align-items: center; }
.wl-pill { font: inherit; font-size: var(--fs-sm); padding: 0.45rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--grey-line); background: var(--white); cursor: pointer; font-weight: 500; color: var(--black); }
.wl-pill:hover { background: var(--creme-hover); }
.wl-pill.on { background: var(--blue-grey); border-color: var(--blue-grey); color: var(--white); }
.wl-pill.more { margin: var(--s-4) auto 0; display: block; }
.wl-pill.more[hidden], .wl [hidden] { display: none; }
.wl-list { display: flex; flex-direction: column; gap: var(--s-2); }
.wl .wlrow { display: grid; grid-template-columns: 1.5fr 1.3fr auto; gap: var(--s-3); align-items: center; background: var(--grey-light); border-radius: var(--radius); padding: var(--s-2) var(--s-4); }
.wl .term { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; min-width: 0; }
.wl .lid { font-size: 0.72rem; padding: 0.05rem 0.45rem; border-radius: 5px; background: var(--grey-line); color: var(--grey); }
.wl .lid.de { background: var(--white); color: var(--blue-grey); border: 1px solid var(--blue-grey); }
.wl .lid.het { background: var(--creme); color: var(--burnt-orange); }
.wl .woord { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.wl .trans { color: var(--grey); font-size: 0.98rem; min-width: 0; transition: filter 0.15s; overflow-wrap: anywhere; }
.wl.study .trans { filter: blur(5px); cursor: pointer; }
.wl.study .wlrow.reveal .trans { filter: none; }
.wl .meta { display: flex; gap: 0.35rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
/* Les Woordenschat (Marin 2026-10-23): word + translation only; the bin column
   has a fixed width so translations line up whether a row has a bin or not. */
.wl .wl-les .wlrow { grid-template-columns: 1.5fr 1.3fr 2.5rem; }
/* Admin les Woordenschat in the same look as the student les rows (Marin
   2026-10-23): white row, thin border, orange outlined de pill, pale filled het
   pill. Values are the website palette (body.student-theme --pub-*), written out
   because the admin page does not carry those variables. */
body:not(.student-theme) .wl .wl-les .wlrow { background: oklch(.991 .003 100); border: 1px solid oklch(.89 .009 95); border-radius: 8px; }
body:not(.student-theme) .wl .wl-les .trans { color: oklch(.49 .014 255); }
body:not(.student-theme) .wl .wl-les .lid.de { color: oklch(.68 .18 40); border: 1px solid oklch(.68 .18 40); background: oklch(.991 .003 100); }
body:not(.student-theme) .wl .wl-les .lid.het { color: oklch(.68 .18 40); background: oklch(.949 .023 68); }
body:not(.student-theme) .wl .wl-les .wl-remove { background: oklch(.991 .003 100); border-color: oklch(.89 .009 95); color: oklch(.68 .18 40); }
.wl .wltag { font-size: 0.68rem; padding: 0.1rem 0.5rem; border-radius: var(--radius-pill); background: var(--grey-line); color: var(--grey); white-space: nowrap; }
.wl .wltag.th { background: var(--creme); color: var(--burnt-orange); }
.wl .lvl { font-weight: 600; color: var(--black); }
.wl .lvl.A1 { background: var(--yellow); }
.wl .lvl.A2 { background: var(--pink); }
.wl .lvl.B1 { background: var(--green-soft); color: #00351a; }
.wl .lvl.B2 { background: var(--blue-grey); color: var(--white); }
.wl .state { text-align: center; padding: var(--s-6) var(--s-4); color: var(--grey); }
.wl .state.err { color: var(--burnt-orange); }

/* Mijn woorden: per-row save (master list) + remove (own list) actions, and the
   "Eigen woord toevoegen" form. */
.wl .wl-save, .wl .wl-remove { font: inherit; font-size: 0.72rem; font-weight: 600;
  padding: 0.12rem 0.6rem; border-radius: var(--radius-pill); border: 1px solid var(--grey-line);
  background: var(--white); color: var(--black); cursor: pointer; white-space: nowrap; }
.wl .wl-save:hover, .wl .wl-remove:hover { background: var(--creme-hover); }
.wl .wl-save.on { background: var(--green-soft); border-color: var(--green-soft); color: #00351a; }
.wl .wl-remove { color: var(--burnt-orange); border-color: var(--creme); }
.wl .wl-save:disabled, .wl .wl-remove:disabled { opacity: 0.5; cursor: default; }
.wl-addform { background: var(--grey-light); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); }
.wl-addform[hidden] { display: none; }
.wl-addgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2) var(--s-3); }
.wl-addgrid .field { margin-bottom: 0; }
.wl-addform .btn-row { margin-top: var(--s-3); }
.wl-addgrid .field > .lab { font-size: var(--fs-xs); color: var(--grey); font-weight: 500; }
.wl-addactions { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.wl-adderr { color: var(--burnt-orange); font-size: var(--fs-sm); }
.wl-adderr[hidden] { display: none; }

/* Woordkaarten: the shared flashcard-practice overlay (_woordkaarten.html).
   One box in the middle of the screen (start box, card or "Klaar!"), with the
   ✓/✗ or the typing field and a very small close button just below it. */
.wk { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; padding: var(--s-4); }
.wk[hidden] { display: none; }
body.wk-open { overflow: hidden; }
.wk-dialog { width: 100%; max-width: 30rem; display: flex; flex-direction: column; gap: var(--s-2); }
.wk-slot { width: 100%; }
.wk-slot > [hidden] { display: none; }
.wk-card { font: inherit; width: 100%; min-height: 12rem; background: var(--white); color: var(--black);
  border: 1px solid var(--grey-line); border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: var(--s-5) var(--s-4); }
.wk-card.noflip, .wk-donecard { cursor: default; }
.wk-card.flipped { background: var(--creme); }
.wk-card.wrong { border-color: #c62828; }
.wk-face { font-size: 1.6rem; font-weight: 600; overflow-wrap: anywhere; }
.wk-face[hidden] { display: none; }
.wk-back { color: var(--burnt-orange); }
/* typed answer right but de/het wrong: plain answer, article in bold orange */
.wk-card.lid.flipped { background: var(--white); border-color: var(--burnt-orange); }
.wk-card.lid .wk-back { color: var(--black); }
.wk-lid { color: var(--burnt-orange); font-weight: 800; text-decoration: underline;
  text-decoration-thickness: 3px; text-underline-offset: 0.2em; }

/* start box */
.wk-start { min-height: 12rem; display: flex; flex-direction: column; justify-content: center; gap: var(--s-3);
  background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: var(--s-4); }
.wk-opt { display: flex; align-items: center; justify-content: center; gap: var(--s-3); }
.wk-opt-lab { font-weight: 600; }
.wk-choices { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; }
.wk-choices .wl-pill { background: var(--white); }
.wk-choices .wl-pill.on { background: var(--burnt-orange); color: var(--white); border-color: var(--burnt-orange); }
.wk-toggle { position: relative; width: 3rem; height: 1.6rem; border-radius: 1rem; border: 1px solid var(--grey-line);
  background: var(--grey-line); cursor: pointer; padding: 0; flex: 0 0 auto; transition: background .15s; }
.wk-toggle .wk-knob { position: absolute; top: 2px; left: 2px; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--white); transition: left .15s; }
.wk-toggle.on { background: var(--burnt-orange); border-color: var(--burnt-orange); }
.wk-toggle.on .wk-knob { left: calc(100% - 1.2rem - 2px); }
.wk-startbtn { align-self: stretch; background: var(--burnt-orange); color: var(--white); border-color: var(--burnt-orange); }

/* below the box: ✓/✗ or the typing field, centred; the small close at the right */
.wk-under { position: relative; min-height: 2.6rem; display: flex; align-items: center; justify-content: center;
  padding: 0 2.25rem; }
.wk-under > [hidden] { display: none; }
.wk-mark { display: flex; gap: var(--s-3); justify-content: center; }
.wk-mark-btn { font: inherit; font-size: 1.3rem; line-height: 1; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; border: 1px solid var(--burnt-orange); background: var(--white);
  color: var(--burnt-orange); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wk-type { display: flex; width: 100%; }
.wk-input { flex: 1 1 auto; min-width: 0; font: inherit; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--grey-line); border-radius: var(--radius); background: var(--white); color: var(--black); }
.wk-input.bad { border-color: #c62828; }
.wk-close { position: absolute; right: 0; top: 0; font: inherit; font-size: 1rem; line-height: 1;
  width: 1.5rem; height: 1.5rem; padding: 0; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.85); color: var(--black); cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: .8; }
.wk-close:hover { opacity: 1; }

/* ---- login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s-6) var(--s-4); background: var(--creme-soft); }
.login-card { background: var(--white); border-radius: var(--radius); padding: var(--s-6); width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06); }
.login-card h1 { text-align: center; }
.login-brand-tag { text-align: center; color: var(--grey); margin-bottom: var(--s-4); }
.oauth-sep { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-4) 0; color: var(--grey); font-size: var(--fs-xs); }
.oauth-sep::before, .oauth-sep::after { content: ""; height: 1px; background: var(--grey-line); flex: 1 1 auto; }
.oauth-btn-row { display: flex; gap: var(--s-2); }
.oauth-btn-row .btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); }
.forgot { background: none; border: none; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---- printable invoice ---- */
.invoice-wrap { max-width: 720px; margin: 0 auto; padding: var(--s-6) var(--s-4) var(--s-6); }
.invoice {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: 2.5rem 2.5rem 2rem;
}
.invoice .inv-top { display: flex; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; align-items: flex-start; }
.invoice .inv-top .brand { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--black); }
.invoice .inv-top .brand-logo { width: 48px; height: 48px; flex: none; }   /* the round logo mark, next to the name */
.invoice .inv-meta { text-align: right; font-size: 0.9rem; }
.invoice .inv-meta .num { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.invoice .parties { display: flex; gap: var(--s-6); flex-wrap: wrap; margin: var(--s-5) 0; }
.invoice .parties .party { flex: 1 1 220px; }
.invoice .parties .lab { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); font-weight: 600; margin-bottom: var(--s-1); }
.invoice table.lines { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: var(--s-2); }
.invoice table.lines th, .invoice table.lines td { padding: var(--s-2) var(--s-2); border-bottom: 1px solid var(--grey-line); text-align: left; }
.invoice table.lines th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); }
.invoice table.lines td.num, .invoice table.lines th.num { text-align: right; white-space: nowrap; }
.invoice table.lines tfoot td { border-bottom: none; font-weight: 700; padding-top: var(--s-3); }
.invoice table.lines tfoot td.num { font-size: 1.1rem; }
.invoice .inv-foot { margin-top: var(--s-5); font-size: var(--fs-xs); color: var(--grey); }

/* =========================================================================
   7. RESPONSIVE
   ========================================================================= */
/* nav: drop the "portaal"/"student" tag first, then collapse at ≤ 900px (the
   nine admin links do not fit beside the brand on an iPad in landscape) */
@media (max-width: 1100px) {
  .nav-brand .tag { display: none; }
}
@media (max-width: 900px) {
  /* nav collapses behind the burger; the checkbox toggle needs no JS */
  .nav-burger { display: inline-flex; }
  .nav-brand .tag { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: var(--s-2) var(--s-4) var(--s-3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  nav.portalnav.admin .nav-links { background: var(--creme); }
  nav.portalnav.student .nav-links { background: var(--blue-grey); }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-links a { padding: var(--s-2) var(--s-3); font-size: var(--fs-md); white-space: normal; }
}

@media (max-width: 820px) {
  .form-grid { grid-template-columns: 1fr; }
  .wl-selects { grid-template-columns: 1fr 1fr; }
  .wl-addgrid { grid-template-columns: 1fr 1fr; }
  .cal td { height: 3.2rem; padding: 2px 3px; }
  .cal th { padding: var(--s-1) 3px; }
  .ev { font-size: 0.68rem; padding: 0.1rem 0.3rem; white-space: normal; overflow-wrap: anywhere; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .invoice { padding: var(--s-5) var(--s-4); }
}

@media (max-width: 480px) {
  main { padding: var(--s-3) var(--s-3) var(--s-6); }
  h1 { font-size: 1.35rem; }
  .card { padding: var(--s-3); }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .filters { gap: var(--s-3); }

  /* full-width button stacks */
  .btn-row.stack { flex-direction: column; align-items: stretch; }
  .btn-row.stack .btn { display: block; width: 100%; }

  /* corner edit panel flows as a normal block on narrow screens */
  .corner-edit { position: static; width: 100%; }
  .corner-edit > .corner-edit-panel {
    position: static; width: 100%; margin-top: var(--s-2); box-shadow: none;
  }

  /* stacked data tables: each cell becomes "label · value" */
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { border-bottom: 1px solid var(--grey-line); padding: var(--s-2) 0; }
  table.data.stack td { display: flex; gap: var(--s-2); padding: 2px 0; border-bottom: none; text-align: left; }
  table.data.stack td.num { text-align: left; white-space: normal; }
  table.data.stack td::before { content: attr(data-label); flex: 0 0 36%; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); font-weight: 600; padding-top: 2px; }
  table.data.stack td:not([data-label])::before { content: none; }
  table.data.stack tbody tr:hover td { background: transparent; }
  /* the total row keeps only its labelled amount cell */
  table.data.stack tfoot { display: block; }
  table.data.stack tfoot td.foot-label { display: none; }
  table.data.stack tfoot td[data-label] { font-weight: 700; }

  /* calendar: day list instead of the 7-column grid */
  .cal-wrap .cal { display: none; }
  .cal-wrap .cal-list { display: block; }
  .cal-list .day .d { flex-basis: 100%; }

  /* woordenlijst rows: word + translation stacked, tags on the right */
  .wl .wlrow, .wl .wl-les .wlrow { grid-template-columns: 1fr auto; padding: var(--s-2) var(--s-3); }
  .wl .trans { grid-column: 1; white-space: normal; }
  .wl .meta { grid-column: 2; grid-row: 1 / 3; flex-direction: column; align-items: flex-end; }
  .wl-hero { padding: var(--s-4) var(--s-3); }

  .page-head.has-actions, .page-head.spread { align-items: flex-start; }
  .rating .dot { flex: 1 1 0; min-width: 2.6rem; padding: 0.3rem 0.2rem; }
  dialog.dialog { padding: var(--s-3); }
  .listrow .side { width: 100%; }
}

/* =========================================================================
   9. STUDENT THEME  (the main-website "Lovable" look, student side only)
   -------------------------------------------------------------------------
   Scoped to `body.student-theme` (set by base.html whenever nav == "student"
   or a page passes student_theme, i.e. the admin "Bekijk als leerling"
   preview). Mirrors app/static/public/public.css: Figtree body + Outfit
   headings (loaded on student pages only), a warm near-white background, dark
   blue-grey text, a warm-orange primary, soft sky + leaf + cream accents,
   rounded corners and a soft floating shadow. The admin side carries none of
   this class, so nothing below ever touches it. Every rule here only RE-SKINS
   existing components — no markup, field names or JS hooks change.
   ========================================================================= */
body.student-theme {
  /* the website palette, verbatim from public.css */
  --pub-bg: oklch(.991 .003 100);
  --pub-fg: oklch(.245 .019 255);
  --pub-primary: oklch(.68 .18 40);
  --pub-primary-fg: oklch(1 0 0);
  --pub-secondary: oklch(.949 .023 68);
  --pub-muted: oklch(.96 .006 95);
  --pub-muted-fg: oklch(.49 .014 255);
  --pub-border: oklch(.89 .009 95);
  --pub-sky: oklch(.922 .038 235);
  --pub-leaf: oklch(.922 .045 135);
  --pub-shadow: 0 8px 28px oklch(.245 .019 255 / .1);
  --pub-radius-lg: 12px;
  --pub-radius-md: 8px;

  background: var(--pub-bg);
  color: var(--pub-fg);
  font-family: "Figtree", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
.student-theme h1, .student-theme h2, .student-theme h3, .student-theme h4 {
  font-family: "Outfit", system-ui, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  font-weight: 600;
}
.student-theme a { color: var(--pub-primary); }
.student-theme .muted,
.student-theme .page-head .crumb,
.student-theme .page-head .crumb a,
.student-theme .page-head .sub,
.student-theme .page-head p { color: var(--pub-muted-fg); }

/* ---- nav: the website's calm near-white header with orange accents ---- */
.student-theme nav.portalnav.student { background: var(--pub-bg); border-bottom: 1px solid var(--pub-border); }
.student-theme nav.portalnav.student .nav-brand { color: var(--pub-fg); }
.student-theme nav.portalnav.student .nav-brand .tag { background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme nav.portalnav.student .nav-links a { color: var(--pub-muted-fg); font-weight: 500; }
.student-theme nav.portalnav.student .nav-links a:hover { background: var(--pub-muted); color: var(--pub-primary); }
.student-theme nav.portalnav.student .nav-links a.active { background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme nav.portalnav.student .nav-burger { color: var(--pub-fg); }
.student-theme nav.portalnav.student .nav-burger:hover { background: var(--pub-muted); }

/* ---- tabs: orange active underline (website accent) ---- */
.student-theme .tabs { border-bottom-color: var(--pub-border); }
.student-theme .tabs .tab { color: var(--pub-muted-fg); }
.student-theme .tabs .tab:hover { color: var(--pub-fg); }
.student-theme .tabs .tab.active { color: var(--pub-fg); border-bottom-color: var(--pub-primary); }

/* ---- cards: rounded + soft floating shadow, warm surfaces ---- */
.student-theme .card {
  background: var(--pub-bg);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  box-shadow: var(--pub-shadow);
  padding: var(--s-4) var(--s-5);
}
.student-theme a.card:hover { box-shadow: 0 10px 32px oklch(.245 .019 255 / .14); }
.student-theme .card.tint-yellow { background: var(--pub-secondary); border-color: transparent; }
.student-theme .card.tint-creme { background: var(--pub-muted); border-color: transparent; box-shadow: none; }
.student-theme .card.tint-blue { background: var(--pub-sky); border-color: transparent; }
/* Tweak 1: the "Volgende les" empty-state in the website's warm orange. */
.student-theme .card.next-empty {
  background: var(--pub-primary);
  border-color: transparent;
  color: var(--pub-primary-fg);
  box-shadow: var(--pub-shadow);
}
.student-theme .card.next-empty h2 { color: var(--pub-primary-fg); }
.student-theme .card.next-empty p { color: var(--pub-primary-fg); opacity: .95; }

/* ---- list rows ---- */
.student-theme .listrow { border-bottom-color: var(--pub-border); }

/* ---- buttons: orange primary, cream default, outline ghost ---- */
.student-theme .btn {
  background: var(--pub-secondary);
  color: var(--pub-fg);
  border-radius: var(--pub-radius-md);
  font-family: "Figtree", system-ui, Arial, sans-serif;
}
.student-theme .btn:hover { background: var(--pub-secondary); filter: brightness(.96); }
.student-theme .btn.primary { background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme .btn.primary:hover { background: var(--pub-primary); filter: brightness(.94); }
.student-theme .btn.blue { background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme .btn.blue:hover { filter: brightness(.94); opacity: 1; }
.student-theme .btn.ghost { background: transparent; border-color: var(--pub-border); color: var(--pub-fg); }
.student-theme .btn.ghost:hover { background: var(--pub-muted); color: var(--pub-primary); }

/* ---- pills / badges ---- */
.student-theme .pill { background: var(--pub-muted); color: var(--pub-fg); }
.student-theme .pill.level { background: var(--pub-sky); color: var(--pub-fg); }
.student-theme .pill.ghost { background: transparent; border-color: var(--pub-border); color: var(--pub-muted-fg); }

/* ---- forms: rounded fields, orange focus ---- */
.student-theme input[type=text], .student-theme input[type=email],
.student-theme input[type=password], .student-theme input[type=search],
.student-theme input[type=date], .student-theme input[type=number],
.student-theme input[type=time], .student-theme input[type=url],
.student-theme select, .student-theme textarea {
  border-color: var(--pub-border);
  border-radius: var(--pub-radius-md);
  background: var(--pub-bg);
  color: var(--pub-fg);
}
.student-theme input:focus, .student-theme select:focus,
.student-theme textarea:focus, .student-theme button:focus-visible {
  outline-color: var(--pub-primary); border-color: var(--pub-primary);
}
.student-theme .search.round input[type=search],
.student-theme .search.pill input[type=search] { background: var(--pub-muted); }
.student-theme .search.round input[type=search]:focus,
.student-theme .search.pill input[type=search]:focus { background: var(--pub-bg); }

/* ---- material tiles: warm cream block, orange type tag ---- */
.student-theme .tile-wrap,
.student-theme .tile {
  border-color: var(--pub-border);
  border-radius: var(--pub-radius-md);
}
.student-theme .tile-wrap:hover,
.student-theme a.tile:hover { border-color: var(--pub-primary); box-shadow: var(--pub-shadow); }
.student-theme .student-mats .tile { background: var(--pub-secondary); }
.student-theme .student-mats .pill.type { background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme .tile-extra a { color: var(--pub-primary); }
.student-theme .tile-extra a:hover { color: var(--pub-fg); }
/* ---- note button + pop-up on a student material tile ----
   A small notepad icon top-right of the tile (only when the material has a
   student note and/or links) opens one shared <dialog> (static/note-dialog.js). */
.tile-note {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--burnt-orange); background: var(--white); border: 1px solid var(--grey-line);
}
.tile-note:hover { border-color: var(--burnt-orange); }
.tile-note:focus-visible { outline: 2px solid var(--burnt-orange); outline-offset: 2px; }
.tile-wrap.has-note > .tile { border-radius: inherit; padding-right: calc(var(--s-4) + 32px); }
.student-theme .tile-note { color: var(--pub-primary); background: var(--pub-bg); border-color: var(--pub-border); border-radius: var(--pub-radius-md); }
.student-theme .tile-note:hover { border-color: var(--pub-primary); background: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme .tile-note:focus-visible { outline-color: var(--pub-primary); }
.note-dialog {
  padding: 0; border: none; background: transparent;
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
.note-dialog::backdrop { background: oklch(.245 .019 255 / .45); }
.note-dialog-panel {
  position: relative; background: var(--pub-bg, #fff); color: var(--pub-fg, #222);
  border-radius: var(--pub-radius-lg, 12px);
  box-shadow: inset 0 4px 0 var(--pub-primary, #e0692b), var(--pub-shadow, 0 8px 28px rgba(0,0,0,.15));
  padding: var(--s-4) var(--s-5) var(--s-5);
  font-family: "Figtree", system-ui, Arial, sans-serif;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.note-dialog-title { margin: 0 40px var(--s-3) 0; font-size: var(--fs-lg, 1.25rem); }
.note-dialog-text { margin: 0 0 var(--s-3); white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; }
.note-dialog-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.note-dialog-links a { color: var(--pub-primary, #e0692b); font-weight: 600; overflow-wrap: anywhere; }
.note-dialog-links a:hover { color: var(--pub-fg, #222); }
.note-dialog-close {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; border-radius: var(--pub-radius-md, 8px);
  background: transparent; border: none; color: var(--pub-muted-fg, #666);
}
.note-dialog-close:hover { background: var(--pub-muted, #f3f3f3); color: var(--pub-primary, #e0692b); }
.note-dialog-close:focus-visible { outline: 2px solid var(--pub-primary, #e0692b); outline-offset: 2px; }
/* Student material grid (Materialen tab + class page): exactly 3 per row on a
   computer, 2 on a tablet, 1 on a phone. Each cell is one material-block (its
   tile(s) stacked, plus the teacher's note underneath). */
.mat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); align-items: start; }
.mat-grid > .material-block { min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.mat-grid > .material-block > .tiles { grid-template-columns: 1fr; }
.mat-grid > .material-block > .callout { margin-bottom: 0; }
@media (max-width: 900px) { .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mat-grid { grid-template-columns: 1fr; } }

/* ---- callouts ---- */
.student-theme .callout { border-left-color: var(--pub-primary); background: var(--pub-muted); }
.student-theme .callout.info { border-left-color: var(--pub-sky); background: var(--pub-sky); }

/* ---- empty state ---- */
.student-theme .empty { color: var(--pub-muted-fg); }

/* ---- calendar: warm grid lines + orange "today" ---- */
.student-theme .cal th { color: var(--pub-muted-fg); }
.student-theme .cal td { border-color: var(--pub-border); }
.student-theme .cal td.today { outline-color: var(--pub-primary); }
.student-theme .cal td.today .d { color: var(--pub-primary); }
.student-theme .cal-list .day { border-bottom-color: var(--pub-border); }
.student-theme .cal-list .day.today .d { color: var(--pub-primary); }
.student-theme .callegend { color: var(--pub-muted-fg); }

/* ---- woordenlijst module (.wl): orange hero, card-like rows ---- */
.student-theme .wl-hero {
  background: var(--pub-primary); color: var(--pub-primary-fg);
  border-radius: var(--pub-radius-lg); box-shadow: var(--pub-shadow);
}
.student-theme .wl-toolbar { background: var(--pub-bg); border-bottom-color: var(--pub-border); }
.student-theme .wl-selects .field > .lab { color: var(--pub-muted-fg); }
.student-theme .wl-count { color: var(--pub-muted-fg); }
.student-theme .wl-count b { color: var(--pub-fg); }
.student-theme .wl-pill {
  background: var(--pub-bg); border-color: var(--pub-border);
  color: var(--pub-fg); border-radius: var(--radius-pill);
}
.student-theme .wl-pill:hover { background: var(--pub-muted); }
.student-theme .wl-pill.on { background: var(--pub-primary); border-color: var(--pub-primary); color: var(--pub-primary-fg); }
.student-theme .wl .wlrow {
  background: var(--pub-bg); border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-md);
}
.student-theme .wl .trans { color: var(--pub-muted-fg); }
.student-theme .wl .wltag { background: var(--pub-muted); color: var(--pub-muted-fg); }
.student-theme .wl .wltag.th { background: var(--pub-secondary); color: var(--pub-primary); }
.student-theme .wl .lid.de { color: var(--pub-primary); border-color: var(--pub-primary); background: var(--pub-bg); }
.student-theme .wl .lid.het { background: var(--pub-secondary); color: var(--pub-primary); }
.student-theme .wl .wl-save, .student-theme .wl .wl-remove {
  background: var(--pub-bg); border-color: var(--pub-border); color: var(--pub-fg);
}
.student-theme .wl .wl-save:hover, .student-theme .wl .wl-remove:hover { background: var(--pub-muted); }
.student-theme .wl .wl-save.on { background: var(--pub-leaf); border-color: var(--pub-leaf); color: var(--pub-fg); }
.student-theme .wl .wl-remove { color: var(--pub-primary); border-color: var(--pub-border); }
.student-theme .wl-addform { background: var(--pub-muted); border-radius: var(--pub-radius-md); }
.student-theme .wl-addgrid .field > .lab { color: var(--pub-muted-fg); }
/* student les page (classes/student.html, Marin 2026-10-23): orange
   "Nieuwe grammatica" / "Woordenschat" headings and the small orange
   "Nieuw woord +" pill that opens the add-word form */
.student-theme h2.brand-h { color: var(--pub-primary); }
/* Student Grammatica block (2026-10-30): "We bespreken" / "Nieuw" sub-headings. */
.grammar-sub { font-size: 1rem; margin: 0 0 .25rem; }
.grammar-sub + .richtext { margin-bottom: 0; }
.richtext + .grammar-sub { margin-top: 1rem; }
.wl-newword-row { margin-top: var(--s-3); }
.wl-newword { font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 0.45rem 1rem;
  border-radius: var(--radius-pill); border: 1px solid var(--burnt-orange);
  background: var(--burnt-orange); color: var(--white); cursor: pointer; }
.student-theme .wl-newword { background: var(--pub-primary); border-color: var(--pub-primary); color: var(--pub-primary-fg); }
.wl-newword:hover { filter: brightness(.94); }

/* ---- flashcard overlay (_woordkaarten.html) ---- */
.student-theme .wk-card { border-color: var(--pub-border); border-radius: var(--pub-radius-lg); }
.student-theme .wk-card.flipped { background: var(--pub-secondary); }
.student-theme .wk-card.wrong { border-color: #c62828; }
.student-theme .wk-back { color: var(--pub-primary); }
.student-theme .wk-start { border-color: var(--pub-border); border-radius: var(--pub-radius-lg); }
.student-theme .wk-choices .wl-pill { background: var(--pub-bg); }
.student-theme .wk-mark-btn { background: var(--pub-bg); border-color: var(--pub-primary); color: var(--pub-primary); }
.student-theme .wk-choices .wl-pill.on,
.student-theme .wk-startbtn { background: var(--pub-primary); color: var(--white); border-color: var(--pub-primary); }
.student-theme .wk-toggle.on { background: var(--pub-primary); border-color: var(--pub-primary); }
.student-theme .wk-input { border-color: var(--pub-border); border-radius: var(--pub-radius-lg); }
.student-theme .wk-input.bad { border-color: #c62828; }

/* ---- invoices table (light touch; text unchanged) ---- */
.student-theme table.data th { color: var(--pub-muted-fg); }
.student-theme table.data th, .student-theme table.data td { border-bottom-color: var(--pub-border); }
.student-theme table.data tbody tr:hover td { background: var(--pub-muted); }

/* ---- header wordmark + footer copyright, as on the public website
   (rules copied from public.css .brand-word / .brand-dot / .footer-copy) ---- */
body.student-theme { --nav-h: 64px; }
.student-theme nav.portalnav.student .nav-brand.brand-word {
  display: block;
  font-family: "Outfit", system-ui, Arial, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: 0;
  white-space: normal;
  color: var(--pub-fg);
  text-decoration: none;
}
.student-theme .brand-dot { color: var(--pub-primary); }
.student-theme footer.portal.student-foot { border-top: 1px solid var(--pub-border); color: var(--pub-muted-fg); padding-block: var(--s-4); }
.student-theme .student-foot .footer-copy { font-size: 12px; color: var(--pub-muted-fg); margin: 0; }
.student-foot .footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12px; }
.student-foot .footer-links a { color: inherit; text-decoration: none; }
.student-foot .footer-links a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .student-theme nav.portalnav.student .nav-brand.brand-word { font-size: 22px; }
}

/* ---- student-theme responsive: the collapsed burger menu matches the header ---- */
@media (max-width: 900px) {
  .student-theme nav.portalnav.student .nav-links {
    background: var(--pub-bg);
    border-top: 1px solid var(--pub-border);
  }
}

/* =========================================================================
   8. PRINT
   ========================================================================= */
@media print {
  .demobar, nav.portalnav, .noprint, footer.portal, .nav-burger { display: none !important; }
  body { background: var(--white); }
  main { max-width: none; padding: 0; }
  .invoice-wrap { padding: 0; max-width: none; }
  .invoice { border: none; border-radius: 0; padding: 0; }
  a { color: var(--black); text-decoration: none; }
  .card { break-inside: avoid; }
}

/* =========================================================================
   Woordenlijst grid (admin, woordenlijst_grid.html) + Woordkaarten pages
   (woordkaarten/list|edit|detail.html)
   ========================================================================= */
.wg-import { display: contents; }
.wg-toolbar { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-3); }
.wg-toolbar .search { flex: 1 1 220px; max-width: 320px; }
.wg-toolbar select { width: auto; }
.wg-status { margin-left: auto; font-size: var(--fs-sm); color: var(--grey); }
.wg-saved { margin-left: var(--s-2); color: var(--green); }
.wg-saved.err { color: var(--burnt-orange); }
.wg-table { border: 1px solid var(--grey-line); font-size: var(--fs-sm); background: var(--white); }
.wg-table .tabulator-header { background: var(--grey-light); }
.wg-table .tabulator-cell { padding: 4px 8px; }
.wg-table .wg-rownum { color: var(--grey-mid); }
.wg-chip { display: inline-block; background: var(--creme); color: var(--black); text-decoration: none; padding: 0 6px; margin: 1px 2px 1px 0; font-size: var(--fs-xs); line-height: 1.5; }
.wg-thumb { height: 22px; width: 22px; object-fit: contain; vertical-align: middle; }
.wg-nopic { color: var(--grey-mid); }

.wkl-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.wkl-table th { text-align: left; font-weight: 600; color: var(--grey); padding: 6px 8px; border-bottom: 1px solid var(--grey-line); }
.wkl-table td { padding: 8px; border-bottom: 1px solid var(--grey-line); }
.wkl-table a { color: inherit; }

.wke { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
.wke .card + .card { margin-top: 0; }
.wke-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.wke-head { display: flex; justify-content: space-between; align-items: baseline; margin: var(--s-3) 0 var(--s-2); }
.wke-right .wke-head { margin-top: 0; }
.wke-head h2 { margin: 0; font-size: 1rem; }
.wke-results { max-height: 420px; overflow: auto; margin-top: var(--s-2); }
.wke-res, .wke-item { display: flex; align-items: center; gap: var(--s-2); padding: 6px 4px; border-bottom: 1px solid var(--grey-line); font-size: var(--fs-sm); }
.wke-res .t, .wke-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wke-res.on { color: var(--grey-mid); }
.wke-res .lid, .wke-item .lid, .wkd .lid, .wkd-word .lid, .wkd-row .lid { color: var(--grey); font-weight: 400; }
.wke-item { background: var(--white); cursor: grab; }
.wke-item.drag { opacity: 0.5; }
.wke-item .grip { color: var(--grey-mid); letter-spacing: -2px; }
.wke-item .thumb { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--grey-light); flex: none; }
.wke-item .thumb img { max-width: 32px; max-height: 32px; object-fit: contain; background: var(--white); }
.wke-item .thumb .none { color: var(--grey-mid); }
.wke-res-new .t b { font-weight: 600; }
.wke-new { margin-top: var(--s-2); padding: var(--s-3); border: 1px solid var(--grey-line); background: var(--grey-light); }
.wke-new .btn-row { justify-content: flex-end; align-items: center; margin-top: var(--s-2); }
.wke-new .wke-err { margin-right: auto; }
.wke-on { min-height: 120px; }
.wke-sum { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.pill.ok { background: var(--green-tint); color: var(--green); }
.wke-actions { justify-content: flex-end; margin-top: var(--s-4); align-items: center; }
.wke-actions #kDelete { margin-right: auto; }
.wke-err { color: var(--burnt-orange); font-size: var(--fs-sm); }
@media (max-width: 800px) { .wke { grid-template-columns: 1fr; } }

.wkd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--grey-line); background: var(--white); margin-bottom: var(--s-3); }
.wkd-stats > div { padding: var(--s-2) var(--s-3); border-right: 1px solid var(--grey-line); }
.wkd-stats > div:last-child { border-right: 0; }
.wkd-stats .lab { display: block; font-size: var(--fs-xs); color: var(--grey); text-transform: uppercase; letter-spacing: 0.04em; }
.wkd-desc { margin: 0 0 var(--s-3); }
.wkd-preview { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-4); }
.wkd-lab { font-size: var(--fs-xs); color: var(--grey); margin-bottom: var(--s-1); }
.wkd-sheet { background: var(--white); border: 1px solid var(--grey-line); padding: var(--s-4); aspect-ratio: 210 / 297; overflow: hidden; }
.wkd-title { color: var(--burnt-orange); font-weight: 700; font-size: 1.1rem; margin-bottom: var(--s-3); }
.wkd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.wkd-card { border: 1px solid var(--grey-line); border-radius: 8px; padding: var(--s-2); text-align: center; }
.wkd-tile { height: 70px; display: flex; align-items: center; justify-content: center; }
.wkd-tile img { max-height: 70px; max-width: 100%; object-fit: contain; }
.wkd-word { font-weight: 600; font-size: var(--fs-xs); margin-top: var(--s-1); }
.wkd-list { display: flex; flex-direction: column; }
.wkd-row { display: flex; justify-content: space-between; gap: var(--s-3); padding: 4px 0; border-bottom: 1px solid var(--grey-line); font-size: var(--fs-xs); font-weight: 600; }
.wkd-row i { font-weight: 400; color: var(--grey); text-align: right; }
@media (max-width: 800px) { .wkd-preview { grid-template-columns: 1fr; } }

/* ---- Admin dashboard: KvK box (small, bottom right; end of content) ---- */
.kvk-box {
  display: flex; flex-direction: column; align-items: flex-end;
  width: max-content; margin: var(--s-6) 0 0 auto;
  padding: var(--s-2) var(--s-3); border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm); background: var(--white);
  font-size: var(--fs-xs); color: var(--grey); line-height: 1.3;
}
.kvk-box .lab { font-weight: 600; }
.kvk-box .kvk-num { color: var(--black); font-variant-numeric: tabular-nums; }

/* ---- Admin > General Admin: one large notes box ---- */
.admin-note .rt-editor { min-height: 22rem; }
.admin-note textarea { min-height: 22rem; }

/* ---- Leerling page: private notes, click to edit in place ---- */
.student-notes .notes-view {
  display: block; margin-top: var(--s-3); padding: var(--s-2) var(--s-3);
  border: 1px dashed transparent; border-radius: var(--radius-sm);
  color: inherit; text-decoration: none; cursor: text;
}
.student-notes .notes-view:hover, .student-notes .notes-view:focus-visible { border-color: var(--blue-grey); }
.student-notes [hidden] { display: none !important; }
.student-notes .rt-editor { min-height: 8rem; }
.student-notes .btn-row { margin-top: var(--s-3); }

/* Lesplan Woordenlijst picker (plans/_woordenlijst_picker.html, Marin 2026-10-22):
   a search box with a dropdown of onderwerpen, each with a niveau tag. */
.wlpick { position: relative; }
.wlpick [hidden] { display: none !important; }
.wlpick-chosen { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.wlpick-name { font-weight: 600; }
.wlpick-actions { display: flex; gap: var(--s-2); margin-left: auto; }
.wlpick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: 18rem; overflow-y: auto;
  background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: var(--s-1); }
.wlpick-opt { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--s-2);
  font: inherit; text-align: left; background: transparent; border: 0; border-radius: calc(var(--radius) - 4px); padding: var(--s-2) var(--s-3); cursor: pointer; color: inherit; }
.wlpick-opt:hover, .wlpick-opt.active { background: var(--creme-hover); }
.wlpick-opt .t { min-width: 0; overflow-wrap: anywhere; }
.wlpick-none { padding: var(--s-2) var(--s-3); color: var(--grey); font-size: var(--fs-sm); }
.wl .wl-pill:disabled { cursor: default; }

/* Woordenlijst links on a les (Marin 2026-10-23): each linked onderwerp is a
   pill-style link to the word list filtered on it. */
.wl-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-2); }
.wl-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.95rem; border-radius: var(--radius-pill);
  background: var(--creme); color: var(--burnt-orange); font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.wl-link::before { content: "📖"; font-size: 0.95em; }
.wl-link:hover { border-color: var(--burnt-orange); }
.wl-link-wrap { display: inline-flex; align-items: center; gap: 0.15rem; }
.wl-link-wrap form { margin: 0; }
.wl-link-x { font: inherit; line-height: 1; border: 0; background: transparent; color: var(--grey); cursor: pointer; padding: 0.3rem 0.45rem; border-radius: var(--radius-pill); }
.wl-link-x:hover { background: var(--creme-hover); color: var(--burnt-orange); }
a.wl-link-x, .student-theme a.wl-link-x { text-decoration: none; display: inline-block; }
.student-theme .wl-link { background: var(--pub-secondary); color: var(--pub-primary); }
.student-theme .wl-link:hover { border-color: var(--pub-primary); }

/* ---- les page: arrows to the previous / next les (Marin 2026-10-30) ---- */
.les-arrow { color: var(--grey); font-size: var(--fs-sm); }
.les-arrow:hover { color: var(--black); }
.les-arrow.is-disabled { opacity: 0.35; cursor: default; pointer-events: none; }
@media (max-width: 480px) {
  /* "Les verzetten" takes a full row on a phone: keep both arrows together
     on the first row, like a small pager */
  .page-head .actions > .les-arrow[rel="prev"], .page-head .actions > .les-arrow:first-child { order: -2; }
  .page-head .actions > .les-arrow[rel="next"], .page-head .actions > .les-arrow:last-child { order: -1; }
}
