/* Classroom layer: lesson records, class sign-in, the teacher's classes and review screens.
   Loaded after polish.css and uses its tokens (--ink, --card, --line, --blue, --radius …). */
:root {
  --ok: #2f8f5b;
  --ok-bg: #e3f3e8;
  --warn: #b7791f;
  --warn-bg: #fdf3d8;
  --bad: #b8432b;
  --bad-bg: #fbebe5;
  --info-bg: #edf3e6;
}

/* ---------- Shared bits ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #efeae0;
  color: var(--muted);
  white-space: nowrap;
}
.chip-draft {
  background: var(--info-bg);
  color: var(--blue-dark);
}
.chip-submitted {
  background: var(--warn-bg);
  color: #7a4d0b;
}
.chip-reviewed,
.chip-feedback {
  background: var(--ok-bg);
  color: #18492f;
}
.chip-feedback {
  box-shadow: 0 0 0 2px var(--ok);
}
.chip-returned {
  background: var(--bad-bg);
  color: #6e2b16;
}
.confirm-box {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  border: 1px solid #ecd58e;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.confirm-box p {
  flex: 1 1 100%;
  margin: 0 0 4px;
}
.confirm-box input {
  flex: 1 1 220px;
}
.inline-confirm {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--warn-bg);
  border-radius: 10px;
  padding: 6px 10px;
}
button.danger {
  background: var(--bad);
  color: #fff;
  border: 0;
  border-radius: 10px;
}
button.danger:hover {
  background: #933421;
}
.link-button.danger-link {
  color: var(--bad);
}
.cl-note,
.cl-error,
.save-notice {
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  border-left: 4px solid var(--ok);
  background: var(--ok-bg);
}
.cl-error,
.save-notice.warn {
  border-left-color: var(--bad);
  background: var(--bad-bg);
}
.cl-loading,
.cl-empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}
.cl-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: sx-spin 0.8s linear infinite;
}
@keyframes sx-spin {
  to {
    transform: rotate(360deg);
  }
}
input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(36, 87, 197, 0.35);
  outline-offset: 1px;
  border-color: var(--blue);
}
textarea[readonly],
input[readonly] {
  background: #f6f3ec;
  color: var(--ink);
}

/* ---------- Investigate: class card on the board ---------- */
.class-entry:empty {
  display: none;
}
.class-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #edf3e6, #fffdf8 70%);
  border: 1px solid #cddfc4;
  box-shadow: var(--soft-shadow);
}
.class-card.signed-in {
  background: linear-gradient(135deg, #e3f3e8, #fffdf8 70%);
  border-color: #b9dcc5;
}
.class-card h2 {
  margin: 2px 0 4px;
  font-size: 24px;
}
.class-card p {
  margin: 0;
}
.class-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* ---------- Sign-in forms ---------- */
.cl-signin {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}
.cl-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 14px;
}
.cl-form h2 {
  margin: 0;
}
.cl-form label,
.tc-feedback label,
.tc-add label,
.tc-settings label,
.tc-assign label,
.tc-new label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.cl-form label span,
.tc-feedback label span,
.tc-add label span,
.tc-settings label span,
.tc-assign label span,
.tc-new label span {
  font-size: 14px;
  color: var(--muted);
}
.cl-form input {
  font-size: 20px;
  padding: 14px 16px;
  letter-spacing: 0.02em;
}
.cl-form input[name="classCode"] {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.cl-form.inline {
  margin: 12px 0;
  border-color: #ecd58e;
  background: var(--warn-bg);
}
.cl-form p {
  margin: 0;
}
button.big {
  font-size: 18px;
  padding: 14px 20px;
}
.cl-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.cl-aside {
  padding: 8px 4px;
}
.cl-aside h3 {
  margin-top: 0;
}

/* ---------- Student home ---------- */
.cl-head {
  align-items: center;
}
.signout-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 18px;
  color: var(--ink);
  font-size: 14px;
}
.signout-btn b {
  font-size: 18px;
}
.signout-btn.small {
  flex-direction: row;
  gap: 6px;
  padding: 6px 12px;
  border-width: 1px;
  font-size: 14px;
  float: right;
}
.signout-btn.small b {
  font-size: 14px;
}
.cl-lessons {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.cl-lesson {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--soft-shadow);
  color: var(--ink);
}
.cl-lesson:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.cl-lesson-body {
  display: grid;
  gap: 2px;
}
.cl-lesson-body small {
  color: var(--muted);
  font-weight: 700;
}
.cl-lesson-body b {
  font-size: 18px;
}
.cl-lesson-body span {
  color: var(--muted);
  font-size: 14px;
}
.lesson-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  flex: none;
}

/* ---------- Lesson record (shared by team-slot and class modes) ---------- */
.rec-bar,
.cl-recbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin: 0 0 16px;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--soft-shadow);
}
.rec-bar p,
.cl-recbar p {
  margin: 0;
}
.cl-status,
.save-status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 15px;
  color: var(--muted);
}
.cl-status .tick {
  color: var(--ok);
  font-weight: 800;
}
.cl-status.s-saved,
.cl-status.s-locked {
  color: #18492f;
}
.cl-status.s-offline,
.cl-status.s-error,
.cl-status.s-expired,
.cl-status.s-conflict {
  color: #6e2b16;
  background: var(--bad-bg);
  padding: 4px 10px;
  border-radius: 8px;
}
.spin {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: sx-spin 0.8s linear infinite;
}
.rec-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
}
.rec-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}
.rec-section h3 {
  margin: 14px 0 6px;
  font-size: 17px;
}
.rec-q {
  font-weight: 700;
  font-size: 18px;
}
.rec-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.rec-field span {
  font-weight: 700;
}
.rec-field textarea {
  font-size: 17px;
  line-height: 1.45;
  resize: vertical;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rec-table td {
  padding: 4px;
}
.rec-table input {
  min-width: 110px;
  padding: 8px;
  font-size: 16px;
}
.rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.cl-exit {
  border: 2px solid var(--blue);
  background: #f8faf4;
}
.exit-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
  background: #fff;
}
.exit-block summary,
.save-facts summary {
  font-weight: 700;
  cursor: pointer;
}
.cl-feedback {
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
  background: var(--ok-bg);
  border: 2px solid var(--ok);
}
.cl-feedback h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.cl-fb-comment {
  font-size: 18px;
  white-space: pre-wrap;
}
.present-safety {
  background: var(--warn-bg);
  border-radius: 10px;
  padding: 8px 12px;
}
.source-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}

/* Team slots (practice without a class) */
.slot-chooser h2 {
  margin-top: 0;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.slot {
  display: grid;
  gap: 2px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
}
.slot b {
  font-size: 18px;
}
.slot span {
  color: var(--muted);
  font-size: 13px;
}
.teacher-only {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

/* ---------- Teacher: My classes ---------- */
.tc-userbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 8px;
}
.tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 12px 0 20px;
}
.tc-class-card {
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--soft-shadow);
  color: var(--ink);
}
button.tc-class-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.tc-class-card.archived {
  opacity: 0.7;
  border-top-color: var(--line-strong);
}
.tc-class-card b {
  font-size: 20px;
  font-family: var(--heading-font);
}
.tc-class-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.tc-code code,
.tc-join-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.tc-new {
  border-top-color: var(--accent);
  border-style: dashed;
  border-top-style: solid;
}
.tc-class-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.tc-class-head h2 {
  margin: 2px 0;
  font-size: 30px;
}
.tc-class-head p {
  margin: 0;
}
.tc-join {
  display: grid;
  gap: 2px;
  text-align: center;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 20px;
  max-width: 320px;
}
.tc-join span {
  font-size: 13px;
  opacity: 0.85;
}
.tc-join-code {
  font-size: 36px;
  color: var(--lime);
}
.tc-join-code.small {
  font-size: 18px;
  color: var(--ink);
}
.tc-assign,
.tc-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}
.tc-assign label {
  flex: 1 1 320px;
}
.tc-settings label {
  flex: 1 1 200px;
}
.tc-asgs {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tc-asg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.tc-asg-main {
  flex: 1 1 360px;
  display: grid;
  gap: 6px;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
}
.tc-asg-main b {
  font-size: 17px;
}
.tc-bar {
  display: flex;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: #efeae0;
}
.tc-bar i {
  display: block;
}
.seg-none {
  background: #e3dccd;
}
.seg-draft {
  background: #a8c596;
}
.seg-submitted {
  background: #e7b54a;
}
.seg-reviewed {
  background: var(--ok);
}
.seg-returned {
  background: #d98b74;
}
.tc-counts,
.tc-levels {
  font-size: 14px;
  color: var(--muted);
}
.tc-levels {
  color: #18492f;
}
.tc-archived {
  margin: 16px 0;
}
.tc-archived summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
.tc-codes {
  background: var(--warn-bg);
  border: 1px solid #ecd58e;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 12px 0 20px;
}
.tc-codes h3 {
  margin-top: 0;
}
.tc-codes code {
  font-size: 18px;
  font-weight: 700;
}
.tc-add {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 12px 0 20px;
}
.tc-add p {
  margin: 0;
}
.tc-roster tr.archived td {
  color: var(--muted);
}
.tc-roster tr.open td {
  background: var(--info-bg);
}
.tc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tc-actions button:not(.link-button),
.tc-roster td button:not(.link-button):not(.primary):not(.danger) {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--ink);
}
.danger-zone {
  border-color: #e7b2a3;
}
.tc-review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.tc-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 20px;
  align-items: start;
}
.tc-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--soft-shadow);
}
.tc-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.tc-panel-head h3 {
  margin: 0;
  font-size: 24px;
}
.tc-panel h4 {
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: var(--muted);
}
.tc-answer {
  margin: 6px 0;
}
.tc-answer span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.tc-answer p,
.tc-exit-a {
  margin: 2px 0 0;
  white-space: pre-wrap;
}
.tc-exit {
  border-left: 4px solid var(--blue);
  padding: 4px 0 4px 12px;
  margin: 10px 0;
}
.tc-exit-q {
  font-weight: 700;
  margin: 0;
}
.tc-exit-a {
  font-size: 17px;
  background: #f8faf4;
  border-radius: 8px;
  padding: 8px 10px;
}
.tc-exit .example {
  font-size: 14px;
}
.tc-feedback {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 8px;
}
.tc-feedback fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.tc-feedback legend {
  font-weight: 700;
  margin-bottom: 6px;
}
.radio-chip {
  display: inline-flex;
}
.radio-chip input {
  position: absolute;
  opacity: 0;
}
.radio-chip span {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.radio-chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.radio-chip input:focus-visible + span {
  outline: 3px solid rgba(36, 87, 197, 0.45);
}
label.check {
  display: flex !important;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}

/* WIP teach components without styles yet */
.teach-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin: 12px 0 18px;
}
.between-flag {
  background: var(--warn-bg);
  border-radius: 10px;
  padding: 8px 12px;
}
.likely {
  color: var(--muted);
  font-style: italic;
}
.example.partial {
  color: var(--muted);
}
.timings summary {
  cursor: pointer;
  font-weight: 700;
}
.timing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.timing-grid label {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.timing-grid input {
  width: 70px;
  padding: 6px 8px;
}
.task-lessons {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.task-lessons button {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
}
.task-lessons .lesson-num {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

/* ---------- Printing: sign-in cards ---------- */
.sign-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.sign-card {
  border: 1px dashed #777;
  padding: 12pt 14pt;
  break-inside: avoid;
}
.sign-card p {
  margin: 3pt 0;
  display: flex;
  justify-content: space-between;
  gap: 8pt;
}
.sign-card span {
  color: #444;
}
.sign-card b {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14pt;
}
.sign-alias {
  font-size: 18pt;
  font-weight: 800;
}
.sign-site,
.sign-tip {
  font-size: 8.5pt;
  color: #444;
}

/* ---------- Layout ---------- */
@media (max-width: 900px) {
  .cl-signin,
  .tc-review {
    grid-template-columns: 1fr;
  }
  .tc-panel {
    position: static;
    max-height: none;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .class-card-actions {
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  .cl-lesson {
    grid-template-columns: auto 1fr;
  }
  .cl-lesson .chip {
    grid-column: 2;
    justify-self: start;
  }
  .tc-join {
    max-width: none;
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .spin,
  .cl-loading::before {
    animation: none;
  }
  .cl-lesson:hover,
  button.tc-class-card:hover {
    transform: none;
  }
}
@media print {
  .cl-recbar,
  .rec-bar {
    position: static;
  }
}

/* ---------- Polish pass ---------- */
/* Secondary buttons: anything in the app areas without its own style. */
:is(#class-content, #teach-content, #task-content, .confirm-box, .rec-actions) button:not([class]),
.tc-feedback button:not(.primary),
.rec-actions button:not(.primary):not(.danger):not(.link-button) {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--ink);
  font-weight: 600;
}
:is(#class-content, #teach-content, #task-content, .confirm-box, .rec-actions) button:not([class]):hover {
  border-color: var(--ink);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
/* Who is signed in (header), so a shared iPad always shows whose work is open. */
.who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ok-bg);
  color: #18492f;
  border: 1px solid #b9dcc5;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who span {
  color: var(--ok);
  font-size: 10px;
}
.who small {
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.who[hidden] {
  display: none;
}
/* Floating save status while a student scrolls down the record. */
.cl-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  margin: 0;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 253, 248, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: var(--soft-shadow);
  max-width: min(92vw, 520px);
  pointer-events: none;
}
.cl-dock.s-offline,
.cl-dock.s-error,
.cl-dock.s-expired,
.cl-dock.s-conflict {
  background: var(--bad-bg);
  border-color: #e7b2a3;
}
.cl-dock button {
  display: none;
}
body.presenting .cl-dock,
body.print-mode .cl-dock {
  display: none;
}
/* Review table: compact so the work panel gets the room. */
.tc-review {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.tc-review .tc-roster {
  font-size: 14px;
}
.tc-review .tc-roster td,
.tc-review .tc-roster th {
  padding: 8px 10px;
}
.tc-when {
  white-space: nowrap;
}
.tc-when small {
  color: var(--muted);
}
.tc-roster button.primary {
  padding: 6px 14px;
  font-size: 14px;
}
@media print {
  .cl-dock,
  .who {
    display: none !important;
  }
}
.tc-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 0;
  font-weight: 800;
  color: var(--blue);
  text-align: left;
}
.tc-name span {
  color: var(--muted);
}
.tc-name.none {
  color: var(--muted);
  font-weight: 700;
}
.tc-name.todo::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e7b54a;
}
/* Assign from a lesson plan */
.assign-here {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  border: 1px solid #cddfc4;
}
.assign-here label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  flex: 1 1 220px;
}
.assign-here button[type="submit"] {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
}
.assign-here.muted {
  display: block;
  background: none;
  border-style: dashed;
  color: var(--muted);
}
.assign-msg {
  flex: 1 1 100%;
  color: #18492f;
  font-weight: 600;
}
/* Class code on the big screen */
.tc-join-show {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
}
.join-slide {
  text-align: center;
}
.join-step {
  font-size: clamp(20px, 3vw, 34px);
  margin: 8px 0;
}
.join-label {
  margin: 36px 0 0;
  font-size: 22px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.join-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 800;
  font-size: clamp(72px, 14vw, 180px);
  letter-spacing: 0.12em;
  margin: 0;
  color: var(--ink);
}
.join-tip {
  margin-top: 28px;
  font-size: 20px;
  color: var(--muted);
}

/* ---------- Reading and learning supports ---------- */
.support-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}
.support-button span {
  font-family: Georgia, serif;
  font-size: 18px;
}
.support-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px -20px rgba(29, 42, 58, 0.5);
}
.support-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.support-head h2 {
  margin: 0;
}
.support-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.support-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.support-row input {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 2px;
}
.support-row b {
  display: block;
  font-size: 17px;
}
.support-row small {
  color: var(--muted);
  font-size: 14px;
}
.support-tips h3 {
  margin: 14px 0 6px;
  font-size: 16px;
}
.support-tips ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.support-tips li {
  margin: 4px 0;
}
.q-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.q-line > span:first-child {
  flex: 1;
}
button.say {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
button.say[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
}
.sx-listen button.say {
  display: inline-grid;
  place-items: center;
}
.starter-btn {
  justify-self: start;
  background: var(--info-bg);
  color: var(--blue-dark);
  border: 1px dashed #a8c596;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 14px;
}
.voice-tip {
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 15px;
}
.support-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.support-chip {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.support-chip[aria-pressed="true"] {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: #18492f;
}
.tc-supports-note {
  font-size: 13px;
  color: #18492f;
  background: var(--ok-bg);
  border-radius: 8px;
  padding: 4px 8px;
}
/* Bigger text: zoom keeps every pixel-sized part in proportion. */
.sx-big main {
  zoom: 1.2;
}
.sx-big .support-panel {
  zoom: 1.15;
}
/* More space between letters, words and lines (British Dyslexia Association style guide). */
.sx-spacing body,
.sx-spacing input,
.sx-spacing textarea,
.sx-spacing button {
  letter-spacing: 0.06em;
  word-spacing: 0.16em;
}
.sx-spacing main p,
.sx-spacing main li,
.sx-spacing main label,
.sx-spacing main textarea,
.sx-spacing main td {
  line-height: 1.75;
}
.sx-spacing main p,
.sx-spacing main li {
  max-width: 70ch;
}
/* Easy-read font: plain sans serif, no italics, no all-caps. */
.sx-easyfont body,
.sx-easyfont h1,
.sx-easyfont h2,
.sx-easyfont h3,
.sx-easyfont input,
.sx-easyfont textarea,
.sx-easyfont button,
.sx-easyfont select {
  font-family: Verdana, Tahoma, "Trebuchet MS", "Segoe UI", sans-serif !important;
}
.sx-easyfont i,
.sx-easyfont em,
.sx-easyfont .likely {
  font-style: normal;
}
.sx-easyfont .eyebrow,
.sx-easyfont .pill {
  text-transform: none;
  letter-spacing: 0.02em;
}
/* Calm colours: off-white paper, dark text, fewer tints and shadows. */
.sx-calm body {
  background: #fbfaf5;
}
.sx-calm main :is(.class-card, .rec-section, .cl-lesson, .cl-form, .tc-class-card, .hub-card, .lab-tile) {
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
.sx-calm main :is(.eyebrow, .tc-levels) {
  color: var(--ink) !important;
  filter: none;
}
@media (max-width: 700px) {
  .support-button {
    padding: 6px 10px;
    font-size: 0;
  }
  .support-button span {
    font-size: 18px;
  }
}
@media print {
  .support-button,
  .support-panel,
  button.say,
  .starter-btn,
  .voice-tip {
    display: none !important;
  }
}

/* ---------- Simpler sign-in: QR codes and a remembered class ---------- */
svg.qr {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.scan-tip {
  display: flex !important;
  gap: 12px;
  align-items: flex-start;
  background: var(--info-bg);
  border: 1px solid #cddfc4;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}
.scan-tip > span:first-child {
  font-size: 26px;
  line-height: 1;
}
.or-type {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.or-type::before,
.or-type::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.cl-class-known {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  background: var(--ok-bg);
  border: 1px solid #b9dcc5;
  border-radius: 12px;
  padding: 10px 14px;
}
.cl-class-known > span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}
.cl-class-known b {
  font-size: 18px;
}
.cl-class-known small {
  font-family: ui-monospace, Menlo, monospace;
  color: var(--muted);
}
.cl-class-known .link-button {
  margin-left: auto;
}
.sign-card {
  display: grid;
  grid-template-columns: 30mm 1fr;
  gap: 10pt;
  align-items: center;
}
.sign-qr {
  text-align: center;
}
.sign-qr small {
  display: block;
  font-size: 7pt;
  color: #444;
  margin-top: 2pt;
}
.sign-text p {
  margin: 3pt 0;
  display: flex;
  justify-content: space-between;
  gap: 8pt;
}
.join-grid {
  display: grid;
  grid-template-columns: minmax(200px, 340px) 1fr;
  gap: 40px;
  align-items: center;
  text-align: left;
}
.join-qr {
  text-align: center;
}
.join-qr p {
  font-size: 18px;
  color: var(--muted);
}
.join-grid .join-code {
  text-align: left;
}
@media (max-width: 800px) {
  .join-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .join-qr {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* ---------- Two ways in: with my class, or free ---------- */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.mode-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid #cddfc4;
  background: linear-gradient(135deg, #edf3e6, #fffdf8 75%);
  box-shadow: var(--soft-shadow);
}
.mode-card.mode-free {
  border-color: #ecd58e;
  background: linear-gradient(135deg, #fdf3d8, #fffdf8 75%);
}
.mode-card h2 {
  margin: 0;
  font-size: 26px;
}
.mode-card .eyebrow {
  margin: 0;
}
.mode-card ul {
  margin: 0 0 6px;
  padding-left: 20px;
}
.mode-card li {
  margin: 2px 0;
}
.mode-card small {
  color: var(--muted);
  text-align: center;
}
.mode-card button.big:not(.primary) {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-weight: 800;
  color: var(--ink);
}
.free-badge {
  display: inline-block;
  background: var(--warn-bg);
  border: 1px solid #ecd58e;
  color: #7a4d0b;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 800;
  margin-right: 4px;
}
.teach-free {
  font-size: 15px;
}
@media (max-width: 640px) {
  .mode-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Name + PIN sign-in and self-joining ---------- */
.cl-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 6px;
}
.cl-modes button {
  min-height: 54px;
  border-radius: 14px;
  border: 2px solid var(--line-strong, #cfc5b1);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.cl-modes button.active {
  border-color: var(--blue, #2f6b3a);
  background: #eaf2e3;
  color: var(--blue, #2f6b3a);
}
.pin-input {
  font-size: 28px !important;
  letter-spacing: 0.5em;
  max-width: 200px;
  text-align: center;
}
.cl-alt {
  margin: 4px 0 0;
  text-align: center;
}
.tc-joining {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line, #e3dccd);
  border-left: 6px solid #9aa3ad;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 16px;
}
.tc-joining.open {
  border-left-color: #2f7d32;
  background: #f1f9ef;
}
.tc-joining h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.tc-joining p {
  margin: 0;
  max-width: 640px;
}
.tc-add-more {
  margin: 0 0 16px;
}
.tc-add-more > summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* ---------- Curriculum tracker ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.cur-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0;
  font-size: 14px;
}
.cur-legend span {
  padding: 3px 10px;
  border-radius: 999px;
}
.cur-grid th small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}
.cur-code {
  white-space: nowrap;
}
.cur-grid td {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}
.lv-secure {
  background: #dff1df;
  color: #22663a;
}
.lv-developing {
  background: #fdf0c4;
  color: #8a6200;
}
.lv-notyet {
  background: #fde2dc;
  color: #a33a22;
}
.st-submitted {
  background: #eaf2e3;
  color: #234f2b;
}
.st-draft {
  background: #f3f1ec;
  color: #5a6573;
}
.st-none {
  color: #9aa3ad;
}
