/* Shared theme for the login, home, report and teacher pages: Sky Blue × Ice White. */
:root {
  --bg: #f4f9ff;
  --surface: #ffffff;
  --surface-2: #e3f1fd;
  --text: #0f172a;
  --muted: #5b6b82;
  --faint: #94a3b8;
  --border: #dce8f5;
  --border-2: #c7d7ea;
  --accent: #0ea5e9;
  --accent-dk: #0284c7;
  --accent-text: #ffffff;
  --dark: #0f172a;
  --yellow: #fef08a;
  --yellow-ink: #713f12;
  --good: #16a34a;
  --good-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --ace: #dc2626; /* the "Ace" of the wordmark */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-dk); }
header.top {
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--surface);
}
header.top .brand { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
header.top .brand .sub { color: var(--text); font-weight: 800; font-size: 15px; margin-left: 10px; }
.brand .ace, .brand-lg .ace { color: var(--ace); }
.brand .it, .brand-lg .it { color: var(--accent); }
header.top nav { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 14px; }
header.top nav a { color: var(--muted); text-decoration: none; }
header.top nav a.active { color: var(--text); font-weight: 700; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card.hot { border: 2px solid var(--accent); }
h1 { font-size: 26px; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 16px; margin: 16px 0 8px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dk); margin-bottom: 6px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
button.blue, .btn.blue { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.secondary, .btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); font-weight: 600; }
button:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.error { color: var(--bad); min-height: 1.4em; font-size: 14px; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.tabs button { flex: 1; background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; border-radius: 10px; }
.tabs button.active { background: var(--surface); color: var(--text); border-color: var(--border-2); }
/* Shape says what it is. Chips, badges and flags are labels (a status, a class, a mode, a due
   date): square-cornered tags with a light fill and no border. Anything tappable keeps the pill
   shape of a button: links and buttons styled as chips, and the tappable highlight chips. */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
a.chip, button.chip, .chip[class*="hl-"] { border-radius: 999px; cursor: pointer; }
.chip.yellow { background: var(--yellow); color: var(--yellow-ink); }
.chip.good { background: var(--good-soft); color: #166534; }
.chip.bad { background: var(--bad-soft); color: #991b1b; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.outline { background: transparent; border: 1px solid var(--border-2); color: var(--muted); }
.chip.off { background: #e2e8f0; color: #475569; } /* the Students switch's own "off" grey; .chip.good is its "on" green */

/* auth */
.auth { max-width: 440px; margin: 48px auto; }
.auth .brand-lg { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge.good { background: var(--good-soft); color: #166534; }
.badge.bad { background: var(--bad-soft); color: #991b1b; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* misc */
.notice { padding: 10px 14px; background: var(--warn-soft); color: var(--warn); border-radius: 10px; font-size: 13.5px; }
audio { width: 100%; max-width: 480px; display: block; margin: 4px 0 8px; }
select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; }
.weak { font-size: 14px; }
.weak span { display: inline-block; margin: 2px 8px 2px 0; }
.bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* home */
.grid2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; }
.mode { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mode h3 { margin: 0 0 4px; }
.mode .t { color: var(--accent-dk); font-weight: 700; font-size: 13px; }
.big { font-size: 34px; font-weight: 800; line-height: 1; }
.big small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; }
/* student home: one column, "next step" hero first, then progress, practice tiles, history */
main.home { max-width: 860px; }
.hero { background: linear-gradient(135deg, #e3f1fd 0%, #ffffff 70%); border: 2px solid var(--accent); padding: 22px 24px; }
.hero-title { font-size: 24px; margin: 2px 0 6px; font-weight: 800; letter-spacing: -0.01em; }
.hero-text { margin: 0 0 14px; color: var(--muted); max-width: 640px; }
.hero .cta { font-size: 16px; padding: 12px 24px; }
.hero-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.compact-list { padding: 12px 16px; }
/* assignments from the teacher: amber, so they never look like the blue practice cards */
/* A student's assignment card: the colour is its state, in the teacher page's colours (green = open
   now, grey = locked until the lesson, blue = in progress, plain = waiting for the report). */
.assign-card { position: relative; border: 2px solid var(--line-2); background: #fff; padding: 18px 20px; }
.assign-card.state-open { border-color: var(--good); background: linear-gradient(135deg, var(--good-soft) 0%, #ffffff 55%); }
.assign-card.state-locked { border-color: #cbd5e1; background: #f8fafc; }
.assign-card.state-locked .hero-title, .assign-card.state-locked .assign-what { color: #475569; }
.assign-card.state-progress { border-color: var(--accent); background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 55%); }
.assign-card.state-due { border-color: #d97706; background: linear-gradient(135deg, var(--warn-soft) 0%, #ffffff 55%); } /* open, but past its due date: the amber of the teacher page's overdue "Due" tag, never a second green */
.assign-card.is-new .chip.new { box-shadow: 0 0 0 3px #fde68a; } /* the chip, not the card, says new: the card's colour is its state */
.assign-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.assign-head .assign-from { font-weight: 800; font-size: 15px; color: var(--text); }
.chip.kind-tag { font-weight: 800; letter-spacing: 0.05em; }
.chip.kind-test { background: #e0f2fe; color: var(--accent-dk); }
.chip.kind-writing { background: #ede9fe; color: #6d28d9; }
.chip.kind-essay { background: #e9d5ff; color: #4c1d95; } /* a full essay: a deeper purple than a writing card */
.chip.kind-reading { background: #ccfbf1; color: #0f766e; } /* answer sheets: the board's Reading and Listening colours */
.chip.kind-listening { background: #fef3c7; color: #b45309; }
.chip.blue { background: #e0f2fe; color: var(--accent-dk); }
.assign-what { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.chip.new { background: #f59e0b; color: #fff; font-weight: 800; letter-spacing: 0.06em; animation: new-pulse 1.6s ease-in-out 3; }
@keyframes new-pulse { 50% { transform: scale(1.12); } }
.assign-note { color: var(--text); font-style: italic; }
.assign-done { padding: 12px 16px; background: #f1f5f9; border-color: #cbd5e1; } /* history: done or closed, nothing here can be started, so grey like a locked card */
.assign-done summary { cursor: pointer; font-size: 14px; color: #475569; }
.assign-done .rowi { border-top-color: #e2e8f0; }
.assign-done .rowi .t, .assign-done .rowi .v { color: #475569; }
.assign-done .compact-row:first-of-type { margin-top: 8px; }
.assign-later { padding: 10px 16px; background: #f8fafc; border: 1px dashed #cbd5e1; } /* the lesson's next activities, locked until the one before is finished */
.assign-later-h { font-size: 14px; color: #475569; }
.assign-later .rowi { border-top-color: #e2e8f0; padding: 8px 0; min-height: 40px; }
.assign-later .rowi .t { color: #64748b; font-size: 14.5px; }
.good-text { color: #166534; }
.teacher-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 160px; }
.teacher-cell .chip { display: inline-flex; align-items: center; gap: 4px; }
.chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; line-height: 1; }
.chip-x:hover { color: var(--bad); }
.teacher-cell select { padding: 2px 6px; font-size: 12.5px; }
.preview-box { margin: 4px 0 10px; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; line-height: 1.6; }
.compact-row { padding: 8px 0; border-top: 1px solid var(--border); }
.progress-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: center; margin-top: 12px; }
.progress-grid .bands { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.progress-grid .band-tile { padding: 10px 6px; }
.plan-next { margin-top: 12px; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; font-size: 14px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); white-space: normal; font-weight: 500; cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile.primary { border-color: var(--accent); }
.tile-title { font-size: 16px; font-weight: 800; }
.tile-meta { color: var(--accent-dk); font-weight: 700; font-size: 13px; }
.tile-go { margin-top: 6px; color: var(--accent-dk); font-weight: 700; font-size: 14px; }
.home-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--border); }
.home-foot details { margin-bottom: 8px; }
.home-foot summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--text); font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

/* report */
.bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.band-tile { background: var(--surface-2); border-radius: 12px; padding: 12px 10px; text-align: center; }
.band-tile .num { font-size: 26px; font-weight: 800; }
.band-tile .lbl { font-size: 12px; color: var(--muted); }
.overall { display: flex; align-items: center; gap: 20px; }
.overall .num { font-size: 60px; font-weight: 800; color: var(--accent-dk); line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.metric { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.metric b { display: block; font-size: 20px; color: var(--text); }
details.answer { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
details.answer summary { cursor: pointer; font-weight: 600; }
.transcript { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; line-height: 1.7; }
.model { border-left: 4px solid var(--good); padding: 10px 14px; background: #f8fafc; border-radius: 8px; white-space: pre-wrap; }
.fix { font-size: 15px; margin: 6px 0; }
.fix s { color: var(--muted); }
.fix ins { color: var(--good); text-decoration: none; font-weight: 700; }
ol.plan li, ul.tight li { margin-bottom: 6px; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--surface-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .progress-grid { grid-template-columns: 1fr; }
  .hero { padding: 18px 16px; }
  .hero-title { font-size: 21px; }
  header.top { padding: 0 16px; }
  header.top .brand .sub, header.top nav .hide-sm { display: none; }
  header.top nav { gap: 12px; }
}
@media print {
  header.top, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  details.answer { break-inside: avoid; }
}

/* report: guided layout — one row of section buttons, one section at a time */
.hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: 16px; }
.summary { margin: 14px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.seg {
  display: flex; gap: 4px; padding: 5px; margin: 2px 0 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow); overflow-x: auto; position: sticky; top: 8px; z-index: 5; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-width: max-content; background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; padding: 9px 14px; }
.seg button.active { background: var(--accent); color: #fff; }
.seg .ic { font-size: 15px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); font-weight: 800; display: grid; place-items: center; }
.step p { margin: 4px 0 6px; }
.step details p { margin: 6px 0 0; }
details.more { margin-top: 10px; }
details.more > summary, .step details > summary { cursor: pointer; color: var(--accent-dk); font-weight: 600; font-size: 14px; }
details.crit { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
details.crit summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
details.crit summary::-webkit-details-marker { display: none; }
details.crit > p { margin: 12px 0 8px; }
.crit-band { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; font-weight: 800; }
details.answer summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.answer .ans-q { flex: 1; min-width: 200px; }
.badge.band { background: var(--accent); color: #fff; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 8px; }
.subtabs button { background: var(--surface-2); border-color: transparent; color: var(--text); font-weight: 600; padding: 7px 12px; font-size: 13px; }
.subtabs button.active { background: var(--accent); color: #fff; }
.sub p { margin: 6px 0; }
.word { padding: 10px 0; border-bottom: 1px solid var(--border); }
.word:last-child { border-bottom: 0; }
.word ins { color: var(--good); text-decoration: none; font-weight: 700; }
.plan-check { list-style: none; padding: 0; margin: 0; }
.plan-check li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plan-check li:last-child { border-bottom: 0; }
.plan-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.plan-check label { margin: 0; font-size: 15px; color: var(--text); cursor: pointer; }
.plan-check li.done label { text-decoration: line-through; color: var(--muted); }
.next-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border-color: transparent; }
.foot { text-align: center; margin-top: 8px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 14px; }
  .overall .num { font-size: 48px; }
  .bands { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .band-tile { padding: 10px 4px; }
  .band-tile .num { font-size: 22px; }
  .band-tile .hide-sm { display: none; }
  /* phones: an app-style tab bar with the icon above a short label, so all five fit */
  .seg { border-radius: 16px; gap: 2px; padding: 4px; }
  .seg button { flex-direction: column; gap: 1px; min-width: 0; padding: 6px 1px; font-size: 10.5px; letter-spacing: -0.01em; border-radius: 12px; white-space: normal; line-height: 1.2; }
  .seg .ic { font-size: 18px; }
}
@media print {
  .seg, .subtabs { display: none !important; }
  .sec[hidden], .sub[hidden] { display: block !important; }
  .sub::before { content: attr(data-sub); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #666; margin-top: 10px; }
}

/* teacher: tabs, classes and accounts */
.classes-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.classes-grid > * { min-width: 0; }
.class-list { display: grid; gap: 6px; }
.class-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.class-item.active { border-color: var(--accent); background: var(--surface-2); }
.class-item.archived { opacity: 0.55; }
.class-item .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.12em; font-weight: 700; background: var(--surface-2); padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.code.pw { background: var(--yellow); color: var(--yellow-ink); letter-spacing: 0.08em; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { width: auto; flex: 1; min-width: 140px; }
button.small, .btn.small { padding: 6px 12px; font-size: 13px; }
button.ghost { background: transparent; color: var(--text); border-color: var(--border-2); font-weight: 600; }
button.danger { background: var(--surface); color: var(--bad); border-color: var(--bad-soft); font-weight: 600; }
button.danger:hover { background: var(--bad-soft); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions select { padding: 6px 8px; font-size: 13px; }
/* row menu (⋯) in the students table: one line per student, the actions in a pop-over */
button.menu-btn { width: 32px; height: 32px; min-height: 32px; font-size: 16px; }
button.menu-btn.active { background: var(--surface-2); border-color: var(--accent); }
.menu-pop { position: absolute; z-index: 50; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18); display: grid; gap: 2px; }
.menu-item, .menu-pop button.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; justify-content: flex-start; min-height: 40px; }
.menu-item:hover, .menu-pop button.menu-item:hover { background: var(--surface-2); }
.menu-pop button.menu-item.danger { color: var(--bad); }
.menu-pop select { padding: 4px 8px; font-size: 13px; }
.cred td:nth-child(2), .cred td:nth-child(3) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pw-banner { border: 2px solid var(--accent); }
.slips { display: none; }
@media (max-width: 820px) { .classes-grid { grid-template-columns: minmax(0, 1fr); } }
@media print {
  body.print-slips > *:not(.slips) { display: none !important; }
  body.print-slips .slips { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; padding: 10mm; }
  .slip { border: 1px dashed #888; border-radius: 4mm; padding: 6mm 8mm; break-inside: avoid; font: 12pt/1.6 "Manrope", sans-serif; }
  .slip b { font-size: 14pt; }
  .slip code { font: 14pt ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; }
  .slip .small { font-size: 9.5pt; color: #555; }
}

/* Automatic pronunciation check (Azure Speech) inside the Pronunciation criterion */
.pron-check { background: var(--panel, #f0f9ff); border: 1px solid var(--line, #bae6fd); border-radius: 12px; padding: 10px 12px; margin: 6px 0 10px; }
.pron-scores { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.pron-score .num { font-size: 1.5rem; font-weight: 700; color: var(--accent, #0ea5e9); line-height: 1.1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* (the generic chip look is defined once above; the report's highlight chips add their own colours) */

main.narrow { max-width: 760px; }
main.narrow h2 { font-size: 1.05rem; margin: 18px 0 6px; }
main.narrow hr { border: 0; border-top: 1px solid var(--line, #dce8f5); margin: 24px 0; }

/* teacher: account page rows */
.field-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); }
.field-row .field-main { flex: 1; min-width: 220px; }
.field-row .field-value { font-size: 17px; margin: 2px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-form input { max-width: 320px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* guided tour (public/tour.js): dimmed page, spotlight on the target, bubble with an arrow */
.tour-block { position: fixed; inset: 0; z-index: 999; }
.tour-spot {
  position: fixed; z-index: 1000; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55), 0 0 0 3px var(--accent), 0 0 0 7px rgba(14, 165, 233, 0.25);
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour-bubble {
  position: fixed; z-index: 1001; width: min(360px, calc(100vw - 24px)); padding: 16px 18px 14px;
  background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  transition: left 0.25s ease, top 0.25s ease;
}
.tour-bubble .arrow { position: absolute; width: 16px; height: 16px; background: var(--surface); transform: rotate(45deg); }
.tour-bubble[data-place="bottom"] .arrow { top: -8px; }
.tour-bubble[data-place="top"] .arrow { bottom: -8px; }
.tour-bubble[data-place="right"] .arrow { left: -8px; }
.tour-bubble[data-place="left"] .arrow { right: -8px; }
.tour-step { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-dk); }
.tour-title { font-size: 17px; font-weight: 800; margin: 4px 0 6px; }
.tour-text { font-size: 14px; color: var(--muted); line-height: 1.55; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; }
.tour-actions button[disabled] { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-bubble { transition: none; } }

/* teacher: assignments */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid label { margin-top: 8px; }
.form-grid select, .form-grid input { width: 100%; }
.form-grid .switch input { width: 18px; } /* a tick box inside the grid keeps its size (the paper option on the essay form) */
.classes-pick { border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 12px 10px; margin: 12px 0 0; display: flex; gap: 14px; flex-wrap: wrap; }
.classes-pick legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.students-pick { border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 12px 10px; margin: 12px 0 0; }
.students-pick legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.students-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto; padding: 4px 2px; }
.students-list .cls-head { grid-column: 1 / -1; font-weight: 700; font-size: 13px; margin-top: 6px; }
.students-list label.switch { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.assignment.closed { opacity: 0.65; }
.assignment h3 a { color: var(--text); text-decoration: none; }
.assignment h3 a:hover { color: var(--accent-dk); }
.progress { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.progress .bar { flex: 1; }
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr; } }

/* review in class (projector): bigger type, sticky toolbar, one question per screen */
body.review { font-size: 17px; }
body.review main { max-width: 1120px; }
.rv-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-bar .rv-title { flex: 1; min-width: 200px; font-size: 15px; }
.rv-nav { display: flex; align-items: center; gap: 8px; position: sticky; top: 8px; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 14px; }
.rv-tabs { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.rv-tabs button { background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; padding: 7px 12px; }
.rv-tabs button.active { background: var(--accent); color: #fff; }
.rv-q { font-size: clamp(22px, 2.6vw, 30px); margin: 4px 0 8px; }
.rv-prompts { margin: 0; padding-left: 22px; font-size: 18px; line-height: 1.7; }
.rv-focus { font-size: 18px; margin: 14px 0 0; padding: 10px 14px; background: var(--yellow); color: var(--yellow-ink); border-radius: 10px; }
.band-tile.weak { outline: 2px solid var(--warn); }
.dist { display: flex; align-items: flex-end; gap: 10px; margin-top: 16px; text-align: center; }
.dist.small-dist { margin: 0 0 0 10px; gap: 6px; }
.dist-bar { width: 34px; margin: 0 auto 4px; background: var(--accent); border-radius: 6px 6px 2px 2px; }
.small-dist .dist-bar { width: 22px; }
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.sample { margin: 0; border-top: 4px solid var(--border-2); }
.sample.best { border-top-color: var(--good); }
.sample.work { border-top-color: var(--warn); }
.sample .transcript { font-size: 17px; margin-top: 10px; }
.sample details { margin-top: 8px; }
.sample details summary, .rv-sum { cursor: pointer; color: var(--accent-dk); font-weight: 600; font-size: 14px; }
.rv-list { padding-left: 22px; margin: 0; }
.rv-list li { margin-bottom: 10px; }
.chip.big { font-size: 16px; padding: 6px 14px; }
@media print { .rv-screen[hidden] { display: block !important; } .rv-screen { break-before: page; } }

/* admin back office */
.admin-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.admin-tiles .band-tile { text-align: left; padding: 12px 14px; }
.admin-tiles .num { font-size: 28px; }
.band-tile.warn-tile { outline: 2px solid var(--warn); }
.admin-activity { gap: 6px; margin-top: 8px; }
.admin-activity .dist-bar { width: 100%; max-width: 40px; }
.admin-activity .dist-col { flex: 1; }
.seg-link { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; text-decoration: none; min-width: max-content; }
.seg-link:hover { background: var(--surface-2); color: var(--text); }
.info-list { display: grid; gap: 6px; }
.info-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
tr.dim { opacity: 0.55; }
section[id] { scroll-margin-top: 70px; }

/* question bank (teacher) */
.set-card h3 { margin: 0 0 6px; }
.set-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin-top: 12px; font-size: 14px; }
.set-parts .eyebrow { margin-bottom: 2px; }
.set-list { margin-top: 10px; }
.set-list ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.set-part { background: var(--surface-2); border-radius: 12px; padding: 12px 14px 14px; }
.set-part label { display: block; margin-top: 8px; }
.set-part input, .set-part textarea { width: 100%; }
.set-part textarea { min-height: 150px; font-size: 14px; line-height: 1.5; }
.set-part .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
@media (max-width: 820px) { .set-parts, .set-grid { grid-template-columns: 1fr; } }

/* join by QR (teacher classes tab, /join and /poster) */
.join-grid { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px; align-items: center; }
.join-grid .qr { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.join-grid .qr svg { width: 150px; height: 150px; display: block; }
.join-link code { display: block; font-size: 13.5px; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.join-title { font-size: 28px; margin: 10px 0 4px; }
.auth.join input#classNumber { font-size: 22px; font-weight: 700; letter-spacing: 0.08em; }
@media (max-width: 820px) { .join-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; } .join-grid .row { justify-content: center; } }
.poster-body { background: #fff; }
.poster { max-width: 960px; margin: 0 auto; padding: 32px 24px 48px; text-align: center; }
.poster-head { display: flex; justify-content: center; align-items: baseline; gap: 14px; font-size: 22px; }
.poster-head .brand-lg { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.poster h1 { font-size: clamp(36px, 6vw, 64px); margin: 12px 0 20px; letter-spacing: -0.02em; }
.poster .accent { color: var(--accent-dk); }
.poster-grid { display: grid; grid-template-columns: minmax(260px, 420px) minmax(260px, 1fr); gap: 36px; align-items: center; justify-content: center; text-align: left; }
.poster-qr { background: #fff; border: 2px solid var(--border-2); border-radius: 18px; padding: 16px; }
.poster-qr svg { width: 100%; height: auto; display: block; }
.poster-steps { font-size: clamp(18px, 2.4vw, 26px); line-height: 1.45; padding-left: 28px; margin: 0; }
.poster-steps li { margin: 0 0 16px; }
.poster-link { margin-top: 28px; }
.poster-link .url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(16px, 2.4vw, 26px); font-weight: 700; word-break: break-all; background: var(--surface-2); display: inline-block; padding: 10px 18px; border-radius: 12px; }
.poster-foot { margin-top: 18px; }
@media (max-width: 760px) { .poster-grid { grid-template-columns: 1fr; text-align: center; } .poster-steps { text-align: left; } }
@media print { .poster-body .top, .no-print { display: none !important; } .poster { padding: 0; } }
.join-card.closed .qr { opacity: 0.35; }
tr.reserved td { background: var(--warn-soft, #fff7ed); }
.section-pick { margin: 4px 0 10px; }
input.invalid { border-color: var(--bad, #dc2626); outline: 2px solid var(--bad-soft, #fee2e2); }
.section-pick button { font-size: 16px; font-weight: 700; }
.sections-chips .chip { margin-right: 4px; }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.avatars button { font-size: 22px; line-height: 1; padding: 6px 8px; background: var(--surface-2); border-color: transparent; border-radius: 12px; }
.avatars button.active { background: var(--accent); outline: 2px solid var(--accent); }

/* highlighted expressions in model answers and better words (public/highlight.js) */
:root { --hl-collocation: #dcfce7; --hl-collocation-ink: #166534; --hl-phrasal: #ffedd5; --hl-phrasal-ink: #9a3412; --hl-idiom: #fce7f3; --hl-idiom-ink: #9d174d; --hl-linker: #dbeafe; --hl-linker-ink: #1e40af; --hl-opinion: #ede9fe; --hl-opinion-ink: #5b21b6; }
mark.hl { font-weight: 800; padding: 1px 4px; border-radius: 5px; cursor: pointer; border-bottom: 2px solid currentColor; color: var(--text); }
mark.hl:focus-visible { outline: 2px solid var(--accent); }
.hl-collocation, mark.hl-collocation { background: var(--hl-collocation); color: var(--hl-collocation-ink); }
.hl-phrasal, mark.hl-phrasal { background: var(--hl-phrasal); color: var(--hl-phrasal-ink); }
.hl-idiom, mark.hl-idiom { background: var(--hl-idiom); color: var(--hl-idiom-ink); }
.hl-linker, mark.hl-linker { background: var(--hl-linker); color: var(--hl-linker-ink); }
.hl-opinion, mark.hl-opinion { background: var(--hl-opinion); color: var(--hl-opinion-ink); }
ins[class^="hl-"] { text-decoration: none; font-weight: 800; padding: 1px 5px; border-radius: 5px; }
.chip[class*="hl-"] { border-color: transparent; font-weight: 600; }
.chip.tiny { font-size: 11px; padding: 1px 7px; vertical-align: middle; }
.hl-pop { display: inline-block; margin: 0 4px; padding: 3px 9px; border-radius: 8px; font-size: 13px; font-weight: 500; vertical-align: middle; box-shadow: 0 2px 8px rgba(2, 44, 85, 0.12); }
.hl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; }
.hl-legend .lg-group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.hl-chips { margin-top: 10px; display: grid; gap: 6px; }
.hl-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hl-group .chip { white-space: normal; }
.model.big { font-size: 20px; line-height: 1.6; }
@media print { mark.hl { border-bottom-width: 1px; } .hl-pop { display: none; } }
.confirm-join { margin-top: 12px; padding: 14px 16px; border: 2px solid var(--accent); border-radius: 14px; background: var(--surface-2); }
.confirm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.confirm-row span { color: var(--muted); font-size: 14px; }
.confirm-row b.big { font-size: 26px; letter-spacing: 0.06em; color: var(--accent-dk); }

/* lesson checklist (teacher) */
.checklist-wrap { position: fixed; inset: 0; z-index: 60; }
.checklist-back { position: absolute; inset: 0; background: rgba(2, 44, 85, 0.35); }
.checklist { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); margin: 0; border-radius: 0; overflow: auto; padding: 20px 22px 28px; box-shadow: -8px 0 30px rgba(2, 44, 85, 0.2); }
.cl-sec { margin-top: 14px; }
.cl-sec h3 { margin: 0 0 6px; font-size: 16px; }
.cl-stage > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); min-height: 44px; }
.cl-stage > summary::-webkit-details-marker { display: none; }
.cl-stage > summary h3 { margin: 0; }
.cl-stage > summary h3::before { content: "▸ "; color: var(--muted); }
.cl-stage[open] > summary h3::before { content: "▾ "; }
.cl-stage[open] > summary { margin-bottom: 4px; }
.cl-item { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; margin: 0; font-size: 15px; color: var(--text); line-height: 1.4; min-height: 44px; }
.cl-item:hover { background: var(--surface-2); }
.cl-item label { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.cl-item input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--good); }
.cl-item.done label span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-2); font-weight: 500; }
.cl-item a { font-weight: 700; white-space: nowrap; font-size: 13px; }
.cl-howbtn { padding: 4px 10px; font-size: 12.5px; min-height: 30px; }
.cl-howbtn.active { background: var(--surface-2); }
.cl-how { margin: 0 0 8px 42px; padding: 10px 14px 10px 32px; background: var(--surface-2); border-radius: 10px; font-size: 14px; line-height: 1.55; color: var(--text); }
.cl-how li { margin: 4px 0; }
.cl-how b, .cl-trouble b { font-weight: 800; }
@media (max-width: 720px) { .cl-how { margin-left: 0; } }
.cl-trouble { margin: 8px 0 0; font-size: 14px; }
.cl-trouble dt { font-weight: 700; margin-top: 8px; }
.cl-trouble dd { margin: 2px 0 0; color: var(--muted); }
/* "How do I…?": a docked side panel on laptops and iPads (the page shrinks beside it), a bottom
   sheet with a one-line "next step" bar on phones. */
.guide-wrap.docked .guide { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; margin: 0; border-radius: 0; overflow: auto; padding: 18px 20px 28px; box-shadow: -8px 0 30px rgba(2, 44, 85, 0.12); z-index: 45; border-left: 1px solid var(--line); }
.guide-wrap.docked .guide-barrow, .guide-wrap.docked .phone-only { display: none; }
body.guide-docked main { margin-right: 420px; }
body.guide-docked .tabbar { right: 400px; }
.guide-wrap.sheet .guide { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); max-height: 68vh; margin: 0; border-radius: 16px 16px 0 0; overflow: auto; padding: 0 16px 20px; box-shadow: 0 -8px 30px rgba(2, 44, 85, 0.18); z-index: 45; border-top: 1px solid var(--line); }
.guide-wrap.sheet .guide-barrow { display: none; }
.guide-wrap.sheet.min .guide { max-height: none; overflow: hidden; padding: 0 10px; }
.guide-wrap.sheet.min .guide-body { display: none; }
.guide-wrap.sheet.min .guide-barrow { display: flex; align-items: center; gap: 6px; min-height: 56px; }
.guide-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: inherit; text-align: left; background: transparent; border: 0; padding: 6px 4px; cursor: pointer; }
.guide-bar .gb-t { font-weight: 800; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.guide-bar .gb-s { font-size: 13px; color: var(--accent-dk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gb-tick { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--good); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
@media (min-width: 900px) { .guide-wrap .phone-only { display: none; } }
@media (max-width: 1320px) { body.guide-docked main { margin-left: 16px; } }
/* "How do I…?": quick asks, guide titles and the steps as a tickable list */
.chip-btn { font: inherit; font-size: 13px; font-weight: 700; color: var(--accent-dk); background: var(--sky-soft, #e8f3fc); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip-btn:hover { filter: brightness(0.97); }
.guide .cl-item .rcp-title, .checklist .cl-item .rcp-title { flex: 1; min-width: 0; display: block; text-align: left; white-space: normal; font: inherit; font-size: 15px; font-weight: 700; color: var(--text); background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 0; cursor: pointer; line-height: 1.4; }
.guide .cl-item, .checklist .cl-item { justify-content: flex-start; }
.rcp .cl-item { min-height: 40px; }
.rcp-steps { list-style: none; padding-left: 14px; }
.rcp-steps li { margin: 6px 0; }
.rcp-steps label { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.rcp-steps input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--good); }
.rcp-steps li.done span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-2); }
@media print { .checklist-wrap { position: static; } .checklist-back { display: none; } .checklist { position: static; width: auto; box-shadow: none; } }
/* A skill page's tabs (the three buttons beside them moved up into the class bar). */
.tabs-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 14px; position: sticky; top: 8px; z-index: 5; }
.tabs-row .seg { flex: 0 1 auto; width: max-content; max-width: 100%; min-width: 0; margin: 0; position: static; }
.classbar .grow { flex: 1; }
/* The breadcrumb on a child page: the parent link sits above the class bar and the tabs, dashed
   so it reads as "up a level" and never as one of the tabs. */
.crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.crumb .up { display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--border-2); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px 6px 10px; font: inherit; font-weight: 800; cursor: pointer; min-height: 0; }
.crumb .up:hover { border-style: solid; border-color: var(--accent); color: var(--accent-dk); }
.crumb .up .ch { font-size: 16px; line-height: 1; color: var(--accent-dk); }
.crumb .here { font-weight: 800; color: var(--text); }
/* The four doors on the home page: compact pills in the class bar, coloured by skill, one row
   of chrome above the board. */
.doors { display: flex; gap: 6px; align-items: center; margin-left: 6px; }
.door { display: inline-flex; align-items: center; gap: 7px; background: var(--sk-soft); border: 1.5px solid transparent; border-radius: 999px; padding: 7px 14px 7px 10px; cursor: pointer; color: var(--text); font: inherit; font-weight: 800; font-size: 14px; min-height: 0; box-shadow: inset 4px 0 0 var(--sk); white-space: nowrap; }
.door:hover { border-color: var(--sk); }
.door .ic { font-size: 16px; line-height: 1; }
.door .n { line-height: 1; }
.menu-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding: 6px 10px 2px; }
.menu-item b { display: block; }
.menu-item .small { display: block; font-weight: 500; }
.pick-menu.right { left: auto; right: 0; }
@media (max-width: 1180px) { .doors { flex-basis: 100%; order: 5; margin-left: 0; } .classbar .grow { display: none; } }
.tabs-row #checklist-btn { flex: none; white-space: nowrap; }

/* Phone-first building blocks (teacher pages, student profile, student home): one number or one
   action per card, lists of one-line rows instead of tables on phones, a bottom tab bar. */
.classbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
/* The Students card's "Scores from" picker (a details with checkboxes) and sortable headings. */
.pick { position: relative; }
.pick summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--text); }
.pick summary::-webkit-details-marker { display: none; }
/* The teacher missed the tiny ▾: the caret is a small round button on its own, and the whole
   summary reads as a control (border, light fill, darker when open). */
.pick summary { background: var(--surface-2); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
.pick summary:hover { border-color: var(--accent); }
.pick[open] > summary { border-color: var(--accent); background: var(--accent-soft, #e0f2fe); }
.pick summary .caret { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; line-height: 1; margin-left: 2px; }
.pick[open] > summary .caret { transform: rotate(180deg); }
.pick[open] summary { border-color: var(--accent); color: var(--accent-dk); }
.pick-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 8; min-width: 260px; max-width: min(92vw, 420px); max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(15, 23, 42, 0.15)); display: flex; flex-direction: column; gap: 6px; }
.pick-menu label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pick-menu label input { margin: 0; width: auto; flex: none; }
.pick-menu label .small { font-weight: 500; }
.pick-menu .menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font: inherit; font-size: 14px; color: var(--text); background: transparent; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; text-decoration: none; min-height: 0; white-space: normal; }
.pick-menu .menu-item:hover { background: var(--surface-2); }
.pick-menu .menu-item b { font-weight: 800; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--accent-dk); }
th.sortable.on { color: var(--accent-dk); }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--accent); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 15px; min-height: 40px; }
.pill select { border: 0; background: transparent; font: inherit; font-weight: 800; padding: 0 2px; color: var(--text); max-width: 48vw; cursor: pointer; }
/* The lesson switch: closed (grey) or open (green) to the students of the class picked beside it. */
.pill.lock { position: relative; cursor: pointer; border-color: var(--line-2); color: var(--muted); font-size: 14px; gap: 8px; }
.pill.lock.on { border-color: #16a34a; color: #166534; background: #f0fdf4; }
.pill.lock .lk { font-weight: 800; color: var(--text); }
/* Shared on/off slider (the Students switch, Self-practice): its position is the state, flipping it is the action. */
.slide { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.slide .tgl { position: absolute; opacity: 0; width: 0; height: 0; }
.slide .track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; flex: none; transition: background 0.2s; }
.slide .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: left 0.2s; }
.slide .tgl:checked + .track { background: #16a34a; }
.slide .tgl:checked + .track::after { left: 19px; }
.slide .tgl:indeterminate + .track { background: #f59e0b; }
.slide .tgl:indeterminate + .track::after { left: 11px; }
.slide .tgl:disabled + .track { opacity: 0.5; }
.slide .tgl:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
/* "What students can do now": the chain of three, each row its own state, then the result. */
.chain { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.chain .link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #f5f8fc; }
.chain .link.on { background: #f0fdf4; }
.chain .link.dim { opacity: 0.55; }
.chain .n { width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; }
.chain .cnt { min-width: 38px; text-align: center; font-weight: 800; font-size: 17px; flex: none; }
.chain .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.chain .t .s { font-size: 13px; color: var(--muted); font-weight: 500; }
.result { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #eef4fb; font-weight: 700; color: var(--text); }
.lesson-sheet { margin: -4px 0 12px; }
.lesson-note { margin: -4px 0 12px; color: var(--text-2); }
.lesson-note.ok { color: #166534; }
.lesson-note button { margin-left: 4px; }
.lesson-def { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.lesson-def ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.5; }
@media (max-width: 720px) { .lesson-def { grid-template-columns: 1fr; } .pill.lock { font-size: 13px; padding: 4px 10px; } }
.pill select:focus { outline: 0; }
.search { flex: 1; min-width: 150px; max-width: 360px; }
.search input { padding: 8px 14px; border-radius: 999px; min-height: 40px; }
.icobtn, button.icobtn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font-size: 17px; flex: none; }
button.q { display: inline-flex; width: 22px; height: 22px; min-height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--border-2); background: var(--surface); align-items: center; justify-content: center; font-size: 12px; color: var(--muted); font-weight: 800; vertical-align: middle; cursor: pointer; }
.tip-pop { position: absolute; z-index: 70; width: min(300px, calc(100vw - 32px)); padding: 10px 12px; background: var(--dark); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.5; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25); }
.hero-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.ch { font-weight: 800; font-size: 16px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ch a { font-size: 13px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile4 { background: var(--surface-2); border-radius: 12px; padding: 10px 4px; text-align: center; }
.tile4 .n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.tile4 .l { font-size: 11px; color: var(--muted); font-weight: 700; }
.tile4 .d { font-size: 11px; font-weight: 700; min-height: 14px; }
.rows { display: block; }
.rowi { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); min-height: 48px; color: inherit; text-decoration: none; width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; font: inherit; text-align: left; }
.rows > .rowi:first-child { border-top: 0; }
a.rowi:hover, button.rowi:hover { background: var(--surface-2); }
.rowi .t { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowi .s { font-size: 12.5px; color: var(--muted); font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowi .v { font-weight: 800; font-size: 17px; min-width: 32px; text-align: right; }
.rowi .chev { color: var(--faint); font-size: 18px; }
.rowi .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.up { color: #166534; font-weight: 800; } .dn { color: #991b1b; font-weight: 800; } .eq { color: var(--muted); font-weight: 800; }
.spark { vertical-align: middle; flex: none; }
.ring { width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--accent) 0 var(--p, 0%), var(--border) var(--p, 0%) 100%); display: flex; align-items: center; justify-content: center; flex: none; }
.ring i { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 12.5px; }
.btns { display: flex; gap: 8px; margin-top: 10px; }
.btns > * { flex: 1; padding: 11px 10px; font-size: 14px; }
.segm { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin: 0 0 12px; }
.segm button { flex: 1; background: transparent; border-color: transparent; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px 4px; border-radius: 9px; }
.segm button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.month { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 0 4px; }
.card.hero-card { border: 2px solid var(--accent); background: linear-gradient(135deg, #e3f1fd, #ffffff 70%); }
.card.list-card { padding: 4px 16px; }
.hero-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hero-top .chip { margin-bottom: 8px; }
.fab { position: fixed; right: 16px; bottom: 90px; z-index: 30; border-radius: 999px; padding: 14px 18px; box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); font-size: 15px; }
.fab.second { right: auto; left: 16px; }
.tabbar { display: none; }
.phone-only { display: none !important; }
.menu-more { display: none; }
.menu-more.open { display: flex; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 30px; flex: none; }
.focus-row label { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; font-weight: 700; color: var(--text); margin: 0; cursor: pointer; }
.focus-row label:first-of-type { border-top: 0; }
.focus-row input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.focus-row .done { text-decoration: line-through; color: var(--muted); }
.stu-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stu-grid > * { min-width: 0; }
.wide-trend { width: 100%; height: auto; display: block; }
.note-box textarea { min-height: 72px; font-size: 14px; }
@media (max-width: 820px) { .stu-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .desk-only { display: none !important; }
  .phone-only { display: block !important; }
  main { padding-bottom: 100px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); display: flex; padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 700; background: transparent; border: 0; padding: 4px 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; }
  .tabbar b { font-size: 22px; font-weight: 400; line-height: 1.2; }
  .tabbar .active { color: var(--accent-dk); }
  .tabbar .homebtn { color: var(--text); border-right: 1px solid var(--border); border-radius: 0; margin-right: 4px; flex: 0 0 60px; }
  .tabbar .homebtn b { background: var(--surface-2); border-radius: 8px; padding: 0 6px; }
  .tabs-row { display: none; }
  .crumb { margin-bottom: 8px; }
  /* slim doors on a phone: four pills in a row (the bottom bar has the same four) */
  .doors { flex-basis: 100%; order: 5; margin-left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .door { padding: 7px 6px; justify-content: center; font-size: 12.5px; box-shadow: none; border-color: var(--sk); }
  .door .ic { font-size: 15px; }
  h1 { font-size: 22px; }
  .card { padding: 14px 16px; border-radius: 16px; }
  th, td { padding: 8px 6px; }
  .hero-num { font-size: 40px; }
  .tile-blurb { display: none; }
  .btns > * { font-size: 15px; min-height: 44px; }
  button, .btn { min-height: 40px; }
  button.small, .btn.small { min-height: 36px; }
  .row.between > .row:last-child { width: 100%; }
}
@media (max-width: 720px) {
  /* the main "＋ New" button floats above the tab bar on phones */
  .fab-phone { position: fixed; right: 16px; bottom: 90px; z-index: 30; border-radius: 999px; padding: 14px 18px; box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); font-size: 15px; }
  .fab-phone.second { right: auto; left: 16px; }
  details[data-month] > summary::-webkit-details-marker { display: none; }
}
details[data-month] > summary::-webkit-details-marker { display: none; }
details[data-month] > summary { list-style: none; }
details[data-month][open] > summary .chev { transform: rotate(90deg); display: inline-block; }
/* student home: on phones the bottom bar shows one part at a time */
.cta.wide { width: 100%; font-size: 16px; padding: 13px 20px; }
#me .rows summary::-webkit-details-marker { display: none; }
@media (max-width: 720px) {
  main.home[data-view="home"] .v-tests:not(.v-home), main.home[data-view="home"] .v-me { display: none !important; }
  main.home[data-view="tests"] > :not(.v-tests):not(.pw-banner) { display: none !important; }
  main.home[data-view="me"] > :not(.v-me):not(.pw-banner) { display: none !important; }
  main.home[data-view="tests"] #history { margin-top: 0; }
  main.home[data-view="me"] #me { margin-top: 0; padding-top: 0; border-top: 0; }
}
@media (min-width: 721px) { main.home #me .card.row { display: none; } }
@media (min-width: 721px) {
  .btns > * { flex: 0 1 auto; min-width: 150px; }
  .assign-done .rows { max-height: 260px; overflow: auto; }
}
@media (max-width: 720px) { .fab-phone:disabled { display: none; } }

/* Skill drills: flag chips (red = act now, amber = look, grey = note), the per-topic hit dots in
   the monitor and on the student page, the drill card on the student home. */
.flag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.flag.red { background: #fee2e2; color: #991b1b; }
.flag.amber { background: #fef3c7; color: #92400e; }
.flag.green { background: var(--good-soft); color: #166534; }
.flag.grey, .flag.none { background: var(--surface-2); color: var(--muted); }
.hd { display: inline-flex; gap: 3px; align-items: center; flex: none; }
.hd i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); display: inline-block; }
.hd i.hit { background: #16a34a; }
.hd i.tried { background: #f59e0b; }
.hd i.current { background: var(--accent); box-shadow: 0 0 0 2px #e3f1fd; }
.mon-row.open { background: var(--surface-2); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 10px; }
/* a drill card is told apart by its DRILL tag, not by a different border: the border says the state */
.card.topics-pick { padding: 10px 14px; margin: 8px 0 0; background: var(--surface-2); border: 0; box-shadow: none; }
.card.topics-pick label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0; color: var(--text); cursor: pointer; }
.card.topics-pick input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.phr-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 10px 4px 0; }
/* A group's caption: a plain caption, or (yes/no openers) a speech bubble with a clear outline and a tail, "Yes +" / "No +" / "?" (the teacher, 2026-10-13). */
.phr-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.phr-label.bubble { position: relative; display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; line-height: 1.15; color: #075985; background: #fff; border: 2px solid #0ea5e9; border-radius: 12px; padding: 4px 11px; margin: 2px 2px 9px 0; white-space: nowrap; }
.phr-label.bubble::before { content: ""; position: absolute; left: 12px; bottom: -8px; width: 10px; height: 10px; background: #fff; border-right: 2px solid #0ea5e9; border-bottom: 2px solid #0ea5e9; transform: rotate(45deg); }
.phr-label.bubble.q { font-size: 17px; padding: 1px 11px 2px; color: #0369a1; }
.phr-label-plus { font-weight: 900; font-size: 19px; line-height: 1; color: #0ea5e9; margin: 0 7px 6px 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* "Student view": the student home in a frame inside the companion shell (teacher-preview.js). */
.guide.preview { display: flex; flex-direction: column; }
.guide-wrap.docked .guide.preview { padding: 14px 16px 12px; overflow: hidden; }
.guide-wrap.sheet .guide.preview { height: 72vh; padding-top: 10px; }
.guide-wrap.sheet.min .guide.preview { height: auto; }
.guide.preview .guide-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pv-head select { max-width: 100%; font-weight: 700; margin-top: 2px; }
.pv-status { margin: 6px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-frame { flex: 1; min-height: 240px; width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
/* Inside the frame: a one-line hint when the teacher taps something only a student can use. */
.pv-hint { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s; z-index: 60; white-space: nowrap; }
.pv-hint.show { opacity: 0.94; transform: translate(-50%, 0); }
/* The assignment form's Parts picker: tick any combination; Full/Short appears when all three are ticked. */
.parts-pick { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 4px 0; }
.parts-pick .lbl { margin-right: 2px; }
.parts-pick label.switch { margin: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.parts-pick #length-pick { flex-wrap: wrap; }
/* "Who needs help with" chips on the Students card and the per-student problem icons. */
.chip-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ptags { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ptags .chip.tiny { padding: 1px 5px; background: var(--warn-soft); }
/* Question bank shelves (grouped by topic area, difficulty or author). */
.bank-group { margin: 16px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
/* Focus now: the tappable tag under a student's name, and the Who-needs-what rows on an assignment. */
.chip-btn.tiny { font-size: 11px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.ftag { white-space: nowrap; }
.need-row { padding: 10px 0; border-top: 1px solid var(--line); }
.need-row:first-of-type { border-top: 0; }

/* Answer sheets (teacher-sheets.js): the key as rows, in the shelf card and the editor's preview. */
.keylist .krow { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.keylist .krow:last-child { border-bottom: 0; }
.keylist .kn { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.keylist .kv { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.keylist .kt { font-size: 12px; white-space: nowrap; }
/* Admin: the skills open to a class or a teacher, four ticks in one cell (L R W S). */
.skills-cell { display: inline-flex; gap: 8px; white-space: nowrap; flex: 0 0 auto; }
.skills-cell label { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; cursor: pointer; margin: 0; flex: 0 0 auto; }
.skills-cell input { margin: 0; width: auto; flex: 0 0 auto; }

/* ✂️ Trim the picture (the Essay tasks paper import): the PDF page in a dialog, a dashed box dragged over the chart. */
dialog.etask-trim { border: 0; border-radius: 16px; padding: 16px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
dialog.etask-trim::backdrop { background: rgba(15, 23, 42, .4); }
.etask-chart .chart { margin: 0; font-size: 7px; }
.etask-chart .chart-title { font-size: 8px; }

/* Question bank (2026-10-15): the ⋯ menu on a card, a paper's two questions, the give strip */
.bmenu { position: relative; }
.bmenu > summary { list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 999px; border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--surface); }
.bmenu > summary::-webkit-details-marker { display: none; }
.bmenu > .bmenu-list { position: absolute; right: 0; top: 40px; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14); min-width: 230px; padding: 6px; display: grid; gap: 2px; }
.bmenu-list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; min-height: 0; }
.bmenu-list button:hover { background: var(--surface-2); }
.bmenu-list button.danger { color: #b91c1c; }
.bmenu-list button:disabled { opacity: 0.5; cursor: not-allowed; }
.bmenu-list .linkbtn { display: inline; width: auto; padding: 0; font-weight: 700; color: var(--accent-dk); text-decoration: underline; }
.ptasks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ptask { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45; }
.ptask b { display: block; margin-bottom: 2px; }
.give { border: 1px dashed #7c3aed; background: #faf5ff; border-radius: 12px; padding: 10px 14px; margin-top: 12px; }
.give label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.give input, .give select { font-weight: 500; }
@media (max-width: 720px) { .ptasks { grid-template-columns: 1fr; } .give input { min-width: 0 !important; width: 100%; } }
/* What next on a fresh assignment's detail (2026-10-15) */
.wnext { border: 1px dashed var(--accent); background: #f0f7ff; border-radius: 12px; padding: 10px 14px; margin: 10px 0 6px; font-size: 14px; }
.wnext > b { color: var(--accent-dk); }
.wnext ol { margin: 6px 0 0 18px; padding: 0; }
.wnext li { margin: 2px 0; }

/* 📤 Upload scanned essays (teacher-essay-pages.js): the batch as a table, a cell per task, the pages as thumbnails. */
.ep .ep-cell { min-height: 58px; min-width: 110px; display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; }
.ep .ep-cell.over { background: var(--surface-2); border-color: var(--accent); border-style: solid; }
.ep .ep-unsorted { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); }
.ep .ep-unsorted .ep-cell { margin-top: 6px; }
.ep-pg { position: relative; flex: none; width: 44px; height: 60px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #f8fafc; cursor: pointer; }
.ep-pg::before { content: "📄"; position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; font-size: 18px; } /* shows through when the thumbnail is missing */
.ep-pg img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.ep-pg .n { position: absolute; left: 0; bottom: 0; font-size: 10px; font-weight: 800; line-height: 1.3; padding: 0 4px; background: rgba(15, 23, 42, .75); color: #fff; border-radius: 0 4px 0 0; }
.ep-pg .u { position: absolute; right: 0; top: 0; font-size: 10px; font-weight: 800; line-height: 1.3; padding: 0 3px; background: var(--warn-soft); color: var(--warn); border-radius: 0 0 0 4px; }
.ep-pg .qm { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 900; line-height: 1.2; padding: 0 4px; background: #f59e0b; color: #fff; border-radius: 0 0 4px 0; }
.ep-pg.q { outline: 2px solid #f59e0b; }
.ep-pg.dragging { opacity: .4; }
.ep .ep-table td { vertical-align: top; }
.ep .warn-text { color: var(--warn); font-weight: 700; }
dialog.ep-dlg { border: 0; border-radius: 16px; padding: 16px; width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
dialog.ep-dlg::backdrop { background: rgba(15, 23, 42, .4); }
.ep-dlg .ep-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ep-dlg .ep-body img { width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.ep-dlg textarea { width: 100%; min-height: 360px; font: inherit; font-size: 14px; line-height: 1.5; padding: 8px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
@media (max-width: 720px) { .ep-dlg .ep-body { grid-template-columns: 1fr; } }

/* The teacher’s silent message box (nudge-box.js): on the monitor, the assignment pages and ▶ Flow. */
dialog.nudgebox { border: 0; border-radius: 16px; padding: 16px; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); color: var(--text, #0f172a); }
dialog.nudgebox::backdrop { background: rgba(15, 23, 42, .4); }
.nb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.nb-head b { min-width: 0; }
.nb-head #nb-close { min-height: 0; padding: 4px 10px; flex: 0 0 auto; }
.nb-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.nb-presets button { min-height: 0; max-width: 100%; white-space: normal; line-height: 1.3; border: 1px solid var(--border-2, #cbd5e1); background: var(--surface, #fff); color: inherit; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.nb-presets button:hover { background: #eff6ff; border-color: #93c5fd; }
.nb-row { display: flex; gap: 8px; align-items: center; }
.nb-row input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border-2, #cbd5e1); border-radius: 10px; background: var(--surface, #fff); color: inherit; }
#nb-msg.ok { color: #166534; } #nb-msg.error { color: #b91c1c; }

/* Reading › Question bank (teacher-sheets.js, 2026-10-19): a passage card is two lines, its level a square tag
   on one scale (CEFR, teal from pale to dark); the Check view of an imported paper lists what to confirm. */
.chip.cefr { font-weight: 800; min-width: 46px; justify-content: center; flex: none; }
.chip.cefr[data-i="0"] { background: #ecfeff; color: #0e7490; }
.chip.cefr[data-i="1"] { background: #cffafe; color: #0e7490; }
.chip.cefr[data-i="2"] { background: #a5f3fc; color: #155e75; }
.chip.cefr[data-i="3"] { background: #5eead4; color: #134e4a; }
.chip.cefr[data-i="4"] { background: #14b8a6; color: #fff; }
.chip.cefr[data-i="5"] { background: #0f766e; color: #fff; }
.rb-card { padding: 12px 16px; }
.rb-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }
.rb-act { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.rb-l2 { margin-top: 4px; padding-left: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-levels .chip-btn.sug:not(.on) { box-shadow: inset 0 0 0 2px var(--accent); }
.ck-row { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 14px; line-height: 1.5; }
.ck-row.bad { background: #fef2f2; border-color: #fecaca; }
.ck-row.off { background: var(--surface-2); border-color: transparent; }
.ck-edit { display: grid; gap: 6px; }
.ck-edit textarea { width: 100%; }
.rb-paper > summary { cursor: pointer; }
.rb-para { margin: 6px 0; font-size: 14px; line-height: 1.55; }
.rb-q { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 14px; }
.rb-n { flex: none; min-width: 26px; font-weight: 800; color: var(--muted); }
.rb-qt { flex: 1; min-width: 0; }
.rb-ans { width: 150px; flex: none; padding: 4px 8px; min-height: 32px; }
.rb-ans.guess { background: #fef9c3; border-color: #facc15; }
.rb-list { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; margin: 6px 0; font-size: 14px; }
.tiny-btn { min-height: 0; padding: 0 7px; font-size: 12px; line-height: 1.7; border-radius: 999px; vertical-align: baseline; }
@media (max-width: 720px) { .rb-l2 { padding-left: 0; } .rb-q { flex-wrap: wrap; } .rb-ans { width: 100%; } }
