/* HELEN IELTS – shared styles for the class pages, login and account (desktop first; phone layout comes later). */
@import url("tokens.css");   /* the design tokens (design system, 01/11/2026): one source for both app.css and exam.css */
/* the older names, kept as aliases of the tokens (same values), so every rule written before still works */
:root {
  --ink: var(--c-text-1); --ink-2: var(--c-text-2); --muted: var(--c-text-3); --line: var(--c-border); --line-2: var(--c-border-2); --bg: var(--c-surface-2);
  --brand: var(--c-brand); --brand-2: var(--c-brand-strong); --brand-bg: var(--c-brand-soft); --brand-soft: var(--c-brand-tint);
  --ok: var(--c-success); --ok-bg: var(--c-success-bg); --warn: var(--c-warn); --warn-bg: var(--c-warn-bg); --bad: var(--c-danger-strong); --bad-bg: var(--c-danger-bg); --red: var(--c-danger);
  --serif: var(--font-serif); --sans: var(--font-sans); --mono: var(--font-mono);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
/* :where() keeps the old weight (0,1,1); a.btn is left out so a button link keeps its own text colour on hover
   (09/11/2026: a.btn text went navy on navy). */
a:where(:not(.btn)):hover { color: var(--brand-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.2; }
h2 { margin: 0; font-size: 20px; font-weight: 600; }
h3 { margin: 0; font-size: 16px; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.b { font-weight: 600; }
.serif { font-family: var(--serif); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; gap: 12px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.box { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.box.tight { padding: 12px 14px; }
.box.highlight { border: 2px solid var(--brand); }
.box.empty { border-style: dashed; color: var(--muted); text-align: center; padding: 28px 20px; }
.err-box { border-color: #F3C7C7; background: var(--bad-bg); color: var(--bad); }
.stat { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .n { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; color: var(--brand); }
.stat .l { font-size: 14px; color: var(--muted); }
.stat.warn .n { color: #B45309; }
.stat.bad .n { color: var(--bad); }

/* header */
#site-header { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.hdr { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-text { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.06em; }
.logo-text span { color: var(--brand); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); }
.main-nav a[aria-current="page"] { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
details.acct { position: relative; }
details.acct summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 5px; border: 1px solid #CBD2DB; border-radius: 999px; background: #FFFFFF; cursor: pointer; }
details.acct summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.acct-name { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.acct-n { font-size: 14px; font-weight: 600; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-r { font-size: 12px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 250px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(24, 32, 43, 0.16); padding: 6px; display: flex; flex-direction: column; }
.menu-head { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: #F2F5F9; }
.menu .danger { color: var(--red); }

/* back bar */
#back-bar { position: sticky; top: 0; z-index: 30; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.backbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid #CBD2DB; border-radius: 10px; text-decoration: none; color: var(--brand); background: #FFFFFF; }
.back .sep { width: 1px; height: 18px; background: var(--line); }
.backbar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0; }   /* nav-words: a 44 px button here (Download PDF) must not make the row taller than Back (40 px): Back stays at the same place on every page */

/* buttons, forms */
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #FFFFFF; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--brand-2); }
.btn.ghost { background: #FFFFFF; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-bg); }
.btn.quiet { background: #FFFFFF; color: var(--ink-2); border-color: #CBD2DB; }
.btn.quiet:hover { background: #F2F5F9; }
.btn.danger { background: #FFFFFF; color: var(--red); border-color: #E6B8B3; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; }
label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.fld > span.hint { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
  font: inherit; font-size: 15px; font-weight: 400; min-height: 44px; width: 100%; padding: 8px 12px; border: 1px solid #B8C1CE; border-radius: 8px; background: #FFFFFF; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 400; cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.err { color: var(--red); }
.panel .form-msg:empty { min-height: 0; margin-top: -10px; }
.form-msg.ok { color: var(--ok); }

/* chips, badges, status */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.chip.on, .chip[aria-checked="true"] { border-color: var(--brand); background: var(--brand-bg); }
.chip.sm { min-height: 34px; font-size: 13px; padding: 0 12px; border-width: 1px; border-color: #CBD2DB; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #F1F3F6; color: var(--muted); white-space: nowrap; }
.badge.brand { background: var(--brand-bg); color: var(--brand); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.option { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.option.on, .option[aria-checked="true"] { border-color: var(--brand); background: var(--brand-bg); }
.option .t { font-weight: 600; }
.option .h { font-size: 13px; color: var(--muted); }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; cursor: pointer; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-weight: 400; color: var(--muted); }

/* tables */
table.list { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; font-size: 14px; }
table.list th { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #FAFBFC; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* lists of items */
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.item .main { flex: 1 1 260px; min-width: 0; }
.item .title { font-weight: 600; }
.item .meta { font-size: 13px; color: var(--muted); }
.item.selected { border-color: var(--brand); background: var(--brand-bg); }
.timeline { display: flex; flex-direction: column; }
.timeline > div { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.timeline > div:last-child { border-bottom: 0; }
.timeline .dot { margin-top: 6px; }

/* class card colour band */
.class-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; border-top: 5px solid var(--brand); }

/* code */
.code { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: 0.3em; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: 0.2s; background: var(--ink); color: #FFFFFF; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 100; pointer-events: none; max-width: min(520px, calc(100vw - 32px)); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); }

/* login page */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 20px; }
.auth-card { width: min(420px, 100%); background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--brand-bg); color: var(--brand); font-size: 14px; }

/* grading */
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.criteria label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.essay { white-space: pre-wrap; font-size: 15px; line-height: 1.7; background: #FAFBFC; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.band-big { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--brand); }

/* class pages (teacher and student): white head band with the tabs, two-column layouts, row lists */
.chead { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.chead > .wrap { padding-top: 4px; display: flex; flex-direction: column; gap: 8px; }   /* class-head: the class name row is in the Back bar; here only notices + the tabs */
.chead:empty { display: none; }
.ctabs { display: flex; flex-wrap: wrap; gap: 2px; }
.ctabs button { font: inherit; font-weight: 600; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.ctabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.cmain { max-width: 1240px; margin: 0 auto; padding: 24px 24px 56px; }
.lay { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.lay > .grow { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lay > .side { flex: 1 1 300px; min-width: 0; }
.panel { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.panel h2, .grow > h2 { font-size: 18px; }
.panel.side h2, .side .panel h2 { font-size: 16px; }
.rows { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.rows > .r { border-bottom: 1px solid var(--line-2); }
.rows > .r:last-child { border-bottom: 0; }
.rows .rh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 8px; margin: 0 -8px; border-radius: 8px; }
.rows .rh.open { background: #EEF3F8; }
.rows .rh .main { flex: 1 1 240px; min-width: 0; }
.rows .foot { padding: 12px 0; font-size: 13px; color: var(--muted); }
.embed { margin: 4px 0 14px; border: 2px solid var(--brand); border-radius: 12px; padding: 12px 14px; background: #FFFFFF; display: flex; flex-direction: column; gap: 12px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: #EEF0F3; color: var(--ink-2); white-space: nowrap; }
.tag.brand { background: var(--brand); color: #FFFFFF; }
.tag.soft { background: var(--brand-bg); color: var(--brand); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #EEF0F3; color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.brand { background: var(--brand-bg); color: var(--brand); }
/* type tag before an assignment's title (30/10/2026): Graded = solid brand blue, Practice = white with a grey border, so
   neither reads as a status pill (those are tinted, no border) */
.type-tag { display: inline-block; vertical-align: 1px; font-size: 12px; font-weight: 600; line-height: 18px; padding: 0 8px; margin-right: 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.type-tag.test { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }   /* modes (01/11/2026): Test / Graded / Practice */
.type-tag.graded { background: var(--brand-bg); border-color: var(--brand); color: var(--brand); }
.type-tag.practice { background: #FFFFFF; border-color: #A9B2BE; color: var(--ink-2); }
/* step bar of an assignment row (30/10/2026, student-class/step-bar.js): joined chevron segments; the outline is a
   drop-shadow because the clipped shape has no border */
/* (30/10/2026) a long bar wraps onto a second line; labels are never cut */
.stepbar { display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; list-style: none; margin: 8px 0 0; padding: 0 0 0 1px; max-width: 100%; min-width: 0; flex-basis: 100%; }
.stepbar .sb-step { flex: 0 0 auto; margin-right: -7px; filter: drop-shadow(0 0 0.6px #8A93A0) drop-shadow(0 0 0.4px #8A93A0); }
.stepbar .sb-step:last-child { margin-right: 0; }
.stepbar .sb-btn { display: flex; align-items: center; justify-content: center; gap: 2px; box-sizing: border-box; height: 34px; min-width: 100%; padding: 0 16px 0 20px; border: 0; margin: 0; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-decoration: none; cursor: default;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); background: #F1F3F6; color: #8A93A0; }
.stepbar .sb-step:first-child .sb-btn { padding-left: 14px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.stepbar .sb-step:last-child .sb-btn { padding-right: 14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 8px 8px 0; }
.stepbar .sb-step:only-child .sb-btn { clip-path: none; border-radius: 8px; padding: 0 14px; }
.stepbar .sb-l { white-space: nowrap; }
.stepbar a.sb-btn, .stepbar button.sb-btn { cursor: pointer; }
.stepbar .past .sb-btn, .stepbar .open .sb-btn, .stepbar .partial .sb-btn { background: #FFFFFF; color: var(--ink-2); }
.stepbar .past .sb-ic { color: var(--brand); }
.stepbar .open .sb-btn { color: var(--brand); }
.stepbar .partial .sb-ic { color: #D97706; font-size: 14px; }
.stepbar .past a.sb-btn:hover, .stepbar .past button.sb-btn:hover, .stepbar .open .sb-btn:hover, .stepbar .partial .sb-btn:hover { background: #EEF3F8; }
.stepbar .current { z-index: 1; filter: none; }
.stepbar .current .sb-btn { height: 40px; font-size: 14px; padding: 0 20px 0 24px; background: var(--brand); color: #FFFFFF; }
.stepbar .current:first-child .sb-btn { padding-left: 18px; }
.stepbar .current a.sb-btn:hover, .stepbar .current button.sb-btn:hover { background: var(--brand-2); color: #FFFFFF; }
/* (white text on the orange / red fill: the tone classes "late" and the state class "late" share a name, so the colour is set here too) */
.stepbar .current.soon .sb-btn, .stepbar .current.rewrite .sb-btn { background: #B45309; color: #FFFFFF; }
.stepbar .current.soon .sb-btn:hover, .stepbar .current.rewrite .sb-btn:hover { background: #8A3F06; color: #FFFFFF; }
.stepbar .current.late .sb-btn { background: #B42318; color: #FFFFFF; }
.stepbar .current.late .sb-btn:hover { background: #8E1B1B; color: #FFFFFF; }
.stepbar .waiting .sb-btn { background: var(--brand-bg); color: var(--brand); }
.stepbar .opens .sb-btn { background: #FFFFFF; color: var(--ink-2); }
.stepbar .missed .sb-btn { background: var(--bad-bg); color: var(--bad); }
.stepbar .late:not(.current) .sb-btn { background: var(--bad-bg); color: var(--red); }
.stepbar .done .sb-btn { background: var(--ok-bg); color: var(--ok); }
.stepbar .sb-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #F2B705; }
.stepbar .sb-bad { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--bad-bg); color: var(--red); font-size: 11px; line-height: 16px; white-space: nowrap; }
/* the teacher's bar (teacher-class/step-bar-teacher.js): its own line under the row, the whole width of the table */
.stepbar.teacher { max-width: 100%; margin-top: 0; flex: 0 1 auto; }
.tbl tr:has(+ tr.tsb-row) td { border-bottom: 0; padding-bottom: 8px; }
[data-asg].asg-hl { box-shadow: inset 4px 0 0 var(--brand); background: #F3F7FB; }
[data-asg][data-asg-back] { transition: background-color .8s ease, box-shadow .8s ease; }   /* back from a room: the highlight fades (02/11/2026) */
.tbl tr.tsb-day th { padding: 0; border-bottom: 0; background: none; text-transform: none; letter-spacing: 0; }
/* day headers of the class lists (student Assignments; teacher Assignments, Grading, Results), user 30/10/2026: easy to spot */
/* 31/10/2026: clearer (darker band, stronger edge) + a gap above it, except the first one */
.day-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 12px 18px 12px 14px; font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: .01em; color: #1F2A37; background: #DFE5ED; border-left: 6px solid #3E5068; border-top: 1px solid #C9D2DD; border-bottom: 1px solid #C9D2DD; text-align: left; }
.day-head:first-child, .tbl .day-head { margin-top: 0; }
.tbl tr.tsb-day:not(:first-child) th { padding-top: 20px; }
.day-head .day-n { margin-left: auto; min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.day-head.is-today { background: var(--brand-bg); color: var(--brand); border-left-color: var(--brand); }
.day-head.is-today .day-n { color: var(--brand); border-color: var(--brand-soft); }
/* tier 2: the students of one assignment under its row */
.tsb-students { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.tsb-students li { display: grid; grid-template-columns: minmax(150px, 220px) auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 8px; background: #FFFFFF; font-size: 13px; }
.tsb-dots { display: inline-flex; gap: 4px; }
.tsb-dot { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; font-size: 12px; border-radius: 999px; color: #8A93A0; }
.tsb-dot.done { color: var(--brand); font-weight: 700; } .tsb-dot.now { color: var(--brand); } .tsb-dot.part { color: #D97706; } .tsb-dot.bad { color: var(--red); background: var(--bad-bg); font-weight: 700; }
.tsb-text { color: var(--ink-2); min-width: 0; } .tsb-text.bad { color: var(--red); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.seg button[aria-checked="true"] { border-color: var(--brand); background: var(--brand-bg); }
.seg.sq button { border-radius: 8px; }
.seg.sm button { font-size: 13px; min-height: 36px; padding: 0 10px; }
.seg button:disabled { color: var(--muted); border-color: #E2E6EC; cursor: default; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.tile .v { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--brand); }
.tile .l { font-size: 14px; font-weight: 600; }
.tile .n { font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: #EEF0F3; }
.bar > div { height: 8px; border-radius: 999px; background: var(--brand); }
.score { min-width: 64px; text-align: right; }
.score .v { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--brand); line-height: 1.1; }
.score .u { font-size: 12px; color: var(--muted); }
.tbl { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tlink { font: inherit; font-size: 14px; font-weight: 600; border: 0; padding: 0 2px; min-height: 32px; background: transparent; color: var(--brand); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.tlink.bad { color: var(--bad); }
.btn.outline { background: #FFFFFF; color: var(--brand); border-color: var(--brand); }
.btn.outline:hover { background: var(--brand-bg); }
.alertbox { padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: #6B3500; font-size: 14px; }
.infobox { padding: 8px 12px; border-radius: 8px; background: #EEF0F3; color: var(--ink-2); font-size: 14px; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hist .dot { margin-top: 6px; }
main.wrap > div:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.need-db { border: 1px dashed #B8C1CE; border-radius: 12px; padding: 18px 20px; color: var(--muted); background: #FFFFFF; }

@media (max-width: 720px) {
  .acct-name { display: none; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 26px; }
}

/* notifications bell (students) */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: var(--ink-2); }
.bell:hover { background: #F2F5F9; }
.bell[aria-current="page"] { background: var(--brand-bg); color: var(--brand); }
.bell-n { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: #B42318; color: #FFFFFF; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; }
/* Writing grading board (teacher-class/grade-writing.js; mockup TeacherGradeWriting) */
.embed:has(> .gw) { padding: 10px 12px; background: #F4F5F7; }
.gw { display: flex; flex-direction: column; gap: 16px; }
.gw-bar { position: sticky; top: 0; z-index: 12; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.gw-nav { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gw-nav:disabled { opacity: 0.4; cursor: default; }
.gw-keys { font-size: 12px; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gw kbd, .gw-pop kbd { font: inherit; font-size: 11px; padding: 0 5px; border: 1px solid #C9CFD8; border-bottom-width: 2px; border-radius: 4px; background: #FFFFFF; color: #2B3442; }
.btn.okb { background: #1E6B3A; border-color: #1E6B3A; }
.gw-banner { background: #E3F1E7; color: #1E5631; border: 1px solid #B7DCC3; border-radius: 10px; padding: 12px 16px; font-weight: 500; }
.gw-main { display: flex; align-items: flex-start; gap: 20px; }
.gw-ui { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.gw-left { flex: 1 1 250px; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gw-mid { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gw-right { flex: 1 1 320px; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gw-queue { flex: 0 0 270px; width: 270px; box-sizing: border-box; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px; position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow-y: auto; }
@media (max-width: 1100px) { .gw-main { flex-direction: column; align-items: stretch; } .gw-queue { width: 100%; flex: none; position: static; max-height: none; } }
.gw-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.gw-cap { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gw-facts { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; }
.gw-facts > span:nth-child(even) { text-align: right; }
.gw-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gw-tasks button { font: inherit; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #F8F9FB; cursor: pointer; display: flex; flex-direction: column; }
.gw-tasks button.on { border: 2px solid var(--brand); padding: 7px 11px; background: #EEF3F8; color: var(--brand); }
.gw-stats { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gw-stats > div { background: #F8F9FB; border-radius: 8px; padding: 10px 12px; }
.gw-chip { font-size: 13px; background: #EEF1F5; color: #2B3442; padding: 3px 8px; border-radius: 6px; }
.gw-chip.warm { background: #FDEBD3; color: #7A3E00; }
.gw-ai-ico { width: 40px; height: 40px; border-radius: 10px; background: #EEF3F8; display: flex; align-items: center; justify-content: center; flex: none; }
.gw-cat { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid #C9CFD8; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.gw-cat .dot { width: 10px; height: 10px; border-radius: 50%; }
.gw-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.gw-tb { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 10px; border-radius: 6px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.gw-tb.on { background: var(--brand-bg); border-color: var(--brand); color: var(--brand); }
.gw-tb.ok:not(:disabled) { color: #1E5631; } .gw-tb.bad:not(:disabled) { color: #8E1B1B; }
.gw-tb:disabled { opacity: 0.45; cursor: default; }
.gw-sep { width: 1px; height: 24px; background: var(--line); }
.gw-select { font: inherit; font-size: 13px; min-height: 36px; padding: 0 8px; border: 1px solid #CBD2DB; border-radius: 6px; background: #FFFFFF; }
.gw-select.sm { min-height: 30px; font-size: 13px; }
.gw-essay { font-family: var(--serif); font-size: 18px; line-height: 1.85; color: var(--ink); max-width: 760px; white-space: pre-wrap; }
.gw-m { padding: 0 2px; border-radius: 2px; border-bottom: 2px solid; cursor: pointer; }
.gw-m.pending { border-bottom-style: dashed; }
.gw-m.sel { outline: 2px solid #18202B; outline-offset: 2px; }
.gw-m del { color: #8A2E1F; text-decoration: line-through; text-decoration-thickness: 2px; }
.gw-m ins { color: #1E5631; text-decoration: underline; text-decoration-thickness: 2px; background: #E3F1E7; margin-left: 3px; padding: 0 2px; border-radius: 2px; }
.gw-essay.simple .gw-m del { text-decoration: none; color: inherit; }
.gw-fin { background: #E3F1E7; border-radius: 2px; }
.gw-ann { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--line); }
.gw-ann.sel { background: #EEF3F8; border-color: var(--brand); }
.gw-tag { flex: none; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; margin-top: 2px; }
.gw-ann-t { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.gw-src { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; color: var(--muted); border: 1px solid #D5DAE1; border-radius: 4px; padding: 1px 5px; }
.gw-sm { min-height: 36px; min-width: 44px; padding: 0 10px; border-radius: 6px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.gw-sm.pri { border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.gw-bands { margin-top: 8px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gw-bands button { height: 52px; padding: 0; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; line-height: 1; }
.gw-bands button.ai { border: 1px dashed var(--brand); }
.gw-bands button.on { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.gw-bands .ai-l { font-size: 10px; letter-spacing: 0.05em; }
.gw-hint { margin-top: 8px; font-size: 13px; color: var(--ink-2); background: #F8F9FB; border-radius: 6px; padding: 8px 10px; }
.gw-crit-on { box-shadow: -10px 0 0 -7px var(--brand); }
.gw-dark { background: #18202B; color: #FFFFFF; border-radius: 12px; padding: 20px; }
.gw-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gw-ta { margin-top: 12px; width: 100%; box-sizing: border-box; border: 1px solid #CBD2DB; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; }
.gw-bank { font: inherit; font-size: 12px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--brand); cursor: pointer; max-width: 100%; white-space: normal; text-align: left; }
.gw-bank.dashed { border-style: dashed; background: transparent; color: var(--ink-2); }
.gw-qf { min-height: 36px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); }
.gw-qf.on { font-weight: 600; border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.gw-ql { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gw-ql button { display: block; width: 100%; box-sizing: border-box; min-height: 44px; text-align: left; font: inherit; color: var(--ink); padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); background: #FFFFFF; }
.gw-ql button:hover { border-color: #9FB3C8; }
.gw-ql button.on { border-color: var(--brand); background: #EEF3F8; box-shadow: inset 3px 0 0 var(--brand); }
.gw-empty { margin-top: 12px; font-size: 14px; color: #1E5631; background: #E3F1E7; border-radius: 8px; padding: 10px 12px; }
.gw-pop { position: fixed; z-index: 80; background: #FFFFFF; border: 1px solid #CBD2DB; border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 32, 43, 0.22); padding: 12px 14px; box-sizing: border-box; outline: none; }
.gw-pc { font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.gw-pc[aria-checked="true"] { background: var(--bg); border-color: var(--line); box-shadow: inset 0 0 0 2px var(--line); }
.gw-pc[aria-checked="true"] { background: var(--bg, #EEF0F3); }
.gw-in { font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; min-height: 36px; padding: 6px 10px; border: 1px solid #CBD2DB; border-radius: 8px; }
.gw-x { font: inherit; font-size: 20px; line-height: 1; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; color: var(--muted); }

/* ---- A: student result pages (result.html, writing-feedback.html, speaking-feedback.html, reports.html) ---- */
.rs-main { max-width: 920px; margin: 0 auto; padding: 20px 16px 48px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.rs-hero { background: #18202B; color: #FFFFFF; border-radius: 14px; padding: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.rs-hero .meta { font-size: 13px; color: #B8C1CE; }
.rs-hero .lbl { font-size: 14px; color: #B8C1CE; }
.rs-hero .big { font-family: var(--serif); font-size: 64px; font-weight: 600; line-height: 1; }
.rs-hero .mid { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.rs-hero .note { font-size: 14px; color: #C9D1DC; }
.rs-hero .chip { background: #2B3442; border-radius: 10px; padding: 8px 12px; border: 0; min-height: 0; cursor: default; color: #FFFFFF; }
.rs-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rs-card > h2 { font-size: 16px; font-weight: 600; font-family: var(--sans); margin: 0; }
.rs-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rs-skill { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.rs-skill .band { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1.1; }
.rs-cmp { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; align-items: center; gap: 10px; }
.rs-track { position: relative; height: 14px; background: #EEF0F3; border-radius: 999px; }
.rs-tab { min-height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); }
.rs-tab[aria-pressed="true"] { border-color: var(--brand); background: #EEF3F8; color: var(--brand); }
.rs-essay { font-family: var(--serif); font-size: 18px; line-height: 1.85; color: var(--ink); }
.rs-essay p { margin: 0 0 18px; }
.rs-m { font: inherit; line-height: inherit; display: inline; margin: 0; padding: 0 2px; border: 0; border-radius: 2px; cursor: pointer; color: inherit; border-bottom: 2px solid; }
.rs-m.on { outline: 2px solid #18202B; outline-offset: 2px; }
.rs-m.fixed { color: #1E5631; font-weight: 600; }
.rs-m.del { text-decoration: line-through; color: #8A2E1F; }
.rs-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 12px; }
.rs-legend .dot { width: 10px; height: 10px; }
.rs-ask { border: 2px solid var(--brand); }
.rs-cap { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.rs-ta { width: 100%; box-sizing: border-box; border: 1px solid #CBD2DB; border-radius: 8px; padding: 10px 12px; font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); resize: vertical; background: #FFFFFF; }
.rs-ans { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rs-ans.on { border-color: var(--brand); }
.rs-say { font-family: var(--serif); font-size: 17px; line-height: 1.8; margin: 0; }
.rs-say sup { font-family: var(--sans); font-size: 11px; font-weight: 600; margin: 0 3px; padding: 0 4px; border-radius: 4px; border: 1px solid; background: #FFFFFF; }
.rs-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; border-radius: 8px; padding: 8px 10px; }
.rs-at { font: inherit; font-size: 12px; font-weight: 600; min-height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--brand); background: #FFFFFF; color: var(--brand); cursor: pointer; font-family: var(--mono); }
.rs-bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; border-bottom: 1px solid #CBD2DB; padding-top: 18px; }
.rs-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.rs-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #E6E9EE; border-radius: 10px; padding: 4px; }
.rs-kind button { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.rs-kind button[aria-selected="true"] { background: #FFFFFF; color: var(--brand); }
@media print {
  #site-header, #back-bar, .no-print, #toast { display: none !important; }
  body { background: #FFFFFF; }
  .rs-main { max-width: none; padding: 0; gap: 10px; }
  .rs-hero { background: #FFFFFF; color: #18202B; border: 1px solid #CBD2DB; }
  .rs-hero .meta, .rs-hero .lbl, .rs-hero .note { color: #3D4654; }
  .rs-card, .rs-skill { break-inside: avoid; }
  .rs-m { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- C: header search (Ctrl+K), password rules, My account, 404 ---- */
details.hsearch { position: relative; }
details.hsearch summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid #CBD2DB; border-radius: 999px; background: #FFFFFF; color: var(--ink-2); font-size: 14px; cursor: pointer; }
details.hsearch summary::-webkit-details-marker { display: none; }
details.hsearch summary kbd { font: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid #CBD2DB; border-radius: 5px; color: var(--muted); }
details.hsearch[open] summary { border-color: var(--brand); color: var(--brand); }
/* teacher-head (01/11/2026): Search is a compact round icon button (Ctrl K in its tooltip and name; Ctrl K still opens
   it), so the class name has room in the header row */
details.hsearch summary { justify-content: center; width: 40px; min-height: 40px; height: 40px; padding: 0; }
details.hsearch summary:hover { border-color: var(--brand); color: var(--brand); }
.hs-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(380px, calc(100vw - 32px)); background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(24, 32, 43, 0.16); padding: 8px; display: flex; flex-direction: column; }
.hs-panel input[type="search"] { font-size: 15px; }
.hs-hint { padding: 6px 10px 0; font-size: 12px; color: var(--muted); }
.hs-list { max-height: min(460px, calc(100vh - 160px)); overflow-y: auto; display: flex; flex-direction: column; }
.hs-group { padding: 8px 10px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hs-list a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 4px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); flex: none; }
.hs-list a.on { background: #F2F5F9; outline: 1px solid #CBD2DB; }
.hs-t { font-size: 14px; font-weight: 600; }
.hs-s { font-size: 12px; color: var(--muted); }
.hs-empty { padding: 12px 10px; font-size: 14px; color: var(--muted); }
.pw-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.pw-rules li.ok { color: var(--ok); }
.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; }
.auth-acct { font-size: 14px; background: var(--bg); border-radius: 8px; padding: 8px 12px; overflow-wrap: anywhere; }
.btn.block { width: 100%; min-height: 48px; }
.btn[aria-disabled="true"] { background: #8A93A0; border-color: #8A93A0; cursor: default; }
.acct-main { max-width: 880px; margin: 0 auto; padding: 28px 16px 56px; display: flex; flex-direction: column; gap: 16px; }
.acct-main section { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.acct-main h2 { font-size: 18px; }
.acct-dl { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 8px 18px; align-items: baseline; }
.acct-dl dt { color: var(--muted); }
.acct-dl dd { margin: 0; }
.acct-dl dd.act { text-align: right; }
.acct-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.acct-dev { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.acct-dev .n { flex: 1 1 260px; font-weight: 500; }
.acct-inline { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.nf-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.nf-box { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.nf-box h1 { font-size: 30px; }
.nf-box p { color: var(--ink-2); }

/* ---- B: Speaking grading board, rewrite review, grading queue, practice results, gradebook messages ---- */
.gs-note { background: #EEF0F3; color: var(--ink-2); border: 1px solid #D5DAE1; border-radius: 10px; padding: 10px 16px; gap: 10px; }
.gs-part { min-height: 44px; padding: 4px 14px; border-radius: 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.2; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); }
.gs-part.on { border-color: var(--brand); background: #EEF3F8; color: var(--brand); }
.gs-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; }
.gs-wave { margin-top: 14px; height: 64px; display: flex; align-items: center; gap: 2px; cursor: pointer; border-radius: 6px; }
.gs-wave span { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: #C9CFD8; }
.gs-wave span.on { background: var(--brand); }
.gs-pauses { position: relative; height: 6px; margin-top: 4px; }
.gs-pauses span { position: absolute; top: 0; height: 6px; border-radius: 3px; background: #E8B04A; }
.gs-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--brand); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gs-spd { min-height: 36px; min-width: 52px; padding: 0 8px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); }
.gs-spd.on { border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.gs-sel { background: #FFFFFF; border: 2px solid var(--brand); border-radius: 12px; padding: 16px; }
.gs-tr { display: flex; flex-direction: column; gap: 6px; }
.gs-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; }
.gs-row.on { background: #EEF3F8; box-shadow: inset 3px 0 0 var(--brand); }
.gs-ts { flex: none; width: 64px; min-height: 36px; border-radius: 6px; border: 1px solid #D5DAE1; background: #FFFFFF; color: var(--brand); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; cursor: pointer; user-select: none; }
.gs-ts:disabled { color: var(--muted); cursor: default; }
.gs-line { margin: 0; flex: 1; min-width: 0; font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.gw-m.dotted { border-bottom-style: dotted; }
.gs-warn { margin-top: 8px; font-size: 13px; color: #6B3500; background: #FDEBD3; border-radius: 6px; padding: 6px 10px; }
.gs-qs { margin: 8px 0 0; padding-left: 20px; font-family: var(--serif); font-size: 16px; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.rv-ask { background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.rv-cap { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); }
.rv-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.rv-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.rv-card.ok { border: 2px solid var(--ok); }
.rv-h { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.rv-text { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.75; white-space: pre-wrap; }
.rv-new { background: #D7EEDD; border-bottom: 2px solid #1E5631; }
.rv-bad { background: #FCE3C8; border-bottom: 2px solid #B45309; }
.rv-whole { display: flex; flex-direction: column; gap: 12px; font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.rv-in { background: #F3FAF5; border-left: 3px solid var(--ok); padding: 4px 10px; }
.rv-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #FDF1E3; }
.rv-check.on { background: #E3F1E7; }
.rv-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1E5631; }
.rv-opt { font: inherit; text-align: left; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.rv-opt.on { border-color: var(--brand); background: var(--brand-bg); }
.rv-opt:disabled { cursor: default; opacity: 0.7; }
.rv-sent { background: #E3F1E7; color: #1E5631; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.gq-tab { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.gq-tab[aria-selected="true"] { border-color: var(--brand); background: var(--brand-bg); }
.gq-tab span { font-weight: 400; color: var(--muted); }
.gq-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
.gq-table th, .gq-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.gq-table thead th { color: var(--muted); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.gq-table th:first-child, .gq-table td:first-child { padding-left: 16px; }
.gq-table th:last-child, .gq-table td:last-child { padding-right: 16px; text-align: right; }
.gq-table tbody th { color: var(--ink); background: transparent; font-weight: 400; }
.gq-skill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: #EEF0F3; color: var(--ink-2); }
.pr-dist { display: flex; align-items: flex-end; gap: 6px; height: 120px; border-bottom: 1px solid var(--line); padding-top: 14px; }
.pr-dist > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.pr-dist i { display: block; width: 100%; max-width: 40px; border-radius: 4px 4px 0 0; }
a.btn.disabled { opacity: 0.5; }
.msg-panel {border: 2px solid var(--brand); border-radius: 12px; background: #FFFFFF; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ---- E: peer review (student/peer-review.html, teacher Assignments › Peer review; mockups StudentPeerReview, TeacherPeerReview) ---- */
.pe-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.pe-cap { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.pe-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pe-steps li { border-radius: 10px; padding: 8px 12px; border: 2px solid var(--line); background: #FFFFFF; font-size: 14px; }
.pe-steps li.on { border-color: var(--brand); background: var(--brand-bg); }
.pe-steps li.done { background: #F3FAF5; }
.pe-steps li.done .b { color: var(--ok); }
.pe-player { background: #18202B; color: #FFFFFF; border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.pe-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #FFFFFF; color: #18202B; font-size: 16px; font-weight: 600; cursor: pointer; }
.pe-player .mono { font-family: var(--mono); }
.pe-track { flex: 1 1 200px; height: 6px; border-radius: 999px; background: #4A5566; cursor: pointer; }
.pe-track > div { height: 6px; border-radius: 999px; background: #9CC1E6; }
.pe-speed { font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid #4A5566; background: transparent; color: #FFFFFF; cursor: pointer; }
.pe-speed[aria-checked="true"] { background: #FFFFFF; color: #18202B; }
.pe-at { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #9CC1E6; background: transparent; color: #FFFFFF; cursor: pointer; }
.pe-at:disabled { opacity: 0.5; cursor: default; }
.pe-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--ink-2); }
.pe-key { width: 18px; height: 18px; border-radius: 4px; border-bottom: 3px solid; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pe-text { display: flex; flex-direction: column; gap: 14px; }
.pe-para { display: flex; gap: 10px; align-items: flex-start; border-left: 3px solid transparent; padding-left: 10px; }
.pe-para p { flex: 1; margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.8; white-space: pre-wrap; }
.pe-text.say .pe-para p { font-family: var(--sans); font-size: 16px; }
.pe-m { border-radius: 2px; border-bottom: 3px solid; cursor: pointer; }
.pe-m.sel { outline: 2px solid #18202B; outline-offset: 1px; }
.pe-m sup { font-family: var(--sans); font-size: 10px; font-weight: 600; margin-left: 1px; user-select: none; }
.pe-cm { flex: none; font: inherit; font-size: 12px; font-weight: 600; min-width: 40px; min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink-2); cursor: pointer; }
.pe-cm.has { border-color: var(--muted); background: #EEF0F3; }
.pe-li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.pe-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.pe-crit { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.pe-bandrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pe-bandrow button { font: inherit; font-weight: 600; min-height: 38px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.pe-bandrow button[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.pe-bandrow button:disabled { cursor: default; }
.pe-all { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.pe-ta { font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); padding: 8px 10px; border: 1px solid #B8C1CE; border-radius: 8px; resize: vertical; width: 100%; }
.pe-starter { font: inherit; font-size: 12px; min-height: 30px; padding: 0 8px; border-radius: 999px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--brand); cursor: pointer; }
.pe-ok { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.pe-cmp { border: 2px solid var(--brand); }
.pe-cmp-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.pe-cmp-t th, .pe-cmp-t td { padding: 6px 4px; text-align: left; border-top: 1px solid var(--line-2); }
.pe-cmp-t thead th { color: var(--muted); font-size: 13px; font-weight: 600; border-top: 0; }
.pe-cmp-t tbody th { font-weight: inherit; }
.pe-note { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.pe-pop { position: absolute; z-index: 60; width: 360px; max-width: calc(100vw - 16px); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #18202B; color: #FFFFFF; border-radius: 10px; box-shadow: 0 10px 28px rgba(24, 32, 43, 0.28); font-size: 14px; line-height: 1.4; user-select: none; }
.pe-x { font: inherit; font-size: 16px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: #B8C1CE; cursor: pointer; }
.pe-pt { font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 9px; border-radius: 8px; border: 2px solid; color: #FFFFFF; cursor: pointer; }
.pe-pl { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #C9D1DC; }
.pe-pl input { font: inherit; font-size: 14px; min-height: 34px; box-sizing: border-box; padding: 4px 8px; border: 1px solid #4A5566; border-radius: 6px; background: #2B3442; color: #FFFFFF; user-select: text; }
.pe-done { font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: #FFFFFF; color: #18202B; cursor: pointer; }
.pe-delm { font: inherit; font-size: 13px; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #8E5B5B; background: transparent; color: #F5B5B5; cursor: pointer; }
/* teacher's screen */
.pe-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pe-tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pe-tile .v { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; }
.pe-tile .l { font-size: 14px; font-weight: 600; }
.pe-tile .n { font-size: 13px; color: var(--muted); }
.pe-fil { font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.pe-fil[aria-selected="true"] { border-color: var(--brand); background: var(--brand-bg); }
.pe-fil span { font-weight: 400; color: var(--muted); }
.pe-st { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pe-rate { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 2px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.pe-rate[aria-checked="true"] { border-color: var(--brand); background: var(--brand-bg); }
/* ---- end E ---- */

/* ---- G3: Vocabulary (student/vocabulary.html, mockup StudentVocabulary), the nav badge, word lists, Dictionary tab ---- */
.main-nav a .nav-n { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #FFFFFF; }
.voc-today { flex: 2 1 460px; min-width: 0; background: var(--brand); color: #FFFFFF; border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.voc-today h2 { font-size: 15px; letter-spacing: 0.03em; color: #DCE6F0; }
.voc-today .voc-big { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; }
.voc-start { font: inherit; font-weight: 600; font-size: 17px; min-height: 52px; padding: 0 26px; border-radius: 10px; border: 0; background: #FFFFFF; color: var(--brand); cursor: pointer; margin-top: 6px; }
.voc-start:disabled { opacity: 0.6; cursor: default; }
.voc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.voc-week > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.voc-week span { font-size: 12px; color: var(--muted); }
.voc-stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.voc-stages button { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; min-height: 64px; border-radius: 10px; border: 2px solid var(--line); background: #FFFFFF; color: var(--ink); cursor: pointer; }
.voc-stages .n { font-size: 22px; font-weight: 600; line-height: 1.1; }
.voc-how { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.voc-words { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.voc-words > button { font: inherit; width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-2); border-left: 4px solid transparent; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.voc-detail { flex: 2 1 560px; min-width: 0; background: #FFFFFF; border: 1px solid #CBD2DB; border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.voc-play { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--brand); background: #FFFFFF; color: var(--brand); cursor: pointer; }
.voc-ctx { margin: 0; background: var(--bg); border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; padding: 12px 16px; }
.voc-ctx blockquote { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.voc-ctx blockquote b { font-weight: 600; background: #FFE58F; padding: 0 2px; border-radius: 3px; }
.voc-ctx figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.voc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.voc-ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.voc-fam { width: 100%; border-collapse: collapse; font-size: 14px; }
.voc-fam td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line-2); }
.voc-chip { font-size: 14px; padding: 3px 10px; border-radius: 999px; }
.voc-chip.ok { background: var(--ok-bg); color: var(--ok); }
.voc-chip.bad { background: var(--bad-bg); color: var(--bad); }
.voc-ex { font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.voc-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.voc-list { border: 1px solid var(--line); background: #FFFFFF; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.voc-list.test { border-color: #E8C9A8; background: #FDF8F1; }
.voc-session { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.voc-bar { height: 8px; border-radius: 999px; background: var(--line); }
.voc-bar > div { height: 8px; border-radius: 999px; background: var(--brand); }
.voc-card { background: #FFFFFF; border: 2px solid var(--brand); border-radius: 16px; padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.voc-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; }
.voc-big-btn { min-height: 48px; padding: 0 22px; align-self: flex-start; }
.voc-opt { font: inherit; text-align: left; min-height: 48px; padding: 8px 14px; border-radius: 10px; border: 2px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.voc-fb { border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.voc-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.voc-rates button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; padding: 8px; border-radius: 10px; cursor: pointer; }
.voc-rates button:disabled { opacity: 0.6; cursor: default; }
.wl-words { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-words span { font-size: 14px; padding: 3px 10px; border-radius: 999px; background: var(--brand-bg); color: var(--brand); }
/* ---- end G3 ---- */

/* ---- H: second marking (teacher/second-marking.html, mockup TeacherSecondMarking; the box on the grading boards) ---- */
.sm-note { background: var(--brand-bg); color: var(--brand); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.sm-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.sm-script { flex: 999 1 620px; min-width: 0; }
.sm-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sm-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.sm-script > .sm-card { padding: 18px 22px; }
.sm-task { background: var(--bg); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--ink-2); }
.sm-essay p { margin: 0 0 12px; font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.sm-essay { font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.sm-bands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.sm-bands button { font: inherit; font-weight: 600; min-height: 40px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.sm-bands button.on { border-color: var(--brand); background: var(--brand); color: #FFFFFF; }
.sm-bands button:disabled { cursor: default; }
.sm-bands button:disabled:not(.on) { color: var(--muted); }
.sm-cmpbox.close { border: 2px solid var(--ok); }
.sm-cmpbox.far { border: 2px solid #B45309; }
.sm-cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.sm-cmp th, .sm-cmp td { padding: 6px 4px; text-align: left; font-weight: 400; }
.sm-cmp thead th { color: var(--muted); font-size: 13px; font-weight: 600; }
.sm-cmp tbody tr { border-top: 1px solid var(--line-2); }
.sm-cmp tr.sm-total th, .sm-cmp tr.sm-total td { font-weight: 600; }
.sm-done { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.sm-ask, .sm-res { display: flex; flex-direction: column; gap: 8px; }
.sm-res { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #FBFCFD; }
.sm-adm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
/* ---- end H ---- */
/* ---- J: Pronunciation peer review + practice recordings (student/peer-review.html kind pronunciation, teacher peer screen, Results › practice recordings) ---- */
.pp-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); background: #FFFFFF; }
.pp-item:last-child { border-bottom: 0; }
.pp-item.ok { background: #F7FBF8; }
.pp-item.no { background: #FFF8F8; }
.pp-w { flex: 1 1 200px; min-width: 0; }
.pp-w b { font-weight: 600; font-family: "Source Serif 4", Georgia, serif; font-size: 17px; }
.pp-b { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--brand); background: #FFFFFF; color: var(--brand); cursor: pointer; white-space: nowrap; }
.pp-b.on { background: var(--brand); color: #FFFFFF; }
.pp-v { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 2px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; white-space: nowrap; }
.pp-v.ok[aria-checked="true"] { border-color: #1E5631; background: #E3F1E7; color: #1E5631; }
.pp-v.no[aria-checked="true"] { border-color: #B42318; background: #FBE9E9; color: #8E1B1B; }
.pp-v:disabled { cursor: default; opacity: 0.85; }
.pp-heard { display: flex; align-items: center; gap: 8px; flex-basis: 100%; font-size: 13px; color: var(--ink-2); }
.pp-heard select { width: auto; min-height: 34px; font-size: 13px; }
.pp-tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.pp-tag.ok { background: #E3F1E7; color: #1E5631; }
.pp-tag.no { background: #FBE9E9; color: #8E1B1B; }
.pp-recs { display: flex; flex-direction: column; gap: 8px; }
.pp-recs .pp-st { border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; overflow: hidden; }
.pp-recs .pp-st > summary { cursor: pointer; padding: 10px 14px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
/* ---- end J ---- */
/* ---- L: dictionary fix form (Test bank › Dictionary) and the rewrite due ---- */
.dfix label.fld.dfix-f.on { color: #8A3F06; }
.dfix label.fld.dfix-f.on input, .dfix label.fld.dfix-f.on textarea { border-color: #D9822B; background: #FFF8EE; }
.dfix label.fld textarea { font: inherit; font-size: 15px; font-weight: 400; min-height: 0; color: var(--ink); }
.rv-due input[type="datetime-local"], .rv-due-edit input[type="datetime-local"] { max-width: 260px; }
/* ---- end L ---- */
/* ---- I: material viewer (material-viewer.js), photos of paper work, Grading queue › Paper work ---- */
body.mv-open { overflow: hidden; }
.mv-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(24, 32, 43, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.mv { width: min(1000px, 100%); height: min(860px, calc(100vh - 32px)); background: #FFFFFF; border-radius: 12px; box-shadow: 0 20px 48px rgba(24, 32, 43, 0.28); display: flex; flex-direction: column; overflow: hidden; }
.mv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mv-head h2 { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-tag { display: inline-block; flex: none; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.mv-x { flex: none; width: 44px; height: 44px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.mv-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.mv-tabs button { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.mv-tabs button[aria-selected="true"] { border-bottom-color: var(--brand); color: var(--brand); }
.mv-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.mv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.mv-tb { font: inherit; min-width: 44px; min-height: 40px; border-radius: 8px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); cursor: pointer; padding: 0 10px; }
.mv-stage { flex: 1 1 auto; min-height: 0; overflow: auto; background: #E9ECF0; padding: 20px 16px; box-sizing: border-box; display: flex; }
.mv-stage > img.mv-img { display: block; max-width: 100%; height: auto; margin: 0 auto; align-self: flex-start; background: #FFFFFF; box-shadow: 0 2px 10px rgba(24, 32, 43, 0.14); transform-origin: center; }
.mv-pdf { flex: 1; width: 100%; height: 100%; border: 0; background: #FFFFFF; }
.mv-frame { width: min(760px, 100%); background: #18202B; border-radius: 8px; overflow: hidden; }
.mv-frame.video { aspect-ratio: 16 / 9; }
.mv-frame.page { width: 100%; flex: 1; min-height: 420px; background: #FFFFFF; }
.mv-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.mv-video { width: min(760px, 100%); max-height: 70vh; background: #18202B; border-radius: 8px; }
.mv-wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.mv-wm span { transform: rotate(-24deg); font-size: 22px; font-weight: 600; color: rgba(31, 78, 121, 0.10); white-space: nowrap; user-select: none; }
.mv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.mv-note { flex: 1 1 240px; margin: 0; font-size: 13px; }
.mv-photos { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; }
.mv-ph { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.mv-ph img { width: 96px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.btn.dashed { border: 1px dashed #8A96A8; background: var(--bg); color: var(--brand); cursor: pointer; }
.btn.dashed.busy, label.btn.busy { opacity: 0.7; pointer-events: none; }
.btn.ok-btn, .btn.ok-btn:disabled { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); opacity: 1; }
.mv-res { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-wrap: wrap; align-items: stretch; }
.mv-res-photo { flex: 1 1 340px; min-width: 0; background: #E9ECF0; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mv-res-photo img { width: min(420px, 100%); height: auto; box-shadow: 0 3px 12px rgba(24, 32, 43, 0.25); background: #FFFFFF; }
.mv-res-side { flex: 1 1 340px; min-width: 0; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.mv-comment { background: #F3FAF5; border: 1px solid #CFE6D6; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.mv-marks { display: flex; flex-direction: column; font-size: 14px; }
.mv-mrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 72px; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.mv-mrow.head { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom-color: var(--line); }
.mv-mrow.bad { background: #FFF8F6; }
.pw-check { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-wrap: wrap; }
@media (min-width: 760px) { .pw-check { overflow: hidden; flex-wrap: nowrap; } .pw-photo, .pw-key { min-height: 0; } .pw-key { overflow-y: auto; } }
.pw-photo { flex: 1 1 380px; min-width: 0; background: #E9ECF0; display: flex; flex-direction: column; }
.pw-photo .mv-stage { min-height: 360px; }
.pw-key { flex: 1 1 340px; min-width: 0; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; }
.pw-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 104px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.pw-row.head { font-size: 12px; font-weight: 600; color: var(--muted); }
.pw-tog { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink-2); }
.pw-tog[aria-pressed="true"] { border-color: #A9D3B5; background: var(--ok-bg); color: var(--ok); }
.pw-tog[aria-pressed="false"].set { border-color: #E8B4AB; background: var(--bad-bg); color: var(--bad); }
.pw-score { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--brand); }
/* ---- end I ---- */

/* ---- M: Vocabulary > Dictionary tab ---- */
.dict-search { gap: 8px; }
.dict-box { position: relative; display: flex; gap: 8px; }
.dict-box input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 18px; min-height: 48px; padding: 0 14px; border: 2px solid #CBD2DB; border-radius: 10px; background: #FFFFFF; color: var(--ink); }
.dict-box input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.15); }
.dict-box .btn { min-height: 48px; white-space: nowrap; flex: none; }
.dict-sug { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none; background: #FFFFFF; border: 1px solid #CBD2DB; border-radius: 10px; box-shadow: 0 10px 24px rgba(24, 32, 43, 0.14); max-height: 340px; overflow: auto; }
.dict-sug li { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; cursor: pointer; font-size: 15px; }
.dict-sug li[aria-selected="true"], .dict-sug li:hover { background: #EEF3F8; }
.dict-sug li .dict-dots { margin-left: auto; }
.dict-dots { font-size: 9px; letter-spacing: 1px; color: var(--brand); }
.dict-chip { font: inherit; font-size: 14px; min-height: 32px; padding: 3px 12px; border-radius: 999px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--brand); cursor: pointer; }
.dict-chip:hover { border-color: var(--brand); }
.dict-chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.dict-chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.dict-entry { flex: none; }
.dict-pos { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.dict-pos h3 { font-size: 15px; font-style: italic; color: var(--brand); }
.dict-senses { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.dict-senses li::marker { color: var(--muted); font-weight: 600; }
.dict-ex { margin-top: 2px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); }
.dict-ex::before { content: "\2022  "; color: var(--muted); font-style: normal; }
.dict-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #FDF1E3; color: #8A3F06; vertical-align: 2px; }
/* ---- end M ---- */
/* ---- Q: half-band selector on the Writing / Speaking boards (4, 4.5 … 9 in two rows) ---- */
.gw-bands.half { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gw-bands.half button { height: 46px; font-size: 15px; }
/* ---- end Q ---- */
/* ---- T: bands below 4 (a muted row under the 4–9 grid), dictionary fix form ---- */
.gw-low { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.gw-low-l { flex: none; width: 52px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); text-transform: uppercase; line-height: 1.2; }
.gw-low .gw-bands { margin-top: 0; flex: 1 1 auto; }
.gw-low .gw-bands button { height: 34px; font-size: 13px; font-weight: 500; background: #F6F7F9; border-color: #E2E6EC; color: var(--muted); }
.gw-low .gw-bands button.ai { border: 1px dashed var(--brand); color: var(--ink); }
.gw-low .gw-bands button.on { background: #8A2E1F; border-color: #8A2E1F; color: #FFFFFF; }
.gw-low .gw-bands .ai-l { font-size: 9px; }
.gw-low.on .gw-low-l { color: #8A2E1F; }
.rv-due[hidden] { display: none; }   /* the rewrite due box only while "Ask the student to rewrite" is ticked (.col set display: flex) */
.gw-low .sm-bands { flex: 1 1 auto; }
.gw-low .sm-bands button { min-height: 32px; font-size: 13px; font-weight: 500; background: #F6F7F9; border-color: #E2E6EC; color: var(--muted); }
.gw-low .sm-bands button.on { background: #8A2E1F; border-color: #8A2E1F; color: #FFFFFF; }
.dfix-wrap { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.dfix-wrap > .dfix { flex: 1 1 480px; min-width: 0; }
.dfix-rep { flex: 0 1 300px; min-width: 240px; position: sticky; top: 12px; background: #FDF6EC; border: 1px solid #F1D9B5; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dfix-rep q { quotes: "\201C" "\201D"; }
.dfix-pick { font-size: 13px; color: var(--ink-2); background: #EEF3F8; border-radius: 8px; padding: 6px 10px; }
.dict-more { margin-top: 4px; }
/* ---- end T ---- */
/* ---- lead (20/10/2026): the peer-review mark box lies over the next lines of the essay; the mouse goes through its
   non-control areas, so words under it can still be dragged over (a drag that started on the box selected nothing and
   the next "Good" went to the old mark). Buttons, inputs and labels stay clickable. ---- */
.pe-pop { pointer-events: none; }
.pe-pop button, .pe-pop input, .pe-pop label, .pe-pop a { pointer-events: auto; }
/* ---- grading-board-halves (user, 24/10/2026): the Writing / Speaking grading board opened in the class Grading tab
   uses the whole width of the window (24 px gutters) and two equal halves under the bar; no "To grade" column.
   The bar sticks under the page's Back bar; the Speaking board's small player sticks under the bar. ---- */
.cmain:has(.embed > .gw) { max-width: none; }
.rows > .r > .embed:has(> .gw) { margin-left: -19px; margin-right: -19px; }
.gw-ui.gw-halves { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.gw-halves > .gw-half { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gw-halves .gw-left, .gw-halves .gw-mid, .gw-halves > .gw-right { flex: none; width: auto; max-width: none; min-width: 0; }
.embed > .gw > .gw-bar { top: var(--back-bar-h, 57px); }
.gs-mini { position: sticky; top: calc(var(--back-bar-h, 57px) + var(--gw-bar-h, 60px) + 8px); z-index: 11; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(24, 32, 43, 0.08); }
.gs-play.sm { width: 36px; height: 36px; flex: none; }
.gs-play.sm svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .gw-ui.gw-halves { grid-template-columns: minmax(0, 1fr); } }
/* ---- end grading-board-halves ---- */
/* ---- speaking-feedback-player (25/10/2026): the recording bar of the student pages (assets/js/audio-bar.js: play,
   position, −5 s / +5 s, speed, volume) and the answers under their questions on student/speaking-feedback.html;
   the question and cue-card text use the transcript's size (.rs-say: serif 17px) ---- */
.ab { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ab-time { font-family: var(--mono); font-size: 13px; color: var(--ink-2); min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.ab-seek { flex: 1 1 220px; min-width: 120px; height: 28px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.ab-vol { width: 110px; height: 28px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.ab-mute { width: 36px; height: 36px; padding: 0; border-radius: 6px; border: 1px solid #CBD2DB; background: #FFFFFF; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ab-mute[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); }
.ab-lbl { font-size: 13px; color: var(--muted); }
.ab-sep { width: 1px; height: 24px; background: var(--line); }
.ab button:disabled, .ab input:disabled { opacity: 0.5; cursor: default; }
.ab .gs-play:disabled { background: #8FA5BC; }
.sf-part { font-size: 16px; font-weight: 600; margin: 0; }
.sf-qa { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sf-q { font-family: var(--serif); font-size: 17px; line-height: 1.55; font-weight: 600; color: var(--ink); margin: 0; display: flex; align-items: baseline; gap: 8px; }
.sf-q .sf-qn { flex: none; min-width: 22px; color: var(--brand); }
.sf-q .sf-qt { flex: 1 1 auto; min-width: 0; }
.sf-q .rs-at { flex: none; align-self: center; }
.sf-a { margin-left: 30px; padding-left: 14px; border-left: 3px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sf-a.flat { margin-left: 0; padding-left: 0; border-left: 0; }
.sf-card { border: 1px solid var(--line); background: #F7F9FC; border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.sf-card .sf-q { display: block; }
.sf-ct { font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0; }
ul.sf-ct { padding-left: 22px; }
.sf-card + .sf-q { margin-top: 6px; }
.sf-qlist { font-family: var(--serif); font-size: 17px; line-height: 1.55; font-weight: 600; color: var(--ink); margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 4px; }
.sf-qlist li::marker { color: var(--brand); }
@media print { .ab { display: none; } }
/* "Where your errors are" on the Speaking feedback (25/10/2026): one row per error type, bar + total + per part */
.sf-err { display: grid; gap: 10px 12px; align-items: center; margin-top: 4px; }
.sf-err-row { display: contents; }
.sf-err-head > span { font-size: 12px; color: var(--muted); }
.sf-err .num { text-align: right; font-variant-numeric: tabular-nums; }
.sf-err-bar { height: 12px; background: #EEF0F3; border-radius: 999px; overflow: hidden; }
.sf-err-bar > div { height: 100%; border-radius: 999px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* ---- end speaking-feedback-player ---- */
/* ---- any-order agent: wf-2col (user, 25/10/2026): the student's Writing feedback in two halves like the teacher's
   grading board (full width, 24 px gutters): task, bands and comments left; script, marks and Annotations right.
   Printed (Download PDF) as one column, as before. ---- */
.rs-main.wf-main { max-width: none; padding: 20px var(--page-gutter) 48px; }
.wf-halves { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wf-half { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.wf-anns { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow: auto; }
.wf-anns .gw-ann { padding: 10px 12px; }
@media (max-width: 900px) { .wf-halves { grid-template-columns: minmax(0, 1fr); } }
@media print { .rs-main.wf-main { padding: 0; } .wf-halves { display: flex; flex-direction: column; gap: 10px; } .wf-half { gap: 10px; } }
/* ---- end wf-2col ---- */

/* ---- peer review layout ---- (25/10/2026) the mark box lies in the margin beside the paragraph, not over the text; the
   Send button is never locked: an unfinished list shows a confirm dialog */
@media (min-width: 1100px) { .pe-text.pe-margin { padding-right: 312px; } }
.pe-pop.beside { width: 300px; }
.pe-pop.beside::before { content: ""; position: absolute; left: -8px; top: 16px; border: 8px solid transparent; border-left-width: 0; border-right-color: #18202B; }
.pe-dlg-bg { position: fixed; inset: 0; z-index: 200; background: rgba(24, 32, 43, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pe-dlg { background: #FFFFFF; border-radius: 12px; padding: 20px 22px; width: 440px; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 16px 40px rgba(24, 32, 43, 0.3); font-size: 15px; color: var(--ink); }

/* ---- builder 26/10/2026 batch 2: the compact recording bar (audio-bar.js audioBarHtml(id, { compact: true })) for the
   narrow left column of the practice grading board: two rows that never wrap, the position slider takes the room left,
   the four speeds as one small segmented group. Scoped to .ab.compact, so the full bar and the Speaking board keep theirs. */
.ab.compact { gap: 6px; padding: 8px 10px; min-width: 0; }
.ab.compact .ab-row { flex-wrap: nowrap; gap: 6px; min-width: 0; }
.ab.compact .ab-time { min-width: 34px; font-size: 12px; flex: none; }
.ab.compact .ab-seek { flex: 1 1 auto; min-width: 60px; width: 0; }
.ab.compact .gw-sm { min-height: 30px; min-width: 0; padding: 0 7px; font-size: 12px; flex: none; }
.ab.compact .ab-seg { display: inline-flex; flex: none; border: 1px solid #CBD2DB; border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.ab.compact .ab-seg .gs-spd { min-height: 28px; min-width: 0; padding: 0 6px; font-size: 12px; border: 0; border-radius: 0; border-left: 1px solid #CBD2DB; }
.ab.compact .ab-seg .gs-spd:first-child { border-left: 0; }
.ab.compact .ab-mute { width: 30px; height: 30px; flex: none; margin-left: auto; }
.ab.compact .ab-vol { flex: 0 1 72px; width: 72px; min-width: 40px; }

/* ---- builder grading-wide (28/10/2026): every grading card opened in the class Grading tab (Writing / Speaking boards,
   practice boards, weekly stories; .g-lay in teacher-class/grading.js) uses the whole content width, as the Writing /
   Speaking boards already did (grading-board-halves above): the page loses its 1240 px cap while a card is open, the
   side panel "Other work to check" is hidden (it comes back when the card closes) and the card reaches the edges of
   its list. Inside, the work sits on the left (about 60 %) and the marking on the right. The Grading queue's
   Vocabulary stories tab (teacher/grading.html) opens the same story card across its list. ---- */
.cmain:has(.g-lay > .grow .embed) { max-width: none; }
/* the class header (title, tabs row) loses its cap too, so the open card lines up with the tabs row (user, 29/10/2026) */
.chead:has(+ .cmain .g-lay > .grow .embed) > .wrap, .chead:has(+ .cmain .embed > .gw) > .wrap { max-width: none; }
.g-lay:has(> .grow .embed) > .side { display: none; }
.g-lay .rows > .r > .embed, #gq-stories .rows > .r > .embed { margin-left: -19px; margin-right: -19px; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.vs-card-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .pg-grid, .vs-card-grid { grid-template-columns: minmax(0, 1fr); } }
/* ---- end grading-wide ---- */
/* ---- category chips (student class page, 29/10/2026): Assignments / My grades filter chips with the bell badge ---- */
/* (user, 01/11/2026) ONE chip bar on every page that has it (assets/js/categories.js chipRow: teacher Lecture,
   Assignments, Grading, Results; student Assignments, My grades): it always fills the content width — the chips share
   it evenly in one row; on a narrow window two even rows of five */
.cat-chips { margin: 0 0 16px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); width: 100%; }   /* (a chip with a bell never gets narrower than its words + bell; the others share the rest evenly) */
.cat-chips button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; white-space: nowrap; min-width: 0; }
@media (max-width: 1040px) { .cat-chips { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); } .cat-chips:has(> :nth-child(11)) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.seg button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-bg); }
.cat-chips .cat-bell { width: 24px; height: 24px; margin-right: -4px; border-radius: 6px; color: var(--ink-2); }
.cat-chips .cat-bell svg { width: 16px; height: 16px; }
.cat-chips .cat-bell .bell-n { top: -5px; right: -6px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10.5px; }
/* ---- + Assign work, compact (user, 01/11/2026; teacher-class/assignments.js): "1. Choose a source" is the category chip
   bar above (.aw-src: the picks per chip as a small number); "2. What to assign" tighter; "3. Assign to" and "4. When" each
   one line: the label, then its controls (they wrap only when the window is too narrow) ---- */
.aw-form { gap: 12px; }
.aw-form .aw-sec { gap: 6px; }
.aw-form .cat-chips.aw-src { margin: 0; }
.aw-src-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 1; }
.aw-form .chips { gap: 6px; }
.aw-form .chips .chip:not(.sm) { min-height: 34px; font-size: 13.5px; }
.aw-form .item { padding: 7px 12px; gap: 4px 12px; }
.aw-form .item .meta { font-size: 12.5px; }
.aw-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.aw-line > .aw-lab { flex: none; min-width: 96px; }
.aw-line .seg button { min-height: 34px; }
.aw-f { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.aw-f > .hint { font-weight: 400; color: var(--muted); margin-left: -4px; }
.aw-f input, .aw-f select { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.aw-form .aw-pick { margin-left: 112px; }
.aw-form fieldset.aw-pick { padding: 8px 12px; gap: 6px 18px; }
.aw-form .aw-note { margin: -6px 0 0 112px; }
@media (max-width: 700px) { .aw-form .aw-pick, .aw-form .aw-note { margin-left: 0; } }
/* "5. Mode" (modes, 01/11/2026): Test / Graded / Practice + "Practice until" on one line; the chosen mode's line under it,
   (i) = the AI limit (tooltip, also on keyboard focus) */
.aw-info { display: inline-flex; vertical-align: -2px; color: var(--ink-2); cursor: help; border-radius: 50%; }
.aw-info:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.aw-form .aw-many { color: var(--ink-2); }
.aw-line .seg + .aw-f { margin-left: 12px; }
/* "No due date" (02/11/2026): the tick next to Due; Late work and the Edit forms' fields hide with [hidden] */
/* "4. When" on one line at 1536 px with the Due choices (03/11/2026) */
[data-aw-when] input[type="datetime-local"] { width: 186px; padding: 4px 8px; font-size: 13px; }
[data-aw-when] select { width: 180px; font-size: 13px; }
[data-aw-when] [data-due-quick] { gap: 4px; }
[data-aw-when] [data-due-quick] button { padding: 0 8px; font-size: 12px; white-space: nowrap; }
.aw-f.aw-nodue { font-weight: 400; cursor: pointer; }
.aw-f.aw-nodue input { width: 18px; min-height: 0; height: 18px; margin: 0; }
.aw-f[hidden], label.fld[hidden] { display: none; }
/* "2. What to assign" as a 3-column browser (user, 02/11/2026; teacher-class/pick-browser.js): one compact panel, ~300 px tall, full
   width: Collection | Book | Tests (test sources) · Topic | Set | Exercises (skill sources); a search box on top whose results replace the
   columns; every column scrolls on its own */
.pb { border: 1px solid var(--line, #D5DAE1); border-radius: 10px; background: #FFFFFF; display: flex; flex-direction: column; height: 300px; overflow: hidden; }
.pb-top { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line-2, #E3E7EC); background: #F6F7F9; flex: none; }
.pb-top .pb-q { width: 300px; flex: 0 1 300px; max-width: 100%; min-height: 32px; padding: 3px 10px; font-size: 14px; }
.pb-hint { white-space: nowrap; }
.pb-skill .pb-cols { grid-template-columns: 190px 310px minmax(0, 1fr); }
.pb-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px 240px minmax(0, 1fr); }
.pb-cols[hidden], .pb-results[hidden] { display: none; }
.pb-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line-2, #E3E7EC); }
.pb-col:last-child { border-right: 0; }
.pb-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #5B6472); background: #FAFBFC; border-bottom: 1px solid var(--line-2, #E3E7EC); min-height: 30px; }
.pb-ht { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-h .link-btn { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.pb-list, .pb-results { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 0; }
.pb-it { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 3px 10px; border: 0; border-left: 3px solid transparent; background: transparent; font: inherit; font-size: 14px; text-align: left; color: var(--ink, #18202B); cursor: pointer; }
.pb-it:hover { background: #F3F6FA; }
.pb-it:focus-visible { outline: 2px solid var(--brand, #1F4E79); outline-offset: -2px; }
.pb-it.on { background: #E8EFF7; border-left-color: var(--brand, #1F4E79); font-weight: 700; }
.pb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted, #5B6472); overflow: hidden; text-overflow: ellipsis; }
.pb-n { flex: none; font-size: 12.5px; font-weight: 700; color: #1E5631; background: #E3F1E7; border-radius: 10px; padding: 0 7px; }
.pb-box { flex: none; width: 18px; height: 18px; border: 2px solid #B8C1CE; border-radius: 4px; background: #FFFFFF; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.pb-box.on { background: var(--brand, #1F4E79); border-color: var(--brand, #1F4E79); }
.pb-row.given .pb-t, .pb-ex.given .pb-t { color: var(--muted, #5B6472); }
.pb-row.selected { background: #F0F5FA; }
.pb-sks { flex: none; display: inline-flex; gap: 3px; min-width: 81px; }
.pb-sk { width: 18px; height: 18px; border-radius: 4px; background: #EEF0F3; color: #3D4654; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pb-badge { flex: none; font-size: 12px; font-weight: 600; color: var(--muted, #5B6472); background: #EEF0F3; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.pb-badge.brand { background: #E8EFF7; color: var(--brand, #1F4E79); }
.pb-meta { flex: none; font-size: 12.5px; color: var(--muted, #5B6472); white-space: nowrap; }
.pb-empty { padding: 12px 10px; font-size: 13.5px; color: var(--muted, #5B6472); }
label.check.pb-ex { padding: 3px 10px; min-height: 32px; font-size: 14px; gap: 8px; }
label.check.pb-ex:hover { background: #F3F6FA; }
label.check.pb-ex input { margin: 0; flex: none; }
.pb-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; }
.pb-scope .seg button { min-height: 32px; }
.pb-skills { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.pb-skills label.check { font-size: 14px; }
@media (max-width: 800px) { .pb { height: auto; max-height: none; } .pb-cols { grid-template-columns: 1fr; } .pb-col { border-right: 0; border-bottom: 1px solid var(--line-2, #E3E7EC); } .pb-list { max-height: 170px; } .pb-results { max-height: 340px; } }
/* the Selected tray: what is picked + the Assign buttons stay in view at the bottom of the form while the steps above scroll */
.aw-tray { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 10px 0 8px; margin-top: 4px; background: #FFFFFF; border-top: 1px solid var(--line, #D5DAE1); box-shadow: 0 -6px 10px -8px rgba(24, 32, 43, .25); }
.aw-tray .box { max-height: 150px; overflow-y: auto; }
input[data-due-input]:disabled { background: #EEF0F3; color: #8A93A0; border-color: #D5DAE1; cursor: not-allowed; }
/* a list's heading row (teacher Assignments, 01/11/2026): the heading left; Show, Sort and the main button right, one
   row, every control 36 px high */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.list-head > h2 { margin: 0; }
.list-head-ctl { display: flex; align-items: center; gap: 8px 14px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.list-head .list-sort, .gq-sts-h .list-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.list-head .list-sort select { width: auto; min-height: 36px; font-size: 14px; padding: 4px 10px; }
.gq-sts-h .list-sort select { width: auto; min-height: 32px; font-size: 13px; padding: 2px 8px; }
.list-head .tf-ctl { margin-left: 0 !important; }
/* teacher Assignments rows (01/11/2026): a bigger title (with the Graded / Practice tag before it) and due date; the
   step bar's student list opens from an icon-only chevron (turned up while open) */
.asg-t { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.asg-t .type-tag { vertical-align: 2px; }
.asg-due { white-space: nowrap; font-size: 15px; }
.tsb-tgl { color: var(--c-text-2); border-color: var(--c-border-control, #8A96A8); }
.tsb-tgl .ic { transition: transform .15s; }
.tsb-tgl[aria-expanded="true"] .ic { transform: rotate(180deg); }
.tsb-tgl:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* a row's actions: the link that asks for work (Grade …) and the "⋮" menu (teacher Assignments rowMenu, 01/11/2026) */
.asg-acts { text-align: right; white-space: nowrap; }
.rm { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
.rm .rm-btn { color: var(--c-text-2); }
.rm .rm-btn[aria-expanded="true"] { background: var(--c-surface-3); color: var(--c-text-1); }
.rm .rm-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rm-menu { width: auto; min-width: 150px; top: calc(100% + 4px); padding: 4px; text-align: left; }
.rm-menu[hidden] { display: none; }
.rm-menu.up { top: auto; bottom: calc(100% + 4px); }
.rm-menu button { min-height: 36px; }
.rm-menu button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; background: #F2F5F9; }
/* ---- Grading like Assignments (user, 02/11/2026; teacher-class/grading.js): the same rows (tag + title · due · counts + ⋮,
   step bar + ▾); the ▾ opens the students waiting, one line each with its Grade button; a board opens under its line
   across the table ---- */
.gq-tbl { overflow-x: clip; }   /* clip, not auto: a board opened in a row keeps its sticky bar (a scrolling box would hold it) */
.gq-tbl > table { table-layout: fixed; }
.gq-tbl tr.gq-list > td { padding: 0 0 10px; background: #FAFBFC; }
.gq-tbl tr.gq-list[hidden], .gq-tbl .ao-bar[hidden] { display: none; }
.gq-tbl tr.gq-main:hover > td { background: #FAFBFC; }
.gq-count { font-size: 14px; color: var(--ink-2); margin-right: 8px; }
.gq-count .act, .ao-prog .act { color: var(--c-warn, #B45309); font-weight: 600; }
.gq-sts-h { padding: 8px 16px 4px; gap: 8px; }
.gq-st { border-top: 1px solid var(--line-2); }
.gq-line { display: grid; grid-template-columns: minmax(140px, 210px) max-content minmax(0, 1fr) auto auto auto; gap: 6px 12px; align-items: center; padding: 6px 16px; font-size: 13px; }
.gq-st.open > .gq-line { background: #EEF3F8; }
.gq-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gq-text { color: var(--ink-2); min-width: 0; }
.gq-why { display: block; color: #8A3F06; }
.gq-ai { white-space: nowrap; }
.gq-st > .embed { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
.gq-group-h { margin: 0; padding: 18px 16px 6px; font-size: 17px; color: var(--ink); }
.gq-group-h .muted { font-weight: 400; font-size: 14px; }
.tt-compact .gq-tbl td { padding-top: 4px; padding-bottom: 4px; }
.tt-compact .gq-line { padding-top: 2px; padding-bottom: 2px; }
.tt-compact .gq-line .btn.sm { min-height: 28px !important; }
.row > .cat-chips { margin: 0; flex: 1 1 0; min-width: 0; }   /* teacher Results: the chips with "Mark these as seen" beside them (the chips take the rest of the row) */
/* ---- Assignments › All as an overview (user, 01/11/2026; assets/js/all-overview.js, teacher and student): the strip, one
   compact row per category (name button · counts · next due · ›), opened in place into thin lines (36–40 px) with a ▾
   that shows the line's step bar ---- */
.ao { display: flex; flex-direction: column; gap: var(--space-3); }
.ao-strip { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); min-height: 52px; padding: var(--space-2) var(--space-4); background: var(--c-brand-soft); border: 1px solid var(--c-brand-tint); border-left: 6px solid var(--c-brand); border-radius: var(--r-lg); font-size: var(--fs-md); color: var(--c-text-1); }
.ao-strip-h { font-size: var(--fs-lg); font-weight: 700; color: var(--c-brand); }
.ao-strip-n { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ao-strip-n b { font-size: var(--fs-xl); }
.ao-n.zero, .ao-c.zero { color: var(--c-text-3); }
.ao-n.bad b, .ao-c.bad b, .ao-prog .bad { color: var(--c-danger); }
.ao-n.act b, .ao-c.act b, .ao-prog .act { color: var(--c-warn); }
.ao-dot { color: var(--c-text-3); }
.ao-strip-tail { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-2) var(--space-3); flex-wrap: wrap; }
.ao-cats { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.ao-cat + .ao-cat { border-top: 1px solid var(--c-border); }
.ao-head { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 150px var(--ctl-sm); align-items: center; gap: var(--space-3); min-height: 48px; padding: 6px var(--space-3) 6px var(--space-2); }
.ao-cat.needs .ao-head { box-shadow: inset 4px 0 0 var(--c-warn); }
.ao-name { font: inherit; display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--ctl-sm); padding: 0 var(--space-2); border: 0; border-radius: var(--r-md); background: transparent; color: var(--c-text-1); font-size: var(--fs-lg); font-weight: 700; text-align: left; cursor: pointer; }
.ao-name:hover { background: var(--c-surface-3); }
.ao-name:focus-visible, .ao-go:focus-visible, .ao-more:focus-visible { outline: var(--focus-w) solid var(--c-focus, var(--brand)); outline-offset: 1px; }
.ao-chev { display: inline-flex; color: var(--c-text-2); }
.ao-chev .ic { width: 18px; height: 18px; transition: transform .15s; }
.ao-name[aria-expanded="false"] .ao-chev .ic { transform: rotate(-90deg); }
.ao-cnt-n { min-width: 24px; padding: 0 7px; border-radius: var(--r-pill); background: var(--c-surface-2); border: 1px solid var(--c-border); font-size: var(--fs-xs); font-weight: 700; color: var(--c-text-3); text-align: center; line-height: 20px; }
.ao-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); font-size: var(--fs-md); color: var(--c-text-2); white-space: nowrap; }
.ao-next { font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; text-align: right; }
.ao-go { color: var(--c-text-2); border-color: var(--c-border-strong); }
.ao-go-sp { width: var(--ctl-sm); }
.ao-all { gap: 6px; white-space: nowrap; }
.ao-all-ic { display: inline-flex; }
.ao-all-ic .ic { width: 16px; height: 16px; transition: transform .15s; }
.ao-all[aria-pressed="false"] .ao-all-ic .ic { transform: rotate(-90deg); }
.ao-list { padding: 0 var(--space-3) var(--space-3); }
.ao-list[hidden] { display: none; }
.ao-empty { margin: 0; }
.ao-tbl { border-radius: var(--r-md); }
.ao-table { table-layout: fixed; }
.ao .tbl .ao-line td { padding-top: 2px; padding-bottom: 2px; height: 38px; border-bottom: 1px solid var(--c-border-2); }
.ao .ao-line .asg-t { font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao .ao-line .ao-due { font-size: var(--fs-md); color: var(--c-text-2); white-space: nowrap; }
.ao .ao-acts { text-align: right; white-space: nowrap; }
.ao-prog { display: inline-block; max-width: calc(100% - 84px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-size: var(--fs-sm); color: var(--c-text-2); }
.ao .ao-line .icon-btn.sm { width: 32px; height: 32px; vertical-align: middle; }
.ao .ao-line .rm { vertical-align: middle; }
.ao-more .ic { transition: transform .15s; }
.ao-more[aria-expanded="true"] .ic { transform: rotate(180deg); }
.ao-more { color: var(--c-text-2); }
.ao-bar[hidden] { display: none; }
.ao .ao-bar tr.tsb-row td { padding-top: var(--space-2); background: var(--c-surface-2); }
.ao-line-b.asg-hl td { background: var(--c-brand-soft); }
/* the student's lines (a row each: tag + title · due · status · action · ▾, the step bar block under it) */
.ao-slines { border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.ao-sline + .ao-sline { border-top: 1px solid var(--c-border-2); }
.ao-sl .ao-sa { text-align: right; }
.ao-sl { display: grid; grid-template-columns: minmax(0, 1fr) 190px minmax(0, 260px) 150px var(--ctl-sm); align-items: center; gap: var(--space-3); min-height: 40px; padding: 2px var(--space-2) 2px var(--space-3); }
.ao-sl .ao-st { font-weight: 600; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-sl .ao-sd { font-size: var(--fs-md); color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-sl .ao-ss { font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-sl .ao-sa .btn { min-height: 32px; }
.ao-sl .ao-sd.late { color: var(--c-warn); font-weight: 600; }
.ao-sl .ao-sd.soon { color: var(--c-text-1); font-weight: 600; }
/* a student row's title line (01/11/2026): the title, then the deadline at its end (no grey line under it any more) */
.asg-tl { display: flex; align-items: baseline; gap: var(--space-2) var(--space-4); }
.asg-tl > .b { flex: 1 1 auto; min-width: 0; }
.asg-dl { flex: none; margin-left: auto; white-space: nowrap; font-size: 15px; color: var(--c-text-2); }
.asg-dl.late { color: var(--c-warn); font-weight: 600; }
.ao-sb { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: var(--space-2) var(--space-3) var(--space-3); background: var(--c-surface-2); }
.ao-sb[hidden] { display: none; }
.ao-urgent { font-size: var(--fs-md); }
/* the student's "To do" strip in the Show / Sort row (02/11/2026): left, as high as the controls; the Next title shortened */
.asg-ctl-row > .ao-strip { flex: 1 1 560px; min-width: 0; min-height: var(--ctl-sm); margin-right: auto; padding: 2px var(--space-3); flex-wrap: nowrap; }
.asg-ctl-row > .ao-strip .ao-strip-n { flex-wrap: nowrap; white-space: nowrap; }
.asg-ctl-row > .ao-strip .ao-strip-n b { font-size: var(--fs-lg); }
.asg-ctl-row > .ao-strip .ao-strip-tail { min-width: 0; flex-wrap: nowrap; }
.asg-ctl-row > .ao-strip .ao-urgent { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; white-space: nowrap; }
.asg-ctl-row > .ao-strip .ao-urgent .tlink { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---- end Assignments › All ---- */
tr[data-grade-new] [data-open]::after { content: "New"; display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: #B42318; color: #FFFFFF; font-size: 11px; font-weight: 600; line-height: 18px; text-decoration: none; vertical-align: 1px; }
/* ---- end category chips ---- */

/* ---- builder: class notebook (teacher/class.html#notebook; assets/js/teacher-class/notebook.js, assets/js/notebook-board.js) ---- */
@media (min-width: 1500px) { .cmain:has(> #tab-box > .nb) { max-width: 1640px; } }   /* a projector / big screen: a bigger board */
.nb { position: relative; display: flex; flex-direction: column; gap: 10px; }
.nb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.nb-name { font-size: 15px; color: var(--ink); }
/* the notebooks as folder tiles (01/11/2026): one row, scrolled sideways when there are more than fit */
.nb-tiles { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.nb-tile { position: relative; flex: 1 0 88px; max-width: 124px; min-height: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 5px; border: 2px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.nb-tile:hover { background: #EEF1F5; }
.nb-tile[aria-current="true"] { border-color: var(--brand); background: var(--brand-bg); }
.nb-fold { display: flex; align-items: center; justify-content: center; height: 36px; }
.nb-fold svg { display: block; filter: drop-shadow(0 1px 1px rgba(24, 32, 43, 0.12)); }
.nb-tname { font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nb-tno { position: absolute; left: 7px; top: 4px; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nb-tdate { font-size: 11px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.nb-tile[aria-current="true"] .nb-tdate, .nb-tile[aria-current="true"] .nb-tno { color: var(--brand); }
.nb-tile-new { color: var(--brand); border: 2px dashed #CBD2DB; }
.nb-tile-new:hover { border-color: var(--brand); background: var(--brand-bg); }
.nb-tile-new .nb-fold svg { width: 26px; height: 26px; filter: none; }
.nb-status { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.nb-status.ok { color: var(--ok); }
.nb-status.err { color: var(--bad); font-weight: 600; }
.nb-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; padding: 5px 8px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; }
.nb-grp { display: flex; align-items: center; gap: 2px; }
.nb-sep { width: 1px; height: 24px; margin: 0 3px; background: var(--line); }
.nb-ib { font: inherit; font-size: 13px; font-weight: 600; min-width: 34px; height: 34px; padding: 0 5px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.nb-ib:hover { background: #F2F5F9; }
.nb-ib[aria-pressed="true"], .nb-ib[aria-expanded="true"], .nb-size[aria-checked="true"] { background: var(--brand-bg); border-color: var(--brand); color: var(--brand); }
.nb-ib:disabled { opacity: 0.38; cursor: default; background: transparent; border-color: transparent; }
.nb-caret { min-width: 18px; padding: 0 1px; margin-left: -2px; }
.nb-caret svg { width: 14px; height: 14px; }
.nb-zoom { min-width: 48px; font-variant-numeric: tabular-nums; }
.nb-size span { display: block; border-radius: 50%; background: currentColor; }
.nb-sw { width: 22px; height: 22px; margin: 0 1px; padding: 0; border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(24, 32, 43, 0.25); cursor: pointer; }
.nb-sw[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(24, 32, 43, 0.25), 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand); }
.nb-pop { position: absolute; z-index: 30; min-width: 220px; padding: 6px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(24, 32, 43, 0.18); display: flex; flex-direction: column; gap: 2px; }
.nb-pop[hidden] { display: none; }
.nb-mi { width: 100%; font: inherit; font-size: 14px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; }
.nb-mi:hover, .nb-mi[aria-checked="true"] { background: var(--brand-bg); }
.nb-mi[aria-checked="true"] { font-weight: 600; color: var(--brand); }
.nb-bgs { display: grid; grid-template-columns: repeat(4, 66px); gap: 6px; padding: 4px; }
.nb-bgsw { position: relative; width: 66px; height: 46px; padding: 0; border: 2px solid #CBD2DB; border-radius: 8px; cursor: pointer; background-color: #FFFFFF; overflow: hidden; }
.nb-bgsw span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, 0.9); color: var(--ink-2); }
.nb-bgsw[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-bg); }
.nb-bgsw.dark { background-color: #1F3A2E; }
.nb-bg-lined { background-image: linear-gradient(90deg, transparent 9px, #E8A0A0 9px, #E8A0A0 10px, transparent 10px), repeating-linear-gradient(transparent 0 6px, #C7D6E8 6px 7px); }
.nb-bg-grid { background-image: linear-gradient(#C7D6E8 1px, transparent 1px), linear-gradient(90deg, #C7D6E8 1px, transparent 1px); background-size: 7px 7px; }
.nb-bg-dots { background-image: radial-gradient(#A3AFBF 1px, transparent 1.4px); background-size: 7px 7px; }
.nb-paper { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(24, 32, 43, 0.25); flex: none; }
.nb-paper-white { background: #FFFFFF; } .nb-paper-green { background: #1F3A2E; } .nb-paper-grey { background: #2B2F36; }
.nb-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 150px); min-height: 340px; overflow: hidden; border-radius: 12px; background: #DCE1E8; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.nb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.nb-text { position: absolute; z-index: 3; margin: 0; padding: 0 2px; min-width: 40px; border: 1px dashed var(--brand); border-radius: 4px; outline: none; background: rgba(255, 255, 255, 0.06); font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; font-weight: 500; white-space: pre; resize: none; overflow: hidden; -webkit-user-select: text; user-select: text; }
.nb-selbar { position: absolute; z-index: 4; transform: translateX(-50%); display: flex; gap: 6px; padding: 4px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(24, 32, 43, 0.18); }
.nb-selbar[hidden] { display: none; }
.nb-vscroll { position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; width: 14px; overflow-x: hidden; overflow-y: scroll; }
.nb-vscroll > div { width: 1px; }
.nb-vscroll[hidden] { display: none; }
.nb-pages { display: flex; align-items: center; gap: 8px; }
.nb-pageno { min-width: 92px; text-align: center; color: var(--ink-2); white-space: nowrap; }
.nb-thumbs { position: relative; flex: 1; min-width: 0; display: flex; gap: 8px; padding: 4px 2px; overflow-x: auto; }
.nb-thumb { position: relative; flex: none; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.nb-thumb canvas { display: block; width: 112px; height: 63px; border-radius: 6px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line); }
.nb-thumb[aria-current="true"] { border-color: var(--brand); }
.nb-thumb span { position: absolute; left: 4px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.88); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.nb-pages .btn svg { width: 16px; height: 16px; }
.nb-fsnav { display: none; }
.nb-fs-no { min-width: 92px; text-align: center; color: var(--ink-2); white-space: nowrap; }
/* full screen / presentation: the board and a compact floating toolbar (also the full-window fallback, .nb-max) */
.nb.is-full { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; padding: 0; gap: 0; background: #3A4049; }
.nb.is-full .nb-head, .nb.is-full .nb-tiles, .nb.is-full .nb-pages { display: none; }
.nb.is-full .nb-bar { position: absolute; z-index: 10; top: 8px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 16px); padding: 3px 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.nb.is-full .nb-fsnav { position: absolute; z-index: 10; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.nb.is-full .nb-bar .nb-sep { margin: 0 3px; }
.nb.is-full .nb-stage { position: absolute; inset: 0; width: auto; height: auto; max-height: none; min-height: 0; aspect-ratio: auto; border-radius: 0; background: #3A4049; }
/* the notebook as PDF: only the printed pages (assets/js/teacher-class/notebook.js exportPdf) */
#nb-print { display: none; }
@media print {
  body:has(> #nb-print) > :not(#nb-print) { display: none !important; }
  body:has(> #nb-print) { background: #FFFFFF; }
  #nb-print { display: block; }
  #nb-print img { display: block; width: 100%; height: auto; break-after: page; page-break-after: always; }
  #nb-print img:last-child { break-after: auto; page-break-after: auto; }
}
/* insert, presenter tools, dialogs (31/10/2026) */
.nb-dlg-back { position: absolute; inset: 0; z-index: 1200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; background: rgba(24, 32, 43, 0.35); }
.nb.is-full .nb-dlg-back { position: fixed; }
.nb-dlg { width: min(520px, 100%); max-height: calc(100vh - 80px); display: flex; flex-direction: column; background: #FFFFFF; border-radius: 14px; box-shadow: 0 20px 48px rgba(24, 32, 43, 0.3); overflow: hidden; }
.nb-dlg.wide { width: min(860px, 100%); }
.nb-dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.nb-dlg-body { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.nb-pdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nb-pdf-page { display: flex; flex-direction: column; gap: 4px; font-size: 13px; cursor: pointer; }
.nb-pdf-page canvas { width: 100%; height: auto; min-height: 60px; background: #F2F4F7; box-shadow: 0 0 0 1px var(--line); border-radius: 4px; }
.nb-site-paras { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.nb-site-preview { max-height: 220px; overflow: auto; padding: 10px 12px; background: #FFFDF4; border: 1px solid #E6DAB0; border-radius: 8px; font-size: 14px; }
.nb-site-preview:empty { display: none; }
.nb-post-pages { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.nb-post-pages canvas { flex: none; width: 112px; height: 63px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.nb-drop { outline: 3px dashed var(--brand); outline-offset: -6px; }
.nb-curtain { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; background: #2B2F36; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35); }
.nb-curtain-grip { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: #2B2F36; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600; cursor: ns-resize; touch-action: none; }
.nb-curtain-grip span { width: 22px; height: 4px; border-radius: 2px; background: #FFFFFF; opacity: 0.7; }
.nb-spot { position: absolute; z-index: 5; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 4000px rgba(10, 14, 20, 0.8); }
.nb-spot[data-shape="rect"] { border-radius: 10px; }
.nb-spot button { pointer-events: auto; position: absolute; border: 0; cursor: pointer; touch-action: none; }
.nb-spot-grip { left: 50%; top: -16px; transform: translateX(-50%); width: 34px; height: 30px; border-radius: 15px; background: #FFFFFF; color: var(--ink); font-size: 16px; }
.nb-spot-size { right: -6px; bottom: -6px; width: 18px; height: 18px; border-radius: 4px; background: #FFFFFF; cursor: nwse-resize !important; }
.nb-spot-shape { left: 50%; bottom: -16px; transform: translateX(-50%); height: 26px; padding: 0 8px; border-radius: 13px; background: #FFFFFF; color: var(--ink-2); font-size: 12px; }
.nb-timer { position: absolute; z-index: 20; right: 16px; top: 211px; width: 300px; padding: 8px 12px 12px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(24, 32, 43, 0.25); display: flex; flex-direction: column; gap: 8px; }
.nb.is-full .nb-timer { top: 70px; }
.nb-timer-head { display: flex; align-items: center; justify-content: space-between; cursor: move; touch-action: none; }
.nb-timer-digits { font-family: var(--mono); font-size: 56px; font-weight: 500; line-height: 1; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.nb-timer.low .nb-timer-digits { color: #B45309; }
.nb-timer.done .nb-timer-digits { color: var(--red); animation: nb-blink 0.8s steps(2) 4; }
@keyframes nb-blink { 50% { opacity: 0.2; } }
.nb-timer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nb-timer-row .btn.sm { min-height: 32px; padding: 0 9px; }
.nb-thumb.drag-over { border-color: var(--brand); border-style: dashed; }
.nb-thumb.dragging { opacity: 0.4; }
/* ---- end class notebook ---- */
/* ---- builder: Teach tab (teacher/class.html#teach; assets/js/teacher-class/teach.js, teach-views.js, teach-listening.js) ---- */
.tch { display: flex; flex-direction: column; gap: 10px; }
/* (user, 01/11/2026) the chips fill the full width (the shared chip bar, "category chips" above); the item count and a
   small search box on one row under them */
.tch .cat-chips { margin: 0; }
.tch-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.tch-search { position: relative; display: inline-flex; align-items: center; flex: 0 1 340px; min-width: 200px; }
.tch-search .ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--c-text-3, #5B6573); pointer-events: none; }
.tch-search .tch-q { width: 100%; min-height: 34px; height: 34px; font: inherit; font-size: 14px; padding: 0 10px 0 32px; border: 1px solid var(--c-border-control, #8A96A8); border-radius: 8px; }
.tch-search .tch-q:hover:not(:focus) { border-color: var(--c-text-2); }
.tch-topic { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; }
.tch-topic + .tch-topic { margin-top: 8px; }
.tch-topic > summary { cursor: pointer; padding: 12px 16px; display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.tch-sets { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.tch-set { border-top: 1px solid var(--line-2); padding-top: 6px; }
.tch-set > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.tch-set > summary .small { font-weight: 400; margin-left: 10px; }
.tch-set > .tch-items { padding: 6px 0 4px 18px; }
.tch-items { display: flex; flex-wrap: wrap; gap: 6px; }
.tch-item { font: inherit; font-size: 14px; text-align: left; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 12px 4px 6px; border: 1px solid #CBD2DB; border-radius: 8px; background: #FFFFFF; cursor: pointer; color: var(--ink); max-width: 100%; }
.tch-item:hover { border-color: var(--brand); background: var(--brand-bg); }
.tch-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tch-room { flex: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 5px; background: #EEF0F3; color: var(--ink-2); }
.tch-room.r-listening { background: #E3F0FB; color: #1F4E79; }
.tch-room.r-reading { background: #E7F4EA; color: #1E5631; }
.tch-room.r-writing, .tch-room.r-task1, .tch-room.r-task2 { background: #FDF0E1; color: #8A3F06; }
.tch-room.r-speaking, .tch-room.r-forecast { background: #F1E8FA; color: #5B2C83; }
.tch-room.r-pronunciation { background: #FDE8EF; color: #8E1F48; }
.tch-room.r-mock { background: #18202B; color: #FFFFFF; }
.tch-row { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line-2); }
.tch-row:first-child { border-top: 0; }
.tch-row-t { min-width: 200px; font-weight: 600; font-size: 15px; }
/* (03/11/2026) no kind label where it equals the chip; "Continue: <item>" (the item opened last in this class); the
   item just left, lit for a moment after Back */
.tch-item.no-room { padding-left: 12px; }
.tch-tools-l { display: inline-flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
.tch-continue { max-width: min(560px, 100%); gap: 6px; }
.tch-continue .ic { width: 16px; height: 16px; flex: none; }
.tch-continue-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tch-continue .muted { flex: none; }
@keyframes tch-flash { 0%, 55% { background: #FFF1B8; border-color: #D4A106; box-shadow: 0 0 0 3px #FFE58F; } 100% { background: #FFFFFF; border-color: #CBD2DB; box-shadow: none; } }
.tch-item.tch-flash { animation: tch-flash 2.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .tch-item.tch-flash { animation: none; outline: 3px solid #D4A106; outline-offset: 2px; } }

/* the teaching view: a dark bar (the pens of assets/js/pens.js sit in its second row) and big text */
.cmain:has(#tv) { max-width: none; }
.tv { --tv-fs: 22px; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: calc(100vh - var(--back-bar-h, 57px) - 20px); min-height: 520px; }
.tv.is-full, .tv.tv-max { height: 100vh; min-height: 0; border: 0; border-radius: 0; }
.tv.tv-max { position: fixed; inset: 0; z-index: 200; }
/* Lecture bar (Lecture review items 1, 2, 13, 03/11/2026: ONE row of a fixed height for every item, no jump between
   items): Back · title (one line; its book / topic in the tooltip) · ‹ n / N › · the layout's bar slot (a practice
   test's skill tabs) · Draw ▾ (every drawing tool, teach-ink.js) · the view's tools (Show answers, the layout's buttons,
   an (i) for its hint) · Aa ▾ (Font size + Line spacing) · Present · Full screen (at the right end). 30 px controls.
   It never wraps: when it doesn't fit, teach.js fitBar tightens it (.tv-c1 … .tv-c3, below). */
.tv-bar { flex: none; position: relative; z-index: 6; background: #18202B; color: #FFFFFF; padding: 4px 8px; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 8px; height: 38px; box-sizing: border-box; }
.tv-title { flex: 1 1 220px; min-width: 64px; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.tv-title b { flex: 0 1 auto; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tv-title span { flex: 1 1 0; min-width: 0; font-size: 12px; color: #B8C1CE; overflow: hidden; text-overflow: ellipsis; }
.tv-grp { display: inline-flex; gap: 4px; align-items: center; flex: none; }
.tv-pos { font-size: 13px; min-width: 44px; text-align: center; color: #DCE3EC; font-variant-numeric: tabular-nums; }
/* (03/11/2026) the counter is a button: the jump list of the topic's items (teach.js toggleJump); ‹ › past a topic's
   ends go to the topic before / after (marked) */
button.tv-pos { font-family: inherit; min-height: 30px; padding: 0 6px; border: 1px dashed #4A5566; border-radius: 6px; background: transparent; cursor: pointer; white-space: nowrap; }
button.tv-pos:hover, button.tv-pos[aria-expanded="true"] { background: #2A3442; border-style: solid; color: #FFFFFF; }
button.tv-pos:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
.tv .xh-btn[data-topic-step] { border-color: #FFE58F; color: #FFE58F; }
.tv-jump { position: fixed; z-index: 400; display: flex; flex-direction: column; background: #FFFFFF; color: var(--ink, #18202B); border: 1px solid #CBD2DB; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .28); font-size: 14px; overflow: hidden; }
.tv-jump-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 6px; }
.tv-jump-h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.tv-jump-h span { flex: none; font-size: 12px; color: var(--ink-2, #4A5566); }
.tv-jump .tv-jump-q { flex: none; box-sizing: border-box; width: calc(100% - 24px); max-width: none; margin: 0 12px 8px; min-height: 34px; font: inherit; font-size: 14px; padding: 0 10px; border: 1px solid var(--c-border-control, #8A96A8); border-radius: 8px; }
.tv-jump-l { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line-2, #E3E8EF); padding: 4px 0; }
.tv-jump-g { padding: 8px 12px 2px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2, #4A5566); }
.tv-jump-sep { margin: 4px 12px; border-top: 1px solid var(--line-2, #E3E8EF); }
.tv-jump-o { display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; cursor: pointer; line-height: 1.35; }
.tv-jump-o .n { flex: none; min-width: 28px; text-align: right; font-size: 12px; color: var(--ink-2, #4A5566); font-variant-numeric: tabular-nums; }
.tv-jump-o .t { flex: 1 1 auto; min-width: 0; }
.tv-jump-o .now { flex: none; font-size: 11px; font-weight: 600; color: #1F4E79; background: #E3F0FB; border-radius: 5px; padding: 1px 6px; }
.tv-jump-o[aria-current="true"] .t { font-weight: 600; }
.tv-jump-o[aria-selected="true"] { background: var(--brand-bg, #E8F0FB); box-shadow: inset 3px 0 0 var(--brand, #1F5FAD); }
.tv-jump-none { padding: 10px 12px; color: var(--ink-2, #4A5566); }
.tv-jump-k { flex: none; padding: 6px 12px; font-size: 12px; color: var(--ink-2, #4A5566); border-top: 1px solid var(--line-2, #E3E8EF); }
.tv .xh-btn { font: inherit; font-size: 13px; min-height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid #4A5566; background: transparent; color: #FFFFFF; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tv .xh-btn.tv-ib { width: 30px; padding: 0; justify-content: center; }
.tv .xh-btn.tv-back { padding: 0 8px 0 4px; gap: 2px; }
.tv .xh-btn:hover:not(:disabled) { background: #2A3442; }
.tv .xh-btn[aria-pressed="true"] { background: #FFFFFF; color: #18202B; border-color: #FFFFFF; }
.tv .xh-btn[aria-pressed="true"]:hover:not(:disabled) { background: #E3E8EF; }   /* (02/11/2026) a pressed button under the mouse stays readable */
.tv .xh-btn:disabled { opacity: .45; cursor: default; }
.tv .xh-btn:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
.tv .xh-btn[hidden] { display: none; }
.tv-bar .tv-pens { flex: none; display: inline-flex; }
.tv-bar .tv-pens[hidden] { display: none; }   /* (the pens' own bar: driven by the Draw menu, never shown) */
.tv-inkbar { flex: none; display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid #3A4554; }
.tv-view { position: relative; }
.tv-tools { display: inline-flex; gap: 4px; align-items: center; }
.tv-set { margin-left: auto; }
.tv-sr, .tv-bar .pen-bar .pen-lbl, .tv-bar .tv-ink-tl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the pens (assets/js/pens.js) in the bar: icons only, as the ink tools */
.tv-bar .pen-bar { gap: 4px; }
body .tv-bar .pen-bar .pen-ico.clear { display: inline-block; }
.tv-bar .pen-bar button { min-height: 30px; padding: 0 8px; }
.tv-bar .pen-bar .pen-caret { padding: 0 !important; width: 16px; }
/* the view's hint: hidden behind the (i) button (teach.js wireHint), shown under it as a small dark pop-up */
.tv-help { display: inline-flex; }
.tv-help[hidden] { display: none; }
.tv-view .tv-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-view:has(.tv-help:not([hidden]) [data-tv="hint"]:is(:hover:not([data-closed]), :focus-visible:not([data-closed]), [aria-expanded="true"])) .tv-note { clip: auto; overflow: visible; width: max-content; max-width: min(380px, 80vw); height: auto; white-space: normal; top: calc(100% + 6px); right: 0; z-index: 30; padding: 8px 10px; border-radius: 8px; border: 1px solid #4A5566; background: #2A3442; color: #FFFFFF; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.tv .tv-help [data-tv="hint"][aria-expanded="true"] { background: #FFFFFF; color: #18202B; border-color: #FFFFFF; }
.tv-note { font-size: 12.5px; line-height: 1.35; color: #C9D2DE; }
/* (01/11/2026) the body never scrolls: each layout (.tv-lay) = pinned controls (.tv-pin: the audio, the play bar, part
   tabs) over scroll panes whose texts are documents (.tv-sizer > .tv-doc, scaled by the Font size and laid out at their
   pane's width by teach-ink.js: they re-wrap, 04/11/2026; a word or an answer box longer than a narrow pane's line
   breaks / shrinks instead of scrolling sideways) */
.tv-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 12px 20px 8px; font-size: var(--tv-fs); line-height: 1.5; position: relative; }
.tv-lay { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tv-pin { flex: none; }
.tv-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; position: relative; padding: 4px 8px 40px; }
.tv-sizer { position: relative; }
.tv-doc { position: absolute; left: 0; top: 0; transform-origin: 0 0; font-size: var(--tv-doc-fs, 22px); line-height: var(--tv-lh, 1.5); overflow-wrap: anywhere; }
.tv-doc > :first-child { margin-top: 0; }
.tv-ink { position: absolute; z-index: 4; pointer-events: none; mix-blend-mode: multiply; overflow: hidden; }
.tv-ink[hidden] { display: none; }
.tv-ink canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-inking .tv-doc { cursor: crosshair; }
.tv-inking .tv-doc :is(button, input, select, textarea, label) { cursor: auto; }
.tv .tv-ink-size { min-width: 30px; justify-content: center; padding: 0 6px; }
/* the ink's colour + thickness: one button (the colour as a dot, its size = the thickness) and a small pop-up under it */
.tv-ink-opt { position: relative; display: inline-flex; }
.tv .xh-btn.tv-ink-optb { padding: 0 3px 0 6px; gap: 2px; }
.tv-ink-dot { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.tv-ink-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #18202B); box-shadow: 0 0 0 2px #FFFFFF; }
.tv-ink-dot[data-size="0"]::before { width: 6px; height: 6px; }
.tv-ink-dot[data-size="2"]::before { width: 14px; height: 14px; }
.tv .xh-btn .ic.tv-caret { width: 12px; height: 12px; }
.tv-ink-pop { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 8px; border: 1px solid #4A5566; background: #2A3442; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.tv-ink-pop[hidden] { display: none; }
.tv-ink-pop .tv-grp { gap: 6px; }
.tv-ink-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #4A5566; background: var(--c); cursor: pointer; padding: 0; }
.tv-ink-c[aria-pressed="true"] { border-color: #FFFFFF; box-shadow: 0 0 0 2px #FFE58F; }
.tv-ink-c:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
/* the ink's save state ([data-ink-st]; teach.js noteStore.status gives it the class tv-nst, ok / err): colours that read
   on the dark bar (AA); "Saved" / "Saving…" as their icon only (the words in the tooltip and for screen readers); "Not
   saved — Try again" and "Only on this device" keep their words */
#tv-ink [data-ink-st] { display: inline-flex; min-width: 18px; margin-left: 2px; color: #B8C1CE; }
#tv-ink [data-ink-st].ok { color: #9FD9B0; }
#tv-ink [data-ink-st].err { color: #FFB4A8; }
#tv-ink [data-ink-st] .save-st:is([data-st="saved"], [data-st="saving"]) .save-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#tv-ink [data-ink-st] .save-st[data-st="local"] .save-t { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tv-lh { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #DCE3EC; white-space: nowrap; }
.tv-lh .ic { width: 18px; height: 18px; color: #B8C1CE; }
.tv-lh select { font: inherit; min-height: 30px; border-radius: 6px; border: 1px solid #4A5566; background: #18202B; color: #FFFFFF; padding: 0 2px 0 4px; }
.tv-lh select:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
/* ---- Lecture review items 1, 2, 5, 10, 16 (03/11/2026): the Draw menu, the Aa menu, the one-row bar's steps, the
   "Question icons" switch, the skill tabs in the bar, the blank screen (B) and the keys list (?) ---- */
.tv-draw { flex: none; position: relative; display: inline-flex; align-items: center; padding-left: 8px; border-left: 1px solid #3A4554; }
.tv .xh-btn.tv-drawb { gap: 4px; padding: 0 4px 0 6px; }
.tv-draw-ic { display: inline-flex; align-items: center; }
.tv-draw-ic .pen-ico { display: inline-block; }
.tv .xh-btn.tv-drawb[data-on]:not([data-on=""]) { border-color: #FFE58F; box-shadow: inset 0 0 0 1px #FFE58F; }   /* (a drawing tool is on: the mouse marks / draws) */
.tv .xh-btn.tv-drawb[aria-expanded="true"] { background: #2A3442; }
.tv-ink-dot[hidden] { display: none; }
.tv-draw-pop, .tv-aa-pop { position: fixed; z-index: 40; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; border: 1px solid #4A5566; background: #2A3442; color: #FFFFFF; box-shadow: 0 12px 28px rgba(0, 0, 0, .4); font-size: 13px; line-height: 1.35; overflow: auto; }
.tv-draw-pop { width: 420px; max-width: calc(100vw - 16px); box-sizing: border-box; }
.tv-draw-pop[hidden], .tv-aa-pop[hidden] { display: none; }
.tv-draw-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tv-draw-t, .tv-draw-b { font: inherit; font-size: 13px; color: #FFFFFF; background: transparent; border: 1px solid #4A5566; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; white-space: nowrap; touch-action: manipulation; }
.tv-draw-t { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; }
.tv-draw-t .ic, .tv-draw-b .ic { width: 18px; height: 18px; }
.tv-draw-t .pen-ico { margin: 3px 0; }
.tv-draw-t:hover, .tv-draw-b:hover:not(:disabled) { background: #3A4554; }
.tv-draw-t[aria-pressed="true"], .tv-draw-b[aria-pressed="true"] { background: #FFFFFF; color: #18202B; border-color: #FFFFFF; font-weight: 600; }
.tv-draw-b:disabled { opacity: .45; cursor: default; }
.tv-draw-t:focus-visible, .tv-draw-b:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
.tv-draw-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tv-draw-row[hidden] { display: none; }
.tv-draw-k { min-width: 72px; color: #C9D2DE; }
.tv-draw-row .tv-ink-sw, .tv-draw-sz { display: inline-flex; gap: 8px; align-items: center; }
.tv-draw-pop .tv-ink-c { width: 34px; height: 34px; }
.tv-ink-c.ul { border-radius: 6px; background: #FFFFFF; box-shadow: inset 0 -6px 0 var(--c); }
.tv-ink-c.el { border-radius: 50%; background: #FFFFFF; box-shadow: inset 0 0 0 4px var(--c); }
.tv-ink-c.ul[aria-pressed="true"], .tv-ink-c.el[aria-pressed="true"] { border-color: #FFFFFF; outline: 2px solid #FFE58F; outline-offset: 1px; }
.tv-draw-sz .tv-draw-b { min-width: 40px; padding: 0 8px; }
.tv-draw-acts { border-top: 1px solid #4A5566; padding-top: 10px; }
.tv-draw-pop [data-ink-st] { margin-left: auto; color: #B8C1CE; }
.tv-draw-pop [data-ink-st].ok { color: #9FD9B0; }
.tv-draw-pop [data-ink-st].err { color: #FFB4A8; }
.tv-draw-pop [data-ink-st] .save-st [data-save-retry] { color: var(--c-focus-on-dark, #FFE58F); }
.tv-draw-tip { margin: 0; font-size: 12px; color: #C9D2DE; }
.tv .xh-btn.tv-aab { gap: 3px; padding: 0 4px 0 6px; }
.tv-aa-n { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.tv-aa-pop { width: 280px; box-sizing: border-box; }
.tv-aa-pop .tv-lh { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.tv-aa-pop .tv-lh > span { display: inline-flex; align-items: center; gap: 6px; }
.tv-aa-pop .tv-lh select { min-height: 36px; min-width: 110px; padding: 0 4px 0 8px; }
.tv-aa-pop .tv-lh select option:disabled { color: #8A96A8; }
.tv-aa-why { margin: -4px 0 0; font-size: 12px; color: #C9D2DE; }
.tv-aa-why[hidden] { display: none; }
.tv-aa-keys { justify-content: space-between; }
.tv-aa-keys kbd, .tv-keys kbd { font: inherit; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; border: 1px solid #8A96A8; background: #F2F4F7; color: #18202B; white-space: nowrap; }
/* "Question icons" (Listening; was "Controls: On", a solid white button): a switch, quiet in both states */
.tv .xh-btn.tv-switch, .tv .xh-btn.tv-switch[aria-pressed="true"] { background: transparent; color: #FFFFFF; border-color: #4A5566; font-weight: 400; gap: 6px; }
.tv .xh-btn.tv-switch:hover { background: #2A3442; }
.tv-switch-k { position: relative; width: 24px; height: 14px; border-radius: 7px; background: #4A5566; flex: none; transition: background .15s; }
.tv-switch-k::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.tv-switch[aria-pressed="true"] .tv-switch-k { background: #6FA8DC; }
.tv-switch[aria-pressed="true"] .tv-switch-k::after { left: 12px; }
@media (prefers-reduced-motion: reduce) { .tv-switch-k, .tv-switch-k::after { transition: none; } }
/* the layout's place in the bar (V.slot): a practice test's skill tabs, small pills */
.tv-slot { flex: none; display: inline-flex; }
.tv-slot:empty { display: none; }
.tv-bar .tv-skills { margin: 0; gap: 4px; flex-wrap: nowrap; font-size: 13px; }
.tv-bar .tv-skills .tv-part { min-height: 30px; padding: 0 10px; border-width: 1px; border-color: #4A5566; background: transparent; color: #FFFFFF; font-weight: 600; }
.tv-bar .tv-skills .tv-part:hover { background: #2A3442; }
.tv-bar .tv-skills .tv-part[aria-selected="true"] { background: #FFFFFF; color: #18202B; border-color: #FFFFFF; }
.tv-bar .tv-skills .tv-part:focus-visible { outline: 2px solid #FFE58F; outline-offset: 2px; }
/* the bar's steps when it doesn't fit (teach.js fitBar) */
.tv-bar.tv-c1 .tv-back { font-size: 0; gap: 0; padding: 0 4px; }
.tv-bar.tv-c1 .tv-back .ic { font-size: 13px; }
.tv-bar.tv-c1 .tv-draw-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-bar.tv-c2 { column-gap: 5px; padding: 4px 6px; }
.tv-bar.tv-c2 .tv-view .xh-btn:not(.tv-ib), .tv-bar.tv-c2 .tv-skills .tv-part { padding: 0 6px; }
.tv-bar.tv-c2 .tv-draw { padding-left: 5px; }
.tv-bar.tv-c3 .tv-skills .tv-part > span { display: none; }
.tv-bar.tv-c3 .tv-skills .tv-part::before { content: attr(data-short); }
.tv-bar.tv-c3 .tv-skills .tv-part { min-width: 30px; }
/* B: the view blank (black); B, Esc or a click shows it again */
.tv[data-blank]:not(.tv-max) { position: relative; }
.tv-blank { position: absolute; inset: 0; z-index: 60; background: #000000; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; cursor: pointer; }
.tv-blank-t { color: #3A4049; font-size: 13px; }
.tv-blank:focus-visible { outline: none; }
.tv-blank:focus-visible .tv-blank-t { color: #8A96A8; }
/* ?: the keys list (the pens' dialog look) */
.tv-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 14px; }
.tv-keys dt { margin: 0; text-align: right; }
.tv-keys dd { margin: 0; color: #3D4654; }
.tv-keys-dlg .pen-dlg-box { width: 520px; }
.tv-mock { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-mock-body { flex: 1; min-height: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.tv-parts { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; font-size: 15px; }
.tv-part { font: inherit; font-weight: 600; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid #CBD2DB; background: #FFFFFF; cursor: pointer; color: var(--ink); }
.tv-part[aria-selected="true"] { border-color: var(--brand); background: var(--brand-bg); }
.tv h2.tv-h { font-size: 1.15em; margin: 0 0 .2em; }
.tv h3 { font-size: 1em; margin: .8em 0 .3em; }
.tv-sub { font-size: .8em; font-weight: 600; color: var(--ink-2); margin: .6em 0 .2em; }
.tv-sub.center { text-align: center; }
.tv-subtitle, .tv-instr { color: var(--ink-2); font-size: .85em; margin: .2em 0 .6em; }
.tv-img { display: block; max-width: min(900px, 100%); height: auto; margin: .5em 0; border-radius: 6px; }
.tv-img.sm { display: inline-block; max-width: 220px; vertical-align: middle; margin: 0 .4em; }
.tv-tip { background: #F2F7FC; border-left: 4px solid var(--brand); padding: .4em .8em; margin: .4em 0; font-size: .85em; }
.tv-media { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; font-size: 16px; line-height: 1.4; }
.tv-audio { flex: none; margin-bottom: 8px; font-size: 16px; line-height: 1.4; }
.tv-say-bar { margin-bottom: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #F7F9FB; font-size: 15px; line-height: 1.35; }
/* ---- builder: Lecture Pronunciation split (user, 02/11/2026; teach-views.js pronunciationView): the player (.tv-pr-side:
   audio bar + video) left, the script (.tv-scroll) right, the divider of assets/js/split-resizer.js between them (--sp-left,
   as the student's room .scol.pr-split); each side scrolls by itself; under 900 px they stack ---- */
/* (03/11/2026: either pane down to 1 % of the width; the min() keeps the divider whole inside the view even for a share
   kept from a wider window, and the player pane clips its video / audio bar instead of scrolling sideways) */
.tv-pron.tv-pr-split { display: grid; grid-template-columns: minmax(0, min(var(--sp-left, 41.7%), calc(99% - 9px))) 9px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.tv-pr-split > .tv-pr-side { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 16px 0; display: flex; flex-direction: column; }
.tv-pr-split > .tv-pr-side .tv-video { width: 100%; }
.tv-pr-split > .tv-scroll { min-width: 0; padding-left: min(14px, 25%); overflow-x: hidden; }   /* (the script re-wraps to its pane; only a pane dragged down to ~1 % is too narrow for a word: clipped, no sideways scroll bar) */   /* (a % of the pane: a 1 % pane keeps inside its column) */
.tv-pr-split > .sp-resizer { background: transparent; }
@media (max-width: 900px) { .tv-pron.tv-pr-split { display: flex; flex-direction: column; } .tv-pr-split > .tv-pr-side { flex: none; overflow: visible; padding-right: 0; } .tv-pr-split > .tv-scroll { padding-left: 8px; } }
/* ---- end Lecture Pronunciation split ---- */

/* Listening: the questions read-only, the transcript on the left with a divider */
.tv-listen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-split { flex: 1; min-height: 0; display: flex; gap: 0; position: relative; }
.tv-trpane { flex: 0 0 42%; min-width: 0; overflow: auto; scrollbar-gutter: stable; padding: 4px 12px 24px 2px; }
.tv-trpane[hidden] { display: none; }
.tv-trpane p { margin: 0 0 .7em; }
.tv-trh { font-size: .8em; color: var(--ink-2); margin: 0 0 .4em; }
.tv-divider { flex: none; width: 14px; cursor: col-resize; touch-action: none; background: linear-gradient(90deg, transparent 6px, #CBD2DB 6px, #CBD2DB 8px, transparent 8px); }
.tv-divider:hover, .tv-split.dragging .tv-divider, .tv-divider:focus-visible { background: linear-gradient(90deg, transparent 5px, var(--brand) 5px, var(--brand) 9px, transparent 9px); outline: none; }
.tv-split.dragging { user-select: none; cursor: col-resize; }
.tv-qpane { flex: 1; min-width: 0; overflow: auto; scrollbar-gutter: stable; padding: 4px 8px 32px 12px; }
.tv-split[data-tr="off"] .tv-qpane { padding-left: 0; }
/* the picture pane of a Listening / Reading part with a map, plan, diagram or chart (03/11/2026, teach-picture.js): left
   of the questions, its own scroll (so it stays in view), Fit / Width and zoom above it; the same pictures are hidden in
   the questions while it is shown (the question document keeps its structure: the ink keeps its words) */
.tv-picwrap { flex: 0 0 50%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tv-picwrap[hidden] { display: none; }
.tv-picbar { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 6px 4px 0; }
.tv-picbar .tv-seg-b { min-height: 28px; padding: 0 12px; font-size: 13px; }
.tv-picbar .tv-seg-b:disabled { color: #A5AEBB; cursor: default; }
.tv-picz { display: inline-flex; align-items: center; min-width: 48px; justify-content: center; font-size: 12px; color: var(--ink-2); border-left: 1px solid #CBD2DB; border-right: 1px solid #CBD2DB; font-variant-numeric: tabular-nums; }
.tv-picpane { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 2px 4px 6px 2px; }
.tv-picpane .tv-sizer { margin: 0 auto; }
.tv-pic { margin: 0 0 1em; }
.tv-pic:last-child { margin-bottom: 0; }
.tv-pic img { display: block; width: 100%; height: auto; border-radius: 6px; }
.tv-split[data-pic="on"] .tv-qpane { padding-left: 12px; }
.tv-split[data-pic="on"] .tv-qpane .tv-img:not(.sm) { display: none; }
.tv-s { cursor: pointer; border-radius: 3px; }
/* (the colours of the student's Practice with answers, listening-practice.js: in-seg = the question's segment, on/now = the sentence heard, the answer underlined) */
.tv-s.in-seg { background: #E9F0F8; box-shadow: 0 0 0 2px #E9F0F8; }
.tv-s.in-ans { background: #FCE3B0; box-shadow: 0 0 0 2px #FCE3B0; }
.tv-s.now { background: #FFD966; box-shadow: 0 0 0 2px #FFD966; }
.tv-ans-on .tv-s.tv-ans, .tv-s.tv-ans.show1 { text-decoration: underline 3px #2E7D4F; text-underline-offset: 4px; }
.tv-q.follow { background: #EEF3F9; box-shadow: 0 0 0 2px #9DB8D6; }
.tv-q.playing, .tv-q.sel.playing { background: #FFF1C2; box-shadow: 0 0 0 2px #E5A100; }
.tv-s.tv-hit, .tv-line.tv-hit { background: #CFE8FF; box-shadow: 0 0 0 2px #74C0FC; border-radius: 3px; }
.tv-spk { color: var(--brand); }
.tv-grp-q { margin: 0 0 1.1em; }
.tv-grp-q > h3 { margin-top: .2em; }
.tv-q { border-radius: 6px; padding: .1em .2em; margin: .15em 0; cursor: pointer; }
.tv-q.inline { display: inline; padding: 0; }
.tv-q.sel { background: #FFF6D6; box-shadow: 0 0 0 2px #E5B300; }
.tv-stem { display: flex; gap: .5em; align-items: baseline; }
.tv-num { flex: none; font-weight: 700; min-width: 1.6em; }
/* (04/11/2026) a question's row (number · text · answer box) in a document narrower than 10 em (a pane dragged very
   narrow at a big Font size): the box goes under the text instead of the pane scrolling sideways */
.tv-doc { container: tvdoc / inline-size; }
@container tvdoc (max-width: 220px) { .tv-stem { flex-wrap: wrap; } }
.tv-opts { display: flex; flex-direction: column; gap: .15em; margin: .2em 0 .4em 2.1em; }
.tv-opts.row { flex-direction: row; flex-wrap: wrap; gap: .3em 1.2em; }
.tv-opt { border-radius: 6px; padding: 0 .3em; }
.tv-ans-on .tv-opt.ok { background: #DFF3E5; box-shadow: 0 0 0 2px #2E7D4F; color: #14532D; font-weight: 600; }
.tv-hint { color: var(--muted); margin-left: 2.1em; }
/* answer boxes (02/11/2026: READ-ONLY frames; the key shows INSIDE the box once the answer is shown, nothing beside it) */
.tv-gap { display: inline-block; max-width: 100%; margin: 0 .1em; }
.tv-in { display: inline-block; box-sizing: border-box; vertical-align: baseline; font-size: .85em; width: 7.5em; max-width: 100%; min-height: 1.5em; padding: .05em .35em; border: 1.5px solid #8A96A8; border-radius: 6px; background: #FFFFFF; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: inherit; }
.tv-in.wide { width: 13em; }
.tv-in.sel { width: 4.6em; padding: .05em .2em; }
.tv-in-n { color: #8A96A8; font-weight: 600; }
.tv-in-a { display: none; font-weight: 600; }
.tv-ans-on .tv-in:has(.tv-in-a:not(:empty)), .tv-q.show1 .tv-in:has(.tv-in-a:not(:empty)) { width: auto; min-width: 4.6em; max-width: 100%; background: #DFF3E5; border-color: #2E7D4F; color: #14532D; }
.tv-ans-on .tv-in:has(.tv-in-a:not(:empty)) .tv-in-n, .tv-q.show1 .tv-in:has(.tv-in-a:not(:empty)) .tv-in-n { display: none; }
.tv-ans-on .tv-in-a, .tv-q.show1 .tv-in-a { display: inline; }
/* a choice mark: round (one answer) or square (choose N); filled in the right option once shown */
.tv-mk { display: inline-block; box-sizing: border-box; width: .8em; height: .8em; margin: 0 .3em 0 0; vertical-align: -.05em; border: 1.5px solid #5B6472; border-radius: 50%; background: #FFFFFF; }
.tv-mk.sq { border-radius: 2px; }
.tv-ans-on .tv-opt.ok .tv-mk, .tv-q.show1 .tv-opt.ok .tv-mk { border-color: #2E7D4F; background: #2E7D4F; box-shadow: inset 0 0 0 2px #DFF3E5; }
.tv-key { display: none; color: #14532D; font-weight: 600; }
.tv-sample { margin: .2em 0 .4em 2.1em; font-size: .9em; }
.tv-ans-on .tv-sample { display: block; }
.tv-q.show1 .tv-sample { display: block; }
.tv-q.show1 .tv-opt.ok { background: #DFF3E5; box-shadow: 0 0 0 2px #2E7D4F; color: #14532D; font-weight: 600; }
/* the compact gutter of a Listening question (01/11/2026): ▸ whole part · ◎ answer · eye, on the question's first line */
/* (one column at the document's left edge, whatever the question's indent: teach-listening.js placeGutters sets left) */
.tv-gutter { --gut: 84px; }
.tv-gutter .tv-doc { padding-left: var(--gut); }
.tv-gutter .tv-q:not(.inline) { position: relative; }
.tv-gut { position: absolute; left: calc(-1 * var(--gut)); top: 0; width: var(--gut); height: 1lh; display: flex; align-items: center; justify-content: flex-start; gap: 2px; padding-left: 2px; }
.tv-gut.in { position: static; display: inline-flex; width: auto; height: auto; vertical-align: middle; padding: 0 3px 0 0; }
.tv-ic, .tv-ic-gap { flex: none; width: 24px; height: 24px; }
.tv-ic { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #8A96A8; opacity: .4; cursor: pointer; }
.tv-ic:hover, .tv-ic:focus-visible, .tv-q:hover .tv-ic, .tv-q.sel .tv-ic, .tv-q.playing .tv-ic, .tv-ic.on, .tv-ic[aria-pressed="true"] { opacity: 1; color: var(--brand); }
.tv-ic:hover { background: var(--brand-bg); }
.tv-ic:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tv-ic.tv-seek[data-kind="ans"]:is(:hover, .on), .tv-q.playing .tv-ic.tv-seek[data-kind="ans"] { color: #8A5A00; }
.tv-ic.on { background: var(--brand); color: #FFFFFF; }
.tv-ic.tv-seek[data-kind="ans"].on { background: #B7791F; color: #FFFFFF; }
.tv-ic.tv-show1[aria-pressed="true"] { color: #14532D; }
.tv-ctl-off .tv-gut { visibility: hidden; }
.tv .xh-btn[data-l="ctl"] { min-width: 112px; justify-content: center; }
.tv-match { display: flex; gap: .5em; align-items: baseline; flex-wrap: wrap; }
.tv-gaplist { margin: .2em 0; padding-left: 1.4em; }
.tv-notes { border: 1px solid var(--line); border-radius: 10px; padding: .4em 1em; }
.tv-note-line { margin: .15em 0; }
.tv-optbox { border: 1px solid var(--line); border-radius: 10px; padding: .4em .8em; margin: .4em 0; font-size: .9em; }
.tv-opt-title { font-weight: 600; }
.tv-opt-row { display: flex; gap: .6em; }
.tv-summary p { margin: .3em 0; }
.tv-tbl-wrap { overflow-x: auto; }
.tv-table { border-collapse: collapse; font-size: .85em; }
.tv-table th, .tv-table td { border: 1px solid #CBD2DB; padding: .25em .5em; vertical-align: top; }
.tv-flow { display: flex; flex-direction: column; align-items: center; gap: .2em; }
.tv-step { border: 1px solid #CBD2DB; border-radius: 8px; padding: .25em .7em; max-width: 900px; }
.tv-arrow { color: var(--muted); }

/* Reading: the passage on the left (same split as Listening), the answer's place lit */
.tv-read { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-passage { flex-basis: 50%; }
.tv-passage p { margin: 0 0 .75em; }
.tv-plabel { display: inline-block; min-width: 1.4em; color: var(--brand); }
mark.tv-loc { background: #CFE8FF; box-shadow: 0 0 0 2px #74C0FC; border-radius: 3px; color: inherit; }

/* Pronunciation */
.tv-video { display: block; width: min(960px, 100%, 92vh); aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000000; }
video.tv-video { height: auto; }
.tv-expl { color: var(--ink-2); font-size: .8em; }
.tv-ptext p { margin: 0 0 .7em; }
.tv-cue { cursor: pointer; border-radius: 4px; }
.tv-cue.now { background: #FFEDB3; }
/* Highlight: Sentence | Word (03/11/2026, as the student's room .pr-sync): Sentence = the sentence's background only;
   Word = the word being spoken, the sentence faintly behind it (.tv-pron[data-hl], helen.sync) */
.tv-pron[data-hl="word"] .tv-cue.now { background: #FFF7DB; }
.tv-pron[data-hl="word"] .tv-w { border-radius: 3px; }
.tv-pron[data-hl="word"] .tv-w.now { background: #FFD966; box-shadow: 0 0 0 2px #FFD966; }
/* the Lecture bar's two switches of a timed script: Play: Sentence | Full, Highlight: Sentence | Word */
.tv-mode { display: inline-flex; align-items: center; flex: none; }
.tv-mode > span { font-size: 12px; color: #B8C1CE; margin-right: 4px; }
.tv .tv-mode .xh-btn { border-radius: 0; }
.tv .tv-mode .xh-btn:first-of-type { border-radius: 6px 0 0 6px; }
.tv .tv-mode .xh-btn:last-of-type { border-radius: 0 6px 6px 0; border-left: 0; }
.tv .tv-mode .xh-btn[aria-checked="true"] { background: #FFFFFF; color: #18202B; border-color: #FFFFFF; }
.tv .tv-mode .xh-btn[aria-checked="true"]:hover { background: #E3E8EF; }
.tv-line { margin: .25em 0; }
.tv-say { font: inherit; font-size: .6em; width: 2em; height: 2em; border-radius: 50%; border: 1px solid var(--brand); background: #FFFFFF; color: var(--brand); cursor: pointer; vertical-align: middle; padding: 0; }
.tv-ipa { color: #5B2C83; font-family: 'Segoe UI', system-ui, sans-serif; font-size: .9em; }
.tv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.tv-sound { border: 1px solid var(--line); border-radius: 10px; padding: .3em .7em; margin: .4em 0; }
.tv-sound.now { border-color: #E5B300; background: #FFF9E3; }
.tv-sound-h { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.tv-sound-h .btn { font-size: 14px; }
.tv-chips { display: flex; flex-wrap: wrap; gap: .3em; margin: .3em 0; }
.tv-chip { font: inherit; font-size: .9em; padding: .1em .6em; border: 1px solid #CBD2DB; border-radius: 8px; background: #FFFFFF; cursor: pointer; }
.tv-chip:hover { border-color: var(--brand); background: var(--brand-bg); }
.tv-turn.s0 .tv-spk { color: #1F4E79; } .tv-turn.s1 .tv-spk { color: #8E1F48; } .tv-turn.s2 .tv-spk { color: #1E5631; } .tv-turn.s3 .tv-spk { color: #8A3F06; }

/* Speaking */
.tv-say-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tv-say-cur { flex: 1 1 260px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-say-nst { margin-left: auto; }
.tv-seg { display: inline-flex; border: 1px solid #CBD2DB; border-radius: 999px; overflow: hidden; }
.tv-seg-b { font: inherit; font-size: 14px; font-weight: 600; min-height: 32px; padding: 0 14px; border: 0; background: #FFFFFF; color: var(--ink-2); cursor: pointer; }
.tv-seg-b + .tv-seg-b { border-left: 1px solid #CBD2DB; }
.tv-seg-b[aria-pressed="true"] { background: var(--brand); color: #FFFFFF; }
.tv-seg-b:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* (user, 01/11/2026: "the audio bar as compact as possible") the pinned players and play bars of the Lecture views are
   ONE thin row (≈ 34 px): play · time · position · length · −5 s · +5 s · the speeds as one segmented group ("Speed" for
   screen readers) · mute · volume; the Speaking play bar and the part / passage / skill tabs as low */
.tv-body { padding-top: 6px; }
.tv-audio { margin-bottom: 4px; }
.tv-pin .ab { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 2px 6px; border-radius: 8px; }
.tv-pin .ab > .ab-row { flex-wrap: nowrap; gap: 6px; min-width: 0; }
.tv-pin .ab > .ab-row:first-child { flex: 1 1 auto; }
.tv-pin .ab > .ab-row + .ab-row { flex: none; }
.tv-pin .ab .gs-play.sm { width: 28px; height: 28px; }
.tv-pin .ab .gs-play.sm svg { width: 14px; height: 14px; }
.tv-pin .ab .ab-time { min-width: 34px; font-size: 12px; }
.tv-pin .ab .ab-seek { flex: 1 1 auto; width: 0; min-width: 80px; height: 24px; }
.tv-pin .ab .gw-sm { min-height: 28px; min-width: 0; padding: 0 7px; font-size: 12px; }
.tv-pin .ab .ab-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-pin .ab .ab-sep { height: 18px; }
.tv-pin .ab .row[role="group"] { gap: 0 !important; border: 1px solid #CBD2DB; border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.tv-pin .ab .gs-spd { min-height: 26px; min-width: 0; padding: 0 6px; font-size: 12px; border: 0; border-radius: 0; border-left: 1px solid #CBD2DB; }
.tv-pin .ab .gs-spd:first-child { border-left: 0; }
.tv-pin .ab .ab-mute { width: 28px; height: 28px; }
.tv-pin .ab .ab-vol { width: 72px; height: 24px; }
.tv-say-bar { gap: 8px; margin-bottom: 4px; padding: 2px 6px; border-radius: 8px; font-size: 14px; }
.tv-say-bar .btn.sm { min-height: 28px; padding: 0 10px; font-size: 13px; }
.tv-say-bar .tv-seg-b { min-height: 26px; padding: 0 10px; font-size: 13px; }
.tv-parts { margin: 0 0 6px; font-size: 14px; }
.tv-part { min-height: 30px; padding: 0 12px; }
/* ---- Lecture Speaking (redesign, user 04/11/2026: "tidy and professional"; teach-views.js speakingView) ----
   One reading column centred in the pane (the document's width SP_W grows with the Font size); inside it, in layout px
   of the document (em = DOC_FS 22 px, scaled by the Font size): the title, Vocabulary in two columns, then each question as
   a grid row "number · text · read aloud · model answer / Listen / Notes" with the model answer and the note box under the
   text. The DOM keeps the places of the text elements (the ink's anchors); the grid and the flex order move them. */
.tv-speak .tv-scroll { scrollbar-gutter: stable both-edges; }
.tv-speak .tv-scroll > .tv-sizer, .tv-speak .tv-scroll > .tv-media { margin-inline: auto; }
.tv-speak .tv-doc { display: flex; flex-direction: column; color: var(--c-text-1); }
.tv-sp-sec[hidden] { display: none; }
/* the title (appended last in the document, shown first) */
.tv-sp-head { order: -1; margin: .1em 0 .7em; padding: 0 .3em .45em; border-bottom: 1px solid var(--c-border); }
.tv-speak .tv-sp-title { font-size: 1.25em; font-weight: var(--fw-semibold); line-height: 1.3; margin: 0; }
.tv-sp-meta { margin: .1em 0 0; font-size: .7em; color: var(--c-text-3); letter-spacing: .01em; }
/* labels: "Vocabulary", "Part 2", "Model answer" — small capitals with a hairline after them */
.tv-speak :is(.tv-sp-h, .tv-sp-vocab > h3, .tv-model > h3) { font-size: .62em; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .09em; color: var(--c-text-3); line-height: 1.4; }
.tv-speak .tv-sp-h { display: flex; align-items: center; gap: .8em; margin: 1.1em .5em .35em; }
.tv-speak .tv-sp-sec:first-of-type .tv-sp-h { margin-top: .2em; }
.tv-speak .tv-sp-h::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }
/* the topic's phrases: the same look in the Vocabulary list and in the model answers */
.tv-speak :is(.tv-sp-vocab, .tv-model) b { color: var(--c-warn); font-weight: var(--fw-semibold); background: var(--c-warn-bg); border-radius: 3px; padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* Vocabulary: a light block on top, phrase over its meaning, two columns when the column is wide enough */
.tv-speak .tv-sp-vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); gap: .3em 1.6em; margin: 0 0 .8em; padding: .55em .9em .7em; border: 0; border-radius: var(--r-lg); background: var(--c-surface-2); font-size: .9em; line-height: 1.35; }
.tv-speak .tv-sp-vocab[hidden] { display: none; }
.tv-speak .tv-sp-vocab > h3 { grid-column: 1 / -1; margin: 0 0 .1em; font-size: .72em; }
.tv-speak .tv-sp-vocab > p { margin: 0; }
.tv-speak .tv-sp-vocab .tv-vm { display: block; color: var(--c-text-2); font-size: .9em; }
/* a question: number · text · read aloud · the other buttons; then the model answer, the note box, the row's status */
.tv-speak .tv-spq { display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto auto; column-gap: .35em; align-items: start; margin: 0 0 .2em; padding: .4em .5em .45em .4em; border-left: 3px solid transparent; border-radius: 0 var(--r-md) var(--r-md) 0; cursor: pointer; }
.tv-speak .tv-spq:hover { background: var(--c-surface-3); }
.tv-speak .tv-spq.sel { border-left-color: var(--c-brand); background: color-mix(in srgb, var(--c-brand-soft) 65%, var(--c-surface)); }
.tv-speak .tv-spq.playing { border-left-color: var(--c-brand); background: var(--c-brand-soft); }
.tv-speak .tv-spq-h { display: contents; }
.tv-speak .tv-spq > .tv-instr { grid-column: 2 / -1; grid-row: 1; margin: 0 0 .3em; }
.tv-speak .tv-spq :is(.tv-num, .tv-big, .tv-cue-card, .tv-spbtn, .tv-spq-acts) { grid-row: 1; }
.tv-speak .tv-spq.has-intro :is(.tv-num, .tv-big, .tv-cue-card, .tv-spbtn, .tv-spq-acts) { grid-row: 2; }
.tv-speak .tv-spq .tv-num { grid-column: 1; font-size: 1.08em; font-weight: var(--fw-semibold); color: var(--c-text-3); text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.tv-speak .tv-spq .tv-big { grid-column: 2; margin: 0; font-size: 1.08em; font-weight: var(--fw-semibold); }
.tv-speak .tv-spq .tv-spbtn { grid-column: 3; margin-left: .4em; }
.tv-speak .tv-spq-acts { grid-column: 4; display: flex; gap: .15em; margin: 0; }
.tv-speak .tv-spq > :is(.tv-model, .tv-spnote, .tv-sp-mst) { grid-column: 2 / -1; }
/* the icon buttons: quiet at rest (muted, no frame), the brand colour on the question chosen / under the mouse */
.tv-spi { flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; margin-top: calc((1.08em * var(--tv-lh, 1.5) - 1.6em) / 2); padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--c-text-3); font: inherit; font-size: 1em; line-height: 1; cursor: pointer; }
.tv-spi .ic { width: .82em; height: .82em; }
.tv-spi[hidden] { display: none; }
.tv-speak .tv-spq:is(.sel, :hover) .tv-spi { color: var(--c-brand); }
.tv-speak .tv-spi:hover { background: var(--c-brand-soft); color: var(--c-brand); }
.tv-speak .tv-spi[aria-expanded="true"] { background: var(--c-brand-tint); color: var(--c-brand-strong); }
.tv-speak .tv-spi.on, .tv-speak .tv-spi.on:hover { background: var(--c-brand); color: var(--c-text-on-dark); }
.tv-spi:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }
.tv-spi > .tv-ndot { position: absolute; top: .12em; right: .12em; width: .3em; height: .3em; }
/* Part 2: the cue card, a tidy card in the question's place (the same column as the Part 3 questions) */
.tv-speak .tv-spq.is-cue .tv-cue-card { grid-column: 1 / 3; }
.tv-speak .tv-spq.is-cue > :is(.tv-instr, .tv-model, .tv-spnote, .tv-sp-mst) { grid-column: 1 / -1; }
.tv-speak .tv-cue-card { padding: .55em 1em .6em; border: 1px solid var(--c-border-strong); border-radius: var(--r-lg); background: var(--c-surface); }
.tv-speak .tv-cue-card::before { content: "Cue card"; display: block; font-size: .6em; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .09em; color: var(--c-text-3); margin-bottom: .2em; }
.tv-speak .tv-cue-card > p { margin: .15em 0; color: var(--c-text-2); }
.tv-speak .tv-cue-card > p.tv-big { margin: 0 0 .25em; color: var(--c-text-1); font-size: 1.08em; }
.tv-speak .tv-cue-card ul { margin: .15em 0 .3em; padding-left: 1.3em; }
.tv-speak .tv-cue-card li { margin: .1em 0; }
.tv-speak .tv-cue-card li::marker { color: var(--c-brand); }
/* the model answer: a light inset block under the question's text (no frame in a frame) */
.tv-speak .tv-model { margin: .35em 0 .15em; padding: .4em .85em .5em; border: 0; border-left: 3px solid var(--c-border-strong); border-radius: 0 var(--r-md) var(--r-md) 0; background: rgba(24, 32, 43, .035); cursor: auto; }
.tv-speak .tv-model[hidden] { display: none; }
.tv-speak .tv-model > h3 { margin: 0 0 .15em; }
.tv-speak .tv-model p { margin: .15em 0; }
.tv-speak .tv-model .muted, .tv-speak .tv-opt-par { color: var(--c-text-2); }
/* the private note box and a row's status (an error, Loading…, another voice) */
.tv-spnote { display: flex; flex-direction: column; gap: 2px; margin: .35em 0 .1em; font-size: .64em; color: var(--c-text-2); cursor: auto; }
.tv-spnote textarea { font: inherit; font-size: 16px; line-height: 1.4; padding: 6px 10px; border: 1px solid var(--c-border-control); border-radius: var(--r-md); background: #FFFDF2; resize: vertical; min-height: 2.6em; }
.tv-sp-mst { font-size: .62em; color: var(--c-text-3); line-height: 1.4; margin-top: .2em; }
.tv-sp-mst:empty { display: none; }
/* the play bar: one quiet row over the column (no frame): Play · the question chosen · status · Parts · Voice · Notes */
.tv-speak .tv-say-bar { gap: 10px; margin: 0 0 4px; padding: 2px 2px 6px; border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0; background: transparent; font-size: var(--fs-md); flex-wrap: nowrap; }
.tv-speak .tv-say-cur { font-weight: var(--fw-semibold); color: var(--c-text-1); }
.tv-say-q { font-weight: var(--fw-medium); color: var(--c-text-3); margin-right: 4px; }
.tv-say-st { flex: 0 1 auto; min-width: 0; font-size: var(--fs-sm); color: var(--c-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-say-st:empty { display: none; }
.tv-voice { flex: none; display: inline-flex; }
.tv-voice[hidden] { display: none; }
.tv-voice-in { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-3); }
.tv-voice-in b { color: var(--c-text-1); font-weight: var(--fw-semibold); }
.tv-voice-m { margin-left: 8px; font-size: var(--fs-xs); color: var(--c-text-3); white-space: nowrap; align-self: center; }
.tv-voice-m:empty { display: none; }
.tv-voice select { font: inherit; font-size: var(--fs-sm); min-height: 28px; padding: 0 4px 0 6px; border: 1px solid var(--c-border-control); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-text-1); cursor: pointer; }
.tv-voice select:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 1px; }
.tv-speak .tv-say-nst { flex: none; margin-left: 0; }
.tv-speak .tv-nall { border-color: var(--c-border-strong); color: var(--c-text-2); }
.tv-speak .tv-nall[aria-pressed="true"] { background: var(--c-brand-soft); border-color: var(--c-brand); color: var(--c-brand); }
/* Present mode: the per-question buttons only on the question chosen, under the mouse or the keyboard's focus */
.t-present-teach .tv-speak .tv-spq:not(.sel, .playing, :hover, :focus-within) :is(.tv-spbtn, .tv-spq-acts) { opacity: 0; }
.t-present-teach .tv-speak .tv-spq:hover:not(.sel) { background: transparent; }
@media (prefers-reduced-motion: no-preference) { .tv-speak .tv-spq :is(.tv-spbtn, .tv-spq-acts) { transition: opacity .12s; } }
/* ---- end Lecture Speaking ---- */
.tv-panel { border: 1px solid var(--line); border-radius: 10px; padding: .4em 1em .6em; background: #FAFBFC; margin-top: 12px; }
.tv-panel h3 { margin: .3em 0; }
.tv-panel p { margin: .3em 0; }
.tv-panel b { color: #8A3F06; }
.tv-opt-par { color: var(--ink-2); }

/* Pronunciation › 44 sounds – Revision › Full sheet (teach-sheet.js): the layout of sound-revision.pdf */
.tv-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; align-items: start; }
.tv-sh-t { width: 100%; border-collapse: separate; border-spacing: 3px; border: 1px solid #B9C1CC; }
.tv-sh-t th, .tv-sh-t td { border: 1px solid #C9D0D9; padding: .1em .4em; text-align: left; vertical-align: middle; }
.tv-sh-h { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.35em; text-align: center !important; padding: .35em !important; }
.tv-sh-sym { width: 2.6em; font-weight: 700; white-space: nowrap; }
.tv-sh-w { font-weight: 700; }
.tv-sh-row { cursor: pointer; }
.tv-sh-row:hover { background: #F4F7FB; }
.tv-sh-row.now { background: #FFEDB3; }
.tv-sh-play { font: inherit; font-size: 11px; width: 22px; height: 22px; margin-right: .45em; border-radius: 50%; border: 1px solid #B9C1CC; background: #FFFFFF; color: var(--brand); cursor: pointer; padding: 0; vertical-align: .15em; opacity: .55; }
.tv-sh-row:hover .tv-sh-play, .tv-sh-play:focus-visible, .tv-sh-play.on { opacity: 1; border-color: var(--brand); }
.tv-sh-play.on { background: var(--brand); color: #FFFFFF; }
.tv-sh-tri { margin-top: .5em; }
.tv-sh-line { margin: 0; padding: 0 .3em; font-weight: 700; border-radius: 4px; }
.tv-sheet-by { text-align: center; font-family: var(--serif); font-style: italic; font-size: .8em; color: var(--ink-2); margin: 1em 0 0; }

/* Writing: the task and the note box that moves and resizes */
.tv-prompt p { margin: 0 0 .6em; white-space: pre-line; }
.tv-chart { max-width: min(820px, 100%); border: 1px solid var(--line); }
.tv-t1chart { margin: .5em 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }   /* task1: Real test / With values */
.tv-t1chart .tv-chart { margin: 0; }
.tv-notebox { position: absolute; left: 0; top: 0; z-index: 5; display: flex; flex-direction: column; background: #FFFDF2; border: 1px solid #E5D9A8; border-radius: 10px; box-shadow: 0 6px 18px rgba(24,32,43,.14); }
.tv-notebox.moving { box-shadow: 0 10px 28px rgba(24,32,43,.28); }
.tv-nb-h { flex: none; cursor: move; padding: 6px 10px; font-size: 14px; font-weight: 600; line-height: 1.3; background: #FFF4C4; border-radius: 10px 10px 0 0; user-select: none; touch-action: none; color: var(--ink-2); }
.tv-nb-h .small { font-weight: 400; color: var(--muted); }
.tv-notebox textarea { flex: 1; min-height: 0; border: 0; background: transparent; font: inherit; font-size: .8em; line-height: 1.45; padding: 8px 12px; resize: none; outline: none; }
.tv-nb-grip { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize; touch-action: none; border-radius: 0 0 10px 0; background: linear-gradient(135deg, transparent 55%, #C9B66B 55%, #C9B66B 62%, transparent 62%, transparent 72%, #C9B66B 72%, #C9B66B 79%, transparent 79%); }
.tv-nst { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.tv-nst.ok { color: #1E6B3A; }
.tv-nst.err { color: #B42318; }
/* ---- end Teach tab ---- */
/* ---- writing laptop layout (01/11/2026; the standard screen 1536 x 730): Writing screens only, layout only ---- */
/* grading board (teacher-class/grade-writing.js, .gw-w3 = the Writing board, not the Pronunciation one): on a wide screen
   three columns - the student and the task | Mark errors, Track changes and the script, which stays in view under the
   bar while the grading column scrolls (a long script scrolls inside its card) | the grading (bands, band, comment, annotations, Return). Narrower: as before. */
.gw-wa, .gw-wb { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gw-w3 { --gw-w3-split: minmax(0, 27fr) minmax(0, 73fr); --gw-w3-right: minmax(0, 56fr) minmax(0, 44fr); --gw-w3-top: calc(var(--gw-bar-h, 60px) + 12px); }
.embed > .gw-w3 { --gw-w3-top: calc(var(--back-bar-h, 57px) + var(--gw-bar-h, 60px) + 12px); }
/* (user, 01/11/2026: the three-column layout from 1400 px is dropped; two columns at every width, see "grading board:
   two columns" at the end of this file) */
/* student peer review of Writing (student-peer-review.js, .pe-w): the page uses the window's width (as the Writing feedback
   page) so the classmate's text keeps a readable line beside its margin notes; on a wide screen the task text and its chart
   sit side by side, which brings the text to mark up the page */
.cmain:has(.lay.pe-w) { max-width: none; }
@media (min-width: 1400px) {
  .pe-w section[aria-labelledby="tk-h"]:has(> img) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; align-items: start; }
  .pe-w section[aria-labelledby="tk-h"]:has(> img) > h2 { grid-column: 1 / -1; }
  .pe-w section[aria-labelledby="tk-h"]:has(> img) > img { grid-column: 2; grid-row: 2; }
}
/* ---- end writing laptop layout ---- */
/* ---- speaking laptop layout (01/11/2026; the standard screen 1536 x 730): Speaking + Pronunciation screens only, layout only ---- */
/* Speaking grading board (teacher-class/grade-speaking.js, .gw.gs): on a wide screen three columns - the student, the part,
   fluency, the AI pass, the big player, the layers and the marks | the small player and the transcript (.gs-wa), which stay
   in view under the bar while the grading scrolls (a long transcript scrolls inside its card) | the grading: bands, band,
   comment, Return (.gs-wb). Narrower: the two halves as before. */
.gs-wa, .gs-wb { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gw.gs { --gs3-split: minmax(0, 30fr) minmax(0, 70fr); --gs3-right: minmax(0, 55fr) minmax(0, 45fr); --gs3-top: calc(var(--gw-bar-h, 60px) + 12px); }
.embed > .gw.gs { --gs3-top: calc(var(--back-bar-h, 57px) + var(--gw-bar-h, 60px) + 12px); }
/* (user, 01/11/2026: the Speaking board's three columns from 1400 px are dropped too; two columns at every width) */
/* Pronunciation grading board (the Writing board with the task of practice-boards.js on the left, [data-pr-task]): the
   task card with the student's recordings and their players stays in view under the bar while the marking column scrolls
   (a long task scrolls inside its card) */
.gw:has([data-pr-task]) { --gpr-top: calc(var(--gw-bar-h, 60px) + 12px); }
.embed > .gw:has([data-pr-task]) { --gpr-top: calc(var(--back-bar-h, 57px) + var(--gw-bar-h, 60px) + 12px); }
@media (min-width: 1200px) {
  .gw:has([data-pr-task]) .gw-halves > .gw-half { align-self: stretch; }
  .gw:has([data-pr-task]) .gw-half > .gw-left { flex: 1 1 auto; }
  .gw:has([data-pr-task]) .gw-left > [data-pr-task] { position: sticky; top: var(--gpr-top); max-height: calc(100vh - var(--gpr-top) - 12px); overflow-y: auto; box-sizing: border-box; }
}
/* ---- end speaking laptop layout ---- */
/* ---- Listening agent: laptop layout of the Lecture (Teach) tab › Listening view (01/11/2026, 1536 × 730) ----
   Only the Listening view (.tv-listen, assets/js/teacher-class/teach-listening.js). Layout only: the player in one row
   with the part tabs beside it, and the keys hint narrower so the Listening tools fit next to the pens in the dark bar:
   about 140 px more height for the questions and the transcript. Narrower windows: the player wraps inside its column. */
@media (min-width: 1200px) {
  .tv-listen {
    --lst-tv-gap: 12px;          /* between the player and the part tabs */
    --lst-tv-play-min: 360px;    /* the play / position row of the player before it wraps */
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: var(--lst-tv-gap);
  }
  .tv-listen > .tv-audio { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
  .tv-listen > .tv-audio:has(+ .tv-parts) { grid-column: 1; }
  .tv-listen > .tv-parts { grid-column: 2; grid-row: 1; align-self: center; flex-wrap: nowrap; margin: 0 0 4px; }
  .tv-listen > .tv-split { grid-column: 1 / -1; grid-row: 2; }
  .tv-listen > .tv-audio .ab { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .tv-listen > .tv-audio .ab > .ab-row:first-child { flex: 1 1 var(--lst-tv-play-min); min-width: 0; }
  .tv-listen > .tv-audio .ab > .ab-row + .ab-row { flex: 0 1 auto; }
  /* (01/11/2026: the keys hint is now behind the bar's (i) button, teach.js wireHint) */
}
/* ---- end listening laptop layout ---- */

/* ==== design system (phase 2 foundation, 01/11/2026) ===============================================================
   Components read the tokens of assets/tokens.css. Guide for page agents: ielts-eclass-docs/docs/design-system.md.
   This block comes last, so it maps the existing classes onto the system without markup changes. ==== */

/* -- layout: the page width (page-wide, 01/11/2026): the whole window minus the 16 px gutter, the content capped at
   1920 px on wider screens (--page-max, --page-gutter, --page-outer in tokens.css). Header, Back bar and content share
   these edges -- */
.wrap, .cmain { max-width: var(--page-outer); padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
/* full-width pages (a grading board or card open in the class, the Writing feedback, peer review of Writing, the
   Lecture view): the header, the Back bar and the class header lose their cap too, so every edge lines up (24 px gutters) */
body:has(.rs-main.wf-main, .cmain .embed > .gw, .cmain .g-lay > .grow .embed, .cmain .lay.pe-w, .cmain #tv) :is(.chead) > .wrap { max-width: none; }
/* (nav-words, 01/11/2026: the header and the Back bar keep the page width on these pages too, so Back sits in the same
   place on every page; only the class header and the content go full width) */

/* -- buttons: primary (.btn), secondary = brand outline (.btn.outline / .btn.ghost), neutral (.btn.quiet),
   danger (.btn.danger outline; .btn.danger.solid to confirm), ghost/link (.link-btn, .tlink), icon-only (.icon-btn,
   .btn.icon); sizes .sm / (md) / .lg; states :disabled / [aria-disabled] / [aria-busy="true"] (loading) -- */
.btn { min-height: var(--ctl-md); border-radius: var(--r-md); font-weight: var(--fw-semibold); line-height: var(--lh-tight); transition: background-color 0.12s, border-color 0.12s, color 0.12s; }
.btn:not(.dashed):active:not(:disabled) { background: var(--c-brand-strong); border-color: var(--c-brand-strong); }
.btn.sm, .btn.small { min-height: var(--ctl-sm); padding: 0 var(--space-3); font-size: var(--fs-md); }
.btn.lg { min-height: var(--ctl-lg); padding: 0 22px; font-size: var(--fs-lg); }
.btn.outline, .btn.ghost { background: var(--c-surface); color: var(--c-brand); border-color: var(--c-brand); }
.btn.outline:hover:not(:disabled), .btn.ghost:hover:not(:disabled), .btn.outline:active:not(:disabled), .btn.ghost:active:not(:disabled) { background: var(--c-brand-soft); color: var(--c-brand-strong); border-color: var(--c-brand); }
.btn.quiet { background: var(--c-surface); color: var(--c-text-2); border-color: var(--c-border-strong); }
.btn.quiet:hover:not(:disabled), .btn.quiet:active:not(:disabled) { background: var(--c-surface-3); color: var(--c-text-1); border-color: var(--c-border-control); }
.btn.danger { background: var(--c-surface); color: var(--c-danger); border-color: var(--c-danger-border); }
.btn.danger:hover:not(:disabled), .btn.danger:active:not(:disabled) { background: var(--c-danger-bg); color: var(--c-danger-strong); border-color: var(--c-danger); }
.btn.danger.solid { background: var(--c-danger); color: #FFFFFF; border-color: var(--c-danger); }
.btn.danger.solid:hover:not(:disabled), .btn.danger.solid:active:not(:disabled) { background: var(--c-danger-strong); color: #FFFFFF; border-color: var(--c-danger-strong); }
.link-btn, .tlink { color: var(--c-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.link-btn:hover:not(:disabled), .tlink:hover:not(:disabled) { color: var(--c-brand-strong); text-decoration-thickness: 2px; }
.icon-btn { font: inherit; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--ctl-md); height: var(--ctl-md); padding: 0; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--c-text-2); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--c-surface-3); color: var(--c-text-1); }
.icon-btn.sm { width: var(--ctl-sm); height: var(--ctl-sm); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.sm .ic { width: 18px; height: 18px; }
.btn.icon { width: var(--ctl-md); padding: 0; }
.btn.icon.sm { width: var(--ctl-sm); }
.btn .ic { width: 18px; height: 18px; }
.btn:disabled, .link-btn:disabled, .tlink:disabled, .icon-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"], .icon-btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]:disabled { opacity: 0.8; }
.btn[aria-busy="true"]::after { content: ""; flex: none; width: 1em; height: 1em; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ds-spin 0.7s linear infinite; }
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* -- text boxes and selects: an edge with 3 : 1 contrast (WCAG 1.4.11) -- */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea { border-color: var(--c-border-control); }
input[type="text"]:hover:not(:disabled):not(:focus), input[type="email"]:hover:not(:disabled):not(:focus), input[type="password"]:hover:not(:disabled):not(:focus), input[type="search"]:hover:not(:disabled):not(:focus), input[type="number"]:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--c-text-2); }
.ic.acct-caret { color: var(--c-text-3); }

/* -- dialogs: inside the window, scrolled inside when long -- */
.pe-dlg { max-height: var(--modal-max-h); overflow-y: auto; }

/* -- long reading text follows A− / A+ (assets/js/text-size.js: --read-scale; sizes as before at 100 %) -- */
.gw-essay, .rs-essay { font-size: calc(18px * var(--read-scale)); }
.rs-say, .gs-line, .rv-text, .rv-whole, .pe-para p, .sm-essay, .sm-essay p, .sf-q, .sf-ct, .sf-qlist { font-size: calc(17px * var(--read-scale)); }
.voc-ctx blockquote { font-size: calc(18px * var(--read-scale)); }
body .pf-target { font-size: calc(17px * var(--read-scale)); }   /* (student/pronunciation-feedback.html's own style) */
.read-size { display: inline-flex; align-items: center; gap: var(--space-1); }
.read-size .btn { min-width: 40px; padding: 0 var(--space-2); }
.read-size[hidden] { display: none; }

/* -- (c) the floating pens (assets/js/pens.js) on result, feedback and peer-review pages: icons only, and the page
   keeps room at its end, so the bar never sits on the last lines -- */
body:has(> .pen-float:not([hidden])) { padding-bottom: 72px; }

/* -- (d) the class page's tabs on a low window (≤ 800 px tall, e.g. the 1536 × 730 laptop) (class-head, 01/11/2026:
   the rest of the class header is the one row in the Back bar, block "class-head") -- */
@media (max-height: 800px) and (min-width: 821px) {
  .ctabs button { min-height: 40px; }
}

/* -- (e) the result hero (.rs-hero) on a low window: about 120 px instead of 200 -- */
@media (max-height: 800px) and (min-width: 821px) {
  .rs-hero { padding: 14px 20px; gap: 10px 18px; }
  .rs-hero .big { font-size: 44px; }
  .rs-hero .mid { font-size: 22px; }
}

/* -- (f) the Lecture view's bar: one compact wrapping row of groups at every width, "Lecture bar" in the builder's Teach
   tab section above (01/11/2026; was: two rows, merged on ≥ 1400 px windows) -- */
.tv-bar .xh-btn .ic { width: 16px; height: 16px; }
/* ==== end design system ==== */

/* ==== states (01/11/2026): loading skeletons, empty and error states, the save indicator, and no layout shift ======
   Helpers in assets/js/ui.js: skeleton(kind, n, label), empty(text, { action }), errorBox(err, retry),
   saveStatus(el) / saveStatusHtml(state), guardLeave(isDirty, { el, what }) / confirmLeave(), prefetchPage(url).
   Guide: ielts-eclass-docs/docs/design-system.md › States. ==== */

/* -- fonts: the system font shown until IBM Plex Sans / Source Serif 4 arrive (display=swap) takes the same room
   (size and ascent/descent measured against the web fonts in Edge, 01/11/2026), so the text does not reflow when the
   web font swaps in. Segoe UI on Windows, Arial elsewhere; Georgia for the serif. Class pages only (app.css). -- */
@font-face { font-family: "Plex Fallback"; src: local("Segoe UI"), local("SegoeUI"); font-weight: 100 450; size-adjust: 102.2%; ascent-override: 100.3%; descent-override: 26.9%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local("Segoe UI Semibold"), local("SegoeUI-Semibold"); font-weight: 451 900; size-adjust: 102.4%; ascent-override: 100.1%; descent-override: 26.9%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback Arial"; src: local("Arial"), local("ArialMT"); font-weight: 100 450; size-adjust: 99.7%; ascent-override: 102.8%; descent-override: 27.6%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback Arial"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 451 900; size-adjust: 96.1%; ascent-override: 106.7%; descent-override: 28.6%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); font-weight: 100 450; size-adjust: 90.9%; ascent-override: 114.4%; descent-override: 37.4%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 451 900; size-adjust: 79.7%; ascent-override: 130.5%; descent-override: 42.7%; line-gap-override: 0%; }
:root {
  --font-sans: 'IBM Plex Sans', 'Plex Fallback', 'Plex Fallback Arial', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', 'Serif Fallback', Georgia, 'Times New Roman', serif;
}

/* -- no layout shift: the scrollbar's room is always kept (a page growing past the window no longer moves everything
   sideways); the header, the Back bar and the class header keep their height while the page starts (ui.js chrome()
   fills them; pages without a Back bar mark #back-bar hidden in their HTML) -- */
html { scrollbar-gutter: stable; }
#site-header:empty { min-height: 69px; }
#back-bar:empty:not([hidden]) { min-height: 57px; }
#back-bar[hidden] { display: none; }
/* (class-head, 01/11/2026: the class header below the Back bar is the tabs alone: 4 px + the 44 / 40 px tab row; the
   class name and join code wait in the Back bar as .ct-sk-name / .ct-sk-code) */
.chead > .sk-chead { box-sizing: border-box; height: 48px; overflow: hidden; }
@media (max-height: 800px) and (min-width: 821px) { .chead > .sk-chead { height: 44px; } }
.sk-tabs { display: flex; gap: var(--space-5); padding: 12px 12px 14px; }
.sk-tabs .sk-b { width: 76px; height: 14px; }
/* media keeps its box before it loads: a picture without a size gets a 4 : 3 box until its own size is known
   (aspect-ratio "auto" uses the real one then); a recording on its way shows skeleton("player"), the player's height */
.box img:not([width]):not([height]), .embed img:not([width]):not([height]) { aspect-ratio: auto 4 / 3; }

/* -- loading: skeletons (ui.js skeleton()) -- */
.sk { display: flex; flex-direction: column; }
.sk-in { display: flex; flex-direction: column; gap: var(--space-3); }
.sk-b { display: block; flex: none; width: 100%; height: 14px; border-radius: var(--r-sm); background: linear-gradient(90deg, #E8ECF1 0%, #F4F6F9 45%, #E8ECF1 90%) 0 0 / 300% 100%; animation: sk-shine 1.5s ease-in-out infinite; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-sm { height: 11px; }
.sk-lg { height: 20px; }
.sk-h1 { height: 36px; width: 300px; max-width: 70%; }
.sk-h2 { height: 20px; width: 220px; max-width: 60%; }
.sk-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.sk-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.sk-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.sk-av { width: 32px; height: 32px; border-radius: 50%; }
.sk-pill { width: 84px; height: 24px; border-radius: var(--r-pill); }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.sk-card { display: flex; flex-direction: column; gap: var(--space-3); min-height: 196px; padding: 20px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.sk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.sk-tile { height: 52px; border-radius: var(--r-md); }
.sk-btn { width: 128px; height: 40px; border-radius: var(--r-md); }
.sk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); }
.sk-stat { height: 76px; border-radius: var(--r-lg); }
.sk-table { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.sk-table .sk-tr { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: var(--space-4); align-items: center; min-height: 48px; padding: 0 var(--space-4); border-top: 1px solid var(--c-border-2); }
.sk-table .sk-th { border-top: 0; background: var(--c-surface-2); min-height: 40px; }
.sk-table .sk-th .sk-b { height: 10px; width: 55%; }
.sk-table .sk-tr .sk-b { width: auto; }
.sk-player { height: 54px; max-width: 520px; border-radius: var(--r-pill); }
.sk-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.sk-split .sk-box { min-height: 420px; }
.sk-line { display: block; padding: 4px 0; }
.sk-line .sk-b { max-width: 280px; }
.sk-panel .sk-box { min-height: 160px; }
@media (prefers-reduced-motion: reduce) { .sk-b { animation: none; } }

/* -- empty: an icon, one sentence, the next step (ui.js empty(text, { action })); every .box.empty gets the icon -- */
.box.empty::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto var(--space-2); background: currentColor; opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat; }
.box.empty[style*="padding: 14px"]::before { width: 22px; height: 22px; margin-bottom: 6px; }
/* nav-words: an empty page's one sentence is its h1, drawn as before (no heading look) */
.box.empty h1.empty-h { display: inline; margin: 0; font: inherit; color: inherit; }
.box.empty .empty-act { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-3); }

/* -- error: the message and Try again (ui.js errorBox(err, retry)) -- */
.state-err { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2) var(--space-3); }
.state-err .state-ic { width: 22px; height: 22px; margin-top: 1px; color: var(--c-danger); }
.state-err .state-msg { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.state-err [data-retry] { margin-left: auto; }

/* -- the save indicator (ui.js saveStatus / saveStatusHtml): Saved · just now / Saving… / Not saved — Try again -- */
.save-st { display: inline-flex; align-items: center; gap: 6px; min-height: 20px; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--c-text-3); white-space: nowrap; }
.save-st .save-ic { width: 15px; height: 15px; }
.save-st[data-st="saved"] .save-ic { color: var(--c-success); }
.save-st[data-st="error"] { color: var(--c-danger); }
.save-st[data-st="dirty"] { color: var(--c-warn); }
.save-st .save-spin { flex: none; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ds-spin 0.7s linear infinite; }
.save-st [data-save-retry] { font: inherit; padding: 0; border: 0; background: none; cursor: pointer; }
/* inside a container that already colours its status (the Lecture's note / ink status, the notebook bar) */
.tv-nst .save-st, .nb-status .save-st { color: inherit; font-size: inherit; }
.tv-nst .save-st .save-ic, .nb-status .save-st .save-ic { color: inherit; }
#tv-ink [data-ink-st] .save-st [data-save-retry] { color: var(--c-focus-on-dark); }
/* ==== end states ==== */

/* ==== admin pages (admin/*.html; design system phase 2, 01/11/2026, admin page agent) ==============================
   Selectors are prefixed ad- so no other page is touched. Tokens only; system buttons (.btn / .icon-btn) in the markup. ==== */
.adm-nav { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--space-2); }
/* the side navigation of Settings: every item is a flex row whose label is centred vertically in the pill (found 01/11/2026: the label sat at the top) */
.adm-nav button { font: inherit; font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: var(--lh-tight); display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; min-height: var(--ctl-md); padding: 0 var(--space-3); border: 0; border-radius: var(--r-md); background: transparent; color: var(--c-text-2); text-align: left; cursor: pointer; }
.adm-nav button:hover { background: var(--c-surface-3); color: var(--c-text-1); }
.adm-nav button[aria-current="page"] { background: var(--c-brand-soft); color: var(--c-brand); font-weight: var(--fw-semibold); }
.adm-nav .adm-dirty { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--c-warn); }
.adm-nav .adm-dirty:empty { display: none; }
.panel.adm-sec { padding: var(--space-4) var(--space-5); gap: var(--space-4); }
.adm-head h2, .panel.adm-sec > h2 { font-size: var(--fs-xl); }
.adm-head p { margin-top: 2px; font-size: var(--fs-md); color: var(--c-text-3); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-3); }
.adm-grid.w300 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-4); }
.adm-grid.w250 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.adm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--c-border-2); }
.adm-row > :first-child { flex: 1 1 300px; min-width: 0; }
.adm-row .adm-val { font-weight: var(--fw-semibold); }
.adm-row .adm-val.ok { color: var(--c-success); }
.adm-opt { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--c-border-2); cursor: pointer; }
.adm-opt input { margin-top: 2px; flex: none; }
.adm-note { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--r-md); font-size: var(--fs-md); background: var(--c-warn-bg); color: #6B3500; }
.adm-note > .ic { margin-top: 2px; }
.adm-note.ok { background: var(--c-success-bg); color: var(--c-success); }
.adm-note.bad { background: var(--c-danger-bg); color: var(--c-danger-strong); }
.adm-note.info { background: var(--c-surface-2); color: var(--c-text-2); }
.adm-note.small { font-size: var(--fs-sm); }
.adm-confirm { display: flex; flex-direction: column; gap: var(--space-3); border: 1px solid var(--c-danger-border); background: var(--c-danger-bg); border-radius: var(--r-lg); padding: var(--space-4) var(--space-5); }
.adm-rule { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--space-3) var(--space-4); font-size: var(--fs-md); }
.adm-rule > span:first-of-type { color: var(--c-text-2); }
.adm-box { border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.adm-line { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-top: 1px solid var(--c-border-2); font-size: var(--fs-md); }
.adm-band { border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.adm-band-h { padding: var(--space-2) var(--space-3); background: var(--c-surface-2); font-weight: var(--fw-semibold); }
.adm-band-r { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border-top: 1px solid var(--c-border-2); background: var(--c-surface); font-size: var(--fs-md); }
.adm-band-r.hit { background: var(--c-warn-bg); }
.adm-band-r input { min-height: var(--ctl-sm); padding: 4px 8px; text-align: center; font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.adm-try { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--fs-md); }
.adm-try input { width: 70px; min-height: var(--ctl-sm); padding: 4px 8px; }
.adm-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--c-surface); border-top: 1px solid var(--c-border); box-shadow: var(--sh-2); }
.adm-savebar > .wrap { padding-top: var(--space-3); padding-bottom: var(--space-3); display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.adm-savebar .save-st { margin-right: auto; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.adm-savebar .save-st[data-st="idle"] { font-weight: var(--fw-regular); }
.adm-savebar .save-st[data-st="saved"] { color: var(--c-success); }
/* tables: a header row that stays at the top of the window, a hover row, comfortable cells (admin lists at the 1440 container) */
.tbl.adm-tbl { overflow-x: clip; }   /* clip (not auto): a scrolling box would stop the sticky header sticking to the window */
.adm-tbl table { min-width: 0; }
.adm-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--c-surface-2); color: var(--c-text-2); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--c-border); padding: var(--space-3) 10px; white-space: nowrap; }
.adm-tbl thead th:first-child { border-top-left-radius: calc(var(--r-lg) - 1px); }
.adm-tbl thead th:last-child { border-top-right-radius: calc(var(--r-lg) - 1px); }
.adm-tbl td, .adm-tbl tbody th { padding: var(--space-3) 10px; border-bottom: 1px solid var(--c-border-2); vertical-align: middle; }
.adm-tbl tbody th[scope="row"] { text-align: left; font-weight: var(--fw-semibold); padding-left: var(--space-4); }
.adm-tbl tbody tr:last-child > * { border-bottom: 0; }
.adm-tbl tbody tr:hover > * { background: var(--c-surface-3); }
.adm-tbl tbody tr.adm-off > * { color: var(--c-text-3); }
.adm-tbl td.top, .adm-tbl tbody th.top { vertical-align: top; }
.adm-tbl h2 { padding: var(--space-4) var(--space-5) var(--space-2); font-size: var(--fs-xl); }
.adm-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
/* cards of the Classes page */
.adm-card { display: flex; flex-direction: column; gap: var(--space-3); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--space-4) var(--space-5); }
.adm-card.arch { background: var(--c-surface-2); }
.adm-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); font-size: var(--fs-md); }
.adm-card dd { margin: 0; }
.adm-req { gap: var(--space-2) var(--space-3); padding: var(--space-3); border: 1px solid #F0D3B0; background: #FFF8EE; border-radius: var(--r-lg); }
/* the add / create side panel and its tabs */
.panel.adm-side { padding: var(--space-4) var(--space-5); gap: var(--space-3); border-color: var(--c-border-strong); }
.adm-segtabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-1); background: var(--c-border-2); border-radius: var(--r-lg); padding: var(--space-1); }
.adm-segtabs button { font: inherit; font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-tight); min-height: 40px; padding: var(--space-1) 6px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--c-text-2); cursor: pointer; }
.adm-segtabs button:hover { color: var(--c-text-1); }
.adm-segtabs button[aria-selected="true"] { background: var(--c-surface); color: var(--c-brand); box-shadow: var(--sh-1); }
.adm-choice { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) 10px; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: var(--c-surface); cursor: pointer; }
.adm-choice:hover { background: var(--c-surface-3); }
.adm-choice:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-soft); }
.adm-choice input { margin-top: 2px; flex: none; }
.adm-lines { border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.adm-lines > div { display: flex; align-items: flex-start; gap: var(--space-2); padding: 6px 10px; border-bottom: 1px solid var(--c-border-2); font-size: var(--fs-sm); background: var(--c-surface); }
.adm-lines > div:last-child { border-bottom: 0; }
.adm-lines > div.bad { background: var(--c-danger-bg); }
.adm-lines .st { flex: none; max-width: 50%; text-align: right; font-weight: var(--fw-semibold); color: var(--c-success); display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; }
.adm-lines > div.bad .st { color: var(--c-danger-strong); }
.adm-pre { background: var(--c-surface-2); }
textarea.adm-mono { font-family: var(--font-mono); font-size: var(--fs-sm); white-space: pre; }
.adm-chip { font-size: var(--fs-sm); padding: 3px 9px; border-radius: var(--r-sm); background: var(--c-surface-2); border: 1px solid var(--c-border); }
.adm-dim { color: var(--c-text-3); }
.adm-side div.fld, .adm-sec div.fld { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-text-2); }
.adm-parts { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.adm-parts button { font: inherit; width: 100%; text-align: left; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 14px; border: 0; border-bottom: 1px solid var(--c-border-2); background: var(--c-surface); color: var(--c-text-1); cursor: pointer; min-height: 48px; }
.adm-parts button:last-child { border-bottom: 0; }
.adm-parts button:hover { background: var(--c-surface-3); }
.adm-parts button[aria-current="true"] { background: var(--c-brand-soft); box-shadow: inset 3px 0 0 var(--c-brand); }
.adm-why { font: inherit; font-size: var(--fs-sm); width: 100%; min-height: 56px; padding: 4px 8px; border-radius: var(--r-sm); resize: vertical; }
.adm-link { transition: background-color 0.12s, border-color 0.12s; }
.adm-link:hover { background: var(--c-surface-3) !important; border-color: var(--c-border-strong) !important; }
.adm-side label.btn:focus-within { outline: var(--focus-w) solid var(--c-focus); outline-offset: var(--focus-offset); }   /* a file picker styled as a button (sr-only input inside) */
.pill.role-admin { background: var(--c-surface-dark); color: #FFFFFF; }
.pill.role-teacher { background: var(--c-brand-soft); color: var(--c-brand); }
.pill.role-student { background: var(--c-border-2); color: var(--c-text-2); }
/* the checks lists (Overview, Edit test): an icon, then the line */
.adm-check { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-md); }
.adm-check > .ic { margin-top: 2px; width: 16px; height: 16px; }
.adm-check.ok > .ic { color: var(--c-success); }
.adm-check.warn > .ic { color: var(--c-warn); }
.adm-check.bad > .ic { color: var(--c-danger-strong); }
.adm-check.warn > span { color: #6B3500; }
.adm-check.bad > span { color: var(--c-danger-strong); }
/* inline validation: the field's edge turns red and the reason sits under it (other forms may reuse this) */
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--c-danger); box-shadow: 0 0 0 1px var(--c-danger); }
.fld-err { display: flex; align-items: center; gap: var(--space-1); font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--c-danger-strong); }
.fld-err:empty { display: none; }
.fld-err .ic { width: 14px; height: 14px; }
/* ==== end admin pages ==== */

/* ==== student pages (design system adoption, 01/11/2026): login, account, My classes, the student class page, Tests,
   Vocabulary, results / feedback, peer review, notifications. Page-level rules on the tokens of assets/tokens.css ==== */
/* a checkbox / radio keeps its size when its label wraps (notifications "Email me when" shrank to 13 × 18 px) */
input[type="checkbox"], input[type="radio"] { flex: none; }
/* step bar: steps not reached yet at 6 : 1 (was #8A93A0 on #F1F3F6 = 2.8 : 1); the state icons (icons.js) */
.stepbar .sb-btn { color: var(--c-text-3); }
.stepbar .sb-ic { display: inline-flex; align-items: center; margin-right: var(--space-1); }
.stepbar .sb-ic .ic { width: 15px; height: 15px; }
.stepbar .current .sb-ic .ic { width: 16px; height: 16px; }
.stepbar .partial .sb-ic { color: var(--c-warn); }
/* text boxes of the result / feedback pages and peer review: the control edge (3.6 : 1; was #CBD2DB / #B8C1CE) */
.rs-ta, .pe-ta { border-color: var(--c-border-control); }
.rs-ta:hover:not(:disabled):not(:focus), .pe-ta:hover:not(:disabled):not(:focus) { border-color: var(--c-text-2); }
.pe-x { color: var(--c-text-3); }
.pe-x:hover { color: var(--c-text-1); }
/* the page's own small buttons keep their look, with a line icon before the label (play, stop, comment, check) */
.pe-play, .pe-at, .pe-cm, .pp-b, .pp-v, .voc-play, .rs-at { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rs-at { gap: var(--space-1); }
.pe-play .ic { width: 20px; height: 20px; }
.pe-cm .ic, .rs-at .ic { width: 13px; height: 13px; }
.pe-at .ic, .pp-b .ic, .pp-v .ic, .voc-play .ic { width: 15px; height: 15px; }
.pill .ic { width: 14px; height: 14px; vertical-align: -2px; }
[data-check] .ic { width: 15px; height: 15px; vertical-align: -3px; }
/* how common a dictionary word is: five dots, filled up to its level (was ●●●○○) */
.dict-dots { display: inline-flex; align-items: center; gap: 2px; font-size: 0; letter-spacing: 0; }
.dict-dots i { flex: none; width: 6px; height: 6px; box-sizing: border-box; border: 1px solid var(--c-brand); border-radius: 50%; }
.dict-dots i.on { background: var(--c-brand); }
/* password rules (ui.js passwordRules): the check / circle icon in front of each rule */
.pw-rules li { display: flex; align-items: center; gap: var(--space-2); }
.pw-rules li > b { display: inline-flex; }
.pw-rules li .ic { width: 15px; height: 15px; }
/* ==== end student pages ==== */

/* ==== teacher pages (phase 2, 01/11/2026, teacher agent): the class header, the Notebook column, the teacher tables
   (assets/js/teacher-tables.js), Present mode (assets/js/teacher-present.js), icons and contrast on the teacher pages.
   Tokens of assets/tokens.css; guide ielts-eclass-docs/docs/design-system.md ==== */

/* -- class-head (01/11/2026; teacher-head, 01/11/2026): neither class page has a Back bar any more — the class name is
   the h1 in the site header row (.hdr-title below). View as student, Edit class details and Archive class are on the
   class's card on teacher/classes.html (.ct-pop / .ct-menu = its "⋯" menu). The join code card is on the Stream tab.
   #chead: the archived notice + the Edit form (.ct-extra) + tabs. (.backbar … .ct-name: older Back-bar layout, unused) -- */
.backbar:has(> .bb-main > .ct-name) { flex-wrap: nowrap; }
@media (max-width: 900px) { .backbar:has(> .bb-main > .ct-name) { flex-wrap: wrap; } }
.bb-main > .ct-name { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; flex: 0 1 auto; }
.ct-name h1.ct-title { flex: 0 1 auto; min-width: 0; margin: 0; font-size: var(--fs-2xl); line-height: var(--lh-tight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-name .ct-sub { flex: 0 3 auto; min-width: 0; margin: 0; font-size: var(--fs-md); color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-sk-name { width: 200px; height: 20px; }
.ct-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-2); }
.ct-tools .btn.sm { min-height: var(--ctl-sm); gap: 6px; white-space: nowrap; }
.ct-tools .ct-sv .ic { width: 16px; height: 16px; }
.ct-pop { position: relative; }
.ct-menu[hidden] { display: none; }
.ct-menu .ic { flex: none; width: 16px; height: 16px; color: var(--c-text-2); }
/* the class join code (user, 01/11/2026: out of the header): a compact card in the Stream tab's side column
   (teacher-class/stream.js .st-lay; class.html drawCode); "Joining ▾" opens Reset code + the two switches as a pop-up */
.st-lay { display: flex; align-items: flex-start; gap: var(--space-5); }
.st-lay > .st-main { flex: 1 1 auto; min-width: 0; }
.st-lay > .st-side { flex: 0 0 300px; position: sticky; top: 72px; }
@media (max-width: 1000px) { .st-lay { flex-direction: column; align-items: stretch; } .st-lay > .st-side { order: -1; flex: none; position: static; } }
.codecard { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.codecard .jc-l { font-size: var(--fs-sm); color: var(--c-text-2); }
.codecard .jc-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.codecard .code { font-family: var(--font-mono); font-size: 22px; letter-spacing: 3px; color: var(--c-brand); margin-right: auto; }
.codecard .jc-row .btn.sm { min-height: 32px; padding: 0 10px; gap: 4px; }
.codecard .jc-state { font-size: var(--fs-sm); }
.codecard .jc-more .ic { width: 16px; height: 16px; }
.codecard .jc-panel { display: flex; position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 290px; padding: var(--space-3) 14px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.codecard .jc-panel[hidden] { display: none; }
.codecard .jc-panel > label { flex: none; white-space: nowrap; font-size: var(--fs-md); color: var(--c-text-2); }
.codecard .jc-panel .btn.sm { min-height: var(--ctl-sm); border-radius: var(--r-md); }
/* the student class page (user, 01/11/2026): no Back bar; the class name is the h1 in the middle of the site header
   row (student/class.html drawName into .hdr-title), cut with "…" (tooltip), never pushing the bell / account */
.hdr:has(> .hdr-title) { flex-wrap: nowrap; }
.hdr > .hdr-title { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
/* teacher-head (user, 01/11/2026): the teacher's class page too — no Back bar, no class row; the class name sits in the
   middle of the free space after the menu (Classes · Test bank · Practice room), the menu never wraps or shrinks */
.hdr:has(> .hdr-title) > .main-nav { flex: none; flex-wrap: nowrap; }
.hdr:has(> .hdr-title) > .main-nav a { white-space: nowrap; }
/* no sticky Back bar above a page that has none: what sticks under it (grading boards, the Lecture view) goes to the top */
body:has(> #back-bar[hidden]) { --back-bar-h: 0px; }
.chead .ct-edit-h { margin: 0; font-size: var(--fs-xl); }
/* teacher-head (user, 01/11/2026): the class tabs that open with the chip bar (teacher Assignments, Grading, Results,
   Lecture; student Assignments, My grades): the chip bar sits closer to the tabs row (25 → 9 px, −64 %) and to what
   follows it, e.g. "Work for this class" (16 → 8 px, −50 %; Lecture 10 → 5 px). The same on both class pages. */
.cmain:has(> #tab-box > .cat-chips:first-child, > #tab-box > :first-child > .cat-chips:first-child) { padding-top: 8px; }
#tab-box > .cat-chips:first-child { margin-bottom: 8px; }
#tab-box > .row:first-child:has(> .cat-chips:first-child) { margin-bottom: 8px !important; }   /* (teacher Results: the row's own inline 16 px) */
#tab-box > .tch:first-child > .cat-chips:first-child { margin-bottom: -5px; }
.hdr-title h1.ct-title { min-width: 0; max-width: 100%; margin: 0; font-size: var(--fs-2xl); line-height: var(--lh-tight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-right > .backbar-tools { margin: 0; }
.chead .ct-extra { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); min-width: 0; }
.chead .ct-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.chead .ct-note-acts { flex-wrap: nowrap; gap: var(--space-2); }
.chead .ct-saved { font-size: var(--fs-md); color: var(--c-success); }

/* -- the Notebook tab lines up with the page column (1392 px on the 1536 px laptop) like the header and the tabs; the
   bigger board only on a window wide enough to spare it (Present mode gives the whole screen) -- */
@media (min-width: 1500px) and (max-width: 1699px) { .cmain:has(> #tab-box > .nb) { max-width: var(--page-max); } }

/* -- teacher tables (assets/js/teacher-tables.js, table[data-tt]): the box scrolls both ways inside the window's height,
   sticky header rows and first column, row hover, sortable headers, Compact density (html.tt-compact) -- */
.tt-wrap { overflow: auto; max-height: max(360px, calc(100vh - 88px)); overscroll-behavior: contain; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.tt-wrap > table.list, .tt-wrap > table.gq-table { border: 0; border-radius: 0; overflow: visible; }
table[data-tt] { border-collapse: separate; border-spacing: 0; }
table[data-tt] tbody tr { background-color: var(--c-surface); }
table[data-tt] tbody tr.sel { background-color: var(--c-brand-soft); }
table[data-tt] thead th { position: sticky; top: 0; z-index: 2; background: var(--c-surface-2); box-shadow: inset 0 -1px 0 var(--c-border); }
table[data-tt] .tt-c0 { position: sticky; left: 0; z-index: 1; background-color: inherit; box-shadow: inset -1px 0 0 var(--c-border); }
table[data-tt] tbody tr > .tt-c0 { background-color: inherit; }
table[data-tt] thead th.tt-c0 { z-index: 3; background: var(--c-surface-2); box-shadow: inset -1px -1px 0 var(--c-border); }
table[data-tt] tbody tr:hover > td, table[data-tt] tbody tr:hover > th { background-color: var(--c-surface-3); }
table[data-tt] tbody tr.sel:hover > td, table[data-tt] tbody tr.sel:hover > th { background-color: var(--c-brand-tint); }
table[data-tt] td, table[data-tt] tbody th { border-bottom: 1px solid var(--c-border-2); }
table[data-tt] tbody tr:last-child > * { border-bottom: 0; }
/* (the sort button and its arrow take no room of their own: the columns keep the width they had before the table was
   set up, so nothing moves a frame after the page drew it) */
.tt-sort { position: relative; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; }
.tt-sort:hover { background: var(--c-surface-3); color: var(--c-text-1); }
.tt-ar { position: absolute; left: calc(100% - 4px); top: 50%; display: inline-flex; opacity: 0; transform: translateY(-50%); transition: opacity 0.12s, transform 0.12s; pointer-events: none; }
.tt-ar .ic { width: 14px; height: 14px; }
.tt-sort:hover .tt-ar, .tt-sort:focus-visible .tt-ar { opacity: 0.55; }
th[aria-sort] { color: var(--c-text-1) !important; }
th[aria-sort] .tt-ar { opacity: 1; }
th[aria-sort="ascending"] .tt-ar { transform: translateY(-50%) rotate(180deg); }
.tt-bar { display: flex; justify-content: flex-end; margin-bottom: var(--space-2); }
.tt-bar + .tt-wrap { margin-top: 0; }
.tt-dens { gap: 6px; }
.tt-dens[aria-pressed="true"] { background: var(--c-brand-soft); color: var(--c-brand); border-color: var(--c-brand); }
.tt-dens .ic { width: 16px; height: 16px; }
[data-tt-tools] { display: inline-flex; align-items: center; gap: var(--space-2); }
/* the narrow Reports student list: the switch shows its icon only (its name stays for screen readers and the tooltip) */
[data-tt-tools="reports"] .tt-dens { width: var(--ctl-sm); padding: 0; justify-content: center; }
[data-tt-tools="reports"] .tt-dens > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Compact: ~32 px rows (20+ students on the 1536 × 730 laptop) */
.tt-compact .tt-wrap { max-height: max(360px, calc(100vh - 56px)); }
.tt-compact table[data-tt] td, .tt-compact table[data-tt] tbody th { padding-top: 2px !important; padding-bottom: 2px !important; font-size: var(--fs-sm); line-height: var(--lh-tight); }
.tt-compact table[data-tt] thead th { padding-top: 5px !important; padding-bottom: 5px !important; white-space: nowrap; line-height: var(--lh-tight); }
.tt-compact table[data-tt] thead th br { display: none; }
.tt-compact table[data-tt] .btn.sm, .tt-compact table[data-tt] .btn { min-height: 24px !important; padding-top: 0; padding-bottom: 0; font-size: var(--fs-sm); }
.tt-compact table[data-tt] .tlink, .tt-compact table[data-tt] .link-btn { min-height: 0 !important; }
.tt-compact table[data-tt] br + .small, .tt-compact table[data-tt] .tt-sub { font-size: var(--fs-xs); }
.tt-compact table[data-tt] .gb-chip { padding-top: 1px !important; padding-bottom: 1px !important; }
.tt-compact table[data-tt] td br { display: none; }
.tt-compact table[data-tt] td br + span::before { content: "\00a0· "; }
.tt-compact table[data-tt] .gb-cmt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.tt-compact table[data-tt] .gb-cmt br + span::before { content: " · "; }
/* the class Grading list and the Reports student list follow Compact too */
.tt-compact .g-lay .rows .rh { padding-top: 3px; padding-bottom: 3px; row-gap: 2px; }
.tt-compact .g-lay .rows .rh .btn.sm { min-height: 30px !important; }
.tt-compact .g-lay .rows .day-head { margin-top: 6px; }
.tt-compact [data-rp-list] > button { min-height: 0 !important; padding-top: 5px !important; padding-bottom: 5px !important; }

/* -- the teacher step bar's dots (step-bar-teacher.js tier 2): line icons; "not yet" at 3 : 1 or more (icons) -- */
.tsb-dot { color: var(--c-border-control); }
.tsb-dot .ic { width: 13px; height: 13px; }
.tsb-dot.now .ic { fill: currentColor; width: 11px; height: 11px; }
.tsb-dot.part { color: var(--c-warn); }
.tsb-dot.bad .ic { stroke-width: 2.4; }
.tsb-dot.done .ic { stroke-width: 2.4; }

/* -- contrast on the teacher pages (WCAG AA; only colours, the Lecture's text metrics stay as they are) -- */
.tv-ic { color: var(--c-border-control); opacity: 1; }   /* Lecture gutter icons at rest: still quiet, 3.6 : 1 (was #8A96A8 at 40 % ≈ 1.3 : 1) */
.tv-in { border-color: var(--c-border-control); }       /* Lecture answer boxes: the control edge (was #8A96A8 ≈ 3.0 : 1) */
.tv-in-n { color: var(--c-text-3); }                      /* the number in a box: 6.0 : 1 (was #8A96A8 = 3.0 : 1) */
.tch-q { border-color: var(--c-border-control); }       /* Lecture list search box (was #CBD2DB = 1.5 : 1) */
.tch-q:hover:not(:focus) { border-color: var(--c-text-2); }

/* -- Present mode (assets/js/teacher-present.js; Lecture view and Notebook): html.t-present + .t-present-teach /
   .t-present-notebook. The site around the material goes, a high-contrast token set, the Lecture's text one step
   bigger (teach.js sizeNow), the pens / ink / audio stay; "Exit Present" (or Esc) leaves -- */
html.t-present {
  --c-text-1: #000000; --c-text-2: #18202B; --c-text-3: #2B3442;
  --c-border: #7D8796; --c-border-2: #B8C1CE; --c-border-strong: #5B6472; --c-border-control: #3D4654;
  --c-brand: #163A5C; --c-surface-2: #FFFFFF; --c-text-on-dark-2: #E2E6EC;
}
html.t-present body { background: var(--c-surface); }
.t-present #site-header, .t-present #back-bar, .t-present .chead, .t-present .hn-banner:not(.show) { display: none !important; }
.t-present .cmain { max-width: none !important; padding: 0; }
.t-present-teach .tv { height: 100vh; min-height: 0; border: 0; border-radius: 0; }
.t-present-teach .tv-bar .tv-note { color: var(--c-text-on-dark-2); }
.t-present-teach .tv-ic { opacity: 1; }
.t-present-notebook .cmain { padding: var(--space-2) var(--space-3); }
.t-present-notebook .nb { gap: var(--space-2); }
.t-present-notebook .nb-tiles, .t-present-notebook .nb-head, .t-present-notebook .nb-pages { display: none; }
.t-present-notebook .nb-stage { max-height: calc(100vh - 128px); background: #C9CFD7; }
.t-present-notebook .nb:not(.is-full) .nb-fsnav { display: flex; align-self: center; align-items: center; gap: 2px; padding: 2px 6px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.tp-exit { position: fixed; z-index: 1100; right: var(--space-3); bottom: var(--space-3); display: inline-flex; align-items: center; gap: 6px; min-height: var(--ctl-sm); padding: 0 14px; border: 1px solid var(--c-border-strong); border-radius: var(--r-pill); background: var(--c-surface); color: var(--c-text-1); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); box-shadow: var(--sh-3); cursor: pointer; }
.tp-exit:hover { background: var(--c-surface-3); }
.tp-exit .ic { width: 16px; height: 16px; }
.t-present-teach .tp-exit { display: none; }   /* the Lecture's bar has its own Present button */
.tv .xh-btn[data-tv="present"][aria-pressed="true"] { background: var(--c-focus-on-dark); color: var(--c-surface-dark); }
/* ==== end teacher pages ==== */

/* ---- nav-words (01/11/2026): the location trail (breadcrumb) in the Back bar, right after Back (ui.js chrome({ crumbs }),
   setCrumbs()). One row, the bar keeps its 57 px; a long trail cuts its middle parts first, the current page last.
   Guide: ielts-eclass-docs/docs/design-system.md › Breadcrumb. ---- */
.bb-main { display: flex; align-items: center; gap: var(--space-3); min-width: 0; flex: 1 1 auto; }
.bb-main > .back { flex: none; }
.crumbs { min-width: 0; }
.crumbs[hidden] { display: none; }
.crumbs ol { display: flex; align-items: center; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; list-style: none; font-size: var(--fs-md); line-height: var(--lh-snug); color: var(--c-text-2); min-width: 0; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; white-space: nowrap; }
.crumbs li > a, .crumbs li > span { overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.crumbs li + li::before { content: "›"; flex: none; margin: 0 var(--space-2); color: var(--c-text-3); }
.crumbs a { color: var(--c-brand); text-decoration: none; border-radius: var(--r-sm); padding: 2px 2px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--c-text-1); font-weight: var(--fw-semibold); }
.crumbs li:not(:last-child) { flex-shrink: 1; }
.crumbs li:last-child { flex-shrink: 0; }
@media (max-width: 760px) { .crumbs { display: none; } }   /* phone: Back alone (the phone layout comes later) */
@media print { .crumbs { display: none; } }
/* the header keeps one height with or without the menu / account (the guest pages: log-in, set a password), so Back
   sits at the same place on every page */
#site-header > .hdr { min-height: 68px; }
/* the page heading of the result / feedback pages: the hero's first line is the h1 (same look as before, the work's
   title in bold) */
.rs-hero h1.rs-h1 { margin: 0; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-regular); line-height: var(--lh-base); }
.rs-hero h1.rs-h1 > b { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--c-text-on-dark, #FFFFFF); }
@media print { .rs-hero h1.rs-h1 > b { color: inherit; } }
/* ---- grading board: two columns (user, 01/11/2026; teacher-class/grade-writing.js .gw-2c, grade-speaking.js .gw.gs) ----
   Two columns at every width (one under 900 px): left = the student, the prompt / questions, statistics — kept in view
   under the board's bar while the right column scrolls (a long left column scrolls inside itself); right = the AI first
   pass on one line (.gw-ai1), the student's work, ONE row of criteria boxes (.gw-crow, a band pop-up .gw-bp per box),
   the compact band strip (.gw-dk) and the comment. */
.gw-2c, .gw.gs { --gw2-top: calc(var(--gw-bar-h, 60px) + 12px); }
.embed > .gw-2c, .embed > .gw.gs { --gw2-top: calc(var(--back-bar-h, 57px) + var(--gw-bar-h, 60px) + 12px); }
@media (min-width: 901px) {
  .gw-2c .gw-halves > .gw-half, .gw.gs .gw-halves > .gw-half { position: sticky; top: var(--gw2-top); max-height: calc(100vh - var(--gw2-top) - 12px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: 12px; }
}
.gw-2c .gw-track .gw-select { width: auto; }
.gw-2c .gw-cat, .gw.gs .gw-cat { min-height: 36px; font-size: 13px; }
.gw-2c .gw-who, .gw.gs .gw-who { padding: 14px 16px; }
.gw-2c .gw-who .gw-facts, .gw.gs .gw-who .gw-facts { margin-top: 10px; font-size: 13px; gap: 4px 12px; }
.gw-ai1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; }
.gw-ai-ico.sm { width: 32px; height: 32px; border-radius: 8px; }
.gw-ai1-t { flex: 1 1 260px; min-width: 0; line-height: 1.4; }
.gw-ai1-b { gap: 6px; }
.gw-ai1-more { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 0 16px; padding-left: 44px; box-sizing: border-box; }
.gw-grade { padding: 14px 16px; }
.gw-crow { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gw-crit { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; }
.gw-crit.gw-crit-on { box-shadow: none; border-color: var(--brand); }
.gw-crit-n { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 13px; cursor: help; }
.gw-crit-ai { font-size: 11px; font-weight: 600; color: var(--brand); border: 1px dashed var(--brand); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.gw-crit-pick { font: inherit; width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; border: 1px solid #CBD2DB; border-radius: 8px; background: #FFFFFF; color: var(--ink); cursor: pointer; }
.gw-crit-pick .v { font-size: 20px; font-weight: 600; line-height: 1; }
.gw-crit-pick:not(.set) .v { color: var(--muted); }
.gw-crit-pick.set { border-color: var(--brand); background: #EEF3F8; color: var(--brand); }
.gw-crit.low .gw-crit-pick.set { border-color: #8A2E1F; background: #FBEDEA; color: #8A2E1F; }
.gw-crit-pick[aria-expanded="true"] .ic { transform: rotate(180deg); }
.gw-crit-st { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-crit-st.ok { color: #1E6B3A; }
.gw-bp { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 340px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px 14px; background: #FFFFFF; border: 1px solid #CBD2DB; border-radius: 12px; box-shadow: 0 12px 32px rgba(24, 32, 43, 0.22); }
.gw-bp.r { left: auto; right: 0; }
.gw-bp .gw-bands.half button { height: 40px; font-size: 15px; }
.gw-bp .gw-low .gw-bands button { height: 32px; }
.gw-cnotes { margin-top: 10px; }
.gw-dark.gw-dk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 20px; padding: 12px 18px; }
.gw-dk .gw-two { display: flex; gap: 18px; }
.gw-dk-l { font-size: 12px; color: #B8C1CE; }
.gw-dk-v { font-size: 24px; font-weight: 600; line-height: 1.15; }
.gw-dk-f { min-width: 0; font-size: 12px; line-height: 1.5; color: #B8C1CE; }
.gw-dk-o { text-align: right; padding-left: 20px; border-left: 1px solid #333D4C; }
.gw-dk-o .serif { font-size: 36px; font-weight: 600; line-height: 1; }
.gw-2c .gw-cmt, .gw.gs .gw-cmt { padding: 14px 16px; }
.gw-2c .gw-cmt .gw-ta, .gw.gs .gw-cmt .gw-ta { margin-top: 8px; }
/* the comment bank on one line that scrolls sideways (all the tips stay one click away) */
.gw-2c .gw-cmt [aria-label="Comment bank"], .gw.gs .gw-cmt [aria-label="Comment bank"] { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gw-2c .gw-cmt [aria-label="Comment bank"] > *, .gw.gs .gw-cmt [aria-label="Comment bank"] > * { flex: none; white-space: nowrap; }
@media (max-width: 1100px) { .gw-dark.gw-dk { grid-template-columns: minmax(0, 1fr) auto; } .gw-dk-f { grid-column: 1 / -1; grid-row: 2; } }
/* ---- end grading board: two columns ---- */

/* ---- builder (student tabs, 02/11/2026, "Mức B"): Assignments, My grades and My progress of the student class page in
   one frame — tab bar · chip bar · ONE toolbar row (a summary strip .ao-strip on the left, Show / Sort on the right) ·
   stat tiles · content; skill colours; the score chips of My grades; the stat-tile component (assets/js/stat-tiles.js) ---- */
/* the student's tab bar keeps one height on every window (the 2–4 px jump of the tabs and chips between screenshots of
   different heights came from the 44 → 40 px rule of a low window, block (d)) */
.ctabs.s-ctabs button { min-height: 40px; }
/* the toolbar row: as high as the controls, the strip takes the room on the left */
.tab-tb { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) 14px; min-height: 38px; }
.tab-tb > .ao-strip { flex: 1 1 560px; min-width: 0; min-height: 38px; margin-right: auto; padding: 2px var(--space-3); flex-wrap: nowrap; }
.tab-tb > .ao-strip .ao-strip-n { flex-wrap: nowrap; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tab-tb > .ao-strip .ao-strip-n b { font-size: var(--fs-lg); }
.tab-tb > .ao-strip .ao-strip-tail { min-width: 0; flex-wrap: nowrap; white-space: nowrap; }
.tab-tb > .ao-strip .ao-strip-tail a { font-weight: 600; }
.tab-frame { display: flex; flex-direction: column; gap: var(--space-3); }
/* skill colours: a dot before Listening / Reading / Writing / Speaking (chips, score chips, Band by week's lines) */
.skill-dots :is([data-cat="listening"], [data-cat="reading"], [data-cat="writing"], [data-cat="speaking"], [data-skill])::before { content: ""; display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sk-c, var(--c-text-3)); }
.skill-dots :is([data-cat="listening"], [data-skill="listening"]) { --sk-c: var(--c-skill-listening); }
.skill-dots :is([data-cat="reading"], [data-skill="reading"]) { --sk-c: var(--c-skill-reading); }
.skill-dots :is([data-cat="writing"], [data-skill="writing"]) { --sk-c: var(--c-skill-writing); }
.skill-dots :is([data-cat="speaking"], [data-skill="speaking"]) { --sk-c: var(--c-skill-speaking); }
.skill-dots [data-skill="overall"] { --sk-c: var(--c-skill-overall); }
.skill-dots [data-skill="none"]::before { display: none; }
.sk-lbl { display: inline-flex; align-items: center; gap: 6px; }
/* Band by week's lines: outline pills with the dot, the chip bar's look (pressed = brand edge + soft fill) */
.bw-lines button { display: inline-flex; align-items: center; gap: 6px; }
/* By week | By test (03/11/2026, student-progress.js): the switch, then the lines; the By test chart = the band axis in place,
   the plot scrolls sideways when the tests don't fit (the size of the By week chart: 300 px high) */
.bw-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-4); }
.bt-chart { position: relative; display: flex; justify-content: center; }
.bw-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--fs-sm); color: var(--c-text-2); }
.bw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bw-key { display: inline-block; width: 26px; border-top: 2.5px solid var(--c-text-2); }
.bw-key.dash { border-top: 2px dashed var(--c-text-2); }
.bt-axis { flex: none; width: 55px; height: 315px; }
.bt-scroll { flex: 0 1 auto; min-width: 0; overflow-x: auto; border-radius: var(--r-sm); }
.bt-plot { display: block; height: 315px; touch-action: pan-x; }
.bt-tip { position: absolute; top: var(--space-2); z-index: 5; width: max-content; max-width: 280px; padding: var(--space-2) var(--space-3); background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--r-md); box-shadow: var(--sh-3); font-size: var(--fs-sm); color: var(--c-text-2); pointer-events: none; }
.bt-tip[hidden] { display: none; }
.bt-tip-t { font-weight: var(--fw-semibold); color: var(--c-text-1); overflow-wrap: anywhere; }
.bt-tip-d { margin-bottom: var(--space-1); color: var(--c-text-3); }
.bt-tip-r { display: flex; align-items: center; gap: 6px; line-height: 20px; }
.bt-tip-r b { color: var(--c-text-1); }
.bt-tip-k { flex: none; width: 12px; height: 2px; border-radius: 1px; }
/* the stat tiles: one low row, every tile the same height and number size */
.stat-tiles { display: grid; grid-template-columns: repeat(var(--st-n, 4), minmax(0, 1fr)); gap: var(--space-3); }
.stat-tiles .tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: var(--space-2) var(--space-4); border-radius: var(--r-lg); }
.stat-tiles .tile .v { font-family: var(--font-serif); font-size: var(--fs-3xl); font-weight: var(--fw-semibold); line-height: var(--lh-tight); color: var(--c-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-tiles .tile .l { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--c-text-1); }
.stat-tiles .tile .n { font-size: var(--fs-sm); color: var(--c-text-3); }
.stat-tiles .tile.tone-ok .v { color: var(--c-success); }
.stat-tiles .tile.tone-warn .v { color: var(--c-warn); }
.stat-tiles .tile.tone-ink .v { color: var(--c-text-1); }
@media (max-width: 900px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* My grades as a list (the Assignments list's look): day bands, one row per piece of work, the score on the right,
   score chips under the title */
.gr-list { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.gr-row { padding: var(--space-3) 18px; border-bottom: 1px solid var(--c-border-2); cursor: pointer; }
.gr-row:hover { background: var(--c-surface-3); }
.gr-row.open { background: var(--c-brand-soft); }
.gr-row .asg-tl .tlink { font: inherit; font-weight: var(--fw-semibold); text-align: left; white-space: normal; color: var(--c-text-1); }
.gr-row .gr-score { flex: none; margin-left: auto; font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--c-brand); white-space: nowrap; text-align: right; }
.sc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) 6px; margin-top: 6px; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--space-2); border: 1px solid var(--c-border-strong); border-radius: var(--r-pill); background: var(--c-surface); font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 22px; color: var(--c-text-1); white-space: nowrap; }
.sc-note { font-size: var(--fs-sm); color: var(--c-text-2); }
.sc-note .badge { vertical-align: 1px; }
.gr-detail { padding: var(--space-3) 18px var(--space-4); background: var(--c-surface-2); border-bottom: 1px solid var(--c-border-2); cursor: auto; }
.ao-slines .gr-row { padding: var(--space-2) var(--space-3); }
.ao-slines .gr-row:last-child, .ao-slines .gr-detail:last-child { border-bottom: 0; }
.gr-list .day-head:first-child { margin-top: 0; }
.gr-row[data-grade-new] [data-open]::after { content: "New"; display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: var(--r-pill); background: var(--c-danger); color: var(--c-text-on-dark); font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; }
/* ---- end student tabs ---- */

/* ---- builder (teacher Results + Gradebook like Assignments, 02/11/2026; teacher-class/results.js, gradebook.js): one frame
   for the teacher's Assignments, Grading, Results and Gradebook — tab bar · the chip bar · ONE toolbar row (.list-head.tab-tb:
   a summary strip on the left, Show / Sort / the tab's own button on the right, the heading only for screen readers) ·
   stat tiles (stat-tiles.js) · the list ---- */
.list-head.tab-tb { min-height: 38px; }
.t-stat .stat-tiles .tile { min-height: 76px; }
.t-stat .stat-tiles .tile .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-tiles .tile.tone-bad .v { color: var(--c-danger); }
/* Results: one table in the Assignments look — a row = tag + title · due · links + ⋮, then its line of small chips */
.res-tbl { overflow-x: clip; }
.res-tbl > table { table-layout: fixed; }
.res-tbl tbody + tbody tr.tsb-day > th { padding-top: 20px; }
.res-tbl tr.res-main > td { border-bottom: 0; padding-bottom: 2px; }
.res-tbl tr.res-sub > td { padding-top: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--c-border-2); }
.res-tbl tr.res-main.open > td, .res-tbl tr.res-main.open + tr.res-sub > td { background: var(--c-brand-soft); }
.res-tbl tr.res-main.open + tr.res-sub > td { border-bottom: 0; }
.res-tbl tr.res-open > td { padding: 0 16px 14px; background: var(--c-brand-soft); border-bottom: 1px solid var(--c-border-2); }
.res-tbl tr.res-open .embed { margin: 0; }
.res-tbl tr.res-main:hover > td, .res-tbl tr.res-main:hover + tr.res-sub > td { background: var(--c-surface-2); }
.res-tbl tr.res-main.open:hover > td, .res-tbl tr.res-main.open:hover + tr.res-sub > td { background: var(--c-brand-soft); }
.res-open { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; }
.res-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.res-open:focus-visible { outline: var(--focus-w) solid var(--c-focus); outline-offset: 2px; border-radius: 2px; }
.ao .ao-line .res-open { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.res-chips { margin-top: 0; }
.res-chips .sc-chip.act { color: var(--c-warn); border-color: var(--c-warn-border); background: var(--c-warn-bg); }
.res-chips .sc-chip.warn { color: var(--c-warn); border-color: var(--c-warn-border); }
.res-chips .res-new { color: var(--c-danger); border-color: var(--c-danger-border); background: var(--c-danger-bg); }
.res-chips .pill { line-height: 16px; padding: 3px 10px; }
.res-tbl .asg-acts .tlink + .tlink { margin-left: var(--space-2); }
.res-acc { gap: var(--space-3); }
.res-acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3) var(--space-6); }
/* skill colours outside .skill-dots: a dot (column headers of the Gradebook) */
.sk-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c-text-3); vertical-align: 1px; }
.sk-dot[data-skill="listening"] { background: var(--c-skill-listening); }
.sk-dot[data-skill="reading"] { background: var(--c-skill-reading); }
.sk-dot[data-skill="writing"] { background: var(--c-skill-writing); }
.sk-dot[data-skill="speaking"] { background: var(--c-skill-speaking); }
/* Gradebook: column headings = the short title, then the type tag + the skill dots; "to grade" opens Grading */
.gb-colh { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.gb-colh .type-tag { margin-right: 4px; }
.gb-tograde { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: underline; text-underline-offset: 2px; }
.gb-tograde:hover { border-color: var(--c-brand); }
.gb-tograde:focus-visible { outline: var(--focus-w) solid var(--c-focus); outline-offset: 2px; }
.gb-skill-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; align-items: center; gap: 10px; }
.gb-skill-row.dim > div { opacity: .45; }   /* (only the bar: the words stay at AA contrast) */
[data-all-overview="results"] .ao-prog { max-width: calc(100% - 44px); }   /* (a line here has only the ⋮ after it) */
.gb-crit { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2) var(--space-4); }
/* ---- end teacher Results + Gradebook ---- */
/* ---- Grading: AI grade all (03/11/2026; teacher-class/ai-all.js) ---- */
.gq-ai-all { display: inline-flex; align-items: center; gap: var(--space-2); }
.gq-ai-all:empty { display: none; }
.gq-ai-all .btn .ic, .gq-ai-all .btn svg { width: 14px; height: 14px; }
.gq-ai-res { margin: var(--space-1) var(--space-4) var(--space-2); display: flex; flex-direction: column; gap: var(--space-1); }
.gq-ai-res:focus { outline: none; }
.gq-ai-res-t { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.gq-ai-dlg { width: 500px; }
.gq-ai-models { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.gq-ai-models legend { padding: 0; margin-bottom: var(--space-1); }
.gq-ai-opt { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--c-border-2); border-radius: var(--r-md); cursor: pointer; }
.gq-ai-opt:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-tint); }
.gq-ai-opt input { width: auto; min-height: 0; margin: 0; flex: none; }
/* ---- end Grading: AI grade all ---- */

/* ---- row-exercises (03/11/2026, teacher-class/row-exercises.js): "7 exercises ▾" after a work row's title, its list, a student's "4/7 exercises" ---- */
.rx-head { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.rx-head .asg-t { min-width: 0; }
.rx-sep { flex: none; color: var(--c-text-3); }
.rx-tgl { flex: none; display: inline-flex; align-items: center; gap: var(--space-1); min-height: 28px; font-size: var(--fs-sm); white-space: nowrap; }
.rx-st-btn { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; white-space: nowrap; }
.rx-tgl .ic, .rx-st-btn .ic { transition: transform .15s; }
.rx-tgl[aria-expanded="true"] .ic, .rx-st-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.rx-list { margin-top: var(--space-1); cursor: default; }
.rx-list[hidden], .rx-st[hidden] { display: none; }
tr:has(> td > .rx-list:not([hidden])) > td { vertical-align: top; }   /* open: the due date and ⋮ stay on the title's line */
.rx-ol, .rx-st-ul { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.rx-ol li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-2); align-items: baseline; padding: 2px 0; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.rx-no { color: var(--c-text-3); text-align: right; }
.rx-t { min-width: 0; color: var(--c-text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-c { color: var(--c-text-2); white-space: nowrap; }
.rx-c .act { color: var(--c-warn); font-weight: var(--fw-semibold, 600); }
.tsb-students li > .rx-st { grid-column: 3 / -1; }
.rx-st-ul li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 1px 0; font-size: var(--fs-sm); line-height: var(--lh-snug); }
.rx-st-ul li > .ic { color: var(--c-success); }
.rx-st-ul li.part > .ic { color: var(--c-warn); }
.rx-st-ul li.not > .ic { color: var(--c-text-3); }
.rx-st-ul li.not .rx-t { color: var(--c-text-2); }
/* ---- end row-exercises ---- */
/* ---- Lecture content (03/11/2026, the Lecture review items 3, 4, 9, 11; teach-views.js, teach-reading.js,
   teach-listening.js) ---- */
/* 4: Reading's gutter: the eye only (narrower than Listening's three icons) */
.tv-gutter.tv-gut1 { --gut: 30px; }
/* 9: a practice exercise's self-study instructions folded into one closed "Instructions" line; never in Present mode */
.tv-instrx { color: var(--ink-2); font-size: .8em; margin: .1em 0 .5em; }
.tv-instrx > summary { cursor: pointer; width: max-content; max-width: 100%; font-weight: 600; }
.tv-instrx > p { margin: .2em 0 0; }
.t-present-teach .tv-instrx { display: none; }
/* 3: the teacher's private notes: closed until opened (a Notes button per box, N for all), never in Present mode */
.tv-spnote[hidden], .tv-notebox[hidden] { display: none; }
.tv-mbtn.tv-nbtn { border-color: #B08A00; color: #5C4700; }
.tv-mbtn.tv-nbtn:hover:not(:disabled), .tv-mbtn.tv-nbtn[aria-expanded="true"] { background: #FFF4C4; color: #3D2F00; }
.tv-ndot { display: none; width: 7px; height: 7px; border-radius: 50%; background: #B08A00; }
.has-note > .tv-ndot { display: inline-block; }
.tv .xh-btn.has-note > .tv-ndot { background: #FFE58F; }
.tv .xh-btn.has-note[aria-pressed="true"] > .tv-ndot { background: #B08A00; }
.tv-nall { font: inherit; font-size: 13px; font-weight: 600; min-height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid #B08A00; background: #FFFFFF; color: #5C4700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tv-nall[aria-pressed="true"] { background: #FFF4C4; }
.tv-nall:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tv-nall .ic { width: 14px; height: 14px; }
.tv-nb-x { font: inherit; font-size: 12px; font-weight: 600; min-height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 6px; border: 1px solid #C9B66B; background: #FFFDF2; color: #5C4700; cursor: pointer; }
.tv-nb-x:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tv-nb-h { display: flex; align-items: center; gap: 4px; }
.tv-nb-h .tv-nb-sp { flex: 1; }
.t-present-teach :is(.tv-spnote, .tv-notebox, .tv-nbtn, .tv-say-nst, [data-wr="notes"]) { display: none !important; }
/* 11: Writing with a chart: the chart in the picture pane on the left (teach-picture.js: Fit / Width, zoom, its own ink),
   the task and the note box on the right; the chart in the task is hidden meanwhile (the document keeps its structure) */
.tv-wsplit > .tv-wscroll { min-width: 0; }
.tv-wsplit[data-pic="on"] .tv-task :is(.tv-t1chart, img.tv-chart) { display: none; }
.tv-picbar .tv-t1sw { margin-right: auto; }
/* ---- end Lecture content ---- */

/* ---- builder lecture-paraphrase: pair colours (06/11/2026) ----
   teach-paraphrase.js: the words of a question and the passage / transcript words that mean the same share one colour
   per pair (CSS Custom Highlight API, names tvp-c1 … tvp-c6: the DOM is never touched, so the ink's anchors and the pens'
   marks stay). Light fills with dark text (#18202B on each: contrast above 9 : 1), the reading-explain.js palette first;
   Present mode (a projector) takes stronger fills. No underline: the answer sentence's own underline (.tv-ans) stays. */
::highlight(tvp-c1) { background-color: #FFD3A3; color: #18202B; }
::highlight(tvp-c2) { background-color: #C4DCFF; color: #18202B; }
::highlight(tvp-c3) { background-color: #C6EBCB; color: #18202B; }
::highlight(tvp-c4) { background-color: #E4D3FA; color: #18202B; }
::highlight(tvp-c5) { background-color: #FFC7DD; color: #18202B; }
::highlight(tvp-c6) { background-color: #BFEDE8; color: #18202B; }
.t-present-teach ::highlight(tvp-c1) { background-color: #FFC07D; }
.t-present-teach ::highlight(tvp-c2) { background-color: #A9CBFF; }
.t-present-teach ::highlight(tvp-c3) { background-color: #A8E0B0; }
.t-present-teach ::highlight(tvp-c4) { background-color: #D4BBF7; }
.t-present-teach ::highlight(tvp-c5) { background-color: #FFB0CF; }
.t-present-teach ::highlight(tvp-c6) { background-color: #9FE3DB; }
/* ---- end builder lecture-paraphrase ---- */

/* ---- builder grading-returned (06/11/2026): returned work stays in the class Grading tab, quieter (grading.js) ----
   a returned line (.gq-done): name and text in the secondary colours; "Returned (n)" sub-heading under the lines that
   still need the teacher; a row of the group "Returned" (data-gq-g="4") and an All line with only returned work
   (.gq-quiet): the title in the secondary ink. The open line keeps its own highlight (.gq-st.open). */
.gq-st.gq-done:not(.open) .gq-name { color: var(--ink-2); font-weight: 600; }
.gq-st.gq-done:not(.open) .gq-text { color: var(--muted); }
.gq-done-h { display: block; margin-top: 4px; padding: 10px 16px 4px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.gq-row[data-gq-g="4"] .gq-main .asg-t, .ao-line-b.gq-quiet .asg-t { color: var(--ink-2); }
/* ---- end builder grading-returned ---- */

/* ---- builder step6-teacher (06/11/2026): the "Step 6" line under a 6-step set's line (grading.js linePg, step6-board.js)
   the second line of the same student: no name, a lighter top border; open (.s6open) = its own highlight, the step-1 line
   stays plain; the step-1 board open (.open) leaves the step-6 line plain ---- */
.gq-line.gq-s6 { padding-top: 2px; border-top: 1px dotted var(--line); }
.gq-st.open > .gq-line.gq-s6 { background: transparent; }
.gq-st.s6open > .gq-line.gq-s6 { background: #EEF3F8; }
.gq-st.gq-done:not(.s6open) .gq-s6 .gq-text { color: var(--muted); }
/* ---- end builder step6-teacher ---- */

/* ---- builder lecture-hscroll (08/11/2026, user: the Lecture's questions always fit their pane, no sideways scroll; the
   answer boxes / chips in line with their text; no word split in the middle in a narrow table column). Lecture only
   (teach-listening.js groupsHtml: the Listening and Reading question documents); the student rooms have their own CSS.
   - a box was an inline-block with overflow: hidden, so its BASELINE was its bottom edge: it sat on the text's baseline,
     6–12 px higher than the words around it. overflow: visible → the box's own text sits on the line's baseline;
   - an empty box keeps its width (7.5 / 13 / 4.6 em) but never more than its line (min(…, 100%): in a table cell it
     no longer forces the column wider);
   - a shown answer is an INLINE chip: it wraps at its spaces like the words around it ("20% / 20 / twenty / 20 percent
     / …" used to be one unbreakable line running off the pane), its frame cut at the line ends (box-decoration-break:
     slice; clone would frame each piece, but Chromium does not count the cloned end padding when it breaks the line,
     so a piece ran 7 px past the pane);
   - tables: the document's overflow-wrap: anywhere let the table squeeze a column below its longest word
     ("Informatio / n"); in a table a word breaks only when it alone is wider than the whole column (break-word) ---- */
.tv-gap { display: inline; }
.tv-in { overflow: visible; text-overflow: clip; width: min(7.5em, 100%); max-width: 100%; }
.tv-in.wide { width: min(13em, 100%); }
.tv-in.sel { width: min(4.6em, 100%); }
.tv-ans-on .tv-in:has(.tv-in-a:not(:empty)), .tv-q.show1 .tv-in:has(.tv-in-a:not(:empty)) { display: inline; width: auto; min-width: 0; max-width: none; min-height: 0; white-space: normal; overflow-wrap: break-word; -webkit-box-decoration-break: slice; box-decoration-break: slice; }
.tv-table { max-width: 100%; }
.tv-table th, .tv-table td { overflow-wrap: break-word; word-break: normal; }
.tv-opt-row > b { flex: none; }   /* (a list of options / headings: the key "viii" never squeezed into "vi / ii") */
/* a narrow question document (a big Font size, a wide transcript / passage: under 640 layout px) with a table of 4–5
   columns: the ▸ ◎ eye icons of a gap may stack in a narrow cell instead of holding the column 75 px wide (a table
   still wider than its document takes a smaller font of its own: teach-ink.js Surface.fitTables) */
@container tvdoc (max-width: 640px) {
  .tv-table .tv-gut.in { flex-wrap: wrap; }
}
/* the questions' own minimum width: 40 % of the view (the transcript / passage takes at most 60 %, SPLIT_MAX in
   teach-listening.js) and, with a big Font size, at least ~23 × the Font size (≈ 500 layout px: a 4–5 column table
   fits without a word split), never more than 60 % (the transcript / passage gives way: it may shrink below its share) */
.tv-split[data-pic="off"] > .tv-trpane { flex-shrink: 1; }
.tv-split[data-pic="off"] > .tv-qpane { min-width: min(calc(var(--tv-fs, 20px) * 23), 60%); }
/* ---- end builder lecture-hscroll ---- */

/* ---- builder lecture-reading-explain (08/11/2026, user: two buttons per question in the Lecture's Reading view, the
   second = "Location and paraphrases", as the student's Practice with answers; teach-reading.js, teach-paraphrase.js).
   The panel's own rules and the highlight colours come from reading-explain-panel.js (the room's, scoped to .tvx, sized
   in em: style#rx-css-lecture); here only what is the Lecture's:
   - the gutter of a bank test's Reading questions: the eye + the pin (Practice sets keep the eye alone, tv-gut1);
   - the pin pressed (its panel open) like a pressed play icon; a question without an explanation: a quieter pin;
   - the panel inside the question document: the full width of its question (a matching row is a flex row), the UI
     font, words wrap at spaces (the document breaks anywhere);
   - Present mode (a projector): the stronger pair fills the Lecture used before (the room's palette, one step darker) ---- */
.tv-gutter.tv-gut2 { --gut: 54px; }
/* (09/11/2026) the eye + Location + Paraphrases (teach-reading.js): three icons; pressed = on; disabled = no row for it */
.tv-gutter.tv-gut3 { --gut: 80px; }
.tv-ic:is(.tv-loc1, .tv-pp1)[aria-pressed="true"] { background: var(--brand); color: #FFFFFF; }
.tv-ic:is(.tv-loc1, .tv-pp1):disabled { opacity: .35; cursor: default; background: transparent; color: var(--c-border-control); }
.tv .tvx { display: block; cursor: auto; font-family: var(--font-sans, var(--sans)); overflow-wrap: break-word; word-break: normal; }
.tv .tv-match > .tvx { flex-basis: 100%; }
.tv .tvx .rx-panel { margin: .45em 0 .3em; box-shadow: 0 1px 4px rgba(16, 24, 40, .08); }
.tv .tvx .rx-quote { font-family: var(--font-serif, Georgia, serif); }
.t-present-teach ::highlight(rx-c1) { background-color: #FFC07D; }
.t-present-teach ::highlight(rx-c2) { background-color: #A9CBFF; }
.t-present-teach ::highlight(rx-c3) { background-color: #A8E0B0; }
.t-present-teach ::highlight(rx-c4) { background-color: #D4BBF7; }
.t-present-teach .tvx .rx-chip.c1 { background: #FFC07D; }
.t-present-teach .tvx .rx-chip.c2 { background: #A9CBFF; }
.t-present-teach .tvx .rx-chip.c3 { background: #A8E0B0; }
.t-present-teach .tvx .rx-chip.c4 { background: #D4BBF7; }
/* ---- end builder lecture-reading-explain ---- */

/* ---- builder lecture-font-match (08/11/2026, user: "the transcript text looks bigger than the text inside the table",
   CAM 13 Test 1 Listening Part 1, Font size 24). The transcript / passage and the questions are documents of the same
   size (DOC_FS 22, one scale = Font size / 22, teach-ink.js), but the question document set its instructions and its
   tables at .85em and the options box at .9em (the "Choose 2 answers." hint at a fixed 13 px): 20.4 px beside a 24 px
   transcript. Lecture only (.tv-qpane: the Listening / Reading questions); the student rooms keep their own CSS.
   - instructions, tables, the options box and the hint: the question text's own size (1em); headings, the answer boxes /
     chips (.tv-in .85em) and the Reading explanation panel unchanged;
   - a table gets its width from the layout before its font is touched: the pane takes the width its widest table needs
     (--tv-qneed, set by teach-ink.js Surface.fitTables through the views' fitWidth), the transcript / passage gives way
     down to 30 % of the view; a table still too wide moves left into the empty icon gutter (.tv-tbl-out); only past
     that does it take a smaller font (85 % first, below only if 85 % still does not fit);
   - inside table cells the ▸ ◎ eye icons may wrap under each other whenever a column is narrow (was: only in a document
     under 640 layout px), and the cells' padding is a little smaller (.2em .4em, was .25em .5em) ---- */
.tv-qpane .tv-instr, .tv-qpane .tv-table, .tv-qpane .tv-optbox, .tv-qpane .tv-hint.small { font-size: 1em; }
.tv-qpane .tv-table th, .tv-qpane .tv-table td { padding: .2em .4em; }
.tv-qpane .tv-table .tv-gut.in { flex-wrap: wrap; }
.tv-qpane.tv-gutter .tv-tbl-wrap.tv-tbl-out { margin-left: calc(-1 * var(--gut, 0px)); }   /* (a table too wide for its place: into the empty icon gutter, Surface.fitTables) */
.tv-split[data-pic="off"] > .tv-qpane { min-width: max(min(calc(var(--tv-fs, 20px) * 23), 60%), min(var(--tv-qneed, 0px), 70%)); }
/* ---- end builder lecture-font-match ---- */

/* ---- builder writing-preview (09/11/2026): Assign work › Exercises › "Preview" of a Writing exercise (teacher-class/writing-preview.js,
   inside the material viewer's window .mv): the task as students first see it; the window grows with its content and scrolls ---- */
.pb-pv { flex: none; font-size: 13px; font-weight: 600; padding: 2px 4px; border-radius: 4px; }
.pb-pv:focus-visible { outline: 2px solid var(--brand, #1F4E79); outline-offset: 1px; }
.mv.wpv { width: min(920px, 100%); height: auto; max-height: calc(100vh - 32px); }
.mv.wpv .mv-main { overflow-y: auto; overflow-x: hidden; }
.wpv-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--ink, #18202B); min-width: 0; }
.wpv-room { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 8px 12px; border-radius: 8px; background: #E8EFF7; color: var(--brand, #1F4E79); font-size: 14px; }
.wpv-room span { color: var(--ink-2, #3D4654); }
.wpv-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; border-radius: 8px; background: #EEF0F3; font-size: 14px; }
.wpv-instr { margin: 0; }
.wpv-prompt { border: 1px solid var(--line, #D5DAE1); border-radius: 8px; padding: 12px 16px; background: #FFFFFF; line-height: 1.5; }
.wpv-prompt p { margin: 0 0 10px; }
.wpv-prompt p:last-child { margin-bottom: 0; }
.wpv-chart { min-width: 0; max-width: 100%; }
.wpv-tip { border-left: 3px solid #C9D6E6; background: #F6F8FB; padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 14px; }
/* ---- end builder writing-preview ---- */
/* ---- builder vocab-sections: topic sections in Assign work's Topic column (topic-tree.js, 09/11/2026) ---- */
.pb-grp { display: flex; flex-direction: column; }
.pb-grp + .pb-grp { border-top: 1px solid var(--line-2, #E3E7EC); margin-top: 2px; padding-top: 2px; }
.pb-gh { padding: 6px 10px 2px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #5B6472); }
.pb-grp .pb-it { padding-left: 22px; }
/* ---- end builder vocab-sections ---- */
/* ---- builder lecture-font-sync (09/11/2026, user: "sync the fonts of the student's test room and the teacher's
   Lecture"). The Lecture's Reading / Listening test views take the exam room's rule (index.html, "questions pane text
   size"): body = the passage size; "Questions x–y" 1.1× bold; a passage / Listening part title 4/3× (serif); helpers
   ("Choose 2 answers.", the explanation panel: reading-explain-panel.js) 0.875×; passage, titles and transcript in the
   reading serif (--read-font), questions and UI in --font-sans. The ratios are the tokens of tokens.css (--tx-*), so both
   places scale the same way. The body stays the Lecture's own: its documents are laid out at 22 px (DOC_FS) and scaled by
   the Font size (Aa), so every size here is in em of that body and follows the Font size; line spacing stays the
   Lecture's Line spacing control (--tv-lh). The transcript's speaker keeps its inline "Name:" in the turn colour (the
   room shows it as a small block label), in the room's sans bold. ---- */
.tv .tv-passage h2.tv-h, .tv .tv-qpane h2.tv-h { font-family: var(--read-font); font-weight: var(--fw-semibold); font-size: calc(1em * var(--tx-title)); }
.tv .tv-passage .tv-subtitle { font-family: var(--read-font); font-style: italic; font-size: 1em; }
.tv .tv-passage p, .tv .tv-trpane:not(.tv-passage) p { font-family: var(--read-font); }
.tv .tv-passage .tv-plabel, .tv .tv-trpane .tv-spk { font-family: var(--font-sans); font-weight: var(--fw-bold); }
.tv .tv-trpane .tv-trh { font-family: var(--read-font); font-weight: var(--fw-semibold); font-size: calc(1em * var(--tx-tr-head)); }
.tv .tv-qpane .tv-grp-q > h3 { font-size: calc(1em * var(--tx-head)); font-weight: var(--fw-semibold); }
.tv .tv-qpane .tv-sub { font-size: 1em; font-weight: var(--fw-semibold); }
.tv .tv-qpane .tv-num { font-weight: var(--fw-semibold); }
.tv .tv-qpane .tv-in { font-size: 1em; }
.tv .tv-qpane .tv-tip { font-size: 1em; }
.tv .tv-qpane .tv-hint.small { font-size: calc(1em * var(--tx-small)); }
/* ---- end builder lecture-font-sync ---- */

/* ---- builder lecture-topic-tree (09/11/2026): the Lecture's topic sections (assets/js/topic-tree.js, Vocabulary =
   Speaking › Part 1–3, Writing › Task 1–2), as the Assign work picker's .pb-gh; a part without a set: "No sets yet." ---- */
.tch-grp + .tch-grp, .tch-grp + .tch-topic, .tch-topic + .tch-grp { margin-top: 16px; }
.tch-gh { padding: 0 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #5B6472); }
.tch-topic.tch-none { padding: 12px 16px; display: flex; gap: 10px; align-items: baseline; font-size: 16px; background: transparent; border-style: dashed; }
.tch-topic.tch-none b { font-weight: 600; color: var(--muted, #5B6472); }
/* ---- end builder lecture-topic-tree ---- */
/* ---- builder pron-compact (10/11/2026, user: "make the Pronunciation grading interface compact, like Writing's"):
   the Pronunciation board (teacher-class/practice-boards.js → grade-writing.js) uses the Writing criteria row; with 1–2
   criteria (FC · P, or P alone for 44 sounds) the boxes are wider and show the full name; the notes per criterion sit
   side by side in the "Notes per criterion" fold ---- */
.gw-crow.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gw-crit-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-cnotes-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; margin-top: 8px; }
.gw-cnote { min-width: 0; }
.gw-cnote .gw-ta { width: 100%; box-sizing: border-box; }
.gw-cnotes > summary { cursor: pointer; }
/* ---- end builder pron-compact ---- */

/* ---- F: materials (class Materials tab, teacher feedback 15/11/2026 G2) ---- */
.mat-topic { display: flex; flex-direction: column; gap: 8px; }
.mat-topic-h { align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.mat-topic-h h3 { font-size: 16px; }
.mat-item { flex-direction: column; align-items: stretch; gap: 8px; }
.mat-item.mat-hidden { background: #F6F7F9; border-style: dashed; }
.mat-note { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.mat-actions { border-top: 1px solid var(--line-2, #EEF0F3); padding-top: 6px; }
.mat-seen { background: #F6F7F9; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.mat-seen-btn { flex: none; color: var(--brand); }
.mat-form { background: #FFFFFF; border: 2px solid var(--brand); border-radius: 12px; padding: 16px 18px; gap: 12px; }
.mat-targets { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mat-removed summary { cursor: pointer; font-weight: 600; min-height: 32px; }
/* ---- end F: materials ---- */
