:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #173646;
  background: #eff4f7;
  font-size: 16px;
  --navy: #123f52;
  --blue: #165e7d;
  --orange: #f3bb45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
aside {
  width: 255px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--navy);
  color: white;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  font-size: 20px;
  font-weight: 700;
}
.logo {
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--navy);
  width: 43px;
  height: 43px;
  border-radius: 12px;
  font-size: 17px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-top: 6px;
  color: #bfd5de;
}
nav {
  margin-top: 52px;
  display: grid;
  gap: 10px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 12px 16px;
  font-weight: 600;
}
nav button {
  text-align: left;
  color: #9ebdca;
  background: transparent;
  font-size: 14px;
  display: flex;
  gap: 15px;
  align-items: center;
}
nav button span {
  color: #e8f2f7;
  font-size: 16px;
}
nav button.active {
  background: var(--orange);
  color: #0f3445;
}
.aside-bottom {
  margin-top: auto;
  padding: 25px 8px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #c4d9e1;
}
.aside-bottom p {
  margin-top: 8px;
}
main {
  margin-left: 255px;
  padding: 35px 42px;
  max-width: 1600px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #537484;
}
h1 {
  font-size: 32px;
  margin: 9px 0 0;
  letter-spacing: -0.04em;
}
.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pill,
.tag {
  display: inline-block;
  border: 1px solid #ccdae0;
  border-radius: 30px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.aside-bottom .pill {
  border-color: #4a7180;
}
.notice {
  background: #dceaf1;
  border-left: 3px solid var(--blue);
  padding: 13px 17px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 0 8px 8px 0;
}
.notice span {
  font-weight: 600;
}
.intro {
  margin: 30px 0 23px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 0 0 9px;
}
p {
  line-height: 1.65;
  color: #58717e;
  margin: 8px 0 16px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 23px;
  align-items: start;
}
.card {
  background: white;
  border: 1px solid #d8e3e9;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px #123f5204;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.card-head h3 {
  margin: 0;
}
.tag {
  background: #f1f6f8;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 15px 0;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  margin-top: 6px;
  border: 1px solid #c7d7df;
  border-radius: 7px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: #173646;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 85px;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #edb43e;
  outline-offset: 2px;
}
.row {
  display: flex;
  gap: 12px;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.primary {
  background: var(--blue);
  color: white;
}
.secondary {
  background: #edf3f6;
  color: #204c63;
  border: 1px solid #cedde5;
}
.primary:hover {
  background: #10445c;
}
.secondary:hover {
  background: #dce9ee;
}
.text-button {
  padding: 5px;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
}
.hint {
  font-size: 13px;
  line-height: 1.6;
  margin: 13px 0 0;
}
.document {
  height: 565px;
  border: 0;
  border-radius: 0;
  background: #fafcfd;
  padding: 20px;
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 20px;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.chips button {
  font-size: 12px;
  padding: 8px;
  background: #ecf2f6;
  color: #32566a;
}
.empty {
  padding: 40px 0;
}
.callout {
  background: #e5eef3;
  padding: 20px;
  border-radius: 10px;
  margin-top: 25px;
  font-size: 14px;
}
.callout p {
  margin-bottom: 0;
}
.spaced {
  margin-top: 23px;
}
h3 {
  font-size: 19px;
}
.score {
  font-size: 64px;
  font-weight: 700;
  color: var(--blue);
  margin: 25px 0;
}
.score small {
  font-size: 24px;
  color: #79909d;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #dfe8ed;
  vertical-align: top;
}
th {
  background: #f2f6f8;
}
.game {
  background: var(--navy);
  color: white;
  min-height: 460px;
}
.game .tag {
  color: #163f52;
  background: #f3bb45;
  border: 0;
}
.game .text-button {
  color: white;
}
.game h3 {
  font-size: 30px;
  line-height: 1.4;
  margin: 35px 0 25px;
}
.game p {
  color: #c6dce5;
}
.game .answer {
  background: #2a6177;
  border-radius: 10px;
  padding: 20px;
  font-size: 23px;
  margin-bottom: 20px;
}
.game .team-scores {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}
.team-scores button {
  flex: 1;
  background: #2a6177;
  color: white;
}
.game:fullscreen {
  padding: 6vw;
  overflow: auto;
}
.slide {
  min-height: 330px;
  padding: 35px;
  background: #e7f0f5;
  border-top: 6px solid var(--orange);
  margin-bottom: 20px;
  white-space: pre-wrap;
  font-size: 20px;
  line-height: 1.7;
}
.slide h3 {
  font-size: 30px;
  color: var(--navy);
  margin-top: 0;
}
.resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.resource {
  display: block;
  text-decoration: none;
  color: inherit;
}
.resource span:last-child {
  font-size: 14px;
  color: var(--blue);
  font-weight: 600;
}
.resource:hover {
  border-color: #2b7895;
}
.saved-item {
  padding: 16px 0;
  border-bottom: 1px solid #e1e9ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.saved-item p {
  margin: 5px 0;
  font-size: 14px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #66828f;
  font-size: 12px;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #d5e1e7;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #123f52;
  color: white;
  max-width: 90vw;
  padding: 14px 22px;
  border-radius: 10px;
  display: none;
  z-index: 30;
}
a {
  color: #165e7d;
}
.import {
  cursor: pointer;
  margin: 0;
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  aside {
    width: 215px;
    padding: 25px 15px;
  }
  main {
    margin-left: 215px;
    padding: 25px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .resources {
    grid-template-columns: 1fr;
  }
  .document {
    height: 450px;
  }
}
@media (max-width: 650px) {
  aside {
    position: static;
    width: 100%;
    padding: 20px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 20px;
    gap: 8px;
  }
  nav button {
    flex: none;
    padding: 10px;
  }
  nav button span {
    font-size: 14px;
  }
  nav button {
    font-size: 0;
    gap: 0;
  }
  .aside-bottom {
    display: none;
  }
  main {
    margin: 0;
    padding: 22px 15px;
  }
  header {
    align-items: start;
  }
  h1 {
    font-size: 27px;
  }
  header {
    flex-wrap: wrap;
  }
  .header-right {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 8px;
  }
  .header-right button {
    font-size: 12px;
    padding: 9px;
  }
  .card {
    padding: 20px;
  }
  .row {
    flex-wrap: wrap;
  }
  .row > * {
    flex-basis: 140px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  footer span {
    display: none;
  }
  .game h3 {
    font-size: 25px;
  }
}
@media print {
  aside,
  header,
  .notice,
  footer,
  button,
  form,
  .intro {
    display: none !important;
  }
  main {
    margin: 0;
    padding: 0;
  }
  .view {
    display: none !important;
  }
  .view.printing {
    display: block !important;
  }
  .card {
    border: 0;
    box-shadow: none;
  }
  .grid {
    display: block;
  }
  .document {
    height: auto;
  }
  .slide {
    break-after: page;
    min-height: 85vh;
  }
}
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
}
.pack {
  border-top: 1px solid #dce6ec;
  padding: 20px 0;
}
.pack h3 {
  margin: 0 0 6px;
}
.pack p {
  font-size: 14px;
}
.pack .row {
  flex-wrap: wrap;
}
.pack button {
  font-size: 14px;
  padding: 10px;
}
.pack .tag {
  margin-bottom: 10px;
}
#portableDownload {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
}
ol {
  padding-left: 25px;
  line-height: 1.9;
}

/* v0.3 backup reminder */
.reminder {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff4d6;
  border: 1px solid #f3bb45;
  color: #123f52;
  font-weight: 600;
}
.reminder[hidden] {
  display: none;
}
.reminder-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
#lastBackupLabel {
  display: block;
  font-weight: 400;
  margin-top: 4px;
}

/* Site footer (About · Contact · Privacy · Terms) */
footer.site-footer-app {
  display: block;
}
.site-footer-app nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 6px;
}
.site-footer-app a {
  color: #123f52;
  font-weight: 600;
  font-size: 14px;
}
.site-footer-app p {
  margin: 0;
}

/* WhatsApp contact */
.wa-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f8f4e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  margin-top: 8px;
}
.callout.whatsapp {
  border-left-color: #1f8f4e;
}

/* v0.6 NaCCA planner */
.curr-status {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 4px 0 10px;
  background: #eef4f7;
}
.curr-status.ok {
  background: #e6f4ea;
  color: #1d5a32;
}
.curr-status.warn {
  background: #fff4d6;
  color: #6b4b00;
}
#currPickers select,
#lnIndicator {
  white-space: normal;
}
.row.tight {
  gap: 12px;
  margin: 0;
}
.note-doc {
  background: #fff;
  border: 1px solid #d5e1e7;
  border-radius: 10px;
  padding: 12px;
  min-height: 300px;
  max-height: 75vh;
  overflow: auto;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
}
.note-doc:focus {
  border-color: #165e7d;
}
.note-doc table,
.scheme-out table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0 10px;
}
.note-doc th,
.note-doc td,
.scheme-out th,
.scheme-out td {
  border: 1px solid #b9c9d2;
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}
.note-doc th,
.scheme-out th {
  background: #eef4f7;
  font-weight: 700;
}
.ln-head th {
  width: 24%;
}
.note-doc ol {
  margin: 2px 0 4px 18px;
  padding: 0;
}
.ln-title,
.scheme h3 {
  text-align: center;
  font-size: 16px;
  margin: 4px 0 8px;
}
.ln-foot {
  font-size: 12px;
  color: #66828f;
}
.note-doc pre.plain {
  white-space: pre-wrap;
  font: inherit;
}
.scheme-out {
  overflow-x: auto;
  font-size: 14px;
}
@media (max-width: 700px) {
  .note-doc {
    font-size: 13px;
    padding: 8px;
  }
  .ln-head th {
    width: 34%;
  }
}

.more-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}
.more-menu[hidden] {
  display: none;
}
.more-menu button {
  padding: 8px 12px;
  font-size: 14px;
}

/* v0.8 tests & exams */
.ind-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d5e1e7;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  margin-bottom: 8px;
  font-size: 14px;
}
.ind-list summary {
  cursor: pointer;
  padding: 6px 0;
}
.ind-sub {
  margin: 4px 0 8px 6px;
}
.ind-list .toggle.ind {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  margin: 4px 0;
}
.t-editor {
  font-size: 14px;
}
.t-head {
  background: #eef4f7;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.t-todo {
  color: #6b4b00;
}
.t-q {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e3ebef;
  padding: 10px 0;
}
.t-q.todo textarea[data-f="q"] {
  background: #fff4d6;
}
.t-num {
  font-weight: 700;
  min-width: 24px;
  padding-top: 6px;
}
.t-body {
  flex: 1;
  min-width: 0;
}
.t-body textarea {
  width: 100%;
  box-sizing: border-box;
}
.t-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.t-opts label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
  margin: 0;
}
.t-opts input {
  flex: 1;
  min-width: 0;
}
.t-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.t-meta label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.t-meta input[type="number"] {
  width: 70px;
}
.t-scheme {
  margin-top: 6px;
}
@media (max-width: 560px) {
  .t-opts {
    grid-template-columns: 1fr;
  }
}

/* v0.9 review fixes: contrast, phone layout, large text */
.aside-bottom strong {
  color: #ffffff;
}
.aside-bottom {
  color: #e3eef3;
}
[tabindex="-1"]:focus {
  outline: none;
}
body.large-text main {
  zoom: 1.15;
}
@media (max-width: 520px) {
  .card .row:not(.tight),
  form .row:not(.tight) {
    flex-direction: column;
    gap: 0;
  }
  .card .row:not(.tight) > *,
  form .row:not(.tight) > * {
    flex: 0 0 auto; /* in a column the 140px basis became a 140px-tall button */
  }
  .card .row:not(.tight) > button,
  form .row:not(.tight) > button {
    width: 100%;
    margin-bottom: 8px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  .row.tight {
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: flex-start;
  }
  .card,
  .grid > * {
    min-width: 0;
  }
  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0;
  }
}
.ai-badge {
  background: #fff4d6;
  border: 1px solid #f3bb45;
  color: #5c4100;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 8px;
}

.guide {
  margin-bottom: 18px;
  border-left: 4px solid var(--orange);
}
.guide ol {
  margin: 0 0 0 18px;
  padding: 0;
  line-height: 1.6;
}

/* ---------- How TeacherBridge works (help.js) ---------- */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 30, 40, 0.55);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  overflow-y: auto;
}
.help-overlay[hidden] {
  display: none;
}
body.help-open {
  overflow: hidden;
}
.help-card {
  background: #fff;
  color: #173646;
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  padding: 20px 22px 26px;
  font-size: 17px;
  line-height: 1.55;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.help-head h2 {
  margin: 0;
  font-size: 22px;
}
.help-close {
  background: #eff4f7;
  color: #123f52;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  flex: none;
}
.help-lead {
  margin: 6px 0 12px;
  color: #3c5a68;
}
.help-devices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 700;
}
.help-devices button {
  border: 2px solid #165e7d;
  background: #fff;
  color: #165e7d;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
}
.help-devices button[aria-pressed="true"] {
  background: #165e7d;
  color: #fff;
}
.help-card details {
  border-top: 1px solid #dbe6ec;
}
.help-card summary {
  cursor: pointer;
  padding: 14px 4px;
  font-weight: 700;
  font-size: 18px;
  list-style-position: inside;
  min-height: 44px;
}
.help-body {
  padding: 0 4px 12px;
}
.help-body p,
.help-body li {
  color: #173646;
}
.help-body h4 {
  margin: 8px 0 4px;
}
.help-body li {
  margin-bottom: 6px;
}
.help-tip {
  background: #fff6dc;
  border-left: 4px solid #f3bb45;
  padding: 8px 12px;
  border-radius: 6px;
}
.help-foot {
  border-top: 1px solid #dbe6ec;
  padding-top: 14px;
  margin-bottom: 0;
}
.help-promo {
  margin-bottom: 16px;
}
.help-promo p {
  margin: 6px 0 10px;
}
.notice a {
  color: inherit;
  font-weight: 700;
  margin-left: 4px;
}
@media (max-width: 520px) {
  .help-overlay {
    padding: 0;
  }
  .help-card {
    border-radius: 0;
    min-height: 100%;
    padding: 16px;
  }
}

/* ---------- Start here (home) ---------- */
.home-hero h2 {
  font-size: 30px;
}
.home-how h3,
.home-sub {
  margin: 0 0 10px;
  font-size: 20px;
}
.home-sub {
  margin: 28px 0 12px;
}
.home-steps {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.55;
}
.home-steps li {
  margin-bottom: 8px;
}
.home-facts {
  list-style: none;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: #eff4f7;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.6;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.home-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  background: #fff;
  color: #173646;
  border: 1px solid #d8e3e9;
  border-radius: 15px;
  padding: 18px;
  font: inherit;
  line-height: 1.45;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 15px #123f5208;
}
.home-tile:hover,
.home-tile:focus-visible {
  border-color: #165e7d;
  box-shadow: 0 6px 18px #123f5222;
}
.home-tile strong {
  font-size: 18px;
}
.home-tile span {
  color: #3c5a68;
  font-size: 15px;
}
.home-icon {
  font-size: 28px;
}
.home-num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-weight: 700;
  color: #8aa3ae !important;
}
.home-open {
  margin-top: auto;
  font-weight: 700;
  color: #165e7d !important;
}
.home-pref {
  display: block;
  margin: 22px 0 8px;
}
@media (max-width: 520px) {
  .home-hero h2 {
    font-size: 24px;
  }
  .home-tiles {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tests: availability and paper check ---------- */
.t-avail {
  font-size: 15px;
  margin: 10px 0 0;
  padding: 0;
}
.t-avail.ok,
.t-avail.warn {
  padding: 10px 12px;
  border-radius: 8px;
}
.t-avail.ok {
  background: #e6f4ea;
}
.t-avail.warn {
  background: #fff6dc;
  border-left: 4px solid #f3bb45;
}
.t-check {
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0 14px;
  font-size: 15px;
}
.t-check ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.t-check.ok {
  background: #e6f4ea;
  border-left: 4px solid #2e7d32;
}
.t-check.warn {
  background: #fff6dc;
  border-left: 4px solid #f3bb45;
}
.t-check.bad {
  background: #fdecea;
  border-left: 4px solid #c62828;
}

/* ---------- Start here: returning teacher ---------- */
.home-ws h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.home-ws h4 {
  margin: 18px 0 8px;
  font-size: 17px;
}
.home-last {
  margin: 0 0 12px;
}
.ready-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ready-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #e3ecf0;
  line-height: 1.5;
}
.ready-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.ready-mark.ok {
  background: #2e7d32;
  color: #fff;
}
.ready-mark.todo {
  background: #f3bb45;
  color: #123f52;
}

/* ---------- Scheme: school scheme + write all notes ---------- */
.sch-school {
  margin: 14px 0;
  border: 1px solid #d8e3e9;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fafcfd;
}
.sch-school summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sch-school textarea {
  width: 100%;
  font: inherit;
  margin: 6px 0 10px;
}
.sch-pick {
  margin-top: 6px;
  max-width: 100%;
  font-size: 13px;
}
.sch-all {
  margin-top: 16px;
}
.sch-all .row {
  margin: 8px 0 12px;
}
.sch-list ol {
  padding-left: 22px;
}
.sch-list li {
  margin: 4px 0;
}

/* ---------- New address bar (old netlify.app address only) ---------- */
.move-bar {
  background: #123f52;
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
  line-height: 1.5;
}
.move-bar strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.move-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.move-bar .text-button,
.move-bar a.primary-link {
  color: #f3bb45;
  font-weight: 700;
}
.move-status {
  display: block;
  margin-top: 8px;
  font-weight: 700;
}

/* ---------- Lesson note on small phones: no sideways scrolling (screen only; print/Word keep the table) ---------- */
@media (max-width: 520px) {
  .note-doc table.ln-head,
  .note-doc table.ln-body,
  .note-doc .ln-head tbody,
  .note-doc .ln-body tbody {
    display: block;
    width: 100%;
  }
  .note-doc .ln-head tr {
    display: grid;
    grid-template-columns: 36% 64%;
  }
  .note-doc .ln-body tr {
    display: grid;
    grid-template-columns: 28% 72%;
  }
  .note-doc .ln-head th,
  .note-doc .ln-head td,
  .note-doc .ln-body th,
  .note-doc .ln-body td {
    display: block;
    width: auto !important;
    margin: -1px 0 0 -1px;
    overflow-wrap: anywhere;
  }
  .note-doc .ln-body tr:first-child th:nth-child(3) {
    display: none;
  }
  .note-doc .ln-body tr:not(:first-child) td:nth-child(3) {
    grid-column: 1 / -1;
    background: #f7fafb;
  }
  .note-doc .ln-body tr:not(:first-child) td:nth-child(3)::before {
    content: "Resources: ";
    font-weight: 700;
  }
}

/* v1.4 choice dialog */
.choose-card { max-width: 30rem; }
.choose-card h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.choose-body ul { margin: .25rem 0 .75rem 1.2rem; padding: 0; }
.choose-actions { display: flex; flex-direction: column; gap: .35rem; margin-top: 1rem; }
.choose-actions button { width: 100%; }
.choose-note { color: var(--muted, #5b6b75); margin: -.1rem 0 .5rem; font-size: .85rem; }
button.danger { background: #fff; color: #a3261b; border: 2px solid #a3261b; font-weight: 700; border-radius: 10px; padding: .7rem 1rem; cursor: pointer; }
button.danger:hover { background: #fdecea; }
.t-checks .t-check { margin: 6px 0; }
.t-checks { margin: 10px 0 14px; }
.t-check.todo { background: #eef3f7; border-left: 4px solid #123f52; }
.t-check.todo .row { margin-top: 8px; }

/* v1.4 Saved work filter */
.saved-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 6px 0 4px; }
.saved-filter label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 600; flex: 1 1 110px; }
.saved-filter .saved-search { flex: 2 1 220px; }
.saved-filter input, .saved-filter select { margin-top: 3px; }
.vet-tag { font-weight: 700; padding: 1px 6px; border-radius: 6px; font-size: .8rem; }
.vet-tag.approved { background: #e6f4ea; color: #1b5e20; }
.vet-tag.returned { background: #fdecea; color: #a3261b; }
.vet-tag.sent { background: #eef3f7; color: #123f52; }

/* v1.4 scheme review and timetable */
.sch-review { background: #fff6dc; border-left: 4px solid #f3bb45; padding: 8px 12px; border-radius: 8px; margin: 8px 0; }
.sch-how { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.sch-how.ok { background: #e6f4ea; color: #1b5e20; }
.sch-how.warn { background: #fff6dc; color: #7a5300; }
.sch-how.bad { background: #fdecea; color: #a3261b; }
.sch-how.muted { background: #eef3f7; color: #44525c; }
tr.sch-guess td { background: #fffbea; }
tr.sch-miss td { background: #fff5f4; }
.sch-tt { border: 1px solid #d5e0e7; border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.sch-tt legend { font-weight: 700; padding: 0 4px; }
.sch-days { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.sch-days label { display: flex; flex-direction: column; align-items: center; font-weight: 600; font-size: .85rem; }
.sch-days select { min-width: 3.4rem; }
.sch-hol { margin: 8px 0; }
.sch-hol ul { margin: 6px 0 0 1.1rem; padding: 0; }
.sch-confirm { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-weight: 600; }
.attention { outline: 3px solid #f3bb45; outline-offset: 3px; border-radius: 8px; }

/* v1.4 vetting */
.vet-card { max-width: 52rem; }
.vet-note { border: 1px solid #d5e0e7; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.vet-note h3 { margin: 0 0 6px; font-size: 1rem; }
.vet-doc { max-height: 60vh; overflow: auto; border: 1px solid #e3eaef; padding: 8px; margin: 6px 0; background: #fff; }
.vet-choice { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0; font-weight: 700; }
.vet-choice label { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid #c9d6de; border-radius: 8px; cursor: pointer; }
.vet-comment { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; }
.vet-me label { display: flex; flex-direction: column; font-weight: 600; flex: 1 1 160px; }
.ln-vet th { width: 18%; }

/* v1.4 coverage and counter */
.home-counter { background: #e6f4ea; border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.cov-list { list-style: none; padding: 0; margin: 6px 0; }
.cov-list li { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-bottom: 1px solid #e3eaef; }
.cov-bar { display: block; height: 8px; background: #e3eaef; border-radius: 6px; overflow: hidden; }
.cov-bar span { display: block; height: 100%; background: #2e7d32; }
.cov-list .text-button { align-self: flex-start; }
.usage-choice .reminder-actions button { min-width: 9rem; }
.sch-all label.sch-confirm { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; gap: 10px; text-align: left; width: 100%; }
.sch-all label.sch-confirm input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; }
.usage-choice > span:first-child { font-weight: 400; }
.usage-choice > span:first-child b { font-weight: 700; }
.sch-days { gap: 6px; }
.sch-days select { min-width: 0; width: 3.7rem; padding-left: 8px; padding-right: 4px; }

/* v1.5 My school */
.sch-who { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sch-chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 4px; }
.sch-chip.ok { background: #e6f4ea; color: #1b5e20; }
.sch-chip.wait { background: #eef3f7; color: #123f52; }
.sch-chip.bad { background: #fdecea; color: #a3261b; }
.sch-chip.muted { background: #fff6dc; color: #7a5300; }
.sch-weeks, .sch-inbox, .sch-members, .sch-missing { list-style: none; padding: 0; margin: 8px 0; }
.sch-weeks li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e3eaef; flex-wrap: wrap; }
.sch-weeks li > div { flex: 1 1 240px; }
.sch-inbox li button { width: 100%; text-align: left; background: #fff; border: 1px solid #d5e0e7; border-radius: 10px; padding: 10px 12px; margin: 6px 0; cursor: pointer; font: inherit; color: inherit; line-height: 1.5; }
.sch-inbox li button:hover { border-color: #123f52; }
.sch-members li, .sch-missing li { padding: 6px 0; border-bottom: 1px solid #eef3f7; }
.sch-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.sch-filters button { border: 1px solid #c9d6de; background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.sch-filters button.active { background: #123f52; color: #fff; border-color: #123f52; }
.sch-comments { background: #fff6dc; border-left: 4px solid #f3bb45; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.sch-comments p { margin: 4px 0; }
.sch-code { font-size: 1.3rem; letter-spacing: .08em; background: #eef3f7; padding: 2px 8px; border-radius: 6px; }
.sch-wa { display: inline-block; background: #25d366; color: #073b1c; font-weight: 700; padding: 8px 14px; border-radius: 10px; text-decoration: none; }
.sch-decide { border-top: 1px solid #e3eaef; margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sch-decide label { display: flex; flex-direction: column; font-weight: 600; }
.sch-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid #c9d6de; background: #fff; border-radius: 999px; padding: 5px 10px; cursor: pointer; font-size: .85rem; }
.warn-btn { border-color: #c77700 !important; color: #8a5300 !important; }
.sch-consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 8px 0; font-weight: 600; }
.sch-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
#schoolApp select[multiple] { min-height: 6rem; }
#schoolApp > .card, #schoolApp > div > .card { margin-bottom: 14px; }

/* v1.5.2 phones: the menu stays at the top of the screen while you scroll (logo + one swipeable row) */
@media (max-width: 650px) {
  aside {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  }
  aside .brand { flex: 0 0 auto; gap: 0; }
  aside .brand > span:not(.logo) { display: none; }
  aside .logo { width: 38px; height: 38px; font-size: 15px; }
  nav {
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
  nav::-webkit-scrollbar { display: none; }
  nav button { padding: 9px 11px; scroll-snap-align: start; white-space: nowrap; }
}

/* v1.6 My school — simple */
.sch-pick-role { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 520px) { .sch-pick-role { grid-template-columns: 1fr; } }
.sch-role { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #fff; border: 2px solid #d5e0e7; border-radius: 14px; padding: 16px; cursor: pointer; color: #123f52; }
.sch-role span { font-size: 2rem; }
.sch-role b { font-size: 1.15rem; }
.sch-role small { color: #5b6b75; font-weight: 500; }
.sch-role.on { border-color: #123f52; box-shadow: 0 0 0 3px #f3bb4566; }
.sch-simple { display: flex; flex-direction: column; gap: 10px; max-width: 34rem; }
.sch-simple label { display: flex; flex-direction: column; font-weight: 700; gap: 4px; }
.sch-simple input { font-size: 1.1rem; padding: 12px; }
button.big, a.big { font-size: 1.1rem; padding: 14px 18px; border-radius: 12px; width: 100%; text-align: center; }
.sch-legal { font-size: .85rem; }
.sch-join-title { font-size: 1.15rem; margin: 0; }
.sch-join-title b { font-size: 1.5rem; }
.sch-demo-btn { display: inline-block; background: #eef3f7; border: 1px solid #c9d6de; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.sch-big { text-align: center; }
.sch-big.has { background: #fff6dc; border: 2px solid #f3bb45; }
.sch-big-n { font-size: 1.3rem; font-weight: 800; margin: 4px 0 10px; }
.sch-wa.big { display: block; border: 0; cursor: pointer; }
.sch-more summary { font-weight: 700; cursor: pointer; }
.sch-review-top { display: flex; justify-content: space-between; align-items: center; }
.sch-decide-bar { position: sticky; bottom: 0; background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 0 4px; border-top: 1px solid #e3eaef; margin-top: 10px; }
.ok-btn { background: #2e7d32 !important; color: #fff !important; }
.home-school { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.home-sch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-radius: 14px; padding: 14px 16px; }
.home-sch.head { background: #fff6dc; border: 2px solid #f3bb45; }
.home-sch.back { background: #fdecea; border: 2px solid #e57373; }
.home-sch b { font-size: 1.05rem; flex: 1 1 220px; }
.nav-badge { background: #d32f2f; color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; margin-left: 6px; }
.note-sch { border-radius: 10px; padding: 10px 14px; margin: 8px 0; line-height: 1.5; }
.note-sch.returned { background: #fff6dc; border-left: 5px solid #f3bb45; }
.note-sch.approved { background: #e6f4ea; border-left: 5px solid #2e7d32; }
.note-sch.sent { background: #eef3f7; border-left: 5px solid #123f52; }
#vetLesson { font-weight: 800; }
.usage-choice.compact { font-size: .9rem; padding: 8px 12px; margin: 14px 0; }
.usage-choice.compact .reminder-actions button { min-width: 4.5rem; padding: 6px 12px; }
.note-sch.failed { background: #fdecea; border-left: 5px solid #c62828; }
.note-sch.failed button { margin-left: 8px; padding: 6px 12px; }
#vetHint { margin: 4px 0 0; font-size: .85rem; }

/* v1.8 Mark a whole class */
.cm-card h3 { margin: 4px 0 10px; }
.cm-one { margin: 18px 0 8px; color: #123f52; }
.cm-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .cm-steps { grid-template-columns: 1fr; } }
.cm-step { background: #f6f9fb; border: 1px solid #e3eaef; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cm-step label { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; gap: 3px; }
.cm-step .row label { flex-direction: column; }
#cmRosterBox { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed #c9d6de; padding-top: 8px; }
.cm-sheet { margin-top: 14px; border-top: 2px solid #123f52; padding-top: 10px; }
.cm-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 8px; }
.cm-rows { display: flex; flex-direction: column; gap: 4px; }
.cm-row { display: grid; grid-template-columns: minmax(7rem, 1.1fr) minmax(8rem, 2fr) auto auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; }
.cm-row:nth-child(odd) { background: #f6f9fb; }
.cm-row.absent { opacity: .55; }
.cm-code { font-weight: 700; font-size: .92rem; }
.cm-ans { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; letter-spacing: .18em; padding: 8px 10px; text-transform: uppercase; }
.cm-th { width: 5.5rem; padding: 8px; }
.cm-score { min-width: 4.5rem; font-size: .95rem; }
.cm-score b { font-size: 1.1rem; color: #123f52; }
.cm-warn { color: #a3261b; font-size: .75rem; display: block; }
.cm-abs { font-size: .8rem; display: flex; gap: 4px; align-items: center; color: #5b6b75; }
@media (max-width: 560px) {
  .cm-row { grid-template-columns: 1fr auto; }
  .cm-ans { grid-column: 1 / -1; }
}
.cm-sum { margin: 14px 0; border: 1px solid #d5e0e7; border-radius: 12px; padding: 12px; }
.cm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 560px) { .cm-kpis { grid-template-columns: 1fr 1fr; } }
.cm-kpis div { background: #eef3f7; border-radius: 10px; padding: 8px 10px; }
.cm-kpis b { display: block; font-size: 1.3rem; color: #123f52; }
.cm-kpis span { font-size: .8rem; color: #5b6b75; }
.cm-items-t { margin: 12px 0 4px; }
.cm-items { display: flex; gap: 4px; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.cm-item { flex: 0 0 34px; height: 96px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: .7rem; position: relative; }
.cm-item i { display: block; width: 22px; border-radius: 4px 4px 0 0; background: #2e7d32; }
.cm-item.mid i { background: #f3bb45; }
.cm-item.low i { background: #c62828; }
.cm-item span { order: 3; color: #5b6b75; }
.cm-item b { order: 0; font-size: .68rem; }
.cm-reteach { margin: 10px 0 0; background: #fdecea; border-radius: 8px; padding: 8px 10px; }
.cm-reteach.ok { background: #e6f4ea; }
.ln-cc{margin:6px 0 0;font-size:.92em;color:#234}
