/* EduLink colours (from the logo): navy #00296c, blue #014caf / #006bda, sky #008bf4, violet #4b4bc3, orange #fe7b02 /
   #f85802, gold #feb503. A school's own colours replace --brand, --brand-2, --brand-deep and --accent on its pages. */
:root {
  --ink: #14203a;
  --muted: #56637a;
  --line: #d8e0ec;
  --soft: #f2f5fa;
  --bg: #edf1f8;
  --card: #ffffff;
  --brand: #00296c;
  --brand-2: #014caf;
  --brand-deep: #001d4f;
  --accent: #fe7b02;
  --orange-2: #f85802;
  --gold: #feb503;
  --sky: #008bf4;
  --violet: #4b4bc3;
  --good: #1e7d4f;
  --good-bg: #e6f4ec;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --grade-bg: #eef4ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 18px rgba(16, 32, 48, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 110px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand-2); }
code { background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.top { background: linear-gradient(135deg, var(--brand-deep, #001d4f), var(--brand-2)); color: #fff; padding: 0 0 64px; }
.topbar { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(0, 41, 108, .08); padding: 10px 0; }
.brand-logo { height: 56px; width: auto; display: block; }
.top-title { font-weight: 700; color: var(--brand); }
.top-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.logo { width: 52px; height: 52px; flex: none; }
.brand h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.01em; }
.brand p { margin: 2px 0 0; opacity: .85; }
.privacy { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .9rem; background: rgba(255,255,255,.1); padding: 8px 12px; border-radius: 999px; }
.privacy svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 0 0 18px; }
main.wrap { margin-top: -44px; position: relative; }
.card h2 { margin: 0 0 12px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; flex: none; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.card-head h2 { margin-bottom: 4px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* buttons and inputs */
.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: .9rem; padding: 7px 12px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: #b7c4cf; background: var(--soft); }
.btn.ghost { background: var(--soft); }
.btn.primary { background: linear-gradient(180deg, #ff9a2c, #fe7b02); border-color: #ef7200; color: #00296c; font-weight: 700; font-size: 1rem; padding: 11px 20px; }
.btn.primary:hover { background: #ff8a10; border-color: #e56d00; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.small { padding: 4px 9px; font-size: .85rem; }
button:focus-visible, input:focus-visible, select:focus-visible, label.btn:focus-within, .drop:focus-within { outline: 3px solid #8cc4f0; outline-offset: 2px; }
input[type=text], input[type=number], input[type=email], input[type=tel], input[type=password], input[type=search], select { font: inherit; color: inherit; border: 1px solid #c4cfd9; border-radius: 8px; padding: 6px 9px; background: #fff; min-width: 0; }
input[type=number] { width: 5.5em; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); }

/* file drop */
.drop { display: grid; justify-items: center; text-align: center; gap: 6px; border: 2px dashed #9fb3c4; border-radius: 12px; padding: 26px 16px; background: #f8fbfd; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: #eaf3fa; border-color: var(--brand-2); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop svg { width: 46px; height: 46px; }
.drop-text { font-size: 1.05rem; }
.drop-text strong { color: var(--brand-2); }
.drop-hint { color: var(--muted); font-size: .9rem; }
.file-info { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; background: var(--good-bg); border-radius: 10px; padding: 10px 14px; }
.file-info .name { font-weight: 600; word-break: break-all; }
.file-info .note { flex-basis: 100%; color: var(--warn); font-size: .9rem; }

/* scales */
.scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.scale { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfcfd; }
.scale-top { display: flex; gap: 8px; align-items: center; }
.scale-name { flex: 1; font-weight: 600; font-size: 1.05rem; }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: .92rem; }
.field > span { min-width: 7.5em; color: var(--muted); }
.field input[type=text] { flex: 1; min-width: 10em; }
.bands { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
.bands th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 6px 4px; }
.bands td { padding: 3px 6px; border-top: 1px solid #edf1f4; }
.bands input[type=text] { width: 5em; font-weight: 600; }
.bands input[type=number] { width: 5em; }
.bands .to { color: var(--muted); white-space: nowrap; }
.bands .x { width: 1%; }
.icon-btn { appearance: none; border: 0; background: none; color: var(--muted); font-size: 1.15rem; line-height: 1; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.icon-btn:hover { background: var(--bad-bg); color: var(--bad); }
.scale-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.msgs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.msgs li { font-size: .88rem; padding: 6px 10px; border-radius: 8px; }
.msgs .error { background: var(--bad-bg); color: var(--bad); }
.msgs .warn { background: var(--warn-bg); color: var(--warn); }

/* options */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; padding: 14px; background: var(--soft); border-radius: 12px; margin-bottom: 16px; }
.options fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.options legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.options p { margin: 6px 0 0; }
.radio, .check { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; cursor: pointer; }
.radio .muted { font-size: .85rem; }
#heading { width: 100%; max-width: 16em; }

/* sheets */
.sheets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sheet { min-width: 0; }
.sheet { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.sheet.off { background: #fafbfc; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sheet-head h3 { margin: 0; font-size: 1.15rem; word-break: break-word; }
.tag { font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--good-bg); border-color: #b9dfc9; color: var(--good); font-weight: 600; }
.tag.off { background: #f1f1f1; color: var(--muted); }
.tag.warn { background: var(--warn-bg); border-color: #f0d79b; color: var(--warn); }
.sheet-controls { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; align-items: center; }
.sheet-controls label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.subjects { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.subjects legend { font-size: .92rem; padding: 0; margin-bottom: 6px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 8px; font-size: .9rem; cursor: pointer; background: #fff; user-select: none; }
.chip:has(input:checked) { background: #eaf2ff; border-color: #9cc0dd; color: #00296c; font-weight: 600; }
.chip input { margin: 0; accent-color: var(--brand-2); }
.notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.notes li { font-size: .88rem; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.notes li.info { background: var(--soft); color: var(--muted); }

.dist { margin-top: 12px; overflow-x: auto; }
.dist table { border-collapse: collapse; font-size: .85rem; }
.dist th, .dist td { border: 1px solid var(--line); padding: 3px 8px; text-align: center; white-space: nowrap; }
.dist th { background: var(--soft); font-weight: 600; }
.dist td:first-child, .dist th:first-child { text-align: left; }
.dist .zero { color: #b3bcc5; }

details.preview { margin-top: 10px; }
details.preview summary { cursor: pointer; color: var(--brand-2); font-weight: 600; font-size: .92rem; }
.table-wrap { overflow: auto; max-height: 440px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }
.grid { border-collapse: collapse; font-size: .82rem; width: max-content; min-width: 100%; }
.grid th, .grid td { border: 1px solid #e3e8ed; padding: 3px 7px; white-space: nowrap; max-width: 18em; overflow: hidden; text-overflow: ellipsis; }
.grid thead th { position: sticky; top: 0; background: #e9eff4; z-index: 1; }
.grid .rn { background: var(--soft); color: #8895a1; text-align: right; position: sticky; left: 0; }
.grid .g { background: var(--grade-bg); font-weight: 700; color: #00296c; text-align: center; }
.grid thead .g { background: #cfe3f5; }
.grid td.n { text-align: right; }
.more { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }

/* export bar */
.export-bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(16,32,48,.08); padding: 10px 0; z-index: 10; backdrop-filter: blur(6px); }
.export-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.export-summary { font-size: .95rem; }
.export-summary .err { color: var(--bad); }

.status { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(92vw, 640px); background: #17212b; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .92rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.status.show { opacity: 1; }
.status.error { background: var(--bad); }

.foot { color: var(--muted); font-size: .85rem; padding: 18px 0 96px; text-align: center; }
.foot p { margin: 4px 0; }
.foot-brand img { height: 32px; width: auto; display: inline-block; vertical-align: middle; }
.stamp { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.stamp img { height: 42px; width: auto; display: block; }

/* aggregates, divisions and rules */
.results-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.results-box h4 { margin: 14px 0 2px; font-size: .95rem; }
.results-box p { margin: 4px 0; }
.agg-toggle { font-weight: 600; margin-top: 12px; }
.bands .pts { width: 4.2em; }
.divs input[type=text] { width: 4.5em; }
.rules { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.rule select, .rule input { padding: 4px 6px; font-size: .9rem; }
.rule input[type=text] { width: 8.5em; }
.rule input[type=number] { width: 3.6em; }
.rule .icon-btn { margin-left: auto; }
.rule-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: .75rem; font-weight: 700; }
.div-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.div-chip { font-size: .85rem; padding: 3px 10px; border-radius: 8px; background: #eaf2ff; color: #00296c; }
.div-chip.zero { background: var(--soft); color: #9aa5b1; }
.grid.rank td.pos { font-weight: 700; text-align: center; color: #00296c; }
.grid.rank td b { color: #00296c; }
.moved { color: var(--bad); font-weight: 700; cursor: help; }

@media (max-width: 600px) {
  .card { padding: 16px; }
  .brand-logo { height: 42px; }
  .top { padding-bottom: 56px; }
  .export-inner .btn.primary { width: 100%; justify-content: center; }
  .field > span { min-width: 0; }
}

/* ---------------------------------------------------------------- accounts, home, register pupils */
[hidden] { display: none !important; }
.account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account .who { font-size: .92rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 9px 9px 0 0; font-size: .95rem; opacity: .8; white-space: nowrap; }
.tabs a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.tabs a.on { opacity: 1; background: rgba(255,255,255,.16); font-weight: 600; box-shadow: inset 0 -3px 0 var(--accent); }
.top:has(.tabs:not([hidden])) { padding-bottom: 52px; }

.auth-view { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
.auth-card { grid-row: span 2; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.auth-tabs a { text-align: center; padding: 9px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.auth-tabs a.on { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.btn.google { width: 100%; justify-content: center; padding: 11px 16px; font-size: 1rem; font-weight: 600; border-color: #c4cfd9; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 6px; }
.auth-form input[type=text], .auth-form input[type=email], .auth-form input[type=tel], .auth-form input[type=password] { width: 100%; padding: 10px 12px; font-size: 1rem; }
.auth-title { margin: 0 0 4px; font-size: 1.15rem; }
.lbl { font-size: .9rem; font-weight: 600; margin-top: 8px; }
.lbl .muted { font-weight: 400; }
.pw { position: relative; }
.pw input { padding-right: 64px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand-2); font: inherit; font-size: .85rem; cursor: pointer; padding: 4px 6px; }
.auth-row { display: flex; justify-content: flex-end; margin: 2px 0 6px; }
.btn.wide { width: 100%; justify-content: center; margin-top: 8px; }
.auth-switch { text-align: center; font-size: .92rem; margin: 10px 0 0; color: var(--muted); }
.auth-msg { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; font-size: .92rem; }
.auth-msg.error { background: var(--bad-bg); color: var(--bad); }
.auth-msg.good { background: var(--good-bg); color: var(--good); }
.try-card h3 { margin: 0 0 4px; }
.try-card p { margin: 0 0 12px; }
.features { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 10px; }
.features li { padding-left: 28px; position: relative; color: var(--muted); }
.features li::before { content: "✓"; position: absolute; left: 4px; color: var(--good); font-weight: 700; }
.features b { color: var(--ink); }

.hello-card h2 { font-size: 1.4rem; margin-bottom: 2px; }
.options-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 16px; }
.option { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-decoration: none; color: inherit; background: linear-gradient(180deg, #fbfdff, #f3f7fb); transition: border-color .15s, box-shadow .15s, transform .15s; }
.option:hover { border-color: #9cc0dd; box-shadow: var(--shadow); transform: translateY(-1px); }
.option h3 { margin: 4px 0 0; font-size: 1.1rem; }
.option p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.option-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }

.saved { font-size: .85rem; color: var(--good); }
.saved.bad { color: var(--bad); }
.tpl-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 20px; margin-bottom: 8px; }
.tpl-fields input { flex: 1; }
.classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; margin-top: 10px; }
.klass { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfcfd; min-width: 0; }
.klass-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.klass-name { font-weight: 700; font-size: 1.05rem; width: 9.5em; }
.klass-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pupils-wrap { max-height: 420px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pupils { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pupils th { position: sticky; top: 0; background: #e9eff4; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; z-index: 1; }
.pupils td { padding: 3px 6px; border-top: 1px solid #edf1f4; }
.pupils td.rn { color: #8895a1; width: 2.5em; text-align: right; }
.pupils input[type=text] { width: 100%; border-color: transparent; background: transparent; padding: 5px 6px; }
.pupils input[type=text]:hover { border-color: #d6dee6; }
.pupils input[type=text]:focus { border-color: var(--brand-2); background: #fff; }
.pupils select { padding: 4px 6px; }
.klass-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.klass-foot .count { margin-left: auto; }
.paste-box { margin-top: 10px; display: grid; gap: 6px; }
.paste-box textarea { width: 100%; font: inherit; font-size: .92rem; border: 1px solid #c4cfd9; border-radius: 8px; padding: 8px; resize: vertical; }
.btn.primary-lite { background: #eaf2ff; border-color: #9cc0dd; color: #00296c; font-weight: 600; }
.class-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty { color: var(--muted); background: var(--soft); border-radius: 10px; padding: 18px; text-align: center; grid-column: 1 / -1; margin: 0; }

.guest-note { background: var(--warn-bg); color: var(--warn); box-shadow: none; border: 1px solid #f0d79b; }
.guest-note a { color: var(--warn); font-weight: 700; }
.drop-title { font-weight: 700; font-size: 1.15rem; color: var(--brand); }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.loading-card { text-align: center; }

@media (max-width: 760px) {
  .auth-view { grid-template-columns: minmax(0, 1fr); }
  .auth-card { grid-row: auto; }
  .account .who { flex-basis: 100%; }
}

/* privacy and terms pages */
.legal { max-width: 820px; }
.legal h3 { margin: 22px 0 6px; font-size: 1.05rem; color: var(--brand); }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 22px; }

/* school details */
.school-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; margin: 6px 0 12px; background: #fbfcfd; min-width: 0; }
.school-box legend { font-weight: 700; padding: 0 6px; }
.school-box legend .muted { font-weight: 400; font-size: .85rem; }
.logo-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.logo-preview { width: 84px; height: 64px; border: 1px dashed #b7c4cf; border-radius: 10px; display: grid; place-items: center; background: #fff; overflow: hidden; flex: none; }
.logo-preview span { font-size: .78rem; color: var(--muted); }
.logo-preview img { max-width: 100%; max-height: 100%; display: block; }
.logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 200px; }

/* report cards */
.rp-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 16px; margin-top: 10px; }
.rp-scope select { flex: 1; min-width: 0; }
.rp-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.comments-edit { margin-top: 6px; }
.comments-edit summary { cursor: pointer; color: var(--brand-2); font-weight: 600; }
.cmt { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.cmt th { text-align: left; font-size: .78rem; text-transform: uppercase; color: var(--muted); padding: 4px 6px; }
.cmt td { padding: 3px 6px; border-top: 1px solid #edf1f4; vertical-align: top; }
.cmt td:first-child { white-space: nowrap; font-weight: 600; width: 1%; }
.cmt input[type=text] { width: 100%; }
.cmt input[type=number] { width: 4.5em; }
.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.primary.alt { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary.alt:hover { background: var(--brand-2); color: #fff; }
.bands .rm { width: 7.5em; }
@media (max-width: 600px) { .export-buttons { width: 100%; } .export-buttons .btn { flex: 1; justify-content: center; } }

/* the grade table fits a phone */
.scales { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.scale { min-width: 0; }
@media (max-width: 600px) {
  .bands td, .bands th { padding: 3px 2px; }
  .bands input[type=text] { width: 3.2em; padding: 5px 4px; }
  .bands input[type=number] { width: 3.4em; padding: 5px 4px; }
  .bands .pts { width: 2.8em; }
  .bands .rm { width: 100%; min-width: 4.2em; }
  .bands .to { font-size: .85rem; }
  .icon-btn { padding: 4px 4px; }
}

/* ---------------------------------------------------------------- schools */
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d79b; border-radius: 10px; padding: 8px 14px; margin-top: -36px; margin-bottom: 44px; position: relative; z-index: 2; font-size: .92rem; }
.home-schools { margin-top: 20px; }
.home-schools h3 { margin: 0 0 8px; font-size: 1.05rem; }
.school-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.school-chip { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: #fbfdff; min-width: 200px; }
.school-chip:hover { border-color: #9cc0dd; box-shadow: var(--shadow); }
.quota-line { margin: 14px 0 0; padding: 8px 12px; background: var(--soft); border-radius: 8px; }
.two-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 18px; align-items: start; }
.two-cards h3 { margin: 0 0 4px; }
.school-list { display: grid; gap: 8px; }
.school-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.join-results { display: grid; gap: 8px; margin-top: 10px; }
.school-head { padding-bottom: 0; }
.school-title { display: flex; align-items: center; gap: 14px; }
.school-title h2 { margin: 0; }
.school-title p { margin: 2px 0 0; }
.school-logo { width: 54px; height: 54px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; overflow: hidden; flex: none; border: 1px solid var(--line); }
.school-logo img { max-width: 100%; max-height: 100%; }
.school-logo span { font-weight: 800; font-size: 1.4rem; color: var(--brand); }
.banner { padding: 10px 12px; border-radius: 10px; margin: 12px 0 0; font-size: .92rem; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.subtabs { display: flex; gap: 2px; margin: 14px -22px 0; padding: 0 16px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs a { padding: 11px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.subtabs a:hover { color: var(--brand); }
.subtabs a.on { color: var(--brand); border-bottom-color: var(--accent); }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 8px; border-bottom: 1px solid #edf1f4; vertical-align: top; }
.nowrap { white-space: nowrap; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.inline-form input[type=email], .inline-form input[type=text] { flex: 1; min-width: 160px; }
.inline-form input[type=number] { width: 5.5em; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 12px; }
.progress-class { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfd; display: grid; gap: 8px; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pc-subjects { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-subject { display: grid; text-align: center; min-width: 58px; padding: 6px 8px; border-radius: 9px; text-decoration: none; color: inherit; border: 1px solid var(--line); font-size: .85rem; }
.pc-subject span { font-size: .8rem; }
.pc-subject.done { background: var(--good-bg); border-color: #b9dfc9; color: var(--good); }
.pc-subject.part { background: var(--warn-bg); border-color: #f0d79b; color: var(--warn); }
.pc-subject.none { background: var(--soft); color: var(--muted); }
.marks-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 16px; }
.marks-pick select { flex: 1; min-width: 0; }
.marks-table .mark-in { width: 5em; text-align: center; font-weight: 700; }
.marks-table .mark-in.bad { border-color: var(--bad); background: var(--bad-bg); }
.marks-table .grade-cell { font-weight: 700; color: var(--brand); }
.class-form h3 { margin-top: 0; }
.subject-rows { display: grid; gap: 6px; margin-top: 10px; }
.subject-row { display: grid; grid-template-columns: 6em 1fr auto; gap: 8px; align-items: center; }
.subject-row input { text-transform: uppercase; font-weight: 700; }
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-top: 8px; }
.class-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfd; display: grid; gap: 8px; }
.class-card.on { border-color: #9cc0dd; box-shadow: var(--shadow); }
.subject-list { display: flex; flex-wrap: wrap; gap: 4px; }
.btn.danger { color: var(--bad); border-color: #f1b5b0; }
#step-scales.borrowed { box-shadow: none; padding: 0; margin: 0; background: none; }
#step-scales.borrowed > .card-head h2 { display: none; }
p.err, .err { color: var(--bad); }

/* ---------------------------------------------------------------- school look */
.center { text-align: center; }
.look-h { margin: 18px 0 8px; font-size: .98rem; }
.colour-sets { display: flex; flex-wrap: wrap; gap: 8px; }
.colour-set { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px 7px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink); }
.colour-set:hover { border-color: var(--brand-2); }
.colour-set.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent); font-weight: 700; }
.colour-set .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.colour-set .sw + .sw { margin-left: -10px; }
.colour-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; }
.colour-pick label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.colour-pick input[type=color] { width: 42px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.look-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.paper-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.paper-opt { display: grid; grid-template-columns: auto 52px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.paper-opt:hover { border-color: var(--brand-2); }
.paper-opt.on { border-color: var(--brand); background: var(--grade-bg); }
.paper-opt input { margin: 0; accent-color: var(--brand); width: 18px; height: 18px; }
.paper-opt .thumb { width: 52px; height: 72px; border: 1px solid var(--line); border-radius: 4px; background: #fff center / cover no-repeat; }
.paper-opt .badge-thumb { display: grid; place-items: center; overflow: hidden; }
.paper-opt .badge-thumb img { max-width: 44px; max-height: 44px; opacity: .45; }
.paper-opt.off { cursor: default; opacity: .7; }
.level-ticks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; grid-column: 1 / -1; }
.rs-scales { margin: 4px 0 10px; }
/* results for parents and pupils (assets/results.js) */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.res-table td:nth-child(n+2) { text-align: center; }
.res-table .up { color: #1b7a3a; font-size: .8rem; }
.res-table .down { color: #b3261e; font-size: .8rem; }
.res-hist, .res-trend { width: 100%; max-width: 420px; display: block; margin: 6px auto; }
.res-hist .hb { fill: var(--brand-2); opacity: .45; }
.res-hist .hb-me { fill: var(--accent); }
.res-hist .hb-base, .res-trend .tr-grid { stroke: var(--line); stroke-width: 1; }
.res-hist text, .res-trend text { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.res-hist .hb-n { fill: var(--ink, #17212b); font-weight: 600; }
.res-hist .hb-name { fill: var(--ink, #17212b); font-weight: 700; }
.res-trend .tr-axis { text-anchor: start; }
.res-trend .tr-lab { text-anchor: middle; }
.res-trend .tr-line { fill: none; stroke: var(--brand); stroke-width: 2; }
.res-trend .tr-dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.res-trend .tr-val { fill: var(--ink, #17212b); font-weight: 600; }
.res-slider { max-width: 420px; }
.res-slider input { width: 100%; accent-color: var(--brand); }
.proj-bars { display: grid; gap: 6px; margin: 6px 0 10px; max-width: 520px; }
.proj-row { display: grid; grid-template-columns: 9.5rem 1fr 5.5rem; gap: 8px; align-items: center; font-size: .9rem; }
.proj-bar { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.proj-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px 4px 4px 6px; }
.proj-n { color: var(--muted); font-size: .85rem; }
.rs-release { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rc-code { font-size: 1rem; letter-spacing: .06em; font-weight: 700; }
.finals-form select, .finals-form input[type=number] { min-width: 9rem; }
/* admissions and notices (assets/community.js) */
.seg { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.nq { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; display: grid; gap: 6px; background: #fff; }
.nq-top { display: flex; justify-content: space-between; align-items: center; }
.nt-video { display: grid; gap: 6px; margin: 6px 0; }
.nt-texts { margin: 4px 0 10px; padding-left: 1.2rem; display: grid; gap: 4px; }
.notices-card .notice { border-top: 1px solid var(--line); padding: 10px 0; }
.notices-card .notice:first-of-type { border-top: 0; padding-top: 0; }
.notices-card .notice h4 { margin: 2px 0 6px; }
.nt-survey { display: grid; gap: 8px; margin-top: 8px; }
.nt-q { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.nt-q legend { font-weight: 600; margin-bottom: 4px; }
.nt-q textarea { width: 100%; }
/* attendance and reports (assets/reports.js) */
.att-pick { display: inline-flex; gap: 4px; }
.att-pick label { position: relative; display: inline-grid; place-items: center; min-width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--muted); background: #fff; }
.att-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.att-pick input:disabled { cursor: default; }
.att-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.att-pick label.on.att-P { background: #1b7a3a; border-color: #1b7a3a; color: #fff; }
.att-pick label.on.att-A { background: #b3261e; border-color: #b3261e; color: #fff; }
.att-pick label.on.att-L { background: #c77700; border-color: #c77700; color: #fff; }
.att-pick label.on.att-E { background: #5b6875; border-color: #5b6875; color: #fff; }
.att-grid th, .att-grid td { text-align: center; padding: 4px 6px; font-size: .85rem; }
.att-grid td:first-child, .att-grid th:first-child { text-align: left; white-space: nowrap; }
.att-grid td.att-P { color: #1b7a3a; font-weight: 700; }
.att-grid td.att-A { color: #b3261e; font-weight: 700; background: #fdecea; }
.att-grid td.att-L { color: #c77700; font-weight: 700; }
.att-grid td.att-E { color: #5b6875; }
.att-time { width: 7.5rem; }
.total-row td { border-top: 2px solid var(--line); }
.ap-filters { margin-top: 8px; }
/* calendar: timetable, links, today (assets/calendar.js) */
.tt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; margin: 8px 0; }
.tt-day h4 { margin: 0 0 6px; font-size: .9rem; color: var(--brand); }
.tt-slot { position: relative; border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: 10px; padding: 6px 28px 6px 8px; margin-bottom: 6px; background: #fff; font-size: .9rem; }
.tt-slot.tt-other { border-left-color: var(--line); background: var(--soft); }
.tt-slot .icon-btn { position: absolute; top: 4px; right: 4px; }
.cal-slot-form { margin-top: 6px; }
.cal-link { display: grid; gap: 6px; margin: 6px 0 12px; }
.cal-link input[readonly] { font-size: .8rem; }
.today-list { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 6px; }
.today-list li { padding: 6px 10px; border-radius: 10px; background: var(--soft); }
.today-list li.past { opacity: .55; }
.today-list li.next { background: var(--grade-bg); border: 1px solid var(--brand-2); }
.today-remind { max-width: 340px; }
/* supervised discussions (assets/discuss.js) */
.dc-form { margin: 8px 0 12px; }
.dc-form .dc-about { grid-column: 1 / -1; }
.dc-chat { display: grid; gap: 10px; }
.dc-list { max-height: min(60vh, 520px); overflow-y: auto; display: grid; gap: 8px; padding: 4px 2px; }
.dc-msg { background: var(--soft); border-radius: 12px; padding: 8px 12px; max-width: 92%; }
.dc-msg.teacher { background: var(--grade-bg); border: 1px solid var(--brand-2); }
.dc-msg.removed { opacity: .7; }
.dc-meta { font-size: .85rem; margin-bottom: 2px; }
.dc-body { white-space: normal; overflow-wrap: anywhere; }
.dc-acts { margin-top: 2px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font-size: .8rem; }
.dc-compose { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; }
.dc-compose textarea { width: 100%; resize: vertical; }
@media (max-width: 560px) { .dc-compose { grid-template-columns: 1fr; } }
/* the live room: video (JaaS) and the teacher's smartboard (assets/board.js) */
.br-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; margin: 6px 0 4px; }
.br-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.br-seg .lbl { margin: 0 4px 0 0; }
.br-device { min-width: 240px; margin: 0; }
.br-root [aria-pressed="true"] { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.br-stage { display: grid; gap: 12px; align-items: start; }
.br-stage .card { margin: 0; }
.br-stage.show-board { grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); }
.br-stage.show-board .br-board { order: 1; }
.br-stage.show-board .br-video { order: 2; }
.br-stage.show-face { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
.br-stage.board-only { grid-template-columns: 1fr; }
.br-video { padding: 8px; }
.br-jitsi { height: 260px; border-radius: 10px; overflow: hidden; background: var(--soft); }
.br-stage.show-face .br-jitsi { height: min(62vh, 560px); }
.br-novideo { padding: 14px; text-align: center; }
.br-board { padding: 10px; }
.br-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.br-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.br-color { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.br-root .br-color[aria-pressed="true"] { background: var(--sw); border-color: #fff; box-shadow: 0 0 0 3px var(--brand-2); }
.br-size i { display: inline-block; width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; }
.br-hint { margin: 0 0 8px; }
.br-canvas-wrap { width: 100%; aspect-ratio: 16 / 10; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.br-canvas-wrap canvas { display: block; }
.br-draw { touch-action: none; cursor: crosshair; }
.br-draw.br-erasing { cursor: cell; }
.br-pagebar { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; }
.br-save summary { cursor: pointer; }
.br-save[open] summary { margin-bottom: 8px; }
.ex-board { margin: 8px 0; }
.ex-board img { display: block; width: 100%; max-width: 760px; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 820px) {
  .br-stage.show-board, .br-stage.show-face { grid-template-columns: 1fr; }
  .br-stage.show-face .br-video { order: 1; }
  .br-stage.show-face .br-board { order: 2; }
  .br-jitsi { height: 220px; }
  .br-stage.show-face .br-jitsi { height: min(55vh, 420px); }
}
.level-ticks legend { font-size: .85rem; font-weight: 600; padding: 0; margin-bottom: 4px; width: 100%; }
.paper-opt b { display: block; font-size: .92rem; }
.paper-opt small { color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; }
.paper-side { display: grid; gap: 8px; justify-items: stretch; }
.paper-side .btn { justify-self: center; }
.paper-side p { margin: 0; }
.paper-preview { position: relative; width: 210px; height: 297px; margin: 0 auto; background: #fff center / 100% 100% no-repeat; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); padding: 14px 13px; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
.paper-preview > * { position: relative; }
.paper-preview > .pv-badge { position: absolute; left: 50%; top: 53%; width: 130px; height: 130px; object-fit: contain; transform: translate(-50%, -50%); pointer-events: none; }
.pv-head { display: grid; justify-items: center; gap: 2px; text-align: center; color: var(--pv-p); }
.pv-logo { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--pv-a); display: grid; place-items: center; overflow: hidden; background: rgba(255,255,255,.7); }
.pv-logo img { max-width: 100%; max-height: 100%; }
.pv-head b { font-size: .62rem; letter-spacing: .03em; line-height: 1.2; }
.pv-head small { font-size: .5rem; color: var(--muted); }
.pv-bar { background: var(--pv-p); color: #fff; text-align: center; font-size: .5rem; font-weight: 700; letter-spacing: .08em; padding: 3px; border-bottom: 2px solid var(--pv-a); }
.pv-rows { display: grid; gap: 4px; padding: 4px 0; }
.pv-rows i { height: 7px; border-bottom: 1px solid rgba(23,33,43,.18); background: linear-gradient(90deg, rgba(23,33,43,.12) 0 38%, transparent 38% 62%, rgba(23,33,43,.12) 62% 70%, transparent 70%); }
.pv-rows i:first-child { background: var(--pv-p); opacity: .85; height: 8px; }
.pv-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pv-boxes span { height: 22px; border: 1px solid var(--pv-a); border-radius: 3px; background: rgba(255,255,255,.5); }
.pv-lines { display: grid; gap: 9px; margin-top: auto; }
.pv-lines i { border-bottom: 1px dotted rgba(23,33,43,.35); height: 6px; }
@media (max-width: 720px) { .look-grid { grid-template-columns: 1fr; } }

/* type of school at registration */
.level-pick { border: 0; padding: 0; margin: 0 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.level-pick legend { padding: 0; margin-bottom: 6px; }
.level-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.level-opt:has(input:checked) { border-color: var(--brand); background: var(--grade-bg); }
.level-opt input { margin: 0; accent-color: var(--brand); }
.level-opt b { display: block; font-size: .93rem; }
.level-opt small { color: var(--muted); font-size: .8rem; }
.level-opt.soon { cursor: not-allowed; opacity: .6; background: var(--soft); }
.level-opt.soon small { color: var(--warn); font-weight: 600; }
/* tables that become stacked rows on phones */
@media (max-width: 640px) {
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.data.stack td { border: 0; padding: 2px 0; }
  table.data.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; font-weight: 600; }
  table.data.stack td.nowrap { white-space: normal; padding-top: 6px; }
}

/* Studio 13's admins: a way to the approvals that does not depend on the tab bar */
.super-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--grade-bg); border: 1px solid var(--line); }
.super-box b { display: block; }
/* narrow screens: the section tabs wrap onto two lines instead of hiding past the edge */
@media (max-width: 760px) {
  .tabs { flex-wrap: wrap; overflow: visible; gap: 4px 2px; }
  .tabs a { padding: 7px 11px; border-radius: 9px; font-size: .9rem; }
  .tabs a.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .subtabs { flex-wrap: wrap; overflow: visible; }
  .subtabs a { padding: 10px 10px 8px; }
}

/* ---------------------------------------------------------------- online lessons (assets/learn.js) */
#learn-body textarea, .lesson-form textarea { width: 100%; font: inherit; font-size: .95rem; border: 1px solid #c4cfd9; border-radius: 8px; padding: 8px 10px; resize: vertical; background: #fff; color: inherit; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); }
.check.small { font-size: .85rem; margin: 4px 0; align-items: center; }
.check.small input { margin-top: 0; }
.learner-note { background: var(--grade-bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0 0; }
.learn-hero h2 { margin-bottom: 6px; }
.learn-hero p { margin: 0; max-width: 70ch; }
/* the online school's own page: the first thing everyone sees after signing in */
.learn-hero.standout { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px 28px; align-items: center; padding: 26px; color: #fff; background: linear-gradient(135deg, var(--brand-deep, #001d4f), var(--brand-2) 62%, #0b74e0); }
.learn-hero.standout { padding-bottom: 34px; }
.learn-hero.standout::after { content: ""; position: absolute; left: -12%; right: -12%; bottom: -46px; height: 66px; border-radius: 50%; border-top: 5px solid rgba(254, 123, 2, .8); pointer-events: none; }
.learn-hero.standout h2 { color: #fff; font-size: 1.7rem; margin: 6px 0 8px; }
.learn-hero.standout p { color: rgba(255, 255, 255, .9); }
.learn-hero.standout .kicker { color: #ffb45c; }
.lh-text, .lh-panel { position: relative; z-index: 1; }
.lh-panel { background: #fff; color: var(--ink); border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.lh-panel form { display: grid; gap: 6px; }
.lh-panel .lbl { margin: 0; color: var(--brand); }
.learn-hero.standout .lh-panel p { color: var(--muted); margin: 0; }
.lh-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lh-row input[type=text] { flex: 1 1 110px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.lh-row input[type=text]::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lh-row select { flex: 1 1 150px; }
.lh-row input[type=search] { flex: 1 1 200px; }
.lh-row .btn.primary { padding: 7px 18px; }
@media (max-width: 760px) { .learn-hero.standout { grid-template-columns: 1fr; padding: 20px 16px; } .learn-hero.standout h2 { font-size: 1.4rem; } }
.stack-form .field > span { min-width: 9em; }
.stack-form .btn.primary { margin-top: 12px; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 10px; }
.class-card { display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.class-card:hover { border-color: #9cc0dd; box-shadow: var(--shadow); }
.class-card b { font-size: 1.02rem; color: var(--brand); }
.course-head h2 { margin: 2px 0 6px; }
.crumbs { margin: 0 0 4px; color: var(--muted); }
.crumbs a { color: inherit; }
.about { margin-top: 10px; padding: 10px 12px; background: var(--soft); border-radius: 10px; font-size: .95rem; }
.learn-as { margin: -8px 0 12px 4px; }
.join-box { border: 1px solid #b9dfc9; background: linear-gradient(180deg, #f6fcf8, #fff); }
.join-box h3 { margin-top: 0; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { margin: 4px 0; }
.topic-block h4 { margin: 14px 0 6px; font-size: 1rem; color: var(--brand); }
.ico { display: inline-block; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.code-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 14px; background: var(--soft); border-radius: 12px; }
.join-code { font: 700 1.6rem/1.1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; color: var(--brand); }
.wide-field { grid-column: 1 / -1; }
.field textarea { flex: 1 1 100%; }
.topic-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.topic-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.topic-head h4 { margin: 0; font-size: 1.02rem; color: var(--brand); }
.lesson-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.lesson-row:first-of-type { margin-top: 8px; }
.lesson-row a { text-decoration: none; }
.lesson-row .row-tags { margin-top: 3px; }
.add-lesson { margin-top: 8px; }
.paper-edit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.paper-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.paper-form input[name=title] { flex: 2 1 220px; }
.paper-form input[name=year] { width: 6em; }
.progress { flex: 1 1 100%; height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--good); transition: width .3s; }
.video-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b1620; border-radius: 12px; overflow: hidden; margin: 14px 0; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-notes { font-size: 1.02rem; line-height: 1.65; max-width: 72ch; }
.lesson-notes h3, .lesson-notes h4, .lesson-notes h5 { color: var(--brand); margin: 18px 0 6px; }
.lesson-notes ul, .lesson-notes ol { padding-left: 22px; }
.lesson-notes li { margin: 4px 0; }
.example { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: #fbfcfd; }
.ex-q { font-size: 1rem; line-height: 1.55; }
.ex-n { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.ex-try { margin: 8px 0; }
.ex-try .btn { margin-top: 6px; }
.steps { margin: 10px 0 6px; padding-left: 22px; }
.steps li { margin: 5px 0; padding: 6px 10px; background: var(--grade-bg); border-radius: 8px; }
.ex-a { margin: 8px 0; padding: 8px 10px; background: var(--good-bg); border-radius: 8px; color: #14532d; }
.example > .btn { margin-top: 6px; }
.lesson-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 0 0 18px; }
.lesson-form .lbl { display: block; margin-top: 12px; margin-bottom: 4px; }
.lesson-form input[type=text], .lesson-form select { width: 100%; }
.checks { margin-top: 10px; }
.ex-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.ex-edit .lbl { display: block; margin: 8px 0 4px; }
.ex-edit input[type=text] { width: 100%; }
.ex-edit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ex-edit-head .ex-n { margin: 0; }
.video-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.video-actions .btn { cursor: pointer; }
.upload-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.upload-box p { margin: 6px 0; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; margin: 0 -16px 18px; background: rgba(238, 242, 246, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .join-code { font-size: 1.35rem; }
  .lesson-nav .btn { flex: 1 1 100%; justify-content: center; }
}
#learn-body .card > h3:first-child, #sc-body .card > h3:first-child, #learn-body .card-head h3 { margin-top: 0; }
.end-actions { margin: -6px 0 18px; justify-content: flex-end; }
@media (max-width: 640px) {
  .save-bar { gap: 6px; padding: 10px 12px; }
  .save-bar .btn { padding: 7px 10px; font-size: .88rem; }
  .save-bar .btn.primary { padding: 8px 14px; font-size: .95rem; }
}

/* topics and lessons in order: Topic 1 → Lesson 1, 2 … with a line down the numbers */
.start-row { margin: 10px 0 4px; }
.start-row .btn { white-space: normal; text-align: left; }
.topic-seq { list-style: none; margin: 14px 0 0; padding: 0; }
.topic-seq > li.topic-block { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; margin: 0 0 14px; background: #fff; }
.topic-seq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.topic-seq-head b { font-size: 1.05rem; color: var(--ink); }
.topic-seq-head a { margin-left: auto; }
.topic-n { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--brand); border-radius: 6px; padding: 2px 8px; vertical-align: 2px; }
h2 .topic-n, h4 .topic-n { font-size: .8rem; margin-right: 4px; }
.lesson-steps { list-style: none; margin: 4px 0 0; padding: 0; position: relative; }
.lesson-step { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 7px 0 7px; }
.lesson-step:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: -7px; width: 2px; background: var(--line); }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--brand); background: var(--grade-bg); border: 2px solid #c9dcef; position: relative; z-index: 1; }
.lesson-step.done .step-n { background: var(--good); border-color: var(--good); color: #fff; }
.lesson-step.here .step-n { background: var(--accent); border-color: var(--accent); color: #00296c; }
.lesson-step.locked .step-n { color: var(--muted); background: var(--soft); border-color: var(--line); }
.step-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-top: 5px; min-width: 0; }
.step-body a { font-weight: 600; text-decoration: none; }
.step-body a:hover { text-decoration: underline; }
.step-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.lesson-step.locked .step-title { color: var(--muted); }
.step-meta { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lesson-steps.compact .lesson-step { padding: 4px 0; }
.lesson-steps.compact .step-n { width: 26px; height: 26px; font-size: .8rem; }
.lesson-steps.compact .lesson-step:not(:last-child)::before { left: 12px; top: 30px; bottom: -4px; }
.lesson-steps.compact .step-body { padding-top: 3px; }
.lesson-place { margin: 6px 0 2px; font-size: .95rem; }
.lesson-row .step-label { margin-right: 4px; }
.sub-h { margin: 16px 0 6px; font-size: 1rem; color: var(--brand); }

/* ratings */
.rating-avg { margin: 4px 0; }
.stars-avg { color: #c58a00; font-weight: 700; }
.stars-small { color: #c58a00; letter-spacing: 1px; }
.rate-form { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf6; display: grid; gap: 8px; max-width: 520px; }
.rate-form .lbl { margin: 0; }
.stars { display: flex; gap: 4px; }
.star { appearance: none; border: 0; background: none; font-size: 1.9rem; line-height: 1; color: #d6dbe0; cursor: pointer; padding: 0 2px; }
.star.on { color: #f0b300; }
.star:hover, .star:focus-visible { transform: scale(1.12); }
.rating-comments h4 { margin: 12px 0 6px; }
.rating-comments p { margin: 6px 0; }

/* teachers' profiles */
.avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--grade-bg); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.avatar.big { width: 96px; height: 96px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { font-weight: 800; font-size: 1.2rem; color: var(--brand); }
.avatar.big span { font-size: 2.2rem; }
.profile-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.profile-top h2 { margin: 0; }
.profile-top > .btn { margin-left: auto; }
.headline { margin: 2px 0; font-weight: 600; }
.subject-tags { margin: 12px 0 4px; }

/* files of a lesson */
.file-row { margin-top: 8px; }
.file-kind { display: inline-block; min-width: 3.6em; text-align: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); margin-right: 4px; }
#le-files-card .btn { margin-top: 10px; }

/* recording a video in the page */
.recorder { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #0b1620; }
.rec-preview { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.rec-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.rec-time { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.recorder #rec-close { margin-top: 10px; }

/* tests: setting them */
.plain-fieldset { border: 0; padding: 0; margin: 10px 0 0; }
.plain-fieldset .check { margin: 4px 0; }
.plain-fieldset input[type=text] { width: 100%; margin-top: 6px; }
.add-q { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.q-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 12px; background: #fbfcfd; display: grid; gap: 8px; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.q-head .row-tags { margin-left: auto; }
.q-edit textarea { width: 100%; }
.opts { display: grid; gap: 6px; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row input[type=text] { flex: 1; min-width: 0; }
.opt-row input[type=radio], .opt-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--good); flex: none; }
.q-foot { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: center; }
.q-foot .field { margin-top: 0; }
.q-foot .q-marks { width: 4.5em; }
.q-expl-field { flex: 1 1 260px; }
.q-expl-field input { flex: 1; min-width: 0; }
.q-state { font-style: italic; }

/* tests: taking them */
.test-facts li { margin: 4px 0; }
.test-bar { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; margin: 0 0 14px; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.test-bar #tk-saved { color: rgba(255,255,255,.8); }
.test-bar .btn { margin-left: auto; }
#tk-time { font-weight: 800; font-variant-numeric: tabular-nums; }
#tk-time.urgent { color: #ffd166; }
.q-list { padding-left: 0; list-style: none; margin: 0; }
.q-take { padding: 12px 0; border-bottom: 1px solid var(--line); }
.q-take:last-child { border-bottom: 0; }
.q-take-text { font-size: 1.02rem; margin-bottom: 8px; line-height: 1.5; }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--grade-bg); }
.choice input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.short-answer { width: 100%; max-width: 420px; font-size: 1rem; padding: 9px 12px !important; }

/* tests: results */
.score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.score-row h2 { margin: 0; }
.score-big { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; color: #fff; background: var(--good); flex: none; }
.score-big.warn { background: #c46a00; }
.review-item { border-left: 4px solid var(--line); padding: 8px 12px; margin: 10px 0; background: #fbfcfd; border-radius: 0 10px 10px 0; display: grid; gap: 3px; }
.review-item.ok { border-left-color: var(--good); }
.review-item.bad { border-left-color: var(--bad); }
.ri-mark { font-weight: 800; margin-right: 4px; }
.review-item.ok .ri-mark { color: var(--good); }
.review-item.bad .ri-mark { color: var(--bad); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.stat-row > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: grid; }
.stat-row b { font-size: 1.5rem; color: var(--brand); }
.stat-row span { font-size: .85rem; color: var(--muted); }
.q-stat { display: grid; grid-template-columns: 1fr 160px 44px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; background: var(--good); }
@media (max-width: 640px) { .q-stat { grid-template-columns: 1fr 80px 40px; } }

/* live classes */
.live-row { margin-top: 8px; }
details.past { margin-top: 12px; }
details.past summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.people-pick h4 { margin: 12px 0 6px; }
.people-pick input[type=search] { width: 100%; max-width: 360px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 2px 14px; }
.people .check { margin: 3px 0; }
.tpl-fields .check input[type=radio], .tpl-fields .check input[type=checkbox] { flex: none; }
.tpl-fields .check { justify-content: flex-start; }

/* the lesson video: cover first, then starter, video, ending */
.vplayer { margin: 14px 0; }
.vcover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: linear-gradient(135deg, var(--brand), #0b1620) center / cover no-repeat; color: #fff; text-align: left; font: inherit; }
.vcover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 15, 25, .15) 0%, rgba(5, 15, 25, .78) 100%); }
.vcover-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; display: grid; gap: 6px; justify-items: start; }
.vcover-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.vcover-title { font-size: 1.35rem; line-height: 1.2; }
.vcover-text { max-width: 60ch; font-size: .95rem; opacity: .92; }
.vplay { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 99px; background: var(--accent); color: #00296c; font-weight: 800; }
.vcover:hover .vplay, .vcover:focus-visible .vplay { transform: scale(1.04); }
.vstage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b1620; border-radius: 12px; overflow: hidden; }
.vstage iframe, .vstage video, .vstage .vbumper { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vstage .vbumper { object-fit: contain; background: #000; }
.vend { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 10px; background: radial-gradient(circle at 50% 40%, #12326e, #0b1620 75%); }
.vend-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
/* "Powered by Studio 13 Developers" with the contacts, animated in at the end of every video */
.powered { background: #fff; border-radius: 14px; padding: 14px 22px 12px; display: grid; justify-items: center; gap: 7px; max-width: 94%; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.pw-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; color: var(--brand); font-weight: 800; font-size: 1.1rem; }
.pw-line img { height: 44px; width: auto; display: block; }
.pw-by { --dx: -26px; animation: pwIn .6s .25s both ease-out; }
.pw-dev { --dx: 26px; animation: pwIn .6s .25s both ease-out; }
.pw-logo { animation: pwPop .7s both cubic-bezier(.2, 1.4, .4, 1); }
.pw-rule { display: block; height: 3px; width: 0; border-radius: 2px; background: linear-gradient(90deg, #fe7b02, #f85802); animation: pwGrow .6s .7s both ease-out; }
.pw-contacts { font-size: .88rem; color: var(--muted); animation: pwFade .6s 1.05s both ease-out; }
.pw-contacts a { color: var(--brand-2); font-weight: 600; text-decoration: none; }
@keyframes pwIn { from { opacity: 0; transform: translateX(var(--dx)); } to { opacity: 1; transform: none; } }
@keyframes pwPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes pwGrow { to { width: 80%; } }
@keyframes pwFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .powered * { animation: none !important; } .pw-rule { width: 80%; } }
@media (max-width: 600px) { .vend { gap: 8px; } .powered { padding: 8px 12px; gap: 4px; } .pw-line { font-size: .85rem; gap: 2px 8px; } .pw-line img { height: 26px; } .pw-contacts { font-size: .74rem; } .vend .btn.primary { padding: 6px 12px; font-size: .9rem; } }
@media (max-width: 640px) { .vcover-title { font-size: 1.05rem; } .vcover-text { display: none; } .vcover-body { padding: 12px 14px; } }
.teacher-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 8px 10px; border-radius: 10px; background: var(--soft); border: 1px dashed var(--line); }

/* downloads */
.download-card .row-tags { margin-top: 8px; }
.dl-progress { margin-top: 12px; display: grid; gap: 6px; }

/* the lesson editor: cover, light, captions, starter and ending */
.vx-wrap { margin-top: 14px; display: grid; gap: 8px; }
details.vx { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcfd; }
details.vx summary { cursor: pointer; font-weight: 700; color: var(--brand); }
details.vx[open] summary { margin-bottom: 8px; }
details.vx textarea { width: 100%; }
.look-field input[type=range] { flex: 1; min-width: 140px; accent-color: var(--brand); }
.look-field output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.bumpers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.bumper-slot { display: grid; gap: 6px; justify-items: start; }
.bumper-slot img, .bumper-slot video, .bumper-empty { width: 160px; aspect-ratio: 16 / 9; object-fit: contain; background: #0b1620; border-radius: 8px; }
.bumper-empty { display: grid; place-items: center; color: #9fb3c4; font-size: .85rem; }
.recorder .rec-even { color: #fff; }

/* ---------------------------------------------------------------- EduLink: welcome page (signed out) */
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-2, #f85802); }
.hero-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: center; padding: 34px; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #e6f0ff 0%, #fff 58%); }
.card.hero-card h2 { display: block; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; margin: 8px 0 12px; color: var(--brand); letter-spacing: -.02em; }
.hero-lead { font-size: 1.07rem; color: #34425a; margin: 0 0 18px; max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.hero-art { position: relative; padding: 18px 10px 26px; }
.mock-player { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 41, 108, .2); transform: rotate(-2deg); }
.mock-video { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, #4b4bc3, #014caf 60%, #008bf4); }
.mock-play { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px; font-size: 1.3rem; color: #4b4bc3; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.mock-cap { position: absolute; left: 12px; bottom: 10px; color: #fff; font-size: .78rem; font-weight: 700; background: rgba(0, 0, 0, .28); padding: 3px 9px; border-radius: 999px; }
.mock-text { padding: 12px 14px 14px; display: grid; gap: 7px; }
.mock-text b { font-size: .92rem; color: var(--brand); }
.mock-text i { display: block; height: 7px; border-radius: 4px; background: #e3eaf4; }
.mock-text i.short { width: 60%; }
.mock-chip { position: absolute; display: inline-flex; align-items: center; gap: 7px; background: #fff; border-radius: 999px; padding: 7px 13px; font-size: .82rem; font-weight: 800; color: var(--brand); box-shadow: 0 8px 22px rgba(0, 41, 108, .18); }
.chip-live { top: 0; right: 0; }
.chip-live .dot { width: 9px; height: 9px; border-radius: 50%; background: #e53935; box-shadow: 0 0 0 4px rgba(229, 57, 53, .18); animation: livePulse 1.6s infinite; }
.chip-test { bottom: 6px; left: 0; color: #1e7d4f; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 7px rgba(229, 57, 53, .04); } }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 0 0 18px; }
.feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 4px solid var(--sky); }
.feature:nth-child(3n+2) { border-top-color: var(--accent); }
.feature:nth-child(3n) { border-top-color: var(--violet); }
.feature h3 { margin: 10px 0 4px; font-size: 1.02rem; color: var(--brand); }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.f-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #eaf2ff; color: var(--brand-2); }
.feature:nth-child(3n+2) .f-icon { background: #fff1e3; color: var(--orange-2); }
.feature:nth-child(3n) .f-icon { background: #efefff; color: var(--violet); }
.f-icon svg { width: 22px; height: 22px; }
.welcome .two-cards h3, .grading-card h3 { color: var(--brand); }
.steps { list-style: none; counter-reset: step; margin: 10px 0 16px; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.steps li::before { content: counter(step); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--brand); font-weight: 800; }
.steps li span { color: var(--muted); font-size: .92rem; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; align-content: start; background: var(--soft); }
.plan span { font-size: .88rem; color: var(--muted); }
.plan.premium { background: linear-gradient(135deg, #fff4e6, #fff); border-color: #ffd3a3; }
.plan.premium b { color: var(--orange-2); }
.grading-card { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.grading-card h3 { margin: 4px 0 10px; }
.grading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .hero-card { grid-template-columns: 1fr; padding: 22px 18px; gap: 8px; } .plans { grid-template-columns: 1fr; } }

/* grading: its own small menu under the main tabs */
.gtabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 8px; margin: 0 0 14px; }
.gtabs-title { font-weight: 800; color: var(--brand); padding: 6px 12px 6px 6px; margin-right: 4px; border-right: 1px solid var(--line); }
.gtabs a { padding: 6px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.gtabs a:hover { background: var(--soft); color: var(--brand); }
.gtabs a.on { background: #eaf2ff; color: var(--brand); box-shadow: inset 0 -3px 0 var(--accent); }

/* accepting the terms */
.terms-check { font-size: .88rem; color: var(--muted); margin: 12px 0 2px; }
.terms-check input { flex: none; }
.terms-card { max-width: 720px; margin: 0 auto 18px; }
.card.terms-card h2 { display: block; color: var(--brand); margin: 6px 0 10px; }
.terms-card .features { margin: 12px 0 16px; }
.terms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------------------------------------------------------------- payments (assets/pay.js) */
.plan-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; justify-content: space-between; }
.plan-price { font-size: 1.15rem; font-weight: 800; color: var(--orange-2); }
.pay-banner { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; border-left: 5px solid var(--accent); }
.pay-banner p { margin: 4px 0 0; }
.pay-result { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 14px; margin: 6px 0 14px; }
.pay-result h2 { margin: 0 0 4px; }
.pay-result p { margin: 0; }
.pay-result.ok { background: var(--good-bg); }
.pay-result.wait { background: var(--warn-bg); }
.pay-result.bad { background: var(--bad-bg); }
.pay-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; flex: none; background: #fff; }
.pay-result.ok .pay-icon { color: var(--good); }
.pay-result.wait .pay-icon { color: var(--warn); }
.pay-result.bad .pay-icon { color: var(--bad); }
.fee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; align-items: end; margin: 8px 0 4px; }
.fee-grid .field { display: grid; gap: 4px; }
.fee-grid .field > span { font-size: .85rem; font-weight: 600; min-width: 0; }
.fee-grid input, .fee-grid select { width: 100%; }
.fee-field small { font-size: .78rem; }
.fee-save { display: flex; align-items: end; }
#sc-pay h4, #pay-admin h3 { margin: 18px 0 6px; color: var(--brand); }
.money-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 8px 0; }
.money-row > div { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.money-row span { font-size: .8rem; color: var(--muted); }
.money-row b { font-size: 1.05rem; color: var(--brand); }
.money-row .owed { background: #fff4e6; }
.money-row .owed b { color: var(--orange-2); }
.usage { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.usage span { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--brand-2)); }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 10px 0 6px; }
.package { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 3px; justify-items: start; background: #fff; }
.package b { color: var(--brand); font-size: 1.05rem; }
.pay-row .row-tags, .pay-school .row-tags { align-items: center; }
.banner.ok { background: var(--good-bg); color: var(--good); }

/* payments: each child's parts, one bar to pay for all chosen */
.pay-children { display: grid; gap: 10px; margin-top: 10px; }
.pay-child { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fbfcfe; }
.pay-child.paid { background: #f6fbf8; border-color: #cfe7d8; }
.pay-child.off { opacity: .55; }
.child-pick { margin: 0; }
.pay-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 8px 4px; border-top: 1px dashed var(--line); cursor: pointer; }
.pay-item:first-of-type { border-top: 0; }
.pay-item input { accent-color: var(--accent); width: 18px; height: 18px; }
.pay-item-text { display: grid; }
.pay-item-text small { font-size: .78rem; }
.pay-item-price { font-weight: 800; color: var(--orange-2); white-space: nowrap; }
@media (max-width: 600px) { .pay-item { grid-template-columns: auto minmax(0, 1fr) auto; } .pay-item .tag { grid-column: 2 / -1; justify-self: start; } }
.pay-bar { position: sticky; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid #ffd3a3; box-shadow: 0 8px 24px rgba(0, 41, 108, .14); }
.pay-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.period { cursor: pointer; }
.period input { position: absolute; opacity: 0; }
.period span { display: grid; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); text-align: center; }
.period small { font-size: .72rem; color: var(--muted); }
.period input:checked + span { background: #fff4e6; border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.period input:focus-visible + span { outline: 3px solid #8cc4f0; outline-offset: 2px; }
.pay-total { display: grid; text-align: right; }
.pay-total b { font-size: 1.25rem; color: var(--brand); }
/* organisations: their students */
.student-list { display: grid; gap: 2px; max-height: 420px; overflow: auto; margin: 6px 0; }
.student-list .check { margin: 4px 0; }
.students-card .stack-form textarea { min-height: 110px; }
.grant-form input[type=search] { min-width: 140px; }

/* ---------------------------------------------------------------- Studio 13's dashboard (assets/admin.js) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 6px 0; }
.stat-tile { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); color: inherit; text-decoration: none; }
a.stat-tile:hover { border-color: #9cc0dd; box-shadow: var(--shadow); }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.5rem; color: var(--brand); line-height: 1.2; }
.stat-sub { font-size: .8rem; color: var(--muted); }
.warn-tile { background: var(--warn-bg); }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 18px; align-items: start; }
.bars { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; height: 180px; margin: 8px 0 26px; }
.bars-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); text-align: right; padding-bottom: 0; }
.bars-plot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent calc(50% - 1px), #edf1f7 calc(50% - 1px), #edf1f7 50%); }
.bar-slot { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline-offset: 1px; }
.bar-slot:hover .bar, .bar-slot:focus .bar { background: var(--brand); }
.bar { display: block; width: min(100%, 14px); min-height: 1px; background: #014caf; border-radius: 4px 4px 0 0; }
.bar-x { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.chart-tip { position: absolute; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: .8rem; padding: 4px 8px; border-radius: 6px; }
.small-table { width: 100%; font-size: .85rem; }
.share-row { display: grid; grid-template-columns: 7em minmax(0, 1fr) 3em; gap: 8px; align-items: center; font-size: .88rem; margin: 4px 0; }
.share-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.share-bar span { display: block; height: 100%; background: #014caf; border-radius: 4px; }
.share-row b { text-align: right; }
.services { display: grid; gap: 8px; margin: 8px 0; }
.service { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.service.due { border-color: #ffd3a3; background: #fff8ef; }
.sv-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.list-tabs { margin: 0 0 10px; padding: 0; border-top: 0; }
#super-tabs { margin-top: 0; }

/* schools' queries to Studio 13; Studio 13's admins */
details.query { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: #fff; }
details.query summary { cursor: pointer; }
.thread { display: grid; gap: 8px; margin: 10px 0; }
.msg { padding: 8px 10px; border-radius: 10px; background: var(--soft); max-width: 85%; }
.msg.studio { background: #eaf2ff; justify-self: end; }
.msg-head { display: flex; gap: 10px; justify-content: space-between; font-size: .85rem; }
.msg-body { margin-top: 4px; white-space: normal; }
.reply-form { display: grid; gap: 6px; }
.reply-form textarea { width: 100%; }
.perm-boxes { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.warn-text { color: var(--warn); }

/* sign-up: who you are (several allowed) */
.role-pick { border: 0; padding: 0; margin: 8px 0 2px; display: grid; gap: 6px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.role-opt:has(input:checked) { border-color: var(--brand-2); background: #eef4ff; }
.role-opt input { margin-top: 3px; accent-color: var(--brand-2); flex: none; }
.role-opt span { display: grid; }
.role-opt small { color: var(--muted); font-size: .8rem; }

/* tests: publish after adding the questions */
.publish-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--soft); border: 1px dashed var(--line); }
