:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --ink: #1d2433;
  --ink-2: #4a5263;
  --muted: #636a77;          /* 4.5:1 on the page and grey panels (audit 15 Oct 2026; was #6b7280) */
  --line: #e2e0da;
  --line-strong: #cfccc4;
  --brand: #365f91;          /* the faculty template's heading blue */
  --brand-ink: #ffffff;
  --brand-soft: #e8eef6;
  --focus: #2a64c4;
  --good: #2a7347;
  --warn: #875600;
  --bad: #b3261e;
  --ai: #6b4fbb;
  --ai-soft: #f1edfb;
  --music: #365f91; --va: #a14a2a; --drama: #7a2e6b; --pdm: #2c6e6a; --japanese: #9b2f3f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 33, .06), 0 4px 16px rgba(20, 24, 33, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d; --surface: #1c2028; --surface-2: #232833; --ink: #e8eaf0; --ink-2: #c3c8d4; --muted: #99a1b0;
    --line: #2d3340; --line-strong: #3b4252; --brand: #7ea6dc; --brand-ink: #0f1520; --brand-soft: #22324a;
    --ai: #b49cf2; --ai-soft: #2a2442;
    /* Status colours and the focus ring, light enough to read on dark panels (audit 15 Oct 2026: errors were 2.5:1). */
    --good: #7fd3a0; --warn: #e0a640; --bad: #f2867c; --focus: #6ea0f0; --music: #7ea6dc; --va: #e09a7b; --drama: #d18cc3; --pdm: #7cc4bf; --japanese: #ec8f9c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
a { color: var(--brand); }
a.btn { text-decoration: none; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 24px 0; }
.err { color: var(--bad); }
.note { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; color: var(--ink-2); }

/* buttons */
.btn {
  font: inherit; font-weight: 550; font-size: .92rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.busy:disabled { cursor: progress; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary.bad { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.small { padding: 5px 10px; font-size: .84rem; }
.btn.ai { border-color: color-mix(in srgb, var(--ai) 35%, transparent); color: var(--ai); background: var(--ai-soft); }
.btn.ai:hover { border-color: var(--ai); }
.spark { font-size: .8em; }
.icon-btn {
  font: inherit; cursor: pointer; width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 1rem;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--bad); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link-quiet { font: inherit; background: none; border: 0; padding: 4px 2px; margin: -4px -2px; color: var(--ink-2); cursor: pointer; text-decoration: none; font-size: .88rem; }
@media (pointer: coarse) { .link-quiet { padding: 8px 4px; margin: -8px -4px; } .card-actions { gap: 6px 16px; } }
.link-quiet:hover { color: var(--brand); text-decoration: underline; }

/* gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.gate-card {
  width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 10px;
}
.gate-card h1 { color: var(--brand); }
.gate-card label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
/* the public demo (CP_DEMO): its sign-in card and the reminder in the top bar */
.demo-card { width: min(460px, 100%); }
.demo-card p { margin: 0; }
.demo-tag, .demo-pill { justify-self: start; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 999px; background: var(--brand-soft, #e7eef7); color: var(--brand); }
.demo-pill { white-space: nowrap; }

/* inputs */
input[type=text], input[type=url], input[type=number], input[type=password], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.45; min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; min-width: 32px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
/* The editor's top bar holds its toolbar: below a wide screen the brand is its mark only (still the way home), so the bar stays one row. */
@media (max-width: 1440px) { .topbar:has(.save-state) .brand-name { display: none; } }
.topbar-right .user-name { max-width: 10em; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px 6px; border: 2px solid var(--brand-ink); border-radius: 2px; border-right-width: 0; border-left-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.save-state { font-size: .84rem; color: var(--muted); min-width: 7em; text-align: right; }
.save-state.bad { color: var(--bad); }

/* list */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 80px; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head p { margin: 6px 0 0; }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.list-hidden { margin: 0 0 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: .86rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.group-head { margin: 26px 0 10px; font-size: .95rem; color: var(--muted); font-weight: 650; letter-spacing: .02em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-main { padding: 14px 16px 10px; color: inherit; text-decoration: none; flex: 1; }
.card-main h3 { font-size: 1.05rem; margin: 8px 0 4px; }
.card-main p { margin: 0; font-size: .9rem; }
.card-meta { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; padding: 8px 16px; border-top: 1px solid var(--line); }
.card-actions { display: flex; flex-wrap: wrap; gap: 2px 12px; white-space: nowrap; }
.list-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; margin-top: 16px; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 10px auto 18px; }

.subj { font-size: .75rem; font-weight: 650; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; color: var(--music); background: color-mix(in srgb, currentColor 11%, transparent); }
.subj-visual-arts { color: var(--va); } .subj-drama { color: var(--drama); } .subj-pdm { color: var(--pdm); } .subj-japanese { color: var(--japanese); }
.status { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.status-ready { background: #fff3d6; color: var(--warn); }
.status-registered { background: #e3f3e8; color: var(--good); }
.status-evaluated { background: var(--brand-soft); color: var(--brand); }
/* A program's, schedule's or notification's use: In use, Not in use (kept for later), New (not sorted yet). */
.status.in-use { background: #e3f3e8; color: var(--good); }
.status.use-new { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px currentColor; }
@media (prefers-color-scheme: dark) {
  .status-ready { background: #3a2f12; } .status-registered, .status.in-use { background: #183324; color: #7fd3a0; }
}
.use-pick { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-inline.tight { gap: 4px; margin-bottom: 0; }
.status-select { width: auto; max-width: 100%; padding: 6px 8px; font-size: .86rem; font-weight: 600; }
.badge { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #fff3d6; color: var(--warn); vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .badge { background: #3a2f12; } }

/* editor */
.ed-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.side { position: sticky; top: var(--topbar-h, 64px); align-self: start; padding: 24px 0; }
.side .back { display: inline-block; font-size: .88rem; text-decoration: none; margin-bottom: 14px; color: var(--ink-2); }
.side ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.side li a { display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.side li a:hover { color: var(--brand); border-left-color: var(--brand); }
.editor { padding: 24px 0 120px; min-width: 0; }
.ed-head { margin-bottom: 18px; }
.ed-head h1 { margin: 8px 0 4px; }
.ed-head p { margin: 0; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 20px; margin-bottom: 14px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { color: var(--brand); }
.sec-tools { display: flex; align-items: center; gap: 10px; }
.sec-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 26px; }
.sec-fold::before { content: "▸"; color: var(--muted); font-size: .75em; transform: rotate(90deg); transition: transform .15s; }
.sec-fold:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.sec.folded { padding-bottom: 6px; }
.sec.folded .sec-fold::before { transform: none; }
.sec.folded > :not(.sec-head), .sec.folded .sec-tools { display: none; }
.sec.folded .sec-head { margin-bottom: 12px; }
.fold-all { display: flex; gap: 12px; margin-top: 12px; padding-left: 12px; font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.span2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.hint { font-size: .78rem; color: var(--muted); }
.mini { font-size: .9rem; margin: 18px 0 8px; color: var(--ink-2); }
.row-inline { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.row-inline .grow { flex: 1; }
.code-in { width: 120px !important; flex: none; }

.bank { display: grid; gap: 2px; }
.bank > p { margin: 0 0 6px; }
.outcome { display: grid; grid-template-columns: auto 104px 1fr; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: .93rem; }
.outcome:hover { background: var(--surface-2); }
.outcome input { margin-top: 4px; }
.outcome .code { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .86rem; padding-top: 1px; }

.assess { display: grid; gap: 6px; }
.assess-task { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.assess-row { display: grid; grid-template-columns: 2.4fr 1.2fr 64px 30px; gap: 8px; align-items: center; }
.assess-linkrow { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.assess-link { max-width: 100%; }
.assess-row input[readonly] { background: var(--bg); color: var(--muted); }

/* Formatting toolbar over each text field: writes the markup lib/docx.php renders. */
.fmt-bar { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: -2px; }
.fmt { font: inherit; font-size: .78rem; min-width: 28px; height: 24px; padding: 0 7px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); cursor: pointer; line-height: 1; }
.fmt:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.fmt-b { font-weight: 800; }
.fmt-i { font-style: italic; font-family: Georgia, serif; }
.fmt-bar { container-type: inline-size; }
.fmt.fmt-ai { margin-left: auto; color: var(--ai); font-weight: 600; }
/* A narrow box: just the ✦, so the toolbar stays on one line. */
@container (max-width: 330px) { .fmt-ai-text { display: none; } .fmt { min-width: 22px; padding: 0 4px; } }
.fmt.fmt-ai:hover { background: var(--ai-soft); border-color: color-mix(in srgb, var(--ai) 35%, transparent); color: var(--ai); }
.rich.rich-view { border: 0; padding: 0; background: none; cursor: auto; min-height: 0; box-shadow: none; }
.field textarea { font-variant-ligatures: none; }
.rich { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 10px; width: 100%; line-height: 1.45; overflow-wrap: anywhere; position: relative; cursor: text;
  counter-reset: n0 n1 n2; transition: border-color .15s, box-shadow .15s; }
.rich:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.rich.is-empty::before { content: attr(data-placeholder); position: absolute; left: 10px; top: 8px; right: 10px; pointer-events: none;
  color: color-mix(in srgb, var(--muted) 75%, transparent); }
.rich a { color: var(--brand); }
.rich > div { position: relative; min-height: 1.45em; }
.rich > div[data-k="h"] { font-weight: 700; font-size: 1.04em; color: var(--brand); margin-top: .35em; }
.rich > div[data-k="h"]:first-child { margin-top: 0; }
.rich > div[data-k="b"], .rich > div[data-k="n"], .rich > div[data-k="c"], .rich > div[data-k="x"] { padding-left: 1.4em; }
.rich > div[data-l="1"]:not([data-k="p"]):not([data-k="h"]) { margin-left: 1.4em; }
.rich > div[data-l="2"]:not([data-k="p"]):not([data-k="h"]) { margin-left: 2.8em; }
.rich > div[data-l="3"]:not([data-k="p"]):not([data-k="h"]) { margin-left: 4.2em; }
.rich > div::before { position: absolute; left: 0; color: var(--ink-2); }
.rich > div[data-k="b"]::before { content: "•"; left: .35em; }
.rich > div[data-k="b"][data-l="1"]::before { content: "◦"; }
.rich > div[data-k="b"][data-l="2"]::before { content: "▪"; }
.rich > div[data-k="b"][data-l="3"]::before { content: "–"; }
/* Numbered steps count from 1 again after a plain line, heading or blank line, as the export does; a, b, c under a step. */
/* counter-set, not counter-reset: a reset on a sibling line doesn't restart the count for the lines after it. */
.rich > div[data-l="0"]:not([data-k="n"]):not([data-k="c"]):not([data-k="x"]) { counter-set: n0 0 n1 0 n2 0 n3 0; }
.rich > div[data-k="n"][data-l="0"] { counter-increment: n0; counter-set: n1 0 n2 0 n3 0; }
.rich > div[data-k="n"][data-l="1"], .rich > div[data-sub][data-l="1"] { counter-increment: n1; counter-set: n2 0 n3 0; }
.rich > div[data-k="n"][data-l="2"], .rich > div[data-sub][data-l="2"] { counter-increment: n2; counter-set: n3 0; }
.rich > div[data-k="n"][data-l="3"], .rich > div[data-sub][data-l="3"] { counter-increment: n3; }
.rich > div[data-k="n"][data-l="0"]::before { content: counter(n0) "."; }
.rich > div[data-k="n"][data-l="1"]::before, .rich > div[data-sub][data-l="1"]::before { content: counter(n1, lower-alpha) "."; left: 0; }
.rich > div[data-k="n"][data-l="2"]::before, .rich > div[data-sub][data-l="2"]::before { content: counter(n2, lower-roman) "."; left: 0; }
.rich > div[data-k="n"][data-l="3"]::before, .rich > div[data-sub][data-l="3"]::before { content: counter(n3, lower-alpha) ")"; left: 0; }
.rich > div[data-k="c"]::before, .rich > div[data-k="x"]::before { content: "☐"; cursor: pointer; font-size: 1.05em; }
.rich > div[data-k="x"]::before { content: "☑"; color: var(--brand); }
.kf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.kf-cols .lbl { font-weight: 600; }

/* Checklists: repertoire categories, content areas */
.ticks { display: grid; gap: 2px; margin-bottom: 6px; }
.tick { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: .93rem; }
.tick:hover { background: var(--surface-2); }
.tick input { margin-top: 3px; }
.tick.small { font-size: .86rem; padding: 4px 6px; }
.tickrow .use { display: flex; gap: 10px; align-items: center; margin: 0 0 4px 30px; font-size: .8rem; }
.tickrow:not(:has(> .tick input:checked)) .use { display: none; }
.tickrow .use select { width: auto; font-size: .8rem; padding: 2px 4px; }
.use-assessed { white-space: nowrap; }
.use-assessed { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--muted, #666); }
/* Strategy boxes: Literacy | Numeracy, and the differentiation table's three columns */
.strat-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 6px; }
.strat-cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.strat-col { display: grid; align-content: start; gap: 4px; min-width: 0; }
.strat-col > .lbl { color: var(--brand); }
.strat-col > .lbl.sub { margin-top: 8px; }
.ticks > .tick-group { font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); padding: 8px 6px 1px; }
.ticks > .tick-group:first-child { padding-top: 0; }
/* The teacher's own strategy items: one editable line each, removable, with an Add box below. */
.own-items { display: grid; gap: 4px; }
.own-line { display: flex; align-items: flex-start; gap: 6px; }
.own-dot { color: var(--muted); width: 14px; text-align: center; flex: none; }
.own-dot { padding-top: 4px; }
.own-line textarea { flex: 1; min-width: 0; padding: 3px 6px; font: inherit; font-size: .85rem; line-height: 1.35; border-color: transparent; background: transparent; resize: none; overflow: hidden; min-height: 0; }
.own-line textarea:hover, .own-line textarea:focus { border-color: var(--line); background: var(--bg); }
.own-del { border: 0; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 4px; }
.own-del:hover, .own-del:focus-visible { color: var(--danger, #b42318); background: var(--hover, rgba(0,0,0,.05)); }
.own-row .use { display: flex; gap: 10px; align-items: center; margin: 0 0 4px 20px; font-size: .8rem; }
.own-row .use select { width: auto; font-size: .8rem; padding: 2px 4px; }
.own-add { display: flex; gap: 6px; margin-left: 20px; }
.own-add input { flex: 1; min-width: 0; padding: 3px 6px; font-size: .85rem; }
.own-other { margin-top: 6px; }
@media (max-width: 900px) { .strat-cols, .strat-cols.three { grid-template-columns: 1fr; } }
.content-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.content-col .mini { margin-top: 4px; color: var(--brand); }
.content-group { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin: 12px 0 4px 6px; }
.assess-headrow { font-size: .78rem; font-weight: 650; color: var(--muted); }
.assess > .btn { justify-self: start; margin-top: 4px; }

.weeks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 10px 0 12px; }
.week { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.week[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.week-wrap { position: relative; }
.week summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; min-height: 46px; }
/* The row's tools sit on the header but outside the <details>, so the header is one control (audit F07, 18 Oct 2026). */
.week-wrap > .week-tools { position: absolute; top: 7px; right: 8px; }
.week summary .week-title { padding-right: 200px; }
.week summary::-webkit-details-marker { display: none; }
.week summary::before { content: "▸"; color: var(--muted); font-size: .8rem; margin-right: -2px; transition: transform .15s; }
.week[open] summary::before { transform: rotate(90deg); }
.week-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-tools { display: flex; gap: 2px; align-items: center; }
.week-tools .btn { margin-right: 6px; }
.week-body { padding: 4px 14px 16px; border-top: 1px solid var(--line); padding-top: 14px; }

/* dialogs */
.dlg { border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(560px, calc(100vw - 32px)); }
.dlg.wide { width: min(860px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(20, 24, 33, .45); }
.dlg-inner { padding: 22px; display: grid; gap: 14px; max-height: calc(100vh - 40px); overflow: auto; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: -22px; background: var(--surface); padding: 10px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; }
.form-grid label.check { flex-direction: row; align-items: center; gap: 8px; }
.subject-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 5px; }
.subject-opt { font: inherit; font-weight: 600; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--music); cursor: pointer; text-align: left; }
.subject-opt.on { border-color: currentColor; background: color-mix(in srgb, currentColor 9%, var(--surface)); }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.versions li { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }

.suggest { display: grid; gap: 10px; }
.suggest > p { margin: 0; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--ai); padding: 14px; background: var(--ai-soft); border-radius: 10px; }
.dots { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dots { animation: none; } * { transition: none !important; } }
.sug-list { display: grid; gap: 8px; }
.sug-all { font-size: .85rem; color: var(--muted); }
.sug-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sug-item:has(input:checked) { border-color: color-mix(in srgb, var(--ai) 50%, transparent); background: var(--ai-soft); }
.sug-item input { margin-top: 4px; }
.sug-label { font-weight: 650; font-size: .9rem; margin-bottom: 3px; }
.sug-text { white-space: pre-wrap; font-size: .9rem; color: var(--ink-2); }
/* Suggest: what's there now beside the draft. */
.sug-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.sug-compare > div { min-width: 0; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); }
.sug-col { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 3px; }
.sug-now { background: color-mix(in srgb, var(--line) 25%, transparent); }
.sug-now .if-ticked { display: none; text-transform: none; letter-spacing: 0; color: var(--warn); }
.sug-item:has(input:checked) .sug-compare:not(.adds) .sug-now .if-ticked, .replace-all .sug-compare:not(.adds) .sug-now .if-ticked { display: inline; }
.sug-item:has(input:checked) .sug-compare:not(.adds) .sug-now .sug-text, .replace-all .sug-compare:not(.adds) .sug-now .sug-text { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--warn) 55%, transparent); opacity: .75; }
.sug-new { background: var(--surface); }
.fill-only .sug-compare .if-ticked { display: none !important; }
.fill-only .sug-compare .sug-now .sug-text { text-decoration: none !important; opacity: 1 !important; }
.fill-only .sug-compare .sug-new { opacity: .45; }
/* Suggest weeks / import: one row per week, opened to compare. */
.wk-cmp-list { display: grid; gap: 6px; }
.wk-cmp { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.wk-cmp > summary { cursor: pointer; font-size: .9rem; }
.wk-cmp[open] > summary { margin-bottom: 6px; }
.fill-only .only-replace, .replace-all .only-fill, .fill-only .sas-sug-row.clears { display: none; }
.wk-gone { margin: 4px 0 0; font-size: .88rem; color: var(--warn); }
@media (max-width: 700px) { .sug-compare { grid-template-columns: 1fr; } }
.modes { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; transition: opacity .4s, transform .4s; max-width: calc(100vw - 32px); }
.toast.bad { background: #b3261e; color: #fff; }
.toast-undo { font: inherit; font-weight: 650; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 4px 6px; margin-left: 4px; }
.toast.out { opacity: 0; transform: translate(-50%, 8px); }

@media (max-width: 860px) {
  .ed-layout { grid-template-columns: 1fr; padding: 0 16px; }
  .side { display: none; }
  .grid { grid-template-columns: 1fr; }
  .assess-row { grid-template-columns: 1fr 1fr; }
  .content-cols { grid-template-columns: 1fr; }
  .assess-headrow { display: none; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 10px 16px; }
  .page { padding: 20px 16px 60px; }
  .save-state { min-width: 0; font-size: .78rem; }
}
/* Phones (audit 13 Oct 2026): the top bar wrapped to ~180 px and stuck, with the class strip under it. */
@media (max-width: 760px) {
  .topbar { position: static; }
  .cls-strip { top: 0; }
}
/* Where the side nav is hidden: "← Programming" and a section menu above the class strip. */
.sec-jump { display: none; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.sec-jump .back { font-size: .88rem; text-decoration: none; color: var(--ink-2); }
.sec-jump select { font: inherit; font-size: .9rem; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
@media (max-width: 860px) { .sec-jump { display: flex; } }
@media (max-width: 1180px) { .with-preview .sec-jump { display: flex; } }
.cls-view-note { margin-top: 12px; }
.cls-stray { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sug-block { display: block; cursor: default; }
.sug-block .modes { margin: 8px 0 8px 22px; }
.note { white-space: pre-line; }
.note strong { color: var(--ink); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.head-actions.center { justify-content: center; }

/* Stage 6 week tags, focus-area hours */
.week-tags { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.week-tags > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip-tick { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; padding: 2px 8px 2px 4px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chip-tick:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.row-inline input.hours-in { width: 84px; flex: none; }
.depth-toggle { margin-top: 4px; }
.gdoc-note { margin: -4px 0 4px; }
.imp-step { display: grid; gap: 10px; }
.imp-step[hidden] { display: none; }

/* Review */
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rv { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: .9rem; line-height: 1.45; }
.rv-tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.rv-issue .rv-tag { background: color-mix(in srgb, var(--bad) 9%, transparent); color: var(--bad); }
.rv-check .rv-tag { background: color-mix(in srgb, var(--warn) 9%, transparent); color: var(--warn); }
.rv-idea .rv-tag { background: var(--ai-soft); color: var(--ai); }
.rv-area { font-weight: 650; }
.rv-fix { margin-top: 6px; }
.rv-fix summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); }

/* Assessment schedules */
.sched-strip { margin-bottom: 18px; }
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sched-meta { margin-top: 12px; }
.sched-wrap { overflow-x: auto; margin: 16px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sched { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .9rem; }
.sched th, .sched td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.sched thead th { background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.sched thead th input { display: inline-block; width: calc(100% - 34px); font-weight: 650; }
.sched tbody th { font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.sched input.num { width: 64px; text-align: center; }
.sched .comp-name { min-width: 180px; width: 100%; resize: none; overflow: hidden; font-weight: 600; line-height: 1.3; }
.sched textarea.grow { resize: vertical; overflow: hidden; }
.sched textarea { min-width: 150px; font-size: .85rem; }
.comp-sum { margin-left: 8px; font-size: .8rem; color: var(--muted); }
/* Task cards and dropped notifications on the schedule page (app.js paintDrop(); Sam, 16 Oct 2026). */
.nd { display: grid; gap: 12px; margin: 16px 0 6px; }
.nd-tray { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; }
.nd-tray.over, .nd-card.over { border-color: var(--brand); background: var(--brand-soft); }
.nd-tray-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.nd-tray-head .mini { margin: 0; }
.nd-zone { border: 2px dashed var(--line-strong); border-radius: 8px; padding: 10px 12px; text-align: center; color: var(--ink-2); font-size: .88rem; line-height: 2; }
.nd-zone-note { display: block; line-height: 1.4; }
.nd-drive-list { max-height: 45vh; overflow: auto; margin-top: .4rem; }
.nd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.nd-file, .nd-placed { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 8px 10px; display: grid; gap: 5px; font-size: .85rem; min-width: 0; }
.nd-file[draggable="true"], .nd-placed[draggable="true"] { cursor: grab; }
.nd-file > *, .nd-placed > *, .nd-card-top > *, .nd-card-body > *, .nd-diff > * { min-width: 0; }
.nd-file.bad { border-color: var(--bad); }
.dragging { opacity: .45; }
.nd-fname { font-weight: 600; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: flex-start; }
.nd-file .nd-fname::before { content: "DOC"; flex: none; font-size: .62rem; font-weight: 700; letter-spacing: .04em; background: #2b62c0; color: #fff; border-radius: 3px; padding: 2px 4px; margin-top: 2px; }
.nd-file.pdf .nd-fname::before { content: "PDF"; background: #b3261e; }
.nd-why { font-style: italic; }
.nd-reading { display: flex; gap: 8px; align-items: center; color: var(--ai); }
.nd-reading .dots { width: 14px; height: 14px; }
.nd-move { width: 100%; min-width: 0; text-overflow: ellipsis; font-size: .85rem; padding: 4px 6px; }
.nd-done { color: var(--good); font-weight: 600; margin: 0; }
.nd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.nd-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.nd-card.fresh { border-color: var(--good); }
.nd-card-top { padding: 9px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.nd-tname { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nd-tname strong { color: var(--brand); }
.nd-weight { font-variant-numeric: tabular-nums; font-weight: 650; }
.nd-ttitle { font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.nd-meta { font-size: .8rem; color: var(--muted); }
.nd-codes { display: flex; flex-wrap: wrap; gap: 3px; }
.nd-code { font-size: .72rem; font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.nd-code.add { border-color: var(--warn); color: var(--warn); }
.nd-card-body { padding: 9px 12px; display: grid; gap: 8px; align-content: start; }
.nd-slot { border: 2px dashed var(--line-strong); border-radius: 8px; padding: 8px; text-align: center; font-size: .82rem; }
.notice-checks { margin: 6px 0 12px; }
.notice-checks summary { cursor: pointer; font-weight: 600; }
.notice-checks .review-list { margin-top: 6px; }
.bank-table td { vertical-align: top; }
.bank-filters { margin: 12px 0 8px; flex-wrap: wrap; }
.bank-filters input[type=search] { min-width: 240px; flex: 1; }
.bank-defaults { flex-wrap: wrap; gap: 8px 14px; margin: 6px 0; }
.bank-stage { max-height: 50vh; }
.bank-stage .res-tag { min-width: 56px; }
.bank-list { margin-top: 10px; max-height: 60vh; overflow: auto; }
.bank-item { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; }
.bank-item details ul { margin: 4px 0 0 1em; padding: 0; }
.copy-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.task-tools { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.archived-note { margin: 4px 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: .9rem; }
.archived-note .link-quiet { font-weight: 600; }
.nd-has { font-size: .82rem; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nd-has > .menu { margin-left: auto; }
/* A notification's ⋯ beside its use badge. */
.ed-head > .menu { display: inline-block; vertical-align: middle; margin-left: 4px; }
.nd-placed.unsure { border-style: dashed; border-color: var(--warn); }
.nd-placed .btn { justify-self: start; }
.nd-state { font-size: .78rem; font-weight: 650; }
.nd-state.unsure { color: var(--warn); } .nd-state.ok { color: var(--good); }
.nd-state .muted { font-weight: 400; }
.nd-warn { color: var(--warn); }
.nd-diffs { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 8px; }
.nd-diffs-head { font-size: .74rem; font-weight: 700; color: var(--warn); text-transform: uppercase; letter-spacing: .05em; }
.nd-diffs-head.ok { color: var(--good); }
.nd-diff { display: grid; gap: 4px; font-size: .8rem; }
.nd-diff .lbl { font-weight: 650; }
.nd-diff p { margin: 0; }
.nd-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 105px), 1fr)); gap: 4px; }
.nd-choice button { font: inherit; color: inherit; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; padding: 4px 6px; text-align: left; cursor: pointer; font-size: .78rem; line-height: 1.3; display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.nd-choice button small { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.nd-choice button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.nd-new { border-style: dashed; background: transparent; grid-template-rows: none; place-content: center; text-align: center; gap: 4px; color: var(--muted); min-height: 130px; padding: 12px; }
.nd-foot { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.nd-summary { flex: 1; min-width: 200px; }
.comp-sum.bad, [data-grand].bad { color: var(--bad); }
.total-row { background: var(--surface-2); }
.page > .back { display: inline-block; margin-bottom: 8px; }

/* Program register */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 10px; }
.reg { border-collapse: collapse; width: 100%; min-width: 980px; font-size: .9rem; }
.reg th, .reg td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: middle; }
.reg thead th { background: var(--brand-soft); color: var(--brand); font-weight: 650; white-space: nowrap; }
.reg input[type=text], .reg input[type=url], .reg select { width: 100%; padding: 5px 7px; font-size: .88rem; }
.reg .c-year { width: 64px; } .reg .c-class { width: 96px; } .reg .c-term { width: 120px; } .reg .c-teacher { width: 130px; }
.reg .c-doc { width: 170px; } .reg .c-tick { width: 52px; text-align: center; white-space: nowrap; } .reg .c-del { width: 36px; }
.reg .c-unit a { display: inline-block; margin-top: 2px; }
.reg tr.due { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.reg.usage { min-width: 640px; }
.reg.usage .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reg.usage tr.on { background: var(--brand-soft); }
.usage-prices { margin-top: 24px; }
.usage-line { margin-top: 2px; }
.doc-cell { display: flex; gap: 6px; align-items: center; }
.due-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 4px; vertical-align: 2px; }
.loose { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.loose-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.reg-note { margin-top: 2px; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Google Doc dialog */
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-inline input { flex: 1; min-width: 160px; }
.folder-browser { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.folder-browser .crumbs { color: var(--muted); }
.folder-list { display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.folder { text-align: left; font: inherit; font-size: .9rem; background: none; border: 0; border-radius: 6px; padding: 6px 8px; color: var(--ink); cursor: pointer; }
.folder::before { content: "▸ "; color: var(--muted); }
.folder:hover { background: var(--surface-2); }
.folder-browser > .btn { justify-self: start; }
.folder-picker { display: grid; gap: 8px; }
/* Import: the unit's resources folder */
.res-found p { margin: 6px 0 0; }
.res-list summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
.res-list .ticks { max-height: 220px; overflow: auto; margin-top: 6px; }
.res-unused { display: grid; gap: 4px; margin-top: 6px; }
.res-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.res-row select { margin-left: auto; font-size: .85rem; }
.gdoc-note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.gdoc-note p { margin: 0; }
.gdoc-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* Depth study (Stage 5): scaffold ticks in two columns, and one row per step of the plan */
.ticks.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-advice { margin: 0 0 10px; }
.ds-advice summary { cursor: pointer; }
.ds-advice ul { margin: 4px 0 8px 18px; padding: 0; }
.ds-plan { display: grid; gap: 8px; margin-top: 6px; }
.ds-step { display: grid; grid-template-columns: minmax(0, 2fr) 110px minmax(0, 3fr); gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line, #e3e5ea); border-radius: 8px; }
.ds-step-name { font-size: .88rem; padding-top: 22px; }
@media (max-width: 900px) { .ticks.two-col { grid-template-columns: 1fr; } .ds-step { grid-template-columns: 1fr; } .ds-step-name { padding-top: 0; } }

/* Coverage: one row per content point, repertoire area or outcome, with the units that cover it; gaps stand out */
.cov-sec { margin: 22px 0; }
.cov-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cov-table td { border-top: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.cov-table td:first-child { width: 55%; }
.cov-table tr.gap td:first-child { color: var(--ink); }
.cov-table tr.gap { background: color-mix(in srgb, #d97706 8%, transparent); }
.cov-chip { display: inline-block; margin: 0 6px 4px 0; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; text-decoration: none; color: var(--ink-2); }
.cov-chip:hover { text-decoration: underline; }
.cov-none { color: var(--warn); font-size: .85rem; }
@media (max-width: 700px) { .cov-table td:first-child { width: auto; } }
.content-table { font-size: .95rem; margin: 14px 0 4px; color: var(--brand); }
.bank.life-skills { margin-top: 18px; }

/* Register & Comments per class, in each teaching-sequence row */
.wreg-entries { display: grid; gap: 8px; }
.wreg-entry { display: grid; grid-template-columns: 130px 1fr 28px; gap: 8px; align-items: start; }
/* The date box level with its comment box, which sits under the (faded) formatting bar. */
@media (min-width: 761px) { .wreg-entry:has(.fmt-bar) > label.field > input { margin-top: 27px; } }
.wreg-entry .lbl:empty { display: none; }
.wreg-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }
.wreg-entry:first-child .wreg-tools { margin-top: 30px; }
.wreg-move { opacity: .55; }
.wreg-entry:hover .wreg-move, .wreg-move:focus-visible { opacity: 1; }
.wreg-add { justify-self: start; }
@media (max-width: 760px) { .wreg-entry { grid-template-columns: 1fr; } }

/* Planning or a class (Sam, 13 Oct 2026): the strip under the title, a class's register, the head teacher's grid. */
.cls-strip { position: sticky; top: var(--topbar-h, 57px); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 14px 0 0; padding: 8px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.cls-btn { font: inherit; font-size: .86rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); cursor: pointer; }
.cls-btn:hover { background: var(--surface-2); }
.cls-btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cls-btn.cls-all { margin-left: 6px; }
.cls-mine { font-weight: 700; }
.cls-note p { margin: 0 0 8px; }
.regw-list { display: grid; gap: 10px; margin-top: 10px; }
.regw { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.regw-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.regw-head .week-title { font-weight: 600; }
.regw-head .link-quiet { margin-left: auto; }
.regw-plan { margin: 6px 0 4px; }
.regw-plan > summary { cursor: pointer; color: var(--ink-2); font-size: .88rem; padding: 2px 0; }
.regw-plan-body { display: grid; gap: 10px; margin: 8px 0 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.regw-res { margin: 0; padding-left: 18px; }
.regw .wreg { margin: 8px 0 0; }
.rg-table { border-collapse: collapse; font-size: .86rem; }
.rg-table th, .rg-table td { border: 1px solid var(--line); padding: 0; text-align: center; vertical-align: middle; }
.rg-table thead th { padding: 6px 6px; font-weight: 600; color: var(--ink-2); white-space: nowrap; background: var(--surface-2); }
.rg-table tbody th { text-align: left; padding: 6px 10px; white-space: nowrap; }
.rg-table .rg-sum { padding: 6px 8px; white-space: nowrap; }
.rg-cell { min-width: 2.6em; padding: 6px 4px; white-space: nowrap; }
.rg-cell.ok { background: color-mix(in srgb, var(--good) 16%, transparent); }
.rg-cell.due { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.rg-btn { font: inherit; width: 100%; min-height: 2.2em; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 4px; }
.rg-btn:hover { outline: 2px solid var(--focus); outline-offset: -2px; }
.cls-table td { vertical-align: top; }
.cls-table .cls-code { width: 7.5em; }
.cls-table select { width: auto; min-width: 7em; }
.cls-teachers { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cls-teachers .chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; cursor: default; }
.cls-teachers .chip.lead { border-color: var(--brand); font-weight: 600; }
.cls-teachers select { width: auto; padding: 3px 6px; font-size: .84rem; }
.wreg-bar .wreg-code { width: 150px; padding: 4px 8px; font-size: .88rem; }

/* Evaluation page */
.ev-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .92rem; }
.ev-table th, .ev-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }
.ev-table thead th { color: var(--brand); font-weight: 650; }
.ev-table .ev-group th { background: var(--surface-2, #f2f2f2); font-weight: 650; padding-top: 8px; }
.ev-classes { margin: 6px 0 4px; flex-wrap: wrap; }
.ev-for { margin: 10px 0 0; font-size: 1rem; color: var(--brand); }
.ev-table .ev-area { width: 30%; }
.ev-table .ev-rating { width: 260px; }
.ev-table textarea { width: 100%; resize: vertical; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg-btn { font: inherit; font-size: .84rem; padding: 4px 10px; border: 0; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.on { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 760px) { .ev-table .ev-rating { width: auto; } }
/* Phones: each rating stacks (area, then its buttons, then Why?); the three columns ran 34px past a 375px screen. */
@media (max-width: 560px) {
  .ev-table, .ev-table tbody, .ev-table tr, .ev-table th, .ev-table td { display: block; width: auto; }
  .ev-table thead { display: none; }
  .ev-table td { border: 0; padding: 2px 0; }
  .ev-table .ev-area { width: auto; font-weight: 600; padding-top: 8px; }
  .ev-table tr:not(.ev-group) { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .ev-table .seg { display: flex; flex-wrap: wrap; }
}

/* Live preview: the exported program beside the editor */
.btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
/* Sync with Doc: something changed in both places and waits for the teacher. */
.btn.attn { border-color: var(--warn); color: var(--warn); }
.conflict + .conflict { margin-top: 14px; }
/* Its word-by-word comparison: only in the app struck in red, only in the Doc in green. */
.df { margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); font-size: .88rem; line-height: 1.5; }
.df-line { min-height: 1.2em; overflow-wrap: anywhere; }
.df-head { font-weight: 650; }
.df-del { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); text-decoration: line-through; border-radius: 3px; padding: 0 1px; }
.df-ins { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); text-decoration: none; border-radius: 3px; padding: 0 1px; }
.df-gap { display: block; margin: 2px 0; padding: 0; border: 0; background: none; color: var(--muted, #777); font: inherit; font-size: .8rem; cursor: pointer; }
.df-gap:hover { text-decoration: underline; }
.df-whole { margin-top: 6px; font-size: .85rem; }
.df-whole summary { cursor: pointer; color: var(--muted, #777); }
.df-key { margin: 0 0 8px; }
.df-count { font-weight: 400; }
.ed-layout.with-preview { grid-template-columns: 170px minmax(0, 1fr) minmax(340px, 44%); max-width: none; gap: 20px; }
.pv { position: sticky; top: var(--topbar-h, 64px); align-self: start; height: calc(100vh - var(--topbar-h, 64px)); display: flex; flex-direction: column; padding: 16px 0 12px; min-width: 0; }
.ed-layout.with-preview.sched-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 44%); }
.sched-layout > .page { max-width: none; width: 100%; padding-left: 0; padding-right: 0; }
.pv-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pv-zoom { margin-left: auto; display: inline-flex; gap: 4px; }
.pv-scroll { flex: 1; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.pv-pages { color: #000; }
.pv-pages section.docx { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); margin: 0 auto 10px; font-family: 'Quattrocento Sans', Calibri, Arial, sans-serif; }
/* Word lays the export's tables out fixed (w:tblLayout fixed); docx-preview writes auto inline, so each page's table
   stretched its columns to fit long links. */
.pv-pages table { table-layout: fixed !important; }
.pv-pages .pv-here { animation: pv-here 1.6s ease-out; }
@keyframes pv-here { from { box-shadow: 0 0 0 4px rgba(54,95,145,.55); background-color: rgba(54,95,145,.12); } to { box-shadow: 0 0 0 4px rgba(54,95,145,0); background-color: transparent; } }
/* Wider: the preview takes most of the window, the editor what's left (Sam, 17 Oct 2026). Full screen: the whole window. */
.ed-layout.with-preview.pv-wide { grid-template-columns: 170px minmax(0, 1fr) minmax(340px, 62%); }
.ed-layout.with-preview.sched-layout.pv-wide { grid-template-columns: minmax(0, 1fr) minmax(340px, 62%); }
.pv.pv-full { position: fixed; inset: 0; z-index: 60; height: 100vh; height: 100dvh; padding: 10px 16px 12px; background: var(--bg); }
.pv.pv-full .pv-bar { margin-bottom: 6px; }
body.pv-full-open { overflow: hidden; }
@media (max-width: 1180px) { .ed-layout.with-preview { grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); } .ed-layout.with-preview .side { display: none; }
  .ed-layout.with-preview.pv-wide { grid-template-columns: minmax(0, 1fr) minmax(300px, 62%); } }
@media (max-width: 860px) { .ed-layout.with-preview { grid-template-columns: 1fr; } .pv { display: none; } }

/* A week's activities (1.1, 1.2 …): each its own name and box */
.wk-note { margin: 0; }
.activities { gap: 8px; }
.activity { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; display: grid; gap: 6px; background: var(--surface-2); }
.act-head { display: flex; align-items: center; gap: 8px; }
.act-no { font-weight: 700; color: var(--brand); min-width: 2.2em; }
.act-head .act-title { flex: 1; min-width: 0; font-weight: 600; }
.activities > .btn { justify-self: start; }

/* Scope & Sequence: one block per row */
.sas-weeks { display: grid; gap: 12px; }
.sas-week { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.sas-week-head { font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.sas-sug { display: grid; gap: 6px; margin-top: 4px; }
.sas-sug-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.sas-sug-key { font-size: .82rem; font-weight: 650; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
@media (max-width: 700px) { .sas-sug-row { grid-template-columns: 1fr; } }

/* Tick grid (Visual Arts forms, Viewpoints, Artworld concepts): one row per group. */
.tick-grid .grid-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line, #e5e5e5); }
.tick-grid .grid-row:first-of-type { border-top: 0; }
.tick-grid .grid-label { font-weight: 600; font-size: .88rem; padding-top: 5px; }
.ticks.inline { display: flex; flex-wrap: wrap; gap: 2px 6px; margin: 0; }
.ticks.inline .tick { display: inline-grid; }
@media (max-width: 700px) { .tick-grid .grid-row { grid-template-columns: 1fr; gap: 2px; } }
.gate-card div.first-time:not([hidden]), .gate-card div.ht-first:not([hidden]) { display: grid; gap: 10px; }
.gate-card .small { font-size: .82rem; margin-top: 4px; }

/* drop-down menus (Export, More, the user menu) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 7px; vertical-align: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(10, 14, 22, .18); }
.menu-pop.floating { position: fixed; max-height: calc(100vh - 16px); overflow-y: auto; }
.menu-pop a, .menu-pop button { text-align: left; padding: 9px 11px; border-radius: 6px; color: var(--ink); background: none; border: 0;
  font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.menu-pop a:hover, .menu-pop button:hover, .menu-pop a:focus-visible, .menu-pop button:focus-visible { background: var(--surface-2); outline: none; }
.user-name { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* page navigation */
.app-nav { display: flex; gap: 2px; margin-right: auto; margin-left: 18px; flex-wrap: wrap; }
.nav-link { padding: 6px 11px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); }
@media (max-width: 760px) { .app-nav { order: 3; width: 100%; margin: 6px 0 0; } .topbar { flex-wrap: wrap; } }

/* staff */
.staff-table { width: 100%; border-collapse: collapse; }
.staff-table th, .staff-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.staff-table th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.role-key { margin: 4px 0 12px; padding-left: 1.2em; display: grid; gap: 2px; }
.staff-table input[type=text] { min-width: 180px; }
.staff-table select[aria-label=Role] { min-width: 16.5em; }
.staff-table td:nth-last-child(2), .staff-table th:nth-last-child(2) { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.feedback-list { display: grid; gap: 8px; margin: 8px 0 20px; padding: 0; list-style: none; }
.feedback-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.feedback-list li.done { opacity: .55; }
.feedback-list .fb-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.feedback-list .fb-text { white-space: pre-wrap; margin: 6px 0 0; }

/* help: tours and guides */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-block { position: fixed; inset: 0; pointer-events: auto; }
/* A step that asks you to do something leaves the page usable, with a lighter dim. */
.tour.acting .tour-block { display: none; }
.tour.acting .tour-spot { box-shadow: 0 0 0 9999px rgba(10, 14, 22, .32); }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 14, 22, .62); outline: 3px solid var(--brand); transition: all .25s ease; pointer-events: none; }
.tour-spot.none { inset: 0; width: 0; height: 0; outline: 0; }
.tour.acting .tour-spot.none { box-shadow: none; }
.tour-card { position: fixed; pointer-events: auto; background: var(--surface); color: var(--ink); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow);
  border: 1px solid var(--line); border-top: 4px solid var(--brand); max-width: calc(100vw - 32px); transition: top .2s ease, left .2s ease; }
.tour-card.centre { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); }
.tour.acting .tour-card.centre { top: auto; bottom: 16px; left: auto; right: 16px; transform: none; width: min(380px, calc(100vw - 32px)); }
.tour-card h2 { margin: 2px 0 6px; font-size: 1.15rem; }
.tour-card p { margin: 0 0 8px; line-height: 1.5; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; }
.tour-count { margin: 0; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
.help-btn { padding: 4px 12px; }
.help-btn span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; }
.help-dlg { width: min(620px, calc(100vw - 32px)); }
.help-panel { display: grid; gap: 10px; }
.help-panel > p { margin: 0; }
.help-tour { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; }
.help-tour p { margin: 2px 0 0; }
.help-how { margin: 6px 0 0; font-size: 1rem; }
.help-panel input[type=search] { width: 100%; }
.help-guides { display: grid; gap: 12px; }
.help-group h3 { margin: 0 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.help-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 8px; color: inherit; font: inherit; cursor: pointer; }
.help-item:hover, .help-item:focus-visible { background: var(--surface-2); border-color: var(--line); }
.help-item b { display: block; font-weight: 600; }
.help-item .muted { display: block; }
.help-tick { color: var(--brand); font-weight: 700; min-width: 1em; }
.help-foot { border-top: 1px solid var(--line); padding-top: 10px; }
.welcome p { margin: 0 0 10px; line-height: 1.5; }
.start-card { border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; background: var(--brand-soft); }
.start-head { display: flex; align-items: baseline; gap: 10px; }
.start-head h2 { font-size: 1rem; margin: 0; }
.start-head .link-quiet { margin-left: auto; }
.start-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.start-list li.done button { color: var(--muted); text-decoration: line-through; }
.mine { margin: 0 0 16px; }
.mine h2 { font-size: 1rem; margin: 0 0 6px; }
.mine p { margin: 0; }
.mine-list { display: grid; gap: 6px; }
.mine-unit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); }
.mine-title { font-weight: 600; display: inline-block; min-height: 24px; line-height: 24px; }
.mine-unit .row-inline { margin-left: auto; }
@media (max-width: 600px) { .help-tour { flex-direction: column; align-items: stretch; } .mine-unit .row-inline { margin-left: 0; } }
/* Learning experiences ticked per activity (Stage 6) */
.act-les { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: 4px; }
.act-les .chip-tick span { min-width: 1.6em; text-align: center; }

/* Fill the gaps: what's empty, then each part's suggestions under its own heading. */
.gaps-pick { display: grid; gap: 6px; margin: 4px 0 10px; }
.gap-result { margin-top: 14px; }
.gap-result > h3 { font-size: .95rem; margin: 0 0 6px; color: var(--brand); }

/* Import: each choice's name, with when to pick it underneath. */
.imp-choice { align-items: flex-start; }
.imp-choice > span { display: grid; gap: 2px; }
.imp-when { line-height: 1.35; }
.imp-choice input { margin-top: 3px; flex: none; }

/* Assessment task notifications, under the schedule */
.notice-sec { margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--line); }
.notice-tabs { flex-wrap: wrap; margin: 6px 0 10px; }
.notice-actions { gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.notice-actions .check input { width: auto; margin: 0; }
.code-tag { display: inline-block; font-size: .8rem; padding: 1px 7px; margin: 0 4px 2px 0; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.rubric-ed { display: grid; gap: 8px; margin-bottom: 8px; }
.rubric-band { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.rubric-band > input.num { text-align: center; }
.rubric-tools { display: inline-flex; gap: 2px; }
.rubric-guides { display: grid; gap: 12px; justify-items: start; margin-bottom: 8px; }
.rubric-guide { width: 100%; min-width: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
.rubric-head { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px auto; gap: 8px; align-items: end; }
.fb-box { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fb-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.fb-rows { display: grid; gap: 6px; margin: 6px 0 8px; }
.fb-row { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fb-labels { margin-bottom: -2px; }
.fb-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rubric-head input.num { text-align: center; }
.notice-shared { margin: 14px 0 24px; }
.notice-shared > summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; margin-bottom: 8px; }
@media (max-width: 640px) { .rubric-band, .rubric-head, .fb-row { grid-template-columns: 1fr; } .fb-labels { display: none; } }
.notice-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notice-ticks .own-line { margin-left: 6px; }
.notice-ticks .own-line input { flex: 1; min-width: 0; padding: 3px 6px; font-size: .85rem; border-color: transparent; background: transparent; }
.notice-ticks .own-line input:hover, .notice-ticks .own-line input:focus { border-color: var(--line); background: var(--bg); }
@media (max-width: 900px) { .notice-cols { grid-template-columns: 1fr; } }

/* Pickers in the New schedule / New notification dialogs: one line per schedule or task, actions on the right. */
.pick-list { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 4px; }
.pick-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.pick-list li > span:first-child { min-width: 0; }
.pick-group .lbl { margin-top: 8px; }

/* Sign-off (each class's registration and evaluation sign-offs, in the Evaluation section) */
.signoffs { margin-top: 20px; }
.so-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: .92rem; }
.so-table th, .so-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: middle; }
.so-table .so-part th { background: var(--surface-2, #f2f2f2); color: var(--brand); font-weight: 650; padding-top: 8px; }
.so-table .so-who { width: 34%; }
.so-table .so-sig { width: 30%; }
.so-table .so-date { width: 170px; }
.so-table .so-act { text-align: right; white-space: nowrap; }
/* Phones: who signs on its own line, then the signature, date and Sign button. */
@media (max-width: 560px) {
  .so-table, .so-table tbody { display: block; }
  .so-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; border-bottom: 1px solid var(--line); padding: 4px 0; }
  .so-table th, .so-table td { border: 0; padding: 2px 0; }
  .so-table .so-part { border: 0; }
  .so-table .so-part th { flex: 1 1 100%; padding: 6px; }
  .so-table .so-who { flex: 1 1 100%; width: auto; font-weight: 600; }
  .so-table .so-sig, .so-table .so-date { width: auto; }
  .so-table .so-act { margin-left: auto; }
}
.sig-img { display: block; max-height: 46px; max-width: 220px; }
/* A signature is dark ink on a transparent background: give it white paper in dark mode too. */
.sig-img, .sig-preview img { background: #fff; border-radius: 4px; padding: 2px 4px; }
.sig-preview { min-height: 72px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 8px; margin: 10px 0; padding: 8px; }
.sig-preview img { max-height: 90px; max-width: 100%; }
.sig-preview.school-logo { display: inline-flex; min-width: 180px; margin: 6px 0; }
.school-logo-btns input { flex: none; }
.school-logo-field { margin-top: 14px; }
.school-logo-field .school-logo { align-self: flex-start; }
.sig-ways { display: grid; grid-template-columns: 1fr; gap: 14px; }
.sig-ways h3 { font-size: .95rem; margin: 0 0 4px; }
.sig-pad { display: block; width: 100%; max-width: 600px; aspect-ratio: 600 / 180; background: #fff; border: 1px solid var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; margin-bottom: 6px; }
.yc-sum { text-align: left; font-size: .85rem; }
.yc-grid { border-collapse: collapse; width: 100%; }
.yc-grid th, .yc-grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.yc-grid tbody th { text-align: left; font-weight: 500; white-space: nowrap; }
/* Full hairline border and a brand heading, not a coloured side stripe (impeccable's rulebook, 17 Oct 2026). */
.waiting { border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; background: var(--surface); }
.waiting h2 { font-size: 1rem; margin: 0 0 6px; color: var(--brand); }
.waiting h2 .muted { font-weight: 400; }
.waiting ul { margin: 0; padding-left: 18px; }
.waiting li { margin: 2px 0; }
.incoming ul { list-style: none; padding: 0; }
.incoming li { padding: 8px 0; border-top: 1px solid var(--line); }
.incoming li:first-child { border-top: 0; }
.incoming-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.incoming-acts { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.incoming .kind-tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.incoming p { margin: 4px 0 0; }
.incoming .warn-text { color: var(--warn, #8a5a00); }
.incoming .incoming-more { margin: 4px 0 0; padding: 4px 2px; }
.staff-table .btn { white-space: nowrap; }

/* School terms: the term's dates and weeks under Term and above the teaching sequence, and the Staff page's dates. */
.term-fit { margin: 0; }
.term-fit .term-warn { color: var(--warn); display: block; }
.taught-by { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: .35rem 0; }
.taught-by-cls b { font-weight: 600; }
.terms-table input[type=date] { width: 9.5rem; }
.terms-table td { white-space: nowrap; }
/* Narrower screens: each year's terms stack, labelled, instead of scrolling sideways (audit 13 Oct 2026). */
@media (max-width: 1000px) {
  .terms-table thead { display: none; }
  .terms-table tr, .terms-table td { display: block; }
  .terms-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .terms-table td { border: 0; padding: 4px 0; }
  .terms-table td:first-child { font-weight: 650; }
  .terms-table td[data-term]::before { content: attr(data-term) ": "; display: inline-block; min-width: 4.5em; color: var(--muted); font-size: .88rem; }
}
.lessons-set input.num-input { width: 4.5rem; }
.lessons-set td { white-space: nowrap; }
.lessons-set { margin-top: 1rem; }
/* Import: feedback on the draft, under the preview. */
.imp-revise { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line, #ddd); }
/* Sections and rows scrolled to sit below the top bar and the class strip. */
.editor > .sec, .editor .week, .editor .regw { scroll-margin-top: calc(var(--topbar-h, 57px) + 60px); }
.reg .reg-link { display: block; margin-top: 3px; width: 100%; font-size: .8rem; padding: 3px 5px; }
.reg .yc-ok { color: var(--good); font-weight: 700; }
.reg input[type=checkbox]:disabled { opacity: 1; cursor: help; }
/* The use badge as its own control (editor top bar, schedule and notification pages). */
.use-btn { display: inline-flex; align-items: center; padding: 2px 0; border-radius: 999px; }
.use-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.use-pick .menu-pop { right: auto; left: 0; min-width: 240px; }
.topbar .use-pick .menu-pop { left: auto; right: 0; }
.menu-pop .menu-note { margin: 2px 11px 4px; }
.page-jump { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 14px; font-size: .92rem; }
#setup-staff, #setup-classes, #setup-terms, #setup-lessons, #setup-feedback { scroll-margin-top: 76px; }
.due-box { width: 100%; min-width: 0; resize: none; overflow: hidden; line-height: 1.35; font: inherit; }
/* The formatting buttons show on the box being worked in (or pointed at); ✦ Suggest always shows (UI audit, 13 Oct 2026). */
.fmt-bar .fmt { transition: opacity .12s; }
:has(> .fmt-bar):not(:focus-within):not(:hover) > .fmt-bar .fmt:not(.fmt-ai) { opacity: 0; pointer-events: none; }
/* The pane is hidden at this width (.pv above), so its button goes too. */
@media (max-width: 860px) { .preview-btn { display: none; } }
/* Resource tags: worked out from the link, as the export prints them (resourceTag()). */
.res-tag { flex: none; min-width: 64px; text-align: center; font: 700 10px/1 system-ui, sans-serif; letter-spacing: .03em; color: #fff; padding: 4px 6px; border-radius: 3px; }
.res-tag.none { background: transparent; }
/* In the editor the pill is a menu (pick another tag); a picked one has a white inner ring. */
select.res-tag { appearance: none; -webkit-appearance: none; border: 0; cursor: pointer; text-align-last: center; height: auto; width: auto; }
select.res-tag.none { color: var(--muted, #666); border: 1px dashed currentColor; }
select.res-tag.own { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85); }
select.res-tag option { color: #000; background: #fff; }
.regw-res.tagged { list-style: none; padding-left: 0; }
.regw-res.tagged li { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
.regw-res.tagged .res-tag { min-width: 0; font-size: 9px; padding: 2px 4px; }
.row-inline.res-row { flex-wrap: nowrap; }
.row-inline.res-row input { min-width: 0; }
.row-inline.res-row input[type=text] { flex: 1 1 40%; }

/* school reports (lib/reports.php): on a schedule, and the Reports page */
.reports-sec { margin-top: 28px; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.report-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.report-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.report-head h4 { margin: 0; font-size: 1rem; }
.report-outs { margin: 4px 0 8px; padding-left: 1.4em; }
.report-outs li { margin-bottom: 8px; }
.report-out { display: flex; gap: 6px; align-items: flex-start; }
.report-out textarea { flex: 1; resize: none; overflow: hidden; }
.report-outs .week-tags { margin-top: 4px; }
.rep-filters { margin-bottom: 18px; }
.rep-course { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.rep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rep-head h2 { margin: 0; font-size: 1.05rem; }
.rep-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rep-table td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.rep-desc { width: 45%; }
.rep-no { width: 2.2em; text-align: center; color: var(--muted); }
.rep-changed { background: #fff6a8; }
@media (prefers-color-scheme: dark) { .rep-changed { background: #4a4413; } }

/* Scope and sequences (lib/sequence.php) */
.seq-checks { margin: 8px 0 22px; }
.seq-reqs { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
.seq-reqs > summary { cursor: pointer; }
.seq-reqs .req-item { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.seq-reqs .req-item input { margin-top: 3px; }
.seq-year { margin: 26px 0 10px; }
.seq-unit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 10px 0; }
.seq-unit > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seq-unit[open] > summary { border-bottom: 1px solid var(--line); }
.seq-unit-body { padding: 12px 14px; display: grid; gap: 12px; }
.seq-grid { align-items: end; }
.seq-dur { align-items: end; margin: 0; }
.seq-dur input.num { width: 72px; }
.seq-link { margin: 0; }
.small-badge { font-size: .74rem; padding: 1px 7px; }
.chip-tick.stray { border-color: var(--bad); color: var(--bad); }
.seq-overview { margin-top: 14px; }
.seq-overview .row-inline h3 { margin: 0; }
.seq-tasks input { width: 100%; }
.seq-tasks input.num { width: 56px; }
.seq-notes { width: 100%; }
.seq-dur > .field:first-child { flex: 0 0 auto; min-width: 84px; }
.seq-dur > .field:first-child input { width: 84px; }
.seq-dur > .field.grow { flex: 1; min-width: 0; }
.seq-dur input { width: 100%; min-width: 0; }
.seq-unit-actions select { width: auto; flex: none; }
.seq-unit-actions { margin: 4px 0 0; }
.suggest pre.sug-text { font-family: inherit; margin: 4px 0 0; }
.seq-year .sched-head { flex-wrap: wrap; }
.seq-year .sched-head select { max-width: 340px; width: auto; }
.seq-year .group-head .muted { font-weight: 400; }
/* The stage at a glance (scope and sequences): a column per year, units in plan order. */
.seq-plan { margin: 8px 0 22px; }
.seq-plan > .sched-head { align-items: baseline; flex-wrap: wrap; }
.plan-lanes { display: grid; grid-template-columns: repeat(var(--lanes, 2), minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
@media (max-width: 760px) { .plan-lanes { grid-template-columns: 1fr; } }
.plan-lane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 10px; min-height: 90px; }
.plan-lane.drop-end { outline: 2px dashed var(--brand); outline-offset: -4px; }
.plan-lane h3 { margin: 0 0 8px; }
.plan-lane h3 .muted { font-weight: 400; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-card { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px 8px 10px; cursor: grab; position: relative; }
.plan-card.dragging { opacity: .45; }
.plan-card.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.plan-card.drop-after { box-shadow: 0 3px 0 var(--brand); }
.plan-card.just-moved { animation: plan-flash 1.2s ease-out; }
@keyframes plan-flash { from { background: var(--brand-soft); } to { background: var(--surface); } }
.plan-n { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 600; color: var(--muted); min-width: 2.2em; padding-top: 2px; }
.plan-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.plan-title { all: unset; cursor: pointer; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.plan-title:hover { text-decoration: underline; }
.plan-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.plan-meta { font-size: .84rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan-task { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-notes { font-size: .8rem; color: var(--warn); }
.plan-move { display: grid; grid-template-columns: repeat(2, 26px); align-content: start; gap: 0; }
.plan-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.plan-foot .plan-add { max-width: 100%; }
.seq-revert { font-size: inherit; font-weight: 400; padding: 0; }
.sug-unit + .sug-unit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.plan-move .icon-btn { width: 26px; height: 24px; line-height: 1; padding: 0; }
.plan-move .icon-btn[disabled] { visibility: hidden; }
.plan-empty { margin: 4px 2px; }
.seq-cover-box { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
.seq-cover-box > summary { cursor: pointer; }
.seq-cover { margin-top: 8px; width: auto; }
.seq-cover caption { text-align: left; caption-side: top; padding-bottom: 4px; }
.seq-cover th, .seq-cover td { text-align: center; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.seq-cover tbody th { text-align: left; white-space: nowrap; font-weight: 600; }
.seq-cover tr.gap th { color: var(--bad); }
.seq-cover tr.thin th { color: var(--warn); }
.cover-flag { font-weight: 400; font-size: .8rem; }
.seq-missing { color: var(--warn); }
/* Content and inquiry questions over the weeks, as they print (weekGrid()). */
.wk-grid-wrap { overflow-x: auto; padding-bottom: 4px; }
.wk-grid { display: grid; grid-template-columns: 96px repeat(var(--wks, 10), minmax(86px, 1fr)); gap: 4px; min-width: min-content; }
.wk-head { font-size: .74rem; font-weight: 600; text-align: center; color: var(--ink-2); background: var(--surface-2); border-radius: 4px; padding: 2px 0; grid-row: 1; }
.wk-label { font-size: .8rem; font-weight: 600; color: var(--ink-2); align-self: center; padding-right: 4px; }
.wk-cell { display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); min-width: 0; }
.wk-cell textarea { flex: 1; border: 0; border-radius: 6px 6px 0 0; resize: none; min-height: 64px; font-size: .86rem; padding: 6px 7px; background: transparent; width: 100%; }
.wk-cell-foot { display: flex; justify-content: space-between; align-items: center; gap: 2px; padding: 0 2px 0 7px; border-top: 1px solid var(--line); }
.wk-cell-foot .icon-btn { width: 24px; height: 24px; padding: 0; font-size: .95rem; }
.wk-cell-foot .icon-btn[disabled] { opacity: .3; }
.wk-gap { border: 1px dashed var(--line-strong); border-radius: 6px; background: transparent; color: var(--muted); font-size: 1rem; min-height: 40px; cursor: pointer; }
.wk-gap:hover, .wk-gap:focus-visible { border-color: var(--brand); color: var(--brand); }
.review-list .rv-go { all: unset; cursor: pointer; color: var(--brand); text-decoration: underline; font-size: .85rem; margin-left: 6px; }
.review-list .rv-go:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.seq-unit { scroll-margin-top: 72px; }
/* A linked unit's field that Update from program replaces. */
.from-prog { display: inline-block; white-space: nowrap; margin-left: 6px; font-size: .68rem; font-weight: 600; letter-spacing: .02em; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); vertical-align: 1px; cursor: help; }
.from-prog.own { background: var(--surface-2); color: var(--ink-2); }
.wk-label .from-prog { display: block; margin: 3px 0 0; width: fit-content; }
/* Your classes: units whose term has ended, folded (15 Oct 2026). */
.mine-done { margin-top: 8px; }
.mine-done summary { cursor: pointer; padding: 4px 0; }
.mine-done .mine-list { margin-top: 6px; }
/* Staff › Feedback: problems the app ran into (15 Oct 2026). */
.problems { margin-top: 20px; }
.problems summary { cursor: pointer; }
.problems .fb-text { font-family: ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
/* A card's ⋯ menu (Mark in use / not in use, Archive): no arrow, a comfortable target. */
.menu > summary.card-more { padding: 2px 6px; border-radius: 6px; font-weight: 700; letter-spacing: .05em; }
.menu > summary.card-more::after { display: none; }
.menu > summary.card-more:hover { background: var(--surface-2); }
/* A class's register: the row being taught this week (15 Oct 2026). */
.regw.now { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.regw-head .status { margin-left: 4px; }

/* Programming by course (15 Oct 2026, from the layout mockups): filters, Find, a panel per course, List tables. */
.list-tools:has(> .list-tools-row) { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
.list-tools-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.seg-select { font: inherit; font-size: .84rem; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink-2); padding: 4px 8px; width: auto; cursor: pointer; }
.seg-select.on { background: var(--brand); color: var(--brand-ink); }
.find { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); padding: 0 10px; }
.find:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 25%, transparent); }
.find-icon { flex: none; width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%; position: relative; margin-right: 3px; }
.find-icon::after { content: ''; position: absolute; width: 2px; height: 6px; background: var(--muted); right: -4px; bottom: -5px; transform: rotate(-45deg); border-radius: 1px; }
.find .find-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 0; font-size: .92rem; box-shadow: none; }
.find-results { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.find-count { margin: 0 0 6px; }
.find-list { list-style: none; margin: 0; padding: 0; }
.find-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.find-kind { flex: none; width: 9.5em; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.find-title { font-weight: 600; }
.find-sub { flex: 1 1 14em; }
.course-subject { margin-top: 18px; }
.course-subject:first-child { margin-top: 4px; }
.course-subject-head { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 10px; }
.subj-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; color: var(--music); }
.subj-dot.subj-visual-arts { color: var(--va); } .subj-dot.subj-drama { color: var(--drama); } .subj-dot.subj-pdm { color: var(--pdm); } .subj-dot.subj-japanese { color: var(--japanese); }
.course-list { display: grid; gap: 12px; }
.course-stage { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 6px 2px 0; font-size: .9rem; }
.course-stage:not(:first-child) { margin-top: 10px; }
.course-stage-lbl { font-weight: 600; }
.course-stage-lbl .muted { font-weight: 400; }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.course-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.course-head h3 { font-size: 1rem; }
.course-head h3 .muted { font-weight: 400; }
.course-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: .86rem; }
.course-links a { text-decoration: none; font-weight: 550; }
.course-links a:hover { text-decoration: underline; }
.course-link { display: inline-flex; align-items: center; gap: 2px; }
.course-terms { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.course-term { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; border-right: 1px solid var(--line); min-width: 0; }
.course-term:last-child { border-right: 0; }
.course-term-lbl { font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.course-empty { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 6px 9px; font-size: .8rem; color: var(--muted); }
button.course-add { display: block; width: 100%; text-align: left; background: none; font: inherit; font-size: .8rem; cursor: pointer; }
button.course-add:hover, button.course-add:focus-visible { border-color: var(--brand); color: var(--brand-ink); }
.course-cont { font-style: italic; }
.course-cont::before { content: '↤ '; font-style: normal; }
.course-unplaced { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-top: 1px solid var(--line); }
.course-unplaced .unit-tile { flex: 0 1 240px; }
.course-tasks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.course-tasks .course-term-lbl { margin-right: 4px; }
.course-task { font-size: .8rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.course-task b { color: var(--ink); font-weight: 600; }
a.course-task:hover { border-color: var(--brand); }
.course-task.none { border-style: dashed; background: transparent; color: var(--muted); }
.course-task.none b { color: var(--muted); }
.course-task .status { margin-left: 2px; }
.unit-tile { display: flex; align-items: flex-start; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; transition: border-color .15s; }
.unit-tile:hover, .unit-tile:focus-within { border-color: var(--brand); }
/* An inactive unit reads as set aside without fading its text below 4.5:1 (audit F08): dashed edge, muted title, badge at full strength. */
.unit-tile.faded { border-style: dashed; background: var(--surface); }
.unit-tile.faded .unit-title { color: var(--muted); font-weight: 500; }
.unit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 6px 4px 7px 9px; color: inherit; text-decoration: none; }
.unit-title { font-weight: 600; font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
.unit-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .76rem; }
.unit-sub .status { font-size: .7rem; padding: 1px 7px; }
.unit-tile .menu { flex: none; margin: 3px 3px 0 0; }
.unit-tile .menu > summary.card-more { color: var(--muted); }
.list-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 10px; }
.list-tab { font: inherit; font-weight: 600; font-size: .9rem; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.list-tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.list-tab .muted { font-weight: 500; font-variant-numeric: tabular-nums; }
.list-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.list-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.list-table th { text-align: left; padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.th-sort { font: inherit; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: none; border: 0; padding: 9px 12px; cursor: pointer; }
.th-sort:hover, th[aria-sort] .th-sort { color: var(--ink); }
th[aria-sort="ascending"] .th-sort::after { content: ' ↑'; } th[aria-sort="descending"] .th-sort::after { content: ' ↓'; }
.list-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.list-table td.wrap { white-space: normal; min-width: 14em; }
.list-table tr:last-child td { border-bottom: 0; }
.list-table tbody tr:hover td { background: var(--surface-2); }
.list-title { font-weight: 600; text-decoration: none; }
.list-title:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .course-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-term:nth-child(2) { border-right: 0; }
  .course-term:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .find-kind { width: auto; }
}
.list-table .card-actions { flex-wrap: nowrap; }
.find-title { text-decoration: none; }
.find-title:hover { text-decoration: underline; }
.course-list { grid-template-columns: minmax(0, 1fr); }
.course-head, .course-head h3 { min-width: 0; }
@media (max-width: 760px) { .course-task { white-space: normal; } }
/* Semester courses (15 Oct 2026): a row per semester with its classes, a column per half; Run it again; the copy's notes. */
.course-sem { display: grid; grid-template-columns: 150px repeat(2, minmax(0, 1fr)); }
.course-sem > div { min-width: 0; padding: 8px 10px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.course-sem > div:nth-child(3n) { border-right: 0; }
.course-sem > .sem-colh { padding-block: 6px 0; border-bottom: 0; }
.course-sem > .last { border-bottom: 0; }
.sem-rowh { background: var(--surface-2); gap: 3px !important; }
.sem-rowh b { font-size: .9rem; }
.sem-classes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sem-class { font-size: .72rem; font-weight: 600; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-2); }
.course-copied { font-size: .74rem; margin-top: -3px; }
.course-copied::before { content: '↳ '; }
.course-again { font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; border: 1px dashed var(--brand); border-radius: 8px; padding: 6px 9px; background: var(--brand-soft); color: var(--brand); font-size: .84rem; font-weight: 600; }
.course-again span { font-weight: 400; font-size: .76rem; color: var(--ink-2); }
.course-again:hover { border-style: solid; }
.rerun-notes { margin: 10px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.rerun-notes h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 6px; }
.rerun-notes ul { margin: 0 0 8px; padding-left: 18px; }
.rerun-notes li + li { margin-top: 4px; }
@media (max-width: 760px) {
  .course-sem { grid-template-columns: 1fr; }
  .course-sem > div { border-right: 0; }
  .course-sem > .sem-colh { display: none; }
}
.nowrap { white-space: nowrap; }
/* Coverage at a glance: each section's count, a jump to it, and only-the-gaps (16 Oct 2026). */
.cov-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cov-jumps { display: flex; flex-wrap: wrap; gap: 6px; }
.cov-jump { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; color: var(--ink-2); text-decoration: none; }
.cov-jump strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cov-jump.has-gaps { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.cov-jump.has-gaps strong { color: var(--warn); }
.cov-jump:hover { background: var(--surface-2); }
.cov-sec { scroll-margin-top: 120px; }
/* Dialog fields share a row only while they fit (16 Oct 2026: "Stage 4 (Years 7–" was cut off in a third of the dialog). */
.dlg .form-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* The file picker's button matches the app's buttons, in both themes (it was the browser's own grey). */
input[type=file] { font: inherit; font-size: .9rem; color: var(--ink-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; padding: 6px 12px; margin-right: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--brand); }
/* Phones: the top bar scrolls away and its page links stay on one swipeable row (16 Oct 2026: it held a quarter of the screen). */
@media (max-width: 640px) {
  .topbar { position: static; }
  .app-nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; margin-left: 0; scrollbar-width: none; }
  .app-nav .nav-link { white-space: nowrap; }
}
.coming ul { list-style: none; padding: 0; }
.coming li { padding: 3px 0; }
.coming .coming-when { color: var(--ink-2); }
.coming .coming-start, .coming .warn-text { color: var(--warn, #8a5a00); }
/* Programming: signatures waiting and tasks coming up share a row where there's room. */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 16px; align-items: stretch; }
@media (max-width: 420px) { .attn { grid-template-columns: 1fr; } }

/* Programming: the unnamed-units line (audit F13) */
.blank-units .link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }

/* Screen-reader-only text, and the skip link that shows when it's focused (audit F08, 18 Oct 2026). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -40px; z-index: 50; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 8px; }
main:focus { outline: none; }

/* A blank unit's 'start here' line (audit F04) and Prepared for you folded to its heading once seen (audit F18). */
.start-here { margin: 0 0 12px; }
.incoming-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.incoming-fold > summary::-webkit-details-marker { display: none; }
.incoming-fold > summary::before { content: "▸"; color: var(--muted); font-size: .8rem; }
.incoming-fold[open] > summary::before { content: "▾"; }
.incoming-fold > summary h2 { margin: 0; display: inline; }

/* Who has it open, the look request banner and the casual-lesson marker (audit F09, F28, Q2; 18 Oct 2026). */
.presence { margin: -4px 0 10px; }
.look-banner { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.look-banner.looked { background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.wreg-casual { font-size: .78rem; font-weight: 700; width: 24px; height: 24px; }
.wreg-casual.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* A 2003/2004 syllabus's Life Skills outcomes by area of content (Practice, Conceptual framework …). */
.life-skills .ls-group { font-size: .8rem; color: var(--muted); margin: 10px 0 2px; font-weight: 600; }
