/* ===================================================================
   hub.css — Classroom Hub "Teach / Plan" redesign
   Recreates the design-handoff prototype in the app's existing tokens.
   Glow Getters (glow) styling is untouched and lives elsewhere.
   =================================================================== */

/* ---------- Mode shell ---------- */
body[data-mode="teach"] #planApp { display: none; }
body[data-mode="plan"]  #teach   { display: none; }
#teach { display: flex; }

/* ===================================================================
   TEACH MODE — phones get a single 540px column; tablets/iPads fill
   the whole page. 100dvh (not vh) so nothing hides behind the Safari
   toolbar on iPad.
   =================================================================== */
.teach {
  flex-direction: column;
  min-height: 100vh;      /* fallback for older browsers */
  min-height: 100dvh;
  max-width: 540px;
  margin: 0 auto;
  padding: 16px;
  gap: 14px;
}
.teach-view { display: none; flex-direction: column; gap: 14px; flex: 1; }
.teach-view.active { display: flex; }

/* iPad / tablet: use the full page instead of a phone-width column */
@media (min-width: 768px) {
  .teach { max-width: none; padding: 20px 32px; }
}

/* Teach top row */
.teach-top { display: flex; align-items: center; gap: 10px; }
.teach-date { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.teach-top .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; font-weight: 600;
}
.pill-saved {
  font-size: 11.5px; padding: 5px 11px;
  background: var(--teal-50); color: var(--teal-700);
}
.pill-saved.is-saving { background: var(--gold-50); color: var(--gold-600); }
.pill-ghost {
  font-size: 11.5px; padding: 5px 11px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.pill-ghost:hover { background: var(--line-2); }

/* Glance strip */
.glance {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(20,24,29,.05);
}
.glance-now { display: flex; align-items: baseline; gap: 10px; }
.glance .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.glance-now .eyebrow { color: var(--teal-600); }
.glance-subject { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.glance-until { margin-left: auto; font-size: 13px; color: var(--muted); }
.glance-next {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2);
}
.glance-next .eyebrow { color: var(--faint); }
.glance-next .nxt { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Tile grid */
.tile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  flex: 1; align-content: stretch;
}
/* iPad / tablet: three tiles across so the grid uses the full page width */
@media (min-width: 768px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
}
.tile {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  color: var(--ink);
  padding: 16px; min-height: 120px; cursor: pointer; text-align: left;
  transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--card); }
.tile-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--teal-50); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
}
.tile-icon svg { width: 22px; height: 22px; }
.tile.violet .tile-icon { background: var(--violet-50); color: var(--violet-600); }
.tile-foot { margin-top: 14px; display: flex; flex-direction: column; }
.tile-label { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.tile-status { font-size: 12.5px; font-weight: 600; color: var(--faint); margin-top: 2px; }
.tile-status.ok { color: var(--success); }

/* Quick log dock */
.dock {
  width: 100%; padding: 18px; border-radius: 16px;
  background: var(--teal-600); color: #fff;
  font-size: 18px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: var(--dock-shadow);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; border: 0;
}
.dock:hover { background: var(--teal-600); transform: translateY(-1px); }
.dock svg { width: 22px; height: 22px; }

/* Teach sub-view header (back row) */
.teach-head { display: flex; align-items: center; gap: 10px; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.back-link:hover { color: var(--ink); background: none; transform: none; }

/* Glow Getters award row on the Pick-a-name screen */
.glow-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line-2);
  width: 100%; max-width: 360px;
}
.glow-tally { display: flex; flex-direction: column; align-items: center; min-width: 100px; }
.glow-n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.glow-l { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }
.glow-minus, .glow-plus {
  flex: 0 0 auto; min-width: 56px; height: 56px; border-radius: 14px;
  font-size: 20px; font-weight: 800; cursor: pointer; border: 1px solid transparent;
  transition: transform .1s, background .12s, filter .12s;
}
.glow-minus:active, .glow-plus:active { transform: scale(.95); }
.glow-plus { background: var(--teal-600); color: #fff; }
.glow-plus:hover { background: var(--teal-700); }
.glow-minus { background: var(--coral-50); color: var(--coral-600); border-color: var(--coral-100); }
.glow-minus:hover { background: var(--coral-100); }

/* Points picker grid (Teach › Points) */
.pts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
  align-content: start;
}
.pts-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; box-shadow: 0 4px 14px rgba(20,24,29,.04);
}
.pts-name {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pts-row { display: flex; align-items: center; gap: 10px; }
.pts-n {
  flex: 1; text-align: center; font-size: 26px; font-weight: 800;
  letter-spacing: -.02em; color: var(--teal-700); line-height: 1;
}
.pts-minus, .pts-plus {
  flex: 0 0 auto; min-width: 48px; height: 44px; border-radius: 12px;
  font-size: 17px; font-weight: 800; cursor: pointer; border: 1px solid transparent;
  transition: transform .1s, background .12s;
}
.pts-minus:active, .pts-plus:active { transform: scale(.95); }
.pts-plus { background: var(--teal-600); color: #fff; }
.pts-plus:hover { background: var(--teal-700); }
.pts-minus { background: var(--coral-50); color: var(--coral-600); border-color: var(--coral-100); }
.pts-minus:hover { background: var(--coral-100); }

/* ===================================================================
   QUICK LOG — bottom sheet + toast (shared by Teach & Plan)
   =================================================================== */
.ql-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20,24,29,.45);
  display: none; align-items: flex-end; justify-content: center;
}
.ql-backdrop.open { display: flex; }
.ql-sheet {
  background: var(--card); width: 100%; max-width: 540px;
  border-radius: 20px 20px 0 0; padding: 8px 16px 24px;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .18s ease-out;
}
.ql-backdrop.open .ql-sheet { transform: translateY(0); }
.ql-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 14px; }
.ql-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ql-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.ql-head .spacer { flex: 1; }
.ql-x {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 4px 6px;
}
.ql-x:hover { color: var(--ink); background: none; transform: none; }

.ql-special { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ql-chip {
  padding: 13px 14px; border-radius: 11px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  text-align: center;
}
.ql-chip:hover { border-color: var(--teal-500); }
.ql-chip.special { background: var(--page); }
.ql-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}

/* Quick log step "What?" */
.ql-who { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ql-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal-50); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.ql-who-name { font-size: 17px; font-weight: 700; }
.ql-who-sub { font-size: 14px; color: var(--muted); font-weight: 500; }
.ql-actions { display: flex; flex-direction: column; gap: 8px; }
.ql-action {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--line);
  cursor: pointer; text-align: left;
}
.ql-action:hover { background: var(--line-2); transform: none; }
.ql-action .ai {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.ql-action .al { font-size: 15px; font-weight: 700; color: var(--ink); }
.ai.praise  { background: var(--teal-50);  color: var(--teal-700); }
.ai.concern { background: var(--coral-50); color: var(--coral-600); }
.ai.star    { background: var(--gold-50);  color: var(--gold-600); }
.ai.glow    { background: var(--violet-50);color: var(--violet-600); }
.ai.note    { background: #eef1f1;         color: #5c6a6e; }

/* Quick log → Mark activity confirm step */
.ql-mlabel { font-size: 12px; font-weight: 600; color: var(--muted); margin: 4px 0 8px; }
.ql-marknote { width: 100%; min-height: 58px; margin-top: 12px; line-height: 1.45; font-size: 14px; }
.ql-markbtns { display: flex; gap: 9px; margin-top: 14px; }
.ql-markbtns button:first-child { flex: 1; }
.ql-markbtns button:disabled { opacity: .5; cursor: not-allowed; }
.ql-chip.sel { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.ql-chip.sel:hover { border-color: var(--ink); }

/* Toast */
.ql-toastwrap {
  position: fixed; left: 0; right: 0; bottom: 20px; z-index: 2200;
  display: flex; justify-content: center; pointer-events: none;
}
.ql-toast {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--toast-bg); color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,24,29,.35);
  transform: translateY(140%); transition: transform .18s ease-out;
  pointer-events: auto; max-width: 90vw;
}
.ql-toast.show { transform: translateY(0); }
.ql-toast .undo {
  background: none; border: 0; color: var(--toast-link);
  font-weight: 700; cursor: pointer; padding: 0; font-size: 13.5px;
}
.ql-toast .undo:hover { background: none; transform: none; }

/* ===================================================================
   PLAN MODE additions
   =================================================================== */
/* "Open Teach" button + Settings gear in the existing sidebar */
.open-teach {
  width: 100%; margin: 4px 0 12px; padding: 11px 14px;
  background: var(--teal-600); color: #fff; border: 0; border-radius: 11px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.open-teach:hover { background: var(--teal-700); }
/* sidebar section labels (Organise / Tools) for the split nav */
.navwrap .nav-section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); font-weight: 700; padding: 14px 10px 4px 8px;
}
.sidefoot .gear {
  margin-left: auto; width: 34px; height: 34px; border-radius: 9px;
  background: var(--line-2); color: var(--muted); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sidefoot .gear:hover { background: var(--border); color: var(--ink); }
.sidefoot .gear svg { width: 18px; height: 18px; }

/* Plan › Today */
.today-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px){ .today-grid { grid-template-columns: 1fr; } }
.tt-list { display: flex; flex-direction: column; }
.tt-row {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 11px;
  border-radius: 9px; font-size: 13.5px;
}
.tt-row .t { color: var(--faint); font-weight: 600; width: 52px; flex: 0 0 auto; font-size: 12.5px; }
.tt-row.now { background: var(--teal-50); color: var(--teal-700); font-weight: 600; }
.tt-row.break { color: var(--faint); }
.nudge {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; margin-bottom: 10px;
}
.nudge b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.nudge .go { color: var(--teal-600); font-weight: 700; font-size: 13px; cursor: pointer; background: none; border: 0; padding: 0; }
.nudge .go:hover { background: none; transform: none; text-decoration: underline; }
.weekcount { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.weekcount:first-child { border-top: 0; }
.weekcount .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; width: 46px; }
.weekcount .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.weekcount.star .n { color: var(--gold-600); }
.weekcount.praise .n { color: var(--success); }
.weekcount.concern .n { color: var(--coral-600); }
.weekcount.glow .n { color: var(--violet-600); }

/* Plan › Pupils */
.pupil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pupil-card {
  display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  cursor: pointer; background: var(--card); color: var(--ink); text-align: left;
}
.pupil-card:hover { border-color: var(--teal-500); box-shadow: var(--shadow); }
.pupil-card .nm { font-size: 14px; font-weight: 700; }
.pupil-card .sub { font-size: 11px; color: var(--faint); margin-top: 3px; min-height: 14px; }
.glance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.gl-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: var(--card); }
.gl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gl-title { font-size: 13.5px; font-weight: 700; }
.gl-badge { margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 9px; border-radius: 999px; }
.gl-badge.send { background: var(--gold-50); color: #92660b; }
.gl-badge.pp { background: var(--teal-50); color: var(--teal-700); }
.gl-badge.allergy { background: var(--coral-50); color: var(--coral-600); }
.gl-badge.health { background: var(--violet-50); color: var(--violet-600); }
.gl-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.gl-row:first-of-type { border-top: 0; }
.gl-row .nm { font-size: 12.5px; font-weight: 700; color: var(--teal-600); cursor: pointer; }
.gl-row .nm:hover { text-decoration: underline; }
.gl-row .det { margin-left: auto; font-size: 11.5px; color: var(--muted); text-align: right; }

/* Plan › Pupil record */
.rec-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex: 0 0 auto; }
.rec-name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.rec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.chip.send { background: var(--gold-50); color: var(--gold-600); border: 1px solid var(--gold-100); }
.chip.pp { background: var(--line-2); color: var(--muted); }
.chip.allergy { background: var(--coral-50); color: var(--coral-600); }
.chip.ehcp { background: var(--violet-50); color: var(--violet-600); }
.rec-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px){ .rec-grid { grid-template-columns: 1fr; } }
/* Pupil record redesign — two-column (profile 5fr / behaviour log 7fr) */
.pr-grid { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
@media (max-width: 1000px){ .pr-grid { grid-template-columns: 1fr; } }
.timeline { display: flex; flex-direction: column; }
.tl-item { border-left: 3px solid var(--line); padding: 8px 0 8px 12px; margin-bottom: 8px; }
.tl-item.praise { border-color: var(--success); }
.tl-item.concern { border-color: var(--coral-600); }
.tl-item.star { border-color: var(--gold-600); }
.tl-item.glow { border-color: var(--violet-600); }
.tl-item.note { border-color: var(--faint); }
.tl-item .tl-top { display: flex; align-items: baseline; gap: 8px; }
.tl-item .tl-kind { font-size: 12px; font-weight: 700; }
.tl-item .tl-date { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 600; }
.tl-item .tl-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.termbar { margin: 8px 0; }
.termbar .lab { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.termbar .track { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.termbar .fill { height: 100%; border-radius: 999px; }

/* segmented sub-tabs reuse .tabs/.tab from index.html */
.subview { display: none; }
.subview.active { display: block; }

/* ===================================================================
   STARTER v2 — week view, day sheet, whiteboard, print
   =================================================================== */
.day-row { display: flex; align-items: center; gap: 10px; width: 100%; border-radius: 14px; padding: 13px 14px; cursor: pointer; color: var(--ink); text-align: left; }
.day-row:hover { transform: none; }
.dr-label { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.dr-prev { display: block; font-size: 12px; font-weight: 600; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.dr-status { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.wk-chip:hover { transform: none; }

/* Day view sheet */
.ds-sheet { background: var(--card); border: 1px solid var(--line); border-radius: 16px; flex: 1; padding: 14px; box-shadow: 0 4px 14px rgba(20,24,29,.05); overflow-y: auto; }
.ds-sheethead { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin-bottom: 10px; font-size: 13.5px; }
.ds-sheethead b { font-weight: 700; }
.ds-sheethead span { font-size: 11.5px; color: var(--faint); }
.ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-q { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--card); }
.ds-num { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: var(--teal-50); color: var(--teal-700); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.ds-text { font-size: 15px; font-weight: 700; color: var(--ink); }
.ds-text .gen-clock { width: 58px; height: 58px; }
.ds-text .gen-clocks { gap: 6px; }
.ds-text .gen-clock-label { font-size: 11px; }
.ds-text .gen-qtext { font-size: 12px; font-weight: 600; color: var(--muted); }
.ds-text .gen-blocks { height: 40px; }
.ds-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-top: 1px dashed var(--line); padding-top: 10px; }
.ds-xtgrid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.ds-xt { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ds-xtn { color: var(--faint); font-size: 10px; font-weight: 700; }

/* Whiteboard mode (full-screen takeover) */
#whiteboard { display: none; position: fixed; inset: 0; z-index: 2500; background: var(--card); flex-direction: column; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wb-top { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wb-airplay { font-size: 12px; font-weight: 600; color: var(--success); background: var(--success-50); border: 1px solid #bfe3cf; border-radius: 999px; padding: 4px 11px; }
.wb-tb { background: var(--card); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wb-tb:hover { transform: none; background: var(--line-2); }
.wb-pagelbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wb-stage { position: relative; flex: 1; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wb-stage #wbCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; z-index: 5; cursor: crosshair; }
.wb-grid { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; padding: 14px; }
.wb-card { position: relative; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 12px 8px 48px; min-width: 0; }
.wb-num { position: absolute; left: 11px; top: 10px; width: 26px; height: 26px; border-radius: 8px; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.wb-num.big { position: static; width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
.wb-q { font-size: 22px; font-weight: 700; color: var(--ink); text-align: center; }
.wb-q.big { font-size: 39px; }
.wb-q .gen-clock { width: 90px; height: 90px; }
.wb-q.big .gen-clock { width: 150px; height: 150px; }
.wb-q .gen-qtext { font-size: 14px; color: var(--muted); }
.wb-focus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; padding: 40px; }
.wb-toolbar { display: flex; gap: 7px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--page); flex-wrap: wrap; }
.wb-popup { position: absolute; right: 18px; top: 16px; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(20,24,29,.25); overflow: hidden; z-index: 10; }
.wb-popup-head { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line-2); background: var(--page); }
.wb-popup-head b { font-size: 12.5px; color: var(--teal-700); }
.wb-popup-head button { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; }
.wb-popup-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 10px; }
.wb-cell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-size: 10.5px; font-weight: 600; background: var(--page); color: var(--ink); border-radius: 3px; }
.wb-cell.hdr { background: var(--teal-50); color: var(--teal-700); font-weight: 700; }

/* ===================================================================
   MARKBOOK › MARKING  (book sets, activities, marking list, comment bank)
   =================================================================== */
/* sets bar */
.mk-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.mk-barlbl { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.mk-spacer { flex: 1; }
.mk-set {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mk-set:hover { border-color: var(--teal-500); background: var(--card); transform: none; }
.mk-set.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.mk-set.active:hover { background: var(--ink); }
.mk-setedit {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; background: var(--page);
}
.mk-setname { border: 0; outline: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink); width: 104px; padding: 0; }
.mk-setname:focus { box-shadow: none; }
.mk-setx {
  border: 0; background: var(--coral-50); color: var(--coral-600);
  border-radius: 50%; width: 22px; height: 22px; font-size: 12px; padding: 0; line-height: 1;
}
.mk-setx:hover { background: var(--coral-100); transform: none; }
.mk-newset {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px dashed var(--teal-500); border-radius: 999px; padding: 3px 4px 3px 12px; background: var(--teal-50);
}
.mk-newsetin { border: 0; outline: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--teal-700); width: 90px; padding: 0; }
.mk-newsetin:focus { box-shadow: none; }
.mk-newsetin::placeholder { color: var(--teal-500); }
.mk-newsetadd { border: 0; background: var(--teal-600); color: #fff; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; padding: 0; line-height: 1; }

/* two columns */
.mk-cols { display: grid; grid-template-columns: 312px 1fr; gap: 16px; align-items: start; }
@media (max-width: 880px){ .mk-cols { grid-template-columns: 1fr; } }

/* activities */
.mk-actcol { padding: 16px; }
.mk-actcol-head { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; }
.mk-act {
  position: relative; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 11px; padding: 11px 13px; margin-bottom: 9px; cursor: pointer;
}
.mk-act:hover { border-color: var(--teal-500); }
.mk-act.active { border-color: var(--teal-500); background: var(--teal-50); }
.mk-actx { position: absolute; top: 7px; right: 7px; border: 0; background: transparent; color: var(--faint); font-size: 13px; padding: 2px; }
.mk-actx:hover { background: transparent; color: var(--coral-600); transform: none; }
.mk-act-title { font-size: 14.5px; font-weight: 700; color: var(--ink); padding-right: 18px; }
.mk-act-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mk-prog { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.mk-prog-track { flex: 1; height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.mk-prog-fill { display: block; height: 100%; border-radius: 999px; background: var(--teal-600); }
.mk-prog-lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.mk-addact {
  width: 100%; border: 1.5px dashed var(--teal-500); color: var(--teal-700); background: var(--teal-50);
  border-radius: 11px; padding: 11px; font-size: 13.5px; font-weight: 600;
}
.mk-addact:hover { background: var(--teal-50); border-color: var(--teal-600); transform: none; }
.mk-actform { border: 1.5px solid var(--teal-100); border-radius: 11px; padding: 13px; background: var(--teal-50); }
.mk-actform-in { margin-bottom: 9px; }
.mk-actform-row { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.mk-actform-lbl { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mk-actform-row input[type=date] { width: auto; flex: 1; }
.mk-actform-btns { display: flex; gap: 8px; }
.mk-actform-btns button:first-child { flex: 1; }

/* marking list */
.mk-list { padding: 16px; min-width: 0; }
.mk-list-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.mk-list-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mk-list-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.mk-datepills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.mk-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; color: var(--muted); }
.mk-pill b { color: var(--ink); }
.mk-pill.marked { border-color: var(--teal-100); background: var(--teal-50); color: var(--teal-700); }
.mk-pill.marked b { color: var(--teal-700); }
.mk-sortbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-sortlbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.mk-sortbtn { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; }
.mk-sortbtn:hover { background: var(--line-2); transform: none; }
.mk-sortbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mk-sortbtn.on:hover { background: var(--ink); }

.mk-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mk-thead, .mk-row { display: flex; align-items: center; gap: 11px; padding: 9px 14px; }
.mk-thead {
  background: var(--line-2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--faint); font-weight: 700;
}
.mk-row { border-top: 1px solid var(--line); }
.mk-row .mk-ava {
  width: 30px; height: 30px; border-radius: 50%; background: var(--teal-50); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: 0 0 auto;
}
.mk-thead .mk-ava { width: 30px; background: none; }
.mk-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.mk-thead .mk-name { font-weight: 700; }
.mk-last { width: 78px; font-size: 12.5px; font-weight: 600; color: var(--muted); flex: 0 0 auto; }
.mk-last.never { color: var(--coral-600); }
.mk-thead .mk-last { color: var(--faint); }
.mk-mark {
  width: 104px; flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--faint);
  border-radius: 999px; padding: 5px 8px; font-size: 12.5px; font-weight: 600;
}
.mk-mark:hover { background: var(--line-2); transform: none; }
.mk-mark.on { border-color: var(--teal-100); background: var(--teal-50); color: var(--teal-700); }
.mk-thead .mk-mark { background: none; border: 0; color: var(--faint); padding: 0; font-weight: 700; }
.mk-met { width: 62px; display: inline-flex; gap: 4px; justify-content: center; flex: 0 0 auto; }
.mk-thead .mk-met { text-align: center; display: block; }
.mk-met-y, .mk-met-n { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); color: var(--faint); border-radius: 7px; font-size: 13px; padding: 0; }
.mk-met-y:hover, .mk-met-n:hover { background: var(--line-2); transform: none; }
.mk-met-y.on { border-color: var(--success); background: var(--success); color: #fff; }
.mk-met-n.on { border-color: var(--coral-500); background: var(--coral-500); color: #fff; }
.mk-commentwrap { flex: 1.1; display: flex; align-items: center; gap: 5px; min-width: 0; }
.mk-commentwrap .mk-comment { flex: 1 1 auto; }
.mk-mk {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px;
  background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100);
  white-space: nowrap;
}
.mk-comment {
  flex: 1.1; text-align: left; font-size: 13px; font-weight: 500; color: var(--faint);
  background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.mk-comment:hover { background: var(--line-2); transform: none; }
.mk-comment.has { color: var(--ink); background: var(--page); border: 1px solid var(--line); }
.mk-thead .mk-comment { background: none; border: 0; color: var(--faint); padding: 0; font-weight: 700; }
.mk-empty { color: var(--muted); padding: 24px; text-align: center; font-size: 13.5px; }
.mk-empty.big { padding: 36px 24px; border: 1.5px dashed var(--line); border-radius: 12px; }

/* comment editor — centred popup */
.mk-back {
  position: fixed; inset: 0; z-index: 2600; background: rgba(20,24,29,.45);
  display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box;
  animation: mkFade .12s ease;
}
@keyframes mkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mkPop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.mk-modal {
  width: 560px; max-width: 100%; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(20,24,29,.28);
  padding: 20px; box-sizing: border-box; animation: mkPop .14s ease;
}
.mk-modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mk-modal-title { font-size: 17px; font-weight: 700; }
.mk-modal-ctx { font-size: 12.5px; color: var(--muted); }
.mk-modal-x { border: 0; background: var(--line-2); color: var(--muted); border-radius: 8px; width: 30px; height: 30px; font-size: 15px; padding: 0; }
.mk-modal-x:hover { background: var(--border); color: var(--ink); transform: none; }
/* permanent customisable quick-insert buttons (top of the comment modal) */
.mk-qbrow {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 11px; margin-bottom: 12px;
  background: var(--page); border: 1px solid var(--line); border-radius: 11px;
}
.mk-qblbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--faint); margin-right: 2px; }
.mk-qbtn {
  border: 1px solid var(--teal-100); background: var(--teal-50); color: var(--teal-700);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600;
}
.mk-qbtn:hover { background: var(--teal-100); transform: none; }
.mk-qbtn.on { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.mk-qbtn.on:hover { background: var(--teal-700); }
.mk-qbempty { font-size: 12.5px; color: var(--faint); }
.mk-qbtoggle { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 600; }
.mk-qbtoggle:hover { background: var(--line-2); transform: none; }
.mk-qbedit { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; background: var(--card); }
.mk-qbname { border: 0; outline: none; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ink); width: 132px; padding: 0; }
.mk-qbname:focus { box-shadow: none; }

.mk-draft { width: 100%; min-height: 66px; line-height: 1.45; font-size: 14px; }
.mk-savebank {
  margin-top: 8px; border: 1px dashed var(--teal-500); color: var(--teal-700); background: var(--teal-50);
  border-radius: 9px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
}
.mk-savebank:hover { background: var(--teal-50); border-color: var(--teal-600); transform: none; }
.mk-bankhead { display: flex; align-items: center; gap: 10px; margin: 16px 0 11px; }
.mk-bankhead span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mk-hr { flex: 1; height: 1px; background: var(--line); }
.mk-search { display: flex; align-items: center; gap: 9px; background: var(--page); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; margin-bottom: 10px; }
.mk-search input { border: 0; outline: none; background: transparent; font-size: 13.5px; flex: 1; padding: 0; }
.mk-search input:focus { box-shadow: none; }
.mk-banktabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mk-banktab { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; }
.mk-banktab:hover { background: var(--line-2); transform: none; }
.mk-banktab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mk-banktab.on:hover { background: var(--ink); }
.mk-banklist { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow: auto; }
.mk-bankrow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.mk-bankrow:hover { border-color: var(--teal-500); }
.mk-fav { border: 0; background: transparent; font-size: 15px; padding: 0; color: var(--faint); width: auto; }
.mk-fav:hover { background: transparent; transform: none; }
.mk-fav.on { color: var(--gold-500); }
.mk-banktext { flex: 1; font-size: 13.5px; color: var(--ink); }
.mk-bankuses { font-size: 11px; color: var(--faint); font-weight: 600; }
.mk-modal-btns { display: flex; gap: 9px; margin-top: 16px; }
.mk-modal-btns button:first-child { flex: 1; }

/* marking toast (self-contained) */
.mk-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%); z-index: 2800;
  background: var(--toast-bg); color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.28);
  transition: transform .18s ease-out; max-width: 90vw;
}
.mk-toast.show { transform: translate(-50%, 0); }

/* whole-class feedback panel */
.mk-fbtoggle {
  border: 1px solid var(--teal-100); background: var(--teal-50); color: var(--teal-700);
  border-radius: 9px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
}
.mk-fbtoggle:hover { background: var(--teal-100); transform: none; }
.mk-fbpanel { margin-top: 16px; padding: 18px; }
.mk-fbhead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mk-fbtitle { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mk-fbsub {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  color: var(--faint); margin: 16px 0 9px;
}
.mk-fblink { border: 0; background: transparent; color: var(--teal-600); font-size: 11.5px; font-weight: 700; padding: 0; text-transform: none; letter-spacing: 0; }
.mk-fblink:hover { background: transparent; transform: none; text-decoration: underline; }
.mk-fbcols { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; align-items: flex-start; }
.mk-fbcol { flex: 0 0 auto; min-width: 132px; max-width: 200px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mk-fbcol-head { padding: 8px 11px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mk-fbcol-head.met { background: var(--success-50); color: var(--success); }
.mk-fbcol-head.not { background: var(--coral-50); color: var(--coral-600); }
.mk-fbcol-head.mk { background: var(--teal-50); color: var(--teal-700); }
.mk-fbn { margin-left: auto; font-size: 11px; font-weight: 800; opacity: .8; }
.mk-fbname { padding: 7px 11px; font-size: 13px; font-weight: 600; color: var(--ink); border-top: 1px solid var(--line-2); }
.mk-fbcomments { display: flex; flex-direction: column; gap: 8px; }
.mk-fbcomment { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.mk-fbctext { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mk-fbcnames { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mk-fbsummary { width: 100%; min-height: 120px; line-height: 1.5; font-size: 13.5px; white-space: pre-wrap; }
.mk-fbbtns { display: flex; gap: 9px; margin-top: 10px; }
.mk-fbbtns button:first-child { flex: 0 0 auto; }

/* Print: show only the dedicated starter print container */
#starterPrint { display: none; }
@media print {
  body[data-mode] #teach, #planApp, .ql-backdrop, .ql-toastwrap, #whiteboard { display: none !important; }
  #starterPrint { display: block !important; }
}
