/*
 * schoolapp — consolidated app styles.
 * Extracted from base.html.twig <style> and per-template <style> blocks.
 * Dark-theme overrides live in theme.css; semantic action-button colors are
 * CSS custom properties so theme.css can re-token them without !important.
 */

/* Color tokens (re-tokened by theme.css in dark mode).
   Three layers kept separate on purpose:
   - neutrals/brand (--c-*): text, surfaces, borders, links, primary
   - results (--res-*): outcomes only — flashes, errors, badges, status
     chips, status icons. NEVER consumed by buttons.
   - actions (--act-*): button fills — intent, not outcome. NEVER
     consumed by badges/chips, so retuning a button can't change a badge.
   --st-* lesson statuses alias the result layer so status reads
   identically on timetable chips, the lesson page and elsewhere. */
:root {
  /* neutrals + brand */
  --c-text: #222;
  --c-muted: #777;
  --c-bg: #fff;
  --c-surface: #fff;          /* dropdowns, modals */
  --c-fill: #eee;             /* tinted fills: alt rows, code, hover */
  --c-border: #bbb;           /* interactive borders */
  --c-border-hover: #888;
  --c-line: #d9d9d9;          /* hairlines: tables, menus, hr */

  --c-primary: #1EAEDB;           /* links */
  --c-primary-hover: #0FA0CE;
  --c-primary-fill: #33C3F0;      /* button-primary, focus rings */
  --c-primary-fill-hover: #1EAEDB;

  --c-input-bg: #fff;
  --c-input-fg: currentColor;
  --c-input-border: #d1d1d1;

  /* results — outcomes only */
  --res-danger-fg: #b83232;
  --res-danger-bg: #f9d2d2;
  --res-success-fg: #2e7d32;
  --res-success-bg: #e3f2e4;
  --res-warning-fg: #9a6a00;
  --res-warning-bg: #fdf0c0;
  --res-info-fg: #2f6fae;
  --res-info-bg: #d3e9f9;

  /* actions — button fills */
  --act-add: #fdffbe;             /* create/start/complete ("will do") */
  --act-edit: #bcecff;            /* modify */
  --act-show: #d9d0f7;            /* view (periwinkle; green = results) */
  --act-back: #ffddc4;            /* back/close */
  --act-delete: var(--res-danger-bg);

  /* lesson status = aliases onto the result layer */
  --st-in-progress: var(--res-info-fg);
  --st-completed: var(--res-success-fg);
  --st-cancelled: var(--res-danger-fg);
  --st-rescheduled: var(--res-warning-fg);
  --st-scheduled: var(--c-muted);
  --st-unresolved: var(--res-danger-fg);

  /* accents — neither result nor action */
  --c-accent: #4a90d9;            /* tt-mine border */
  --c-accent-bg: #d6eaff;         /* tt-mine fill */
  --c-accent-hl: rgba(74, 144, 217, 0.12);  /* tt-today */
  --c-now-bg: rgba(230, 162, 60, 0.22);     /* tt-now cell */
  --c-now-line: rgba(230, 162, 60, 0.55);
  --c-highlight: var(--act-add);            /* tt-next callout */
}
.b_delete { background-color: var(--act-delete); }
.b_back   { background-color: var(--act-back); }
.b_edit   { background-color: var(--act-edit); }
.b_add    { background-color: var(--act-add); }
.b_show   { background-color: var(--act-show); }

/* Masked SVG icons (.i): open-iconic glyphs rendered via CSS mask so
   they take text color (currentColor) or any background-color — no
   <img>, no dark-mode filter hacks. Usage:
   <span class="i i-pencil" aria-hidden="true"></span> */
.i {
    display: inline-block; width: 1em; height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat;
            mask: center / contain no-repeat;
}
.i-account-logout    { -webkit-mask-image: url('../open-iconic/svg/account-logout.svg');    mask-image: url('../open-iconic/svg/account-logout.svg'); }
.i-action-redo       { -webkit-mask-image: url('../open-iconic/svg/action-redo.svg');       mask-image: url('../open-iconic/svg/action-redo.svg'); }
.i-arrow-thick-left  { -webkit-mask-image: url('../open-iconic/svg/arrow-thick-left.svg');  mask-image: url('../open-iconic/svg/arrow-thick-left.svg'); }
.i-arrow-thick-right { -webkit-mask-image: url('../open-iconic/svg/arrow-thick-right.svg'); mask-image: url('../open-iconic/svg/arrow-thick-right.svg'); }
.i-arrow-thick-top   { -webkit-mask-image: url('../open-iconic/svg/arrow-thick-top.svg');   mask-image: url('../open-iconic/svg/arrow-thick-top.svg'); }
.i-book              { -webkit-mask-image: url('../open-iconic/svg/book.svg');              mask-image: url('../open-iconic/svg/book.svg'); }
.i-check             { -webkit-mask-image: url('../open-iconic/svg/check.svg');             mask-image: url('../open-iconic/svg/check.svg'); }
.i-clock             { -webkit-mask-image: url('../open-iconic/svg/clock.svg');             mask-image: url('../open-iconic/svg/clock.svg'); }
.i-cog               { -webkit-mask-image: url('../open-iconic/svg/cog.svg');               mask-image: url('../open-iconic/svg/cog.svg'); }
.i-contrast          { -webkit-mask-image: url('../open-iconic/svg/contrast.svg');          mask-image: url('../open-iconic/svg/contrast.svg'); }
.i-copy              { -webkit-mask-image: url('../open-iconic/svg/copy.svg');              mask-image: url('../open-iconic/svg/copy.svg'); }
.i-eye               { -webkit-mask-image: url('../open-iconic/svg/eye.svg');               mask-image: url('../open-iconic/svg/eye.svg'); }
.i-home              { -webkit-mask-image: url('../open-iconic/svg/home.svg');             mask-image: url('../open-iconic/svg/home.svg'); }
.i-minus             { -webkit-mask-image: url('../open-iconic/svg/minus.svg');            mask-image: url('../open-iconic/svg/minus.svg'); }
.i-moon              { -webkit-mask-image: url('../open-iconic/svg/moon.svg');              mask-image: url('../open-iconic/svg/moon.svg'); }
.i-pencil            { -webkit-mask-image: url('../open-iconic/svg/pencil.svg');            mask-image: url('../open-iconic/svg/pencil.svg'); }
.i-people            { -webkit-mask-image: url('../open-iconic/svg/people.svg');            mask-image: url('../open-iconic/svg/people.svg'); }
.i-person            { -webkit-mask-image: url('../open-iconic/svg/person.svg');            mask-image: url('../open-iconic/svg/person.svg'); }
.i-plus              { -webkit-mask-image: url('../open-iconic/svg/plus.svg');              mask-image: url('../open-iconic/svg/plus.svg'); }
.i-print             { -webkit-mask-image: url('../open-iconic/svg/print.svg');             mask-image: url('../open-iconic/svg/print.svg'); }
.i-question-mark     { -webkit-mask-image: url('../open-iconic/svg/question-mark.svg');     mask-image: url('../open-iconic/svg/question-mark.svg'); }
.i-sun               { -webkit-mask-image: url('../open-iconic/svg/sun.svg');               mask-image: url('../open-iconic/svg/sun.svg'); }
.i-x                 { -webkit-mask-image: url('../open-iconic/svg/x.svg');                 mask-image: url('../open-iconic/svg/x.svg'); }

/* Token-driven globals (Skeleton colors overridden without touching
   the vendor file; dark mode re-tokens the same custom properties). */
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-hover); }
.copy-btn { margin-left: .4em; }
.copy-tick { color: var(--c-primary); }
code { background: var(--c-fill); border-color: var(--c-line); }
th, td { border-bottom-color: var(--c-line); }
hr { border-top-color: var(--c-line); }
input[type="email"], input[type="number"], input[type="search"],
input[type="text"], input[type="tel"], input[type="url"],
input[type="password"], input[type="date"], input[type="datetime-local"],
textarea, select {
    color: var(--c-input-fg);
    background-color: var(--c-input-bg);
    border-color: var(--c-input-border);
}
input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus,
input[type="text"]:focus, input[type="tel"]:focus, input[type="url"]:focus,
input[type="password"]:focus, input[type="date"]:focus, input[type="datetime-local"]:focus,
textarea:focus, select:focus { border-color: var(--c-primary-fill); }

/* "Also delete related records" checkbox on forceable delete forms */
.b_cascade {
  display: block;
  margin: 1em 0 .5em;
  cursor: pointer;
}
.b_cascade input[type="checkbox"] { margin-right: .4em; }

/* Utilities (replacing former inline styles) */
.hidden { display: none; }
/* UA [hidden] loses to author display rules (e.g. Skeleton's button{display:inline-block}). */
[hidden] { display: none !important; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-danger { color: var(--res-danger-fg); }
.text-success { color: var(--res-success-fg); }
.form-inline { display: inline; margin: 0; }

/* Empty-table cells ("No results." / "None.") — muted, padded, centered. */
td.empty { color: var(--c-muted); text-align: center; padding: 1.5em 0.5em; }

/* Zebra striping (opt-in via table.zebra on list tables) */
table.zebra { width: 100%; }
table.zebra tbody tr:nth-child(even) td { background-color: var(--c-fill); }
/* Header sticks while the page scrolls. Only engages outside scroll
   containers — inside .table-scroll/.tt-scroll the wrapper is the
   sticky scrollport and never scrolls vertically, so zebra index
   tables stay unwrapped on purpose. */
table.zebra thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--c-bg);
    background-clip: padding-box;
    box-shadow: 0 1px 0 var(--c-line);
}

/* Visible focus indicator (keyboard navigation) */
a:focus-visible, button:focus-visible, .button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--c-primary-fill);
    outline-offset: 2px;
}

/* Skip-to-content link: hidden until focused */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 0.5em 1em;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--c-text);
}
.skip-link:focus-visible {
    left: 0;
    outline: 2px solid var(--c-primary-fill);
}

/* Health-check severity badges (schoolyear/health) */
.hc-sev {
  display: inline-block;
  padding: .1em .55em;
  border-radius: .3em;
  font-weight: bold;
  font-size: .85em;
  margin-right: .5em;
}
.hc-sev-error   { background: var(--res-danger-bg); }
.hc-sev-warning { background: var(--res-warning-bg); }
.hc-sev-info    { background: var(--res-info-bg); }
.hc-suggestion  { font-size: .85em; opacity: .75; margin-top: .2em; }
.hc-passed { margin: 1.5em 0; }
.hc-passed summary { cursor: pointer; font-weight: bold; }
.hc-passed-list { list-style: none; padding-left: 1em; margin-top: .5em; }
.hc-check-id { font-family: monospace; font-size: .85em; margin-right: .5em; opacity: .7; }
.text-muted { color: var(--c-muted); }
.u-bold { font-weight: bold; }
.u-inline { display: inline; }
.u-pull-right { float: right; }
.u-pull-left { float: left; }
.u-ml { margin-left: 1em; }
.u-mb { margin-bottom: 20px; }
.menu-row { margin: 20px; }
.hbox { display: flex; align-items: flex-end; gap: 1em; flex-wrap: wrap; }
.fieldset-plain { border: 0; padding: 0; margin: 0; }
.strike-muted { text-decoration: line-through; color: var(--c-muted); }

/* Typography: Skeleton's heading scale is landing-page sized (h1 4-5rem @ weight 300) —
   shrink to app scale. (1rem = 10px via Skeleton's html 62.5%.) */
h1 { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.02rem; }
h2 { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.02rem; }
h3 { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02rem; }
h4 { font-size: 1.7rem; font-weight: 600; }
h5 { font-size: 1.5rem; font-weight: 600; }
h6 { font-size: 1.3rem; font-weight: 600; }
h1, h2, h3 { margin-bottom: 1.5rem; }

@media (max-width: 550px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.7rem; }
}

/* Skeleton's 30px button padding is generous — tighten app-wide.
   More specific rules (topbar, dropdown menus, forms) still win. */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] { padding-left: 18px; padding-right: 18px; }

/* Grading/student page (and other grade tables) */
h4, h5 { margin-bottom: 0.5rem; margin-top: 1rem; }
.noteditable { font-size: 0.7em; }

/* Flashes: result-token pills (bg + left border), roles already set in
   _flashes.html.twig; dark mode follows the same tokens automatically. */
.flash-error, .flash-warning, .flash-success {
    padding: 0.5em 0.9em;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 4px;
}
.flash-error { color: var(--res-danger-fg); background: var(--res-danger-bg); border-color: var(--res-danger-fg); }
.flash-warning { color: var(--res-warning-fg); background: var(--res-warning-bg); border-color: var(--res-warning-fg); }
.flash-success { color: var(--res-success-fg); background: var(--res-success-bg); border-color: var(--res-success-fg); }

/* Pagination: spaced links, current page as a pill. */
.sa-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em;
    margin: 1em 0;
}
.sa-pagination a, .sa-pagination strong {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    text-decoration: none;
}
.sa-pagination a {
    border: 1px solid var(--c-line);
}
.sa-pagination a:hover {
    border-color: var(--c-border-hover);
    text-decoration: none;
}
.sa-pagination strong {
    background: var(--c-primary-fill);
    border: 1px solid var(--c-primary-fill);
    color: var(--c-bg);
    font-weight: 700;
}

/* Topbar */
#topbar {
  padding: 4px 8px;
  border-bottom: 1px solid var(--c-line);
}
#topbar .toprow {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4em;
}
#topbar .t1, #topbar .t2 { align-self: center; }
/* .t2 is a plain identity label (the actions moved into the main menu). */
#topbar .t2 { padding: 0.2em 0.4em; white-space: nowrap; }
#topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1em 0.6em; }
#topbar nav a {
  padding: 0.2em 0.5em;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}
#topbar nav a:hover { text-decoration: underline; }
#topbar nav a.nav-active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#topbar nav .dropdown-toggle {
  padding: 0.2em 0.5em;
  border-radius: 4px;
  white-space: nowrap;
}
#topbar nav .dropdown-toggle:hover { text-decoration: underline; }
#topbar nav .dropdown-toggle.nav-active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Admin menu drops from the left edge (user menu keeps right alignment). */
#topbar nav .dropdown-menu { left: 0; right: auto; }
/* Long menus (Admin) must never outgrow the viewport: cap at the bar's
   height from the near screen edge and scroll. The same calc works when
   the bar is fixed to the bottom and menus open upward. overflow-x is
   pinned hidden — the menu sizes to its widest item, and letting it
   compute to "auto" (mandated once overflow-y is non-visible) only
   buys a stray horizontal scrollbar. */
#topbar .dropdown-menu {
  max-height: calc(100vh - 3.5em);
  max-height: calc(100dvh - 3.5em);
  overflow-x: hidden;
  overflow-y: auto;
}

/* Menu toggle shows the app logo instead of text; nav-active gets an
   outline since underlining an image reads poorly. */
#topbar nav .menu-logo { line-height: 0; }
#topbar nav .menu-logo img { display: block; height: 1.5em; width: auto; border-radius: 4px; }
#topbar nav .menu-logo.nav-active {
  text-decoration: none;
  box-shadow: 0 0 0 2px var(--c-accent);
  border-radius: 4px;
}
#topbar .button { margin-bottom: 0.1em; padding: 0.2em 0.6em; line-height: 1.5em; height: 2em; }

/* User dropdown (topbar right) */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle {
  background: none;
  border: none;
  padding: 0.2em 0.4em;
  margin-bottom: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  height: auto;
  line-height: 1.5em;
}
.dropdown-toggle .i { width: 0.85em; height: 0.85em; }
.dropdown-toggle:hover { text-decoration: underline; }
.dropdown-toggle .caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 0.3em;
  vertical-align: middle;
  border-left: 0.3em solid transparent;
  border-right: 0.3em solid transparent;
  border-top: 0.3em solid currentColor;
}
.dropdown.open .dropdown-toggle .caret {
  border-top: none;
  border-bottom: 0.3em solid currentColor;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.2em);
  z-index: 100;
  min-width: 9em;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0.3em 0;
  text-align: left;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 0.4em 0.9em;
  border: none;
  background: none;
  font: inherit;
  color: var(--c-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  height: auto;
  line-height: 1.5em;
  margin-bottom: 0;
}
/* Skeleton uppercases every button; menu buttons (Theme, Settings,
   Log Out) must read like the link items. */
.dropdown-menu button { text-transform: none; letter-spacing: normal; }
.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--c-fill); }
.dropdown-menu a.nav-active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dropdown-sep {
  height: 1px;
  margin: 0.25em 0;
  background: var(--c-line);
}
.dropdown-menu .i { width: 0.85em; height: 0.85em; }

/* Layout prefs (localStorage-backed, applied pre-paint as html[data-*]
   by theme.js — radios live in the #sa-settings dialog).
   Bar at viewport bottom for mobile thumb reach; its dropdowns open
   upward; .toprow re-centres to the .container metrics since #topbar
   leaves the container context when fixed. */
html[data-topbar-pos="bottom"] #topbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--c-bg);
  border-bottom: none;
  border-top: 1px solid var(--c-line);
}
html[data-topbar-pos="bottom"] #topbar .toprow {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
@media (min-width: 400px) {
  html[data-topbar-pos="bottom"] #topbar .toprow { width: 85%; padding: 0; }
}
@media (min-width: 550px) {
  html[data-topbar-pos="bottom"] #topbar .toprow { width: 80%; }
}
/* top clearance replaces the bar's old footprint; bottom clearance
   keeps page end visible above the fixed bar. Kept as vertical-only
   properties so .container's horizontal padding (20px < 400px) stays. */
html[data-topbar-pos="bottom"] .container { padding-top: 1.5em; padding-bottom: 3.5em; }
html[data-topbar-pos="bottom"] #topbar .dropdown-menu {
  top: auto;
  bottom: calc(100% + 0.2em);
}
/* Menu side: mirror the bar — nav cluster to the right edge (logo
   outermost for thumb reach), identity label to the left; dropdowns
   re-anchor to the outer edge. */
html[data-menu-side="right"] #topbar .toprow { flex-direction: row-reverse; }
html[data-menu-side="right"] #topbar nav { flex-direction: row-reverse; }
html[data-menu-side="right"] #topbar nav .dropdown-menu { left: auto; right: 0; }

/* Timetable: wide grids scroll instead of squeezing; the header row and
   time column stay pinned while scrolling (the wrapper scrolls internally,
   bounded by the viewport so the toolbar stays visible).
   Sticky + border-collapse quirks: opaque bg + background-clip: padding-box
   stop scrolled content bleeding through; box-shadow repaints the grid
   lines that collapsed borders can't draw on the pinned cells.
   Day columns carry inline min-widths scaled to their lane count, so a
   busy day widens the grid horizontally instead of crushing lanes. */
.tt-scroll { overflow: auto; max-height: calc(100vh - 7em); max-height: calc(100dvh - 7em); }
/* Plain record tables (account/contact members, attendance grid,
   lesson tables): horizontal scroll only — no viewport height cap,
   the page itself scrolls vertically. Using tt-scroll here would
   nest a second scrollbar inside an already-scrolling page because
   its 7em chrome allowance doesn't fit these pages. */
.table-scroll { overflow-x: auto; }
.tt-scroll > table.tt-month { min-width: 50rem; }
table.tt thead th {
    position: sticky; top: 0; z-index: 3;
    background: var(--c-bg);
    background-clip: padding-box;
    box-shadow: 0 1px 0 var(--c-line);
}

/* Timetable calendar (day/week): lessons positioned on a proportional
   time axis — --tt-ppm px per minute, with top/height/axis offsets set
   inline from PHP-computed minutes. Overlapping lessons share a day
   column as side-by-side lanes (left/width % inline). */
/* Grows horizontally with per-day min-widths (inline, scaled to each
   day's lane count); max-content keeps the border/bg enclosing the
   columns when they overflow the scrollport. */
.tt-grid {
    --tt-ppm: 1.4px;
    width: max-content; min-width: 100%; box-sizing: border-box;
    border: 1px solid var(--c-line);
}
.tt-head { display: flex; position: sticky; top: 0; z-index: 3; }
/* No global border-box in this stylesheet, so flex children here are
   content-box by default — cell padding/borders would add to the inline
   min-widths and drift header, body and untimed columns out of sync. */
.tt-corner, .tt-dayhead, .tt-gutter, .tt-day, .tt-ulabel, .tt-uday {
    box-sizing: border-box;
}
.tt-corner {
    flex: 0 0 3em; position: sticky; left: 0; z-index: 1;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 1px 0 0 var(--c-line);
}
.tt-dayhead {
    flex: 1 1 0; min-width: 0; padding: 4px; font-weight: 600;
    background: var(--c-bg);
    border-right: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
}
/* Translucent tints on the pinned header need an opaque base or cells
   scrolling underneath show through (same trick as thead th). */
.tt-dayhead.tt-today {
    background: linear-gradient(var(--c-accent-hl), var(--c-accent-hl)) padding-box, var(--c-bg) padding-box;
}
.tt-dayhead.tt-holiday {
    background: linear-gradient(var(--res-warning-bg), var(--res-warning-bg)) padding-box, var(--c-bg) padding-box;
}
.tt-cols { display: flex; }
.tt-gutter {
    flex: 0 0 3em; position: sticky; left: 0; z-index: 2;
    background: var(--c-bg);
    box-shadow: 1px 0 0 var(--c-line);
}
.tt-tick {
    position: absolute; right: 5px; transform: translateY(-50%);
    font-size: 0.8em; opacity: 0.7; white-space: nowrap;
}
.tt-day {
    flex: 1 1 0; min-width: 0; position: relative;
    border-right: 1px solid var(--c-line);
    background-color: var(--c-bg);
    /* hour hairlines; background-position is set inline to the first
       gutter tick's offset so the lines align with the labels */
    background-image: linear-gradient(var(--c-line) 1px, transparent 1px);
    background-size: 100% calc(60 * var(--tt-ppm));
}
.tt-day.tt-today { background-color: var(--c-accent-hl); }
.tt-day.tt-holiday { background-color: var(--res-warning-bg); }
.tt-evt { position: absolute; box-sizing: border-box; padding: 0 2px 2px 0; min-height: 1.9em; }
.tt-evt > form { height: 100%; }
.tt-evt > form:has(> .tt-chip) { margin: 0; }
.tt-evt .tt-chip {
    height: 100%; min-height: 1.7em; margin: 0; padding: 1px 4px;
    display: flex; flex-direction: column;
    white-space: nowrap;
}
/* Chip content stacks as lines: icon+time / class / teacher. Each line
   truncates on its own; .tt-sz-* tiers (class set from slot duration)
   drop lines on short slots instead of clipping mid-line. */
.tt-chip .tt-line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-sz-m .tt-sub-line { display: none; }
/* sz-s: drop the column flex so the remaining lines merge into a single
   truncated row — must out-specify .tt-evt .tt-chip's display:flex. */
.tt-chip.tt-sz-s { display: block; text-overflow: ellipsis; }
.tt-sz-s .tt-line { display: inline; }
.tt-sz-s .tt-sub-line { display: none; }
.tt-nowline {
    position: absolute; left: 0; right: 0; height: 0; z-index: 1;
    border-top: 2px solid var(--c-now-line);
    pointer-events: none;
}
.tt-untimed { display: flex; border-top: 1px solid var(--c-line); }
.tt-ulabel {
    flex: 0 0 3em; position: sticky; left: 0; z-index: 2;
    padding: 4px; font-weight: 600; text-align: right;
    background: var(--c-bg);
    box-shadow: 1px 0 0 var(--c-line);
}
.tt-uday { flex: 1 1 0; min-width: 0; padding: 4px; border-right: 1px solid var(--c-line); }

/* Lesson attendance: same horizontal scroll on narrow screens,
   with the student column pinned so names stay visible. */
.table-scroll > table.att { width: 100%; min-width: 28rem; }
.att th { white-space: nowrap; }
.att td:not(:first-child), .att th:not(:first-child) { text-align: center; }
.att th:first-child, .att td:first-child {
  position: sticky;
  left: 0;
  background: var(--c-bg);
  box-shadow: 1px 0 0 var(--c-line);
}

/* Breadcrumbs */
.breadcrumb { margin: 0 0 0.8em; font-size: 0.9em; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  padding: 0;
  margin: 0;
}
.breadcrumb li { margin-bottom: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 0.3em; color: var(--c-muted); }

/* Forms */
textarea { width: 100%; }
.formerror li, ul.formerror li { color: var(--res-danger-fg); }

/* Buttons containing masked icons (.i) */
.button .i {
  width: 1.05em;
  height: 1.05em;
}
td .button { margin-bottom: 0; }
#topbar .button .i {
  width: 1em;
  height: 1em;
}

/* Term comments */
.term_comment { margin-top: 20px; }
.term_comment p { margin: 10px 10px; }
.term_comment_author { border-bottom: 1px solid var(--c-line); }

/* Language component lists */
.languageComponent { font-weight: bold; }
.languageComponentTeacher { font-size: 0.7em; color: var(--c-muted); }
.grade_date { font-size: 0.7em; color: var(--c-muted); white-space: nowrap; }
.grade_warn { font-size: 0.8em; color: var(--res-danger-fg); white-space: nowrap; }

/* Grading tables: narrow trailing column for row action buttons. */
.sa_col_actions { width: 1%; white-space: nowrap; text-align: right; }

/* Homepage "assessments to grade": compact rows instead of a wide table —
   one wrapping flex line per pending assessment, fits narrow viewports. */
.pending-assessments { list-style: none; margin: 0 0 1em; padding: 0; }
.pending-assessments li {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15em 0.7em;
    margin-bottom: 4px; padding: 0.35em 0.7em;
    border: 1px solid var(--c-line); border-radius: 4px;
}
.pending-assessments .pa-graded { margin-left: auto; }
.pending-assessments .button { margin-bottom: 0; }

.sectionnote { margin-bottom: 0.3rem; color: var(--c-muted); }

.tra1 td { background-color: var(--c-fill); }

/* Setup wizards: dynamic rows (classes_setup / subjects_setup) */
.class-row { border: 1px solid var(--c-line); padding: 10px; margin-bottom: 12px; }
.row-head { overflow: hidden; margin-bottom: 6px; }
.row-caption { float: left; color: var(--c-muted); }
.remove-class { float: right; }
.class-fields { display: flex; align-items: flex-end; gap: 1em; flex-wrap: wrap; }
.new-class-fields { display: flex; align-items: flex-end; gap: 1em; }
.teacher-row { margin: 4px 0; }
.teacher-row select { max-width: 45%; }
.class-row select:disabled, .class-row input:disabled { opacity: 0.45; }

.subject-row { margin: 4px 0; }
.subject-row select { max-width: 40%; }
.subject-row label.inavg { display: inline; margin: 0 8px; }

/* Book-set form: one flex row per book entry — order | title | + | remove */
.book-row { display: flex; align-items: center; gap: .5em; margin: 4px 0; }
.book-row input[type=number] { width: 4.5em; margin: 0; }
.book-row select { flex: 1; min-width: 0; margin: 0; }
.book-row .remove-book { margin-left: auto; }

/* Person/component checkbox pickers (class_students_setup / cpr_new_multiple / cplc_new_multiple) */
.person_select_container label { display: inline; }
.lc_select_container label { display: inline; }
.multi_person_container { overflow: hidden; clear: both; margin-bottom: 1em; }
@media (min-width: 1000px) {
  .person_select_container { width: 33%; float: left; }
}
@media (min-width: 600px) and (max-width: 1000px) {
  .person_select_container { width: 50%; float: left; }
}

/* Page toolbar: period nav / view switcher / context actions.
   Generic — used by timetable, lesson/class, and any view needing
   a prev/next + label + actions row. */
.toolbar { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; margin-bottom: 1em; }
.toolbar .button { margin-bottom: 0; }
.toolbar form { margin-bottom: 0; }
.pagenav { display: inline-flex; gap: 2px; }
.toolbar-title { flex: 1; font-size: 1.5rem; font-weight: 600; text-align: center; white-space: nowrap; }
.toolbar-end { margin-left: auto; }

/* Timetable nav toolbar: prev / This / view dropdown / clickable period
   label / next + Mine-only toggle. The date input is visually hidden inside
   the clickable label but stays rendered so showPicker() can anchor to it. */
.tt-dateform { flex: 1; text-align: center; }
.tt-dateform .toolbar-title { position: relative; cursor: pointer; margin-bottom: 0; }
.tt-date-input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.tt-label-short { display: none; }

/* View picker: active-mode dropdown toggle styled like the toolbar buttons */
.viewpick > .dropdown-toggle {
    display: inline-block;
    height: 38px;
    padding: 0 18px;
    font-size: 11px;
    font-weight: 600;
    line-height: 36px;
    letter-spacing: .1rem;
    text-transform: uppercase;
    color: var(--c-muted);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: transparent;
}
.viewpick > .dropdown-toggle:hover { text-decoration: none; color: var(--c-text); border-color: var(--c-border-hover); }

/* User menu: short label (initials) only on narrow screens */
.uname-short { display: none; }
@media (max-width: 550px) {
  .toolbar-title { order: -1; flex-basis: 100%; text-align: left; font-size: 1.3rem; }
  .toolbar { gap: 0.4em; }
  .uname-full { display: none; }
  .uname-short { display: inline; }
  /* Timetable nav stays a single row: title inline, tighter buttons,
     short date labels, icon-only Mine toggle. */
  .tt-nav { gap: 0.3em; }
  .tt-nav .button { padding: 0 10px; }
  .tt-nav .viewpick > .dropdown-toggle { padding: 0 10px; }
  .tt-nav .toolbar-title { order: 0; flex-basis: auto; font-size: 1.1rem; }
  .tt-label-full { display: none; }
  .tt-label-short { display: inline; }
}

/* Timetable grid (month view table) */
table.tt { width: 100%; table-layout: fixed; border-collapse: collapse; }
table.tt th, table.tt td { border: 1px solid var(--c-line); padding: 4px; vertical-align: top; }
.tt-daynum { font-weight: 600; margin-bottom: 2px; }
.tt-month td { min-height: 5em; }
/* Month chips are dense one-liners: icon + time + class, ellipsized. */
.tt-month .tt-chip {
    padding: 1px 4px; font-size: 0.8em;
    white-space: nowrap; text-overflow: ellipsis;
}
.tt-month .tt-chip .tt-cls { display: inline; }

.tt-chip {
    display: block; width: 100%; margin: 0 0 3px; padding: 2px 6px;
    box-sizing: border-box;
    border: 1px solid var(--c-border); border-radius: 4px;
    font-size: 0.85em; line-height: 1.2; font-weight: normal;
    text-transform: none; letter-spacing: normal; height: auto; text-align: left;
    overflow: hidden; overflow-wrap: break-word;
}
.tt-chip .t { font-weight: 700; }
/* .tt-icon sizes a masked .i inside a chip; color comes from the
   chip's tt-st-* status class below (or currentColor when neutral). */
.tt-icon { width: .75em; height: .75em; opacity: .85; margin-right: 2px; }
.tt-st-in-progress .tt-icon { background-color: var(--st-in-progress); }
.tt-st-completed   .tt-icon { background-color: var(--st-completed); }
.tt-st-cancelled   .tt-icon { background-color: var(--st-cancelled); }
.tt-st-rescheduled .tt-icon { background-color: var(--st-rescheduled); }
.tt-st-unresolved  .tt-icon { background-color: var(--st-unresolved); }
/* tt-st-scheduled keeps currentColor (neutral) */
.tt-sub-line { display: block; }
.tt-sub { font-size: 0.8em; opacity: 0.75; }
a.tt-chip { color: inherit; text-decoration: none; }
a.tt-chip:hover { border-color: var(--c-border-hover); }
button.tt-chip { cursor: pointer; color: inherit; background: none; }
.tt-chip form, form:has(> .tt-chip) { margin: 0; }
form:has(> button.tt-chip) { margin: 0 0 3px; }

.tt-mine { background-color: var(--c-accent-bg); border-color: var(--c-accent); }
.tt-pending { border-style: dashed; }
.tt-unresolved { border-color: var(--st-unresolved); border-style: dashed; color: var(--st-unresolved); }
.tt-off { text-decoration: line-through; opacity: 0.6; }
.tt-dim { opacity: 0.45; }
.tt-today { background-color: var(--c-accent-hl); }

/* Holiday days: warm notice tint on cells/headers, holiday name
   under the date; a standalone banner on the day view. */
.tt td.tt-holiday, .tt th.tt-holiday { background-color: var(--res-warning-bg); }
.tt-holiday-name { font-size: 0.8em; font-weight: normal; color: var(--res-warning-fg); }
.tt-holiday-banner {
    display: inline-block;
    margin-bottom: 0.8em;
    padding: 0.35em 0.9em;
    border: 1px solid var(--res-warning-fg);
    border-radius: 4px;
    background: var(--res-warning-bg);
    color: var(--res-warning-fg);
    font-weight: 600;
}

/* Lesson in progress (set by updateTtNow in app.js): warm accent,
   kept distinct from the blue "today"/"mine" highlights. */
.tt-evt.tt-now .tt-chip {
    background-color: var(--c-now-bg);
    box-shadow: inset 0 0 0 2px var(--c-now-line);
}

/* "Mine only" toolbar toggle: dims chips that don't belong to the
   current teacher rather than hiding them, so the grid keeps its
   shape (durations/alignment stay readable). Pressed state uses the
   same accent tokens as the .tt-mine chips it highlights. */
.tt-mine-toggle { white-space: nowrap; }
.tt-mine-toggle[aria-pressed="true"] { border-color: var(--c-accent); background-color: var(--c-accent-bg); }
table.tt.tt-only-mine .tt-chip:not(.tt-mine),
table.tt.tt-only-mine form:has(> .tt-chip:not(.tt-mine)),
.tt-grid.tt-only-mine .tt-chip:not(.tt-mine),
.tt-grid.tt-only-mine form:has(> .tt-chip:not(.tt-mine)) {
    opacity: 0.25;
}

/* Day view "next lesson" callout (homepage + timetable). */
.tt-next {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.8em;
    padding: 0.4em 0.8em;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: var(--c-highlight);
}
.tt-next .button,
.tt-next form { margin-bottom: 0; }

/* Homepage "past lessons needing attention" warning: same callout
   layout as .tt-next but in warning colors. */
.tt-pending {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.8em;
    padding: 0.4em 0.8em;
    border: 1px solid var(--res-warning-fg);
    border-radius: 4px;
    background: var(--res-warning-bg);
    color: var(--res-warning-fg);
}
.tt-pending .button { margin-bottom: 0; }

/* Reusable modals: native <dialog> driven by modal.js */
dialog.sa-modal {
    max-width: 42rem;
    width: min(42rem, 92vw);
    padding: 1.2em 1.4em;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    background: var(--c-surface);
    color: inherit;
}
dialog.sa-modal--wide { max-width: 56rem; width: min(56rem, 94vw); }
dialog.sa-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.sa-modal > h3 { margin-top: 0; }
.sa-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5em; justify-content: flex-end; margin-top: 1em; }
.sa-modal-actions .button, .sa-modal-actions button { margin-bottom: 0; }

/* Settings dialog (#sa-settings): labelled radio rows; values write to
   localStorage via theme.js (input[data-pref], name = storage key). */
#sa-settings h4 { margin: 0.9em 0 0.3em; }
.sa-settings-row {
    display: flex; flex-wrap: wrap; gap: 0.35em 1.2em;
    align-items: center; margin: 0.25em 0;
}
.sa-settings-row label {
    display: inline-flex; align-items: center; gap: 0.35em;
    margin: 0; font-weight: normal; white-space: nowrap;
}
.sa-settings-row input[type="radio"] { margin: 0; }
.sa-settings-label { min-width: 4.5em; color: var(--c-muted); }

/* Lesson/occurrence action panel (htmx-loaded into #sa-occ-modal):
   action buttons on one wrapping row; secondary flows (reschedule,
   substitute) expand in place via <details> toggles. */
.sa-panel-actions { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: flex-start; margin-top: 0.75em; }
.sa-panel-actions .button, .sa-panel-actions form, .sa-panel-actions details > summary { margin-bottom: 0; }
details.sa-panel-detail > summary { cursor: pointer; list-style: none; }
details.sa-panel-detail > summary::-webkit-details-marker { display: none; }
details.sa-panel-detail > summary::after { content: ' ▸'; }
details.sa-panel-detail[open] > summary::after { content: ' ▾'; }
details.sa-panel-detail[open] { flex-basis: 100%; }
details.sa-panel-detail > form { margin-top: 0.75em; }
/* "attendance not taken" warning inside the lesson/occurrence panel */
.sa-panel-alert { margin: 0.5em 0 0; color: var(--res-warning-fg); font-weight: 600; }

/* forms nested inside dropdown menus (e.g. more-actions cancel) */
.dropdown-menu form { margin: 0; }
.dropdown-menu form > button { width: 100%; }

/* Lesson show: status chip + the status-driven actions (reschedule,
   cancel) grouped inside the Status row of the properties table. */
.status-chip {
    display: inline-block;
    padding: 0.15em 0.7em;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}
.status-chip--in-progress { background-color: var(--res-info-bg);    border-color: var(--st-in-progress); }
.status-chip--completed   { background-color: var(--res-success-bg); border-color: var(--st-completed); }
.status-chip--cancelled   { background-color: var(--res-danger-bg);  border-color: var(--st-cancelled); }
.status-chip--rescheduled { border-style: dashed; color: var(--st-rescheduled); }
/* occurrence states (no lesson row): upcoming vs past-due */
.status-chip--scheduled   { border-style: dashed; color: var(--st-scheduled); }
.status-chip--unresolved  { background-color: var(--res-danger-bg);  border-color: var(--st-unresolved); }
/* holiday marker (day with no expected lesson, or lesson held on one) */
.status-chip--holiday     { background-color: var(--res-warning-bg); border-color: var(--res-warning-fg); color: var(--res-warning-fg); font-weight: normal; }
/* Status cell: chip, rescheduled link and action buttons flow together
   in one wrapping flex row — no dead lines between them. */
.status-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em 0.7em; }
.status-cell .status-chip { vertical-align: baseline; }
.status-row-actions { display: inline-flex; flex-wrap: wrap; gap: 0.4em; }
.status-row-actions .button { margin-bottom: 0; }
.status-row-actions .button .i { width: 1.05em; height: 1.05em; }

/* Section heading with a right-aligned action (lesson show: Attendance,
   Assessments). The button wraps under the heading on narrow screens. */
.sechead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.2em 1em; }
.sechead .button { margin-bottom: 0; align-self: center; }

/* Collapsible sections (lesson show: attendance table). The summary
   line carries the attendance counts, so it stays tight and muted. */
details summary { cursor: pointer; }
details summary .att-summary { font-weight: normal; }

/* Print page: the selected list is JS-built rows (hidden paths[] input +
   file name + ↑/↓/× controls); compact "add"/row buttons sit inline. */
.print-selected { list-style: none; padding-left: 0; margin: 0 0 0.5rem; }
.print-selected li { display: flex; align-items: center; gap: 0.4em; margin: 3px 0; }
.print-selected .sel-name { flex: 1; overflow-wrap: anywhere; }
.print-rowbtn, .print-add {
    height: 26px; line-height: 24px; padding: 0 8px;
    font-size: 10px; margin: 0;
}
.print-add:disabled { opacity: 0.45; }
/* Controls row: copies/sides/flatten/buttons on one line, wrapping on
   small screens. Skeleton's 100%-width inputs/selects need explicit
   sizes to sit inline. */
.print-controls {
    display: flex; flex-wrap: wrap; gap: 0.6em 1.2em; align-items: center;
}
.print-controls label {
    display: inline-flex; align-items: center; gap: 0.35em;
    white-space: nowrap; margin: 0; font-weight: normal;
}
.print-controls input[type="number"] { width: 4.5em; margin: 0; }
.print-controls select { width: auto; margin: 0; }
.print-controls input[type="checkbox"] { margin: 0; }
.print-controls button { margin: 0; }
/* Print+Preview stay glued: the group is one flex item, so the row
   wraps it whole instead of splitting the pair. */
.print-actions { display: inline-flex; gap: 0.5em; white-space: nowrap; }
/* Material tree (material/index browse + print/index picker, rendered
   by material/_tree.html.twig): unbulleted rows, hierarchy carried by
   nested-<ul> indent; folders still signal via the <details> marker.
   Scoped to .mtree so the flat file lists on book/level entity pages
   (.material via material/_files.html.twig) keep their bullets. */
.mtree, .mtree ul { list-style: none; margin: 0.25rem 0; }
.mtree { padding-left: 0; }
.mtree ul { padding-left: 1.15em; font-size: inherit; }
.mtree li { list-style-type: none; margin: 0.15em 0; }
/* File rows are flex so the print page's "add" button pins to a fixed
   right column whatever the filename length; .fname takes the slack
   and wraps like .sel-name. */
.mtree li.file { display: flex; align-items: center; gap: 0.6em; padding: 0.1em 0.5em; }
.mtree .fname { flex: 1; overflow-wrap: anywhere; }
.mtree .print-add { flex: none; margin: 0; }
/* Zebra on file rows — mirrors table.zebra (--c-fill, even rows).
   "of li.file" counts file rows only, so interleaved dir rows don't
   shift the stripe; flat entity-page file lists stripe every other li. */
.mtree li.file:nth-child(even of li.file),
.material > ul:not(.mtree) > li:nth-child(even) { background-color: var(--c-fill); }
/* Flat file lists (material/_files.html.twig on book/level pages):
   tighten rows so zebra bands sit adjacent like table rows. */
.material > ul:not(.mtree) > li { margin-bottom: 0; padding: 0.1em 0.5em; }
/* .empty = dir with no usable descendants (any file on the browse
   page, printable on /print) or a non-printable file. Muted everywhere;
   hidden on the print tree until "Show hidden" puts .show-empty on the
   form — list-item vs flex restores each row type's own display. */
.mtree li.empty { color: var(--c-muted); }
.mtree-print li.empty { display: none; }
.show-empty .mtree-print li.empty { display: list-item; }
.show-empty .mtree-print li.file.empty { display: flex; }
/* Show-hidden toggle: same aria-pressed accent treatment as the
   timetable's .tt-mine-toggle. Sits on the "Available Material"
   heading line, pushed right by the flex head row. */
.print-tabs-head { display: flex; justify-content: space-between; align-items: baseline; }
.print-tabs-head h2 { margin-bottom: 0; }
.print-empty-toggle { white-space: nowrap; margin: 0; }
.print-empty-toggle[aria-pressed="true"] { border-color: var(--c-accent); background-color: var(--c-accent-bg); }

/* Print page material tabs: bordered strip, the selected tab's white
   bottom edge overlaps the strip border so it reads as attached to its
   panel. Panels hide via the [hidden] attribute — the rule below is a
   guard in case a future section style sets an explicit display. */
.print-tabs {
    display: flex; gap: 4px; align-items: flex-end;
    border-bottom: 1px solid var(--c-line); margin-top: 0.4em;
}
.print-tabs [role="tab"] {
    /* no padding override: Skeleton buttons center via height ==
       line-height with 0 vertical padding (18px sides app-wide) —
       any vertical padding inside that fixed height pushes the text
       off-center */
    border: 1px solid var(--c-line); border-bottom: none; border-radius: 4px 4px 0 0;
    background: var(--c-highlight); color: var(--c-muted); margin: 0;
    font-size: inherit; cursor: pointer;
}
.print-tabs [role="tab"]:hover { border-color: var(--c-border-hover); }
.print-tabs [role="tab"][aria-selected="true"] {
    background: var(--c-input-bg); color: inherit; font-weight: 600;
    /* top accent bar via inset shadow — no layout shift vs the 1px
       borders of inactive tabs */
    box-shadow: inset 0 2px 0 var(--c-accent);
    border-bottom: 1px solid var(--c-input-bg); margin-bottom: -1px;
}
section.material[hidden] { display: none; }

/* Audit line at the bottom of the lesson show page. */
.audit { margin-top: 1.2em; font-size: 0.9em; }

/* Classwork/homework body text on the lesson show page. */
.lesson-notes { white-space: normal; }

/* Accounting teacher-hours grid: a wavy underline flags days whose
   worked hours differ from the teacher's weekly scheduled hours;
   italic muted marks projected (scheduled, not yet taught) days. */
.sa_table td.dev { text-decoration: underline wavy var(--res-warning-fg); text-underline-offset: 3px; }
.dev-sample { text-decoration: underline wavy var(--res-warning-fg); text-underline-offset: 3px; }
.sa_table td.plan, .plan-sample { font-style: italic; color: var(--c-muted); }
.sa_table th.hol, .hol-sample { background: var(--c-fill); }
.sa_table.hoursgrid th + th, .sa_table.hoursgrid td + td { border-left: 1px solid var(--c-line); }

/* Help pages (.doc wraps markdown rendered from docs/*.md). The md's own
   h1 is the page title; deeper headings get section spacing, and pipe
   tables get the standard hairline look. */
.doc h1 { margin-bottom: 0.5em; }
.doc h2 { margin-top: 2rem; font-size: 2rem; }
.doc h3 { margin-top: 1.6rem; font-size: 1.7rem; }
.doc h4 { margin-top: 1.2rem; font-size: 1.5rem; }
.doc table { width: auto; }
.doc th, .doc td { border: 1px solid var(--c-line); padding: 4px 10px; }
.doc thead th { background: var(--c-fill); }
.doc code { background: var(--c-fill); padding: 1px 4px; border-radius: 3px; }
.doc pre { background: var(--c-fill); padding: 0.8em 1em; border-radius: 4px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin-left: 0; padding-left: 1em; border-left: 3px solid var(--c-line); color: var(--c-muted); }

/* Mobile: lesson show properties table keeps labels readable without
   squeezing values; attendance grid gets tighter cells and bigger radios;
   section actions go full-width and status actions collapse to icons. */
@media (max-width: 550px) {
    table.props th { width: 34%; padding-right: 8px; }
    table.props th, table.props td { padding-top: 8px; padding-bottom: 8px; }
    .sechead .button { flex-basis: 100%; }
    /* status actions collapse to icon-only squares so chip + buttons
       stay on one line */
    .status-cell { gap: 0.35em 0.5em; }
    .status-chip { font-size: 0.9em; }
    .status-row-actions { gap: 0.3em; }
    .status-row-actions .button { height: 34px; line-height: 32px; padding-left: 12px; padding-right: 12px; }
    .status-row-actions .btn-label { display: none; }
    .table-scroll > table.att { min-width: 22rem; }
    .att th, .att td { padding: 6px 8px; }
    .att input[type="radio"] { width: 1.35em; height: 1.35em; }
}
