.teacher-login-page {
  background:
    radial-gradient(circle at 85% 15%, rgba(62, 185, 219, .3), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(42, 125, 102, .3), transparent 34%),
    #102f43;
}

.teacher-topbar {
  background: #12394f;
}

.teacher-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}

.teacher-sidebar {
  padding: 27px 18px;
  border-right: 1px solid #d2dfe5;
  background: #fff;
}

.teacher-sidebar > p {
  margin: 0 12px 13px;
  color: #77909e;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#teacher-course-list {
  display: grid;
  gap: 6px;
}

#teacher-course-list button {
  display: grid;
  grid-template-columns: 13px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 14px 12px;
  border: 0;
  color: #3f5d6f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

#teacher-course-list button.is-active,
#teacher-course-list button:hover {
  color: #fff;
  background: #1c718e;
}

#teacher-course-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

#teacher-course-list span {
  display: grid;
  gap: 4px;
}

#teacher-course-list small {
  color: inherit;
  opacity: .67;
}

.teacher-sidebar > small {
  display: block;
  margin: 25px 12px;
  color: #8197a3;
  line-height: 1.55;
}

.teacher-main {
  min-width: 0;
  padding: 32px;
  padding-bottom: calc(var(--teacher-savebar-height, 100px) + 32px);
}

.teacher-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: min(1250px, 100%);
  margin: 0 auto 22px;
}

.teacher-heading > div {
  display: grid;
  gap: 5px;
}

.teacher-heading span {
  color: #718895;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.teacher-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.teacher-heading .teacher-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.teacher-heading-actions a,
.teacher-heading-actions button {
  padding: 10px 13px;
  border: 1px solid #afc2cc;
  color: #216d91;
  font-size: .76rem;
  font-weight: 900;
  text-decoration: none;
  border-radius: 6px;
  background: #fff;
  min-height: 44px;
}

.teacher-heading-actions button {
  color: #fff;
  border-color: #1c718e;
  background: #1c718e;
  cursor: pointer;
}

.teacher-course-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1250px, 100%);
  margin: 0 auto 22px;
}

.teacher-course-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #b8ced9;
  border-radius: 6px;
  color: #215b74;
  background: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}

.teacher-course-shortcuts span {
  flex-basis: 100%;
  color: #557081;
  font-size: .76rem;
  line-height: 1.5;
}

.teacher-app [hidden] { display: none !important; }

.teacher-app [data-teacher-save]:disabled {
  cursor: default;
  opacity: .68;
}

.teacher-app [data-teacher-save]:focus-visible,
.teacher-course-shortcuts a:focus-visible,
.teacher-heading-actions a:focus-visible {
  outline: 3px solid #bd831d;
  outline-offset: 3px;
}

.teacher-tabs {
  display: flex;
  width: min(1250px, 100%);
  margin: 0 auto;
  border-bottom: 1px solid #cbd9e0;
}

.teacher-tabs button {
  padding: 13px 17px;
  border: 0;
  color: #657c8a;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.teacher-tabs button.is-active {
  color: #fff;
  background: #1c718e;
}

.teacher-tabs span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 50%;
  place-items: center;
  color: #1c718e;
  background: #fff;
  font-size: .7rem;
}

#teacher-editor {
  width: min(1250px, 100%);
  margin: 0 auto;
  padding: 30px 0 100px;
}

.teacher-intro {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(63, 190, 220, .4), transparent 30%),
    #12394f;
}

.teacher-intro span {
  color: #7bdff4;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.teacher-intro h2 {
  margin: 6px 0;
  color: #fff;
}

.teacher-intro p {
  margin: 0;
  color: #bad0db;
}

.teacher-intro button {
  flex: 0 0 auto;
  padding: 12px 15px;
  border: 0;
  color: #12394f;
  background: #7ce1f5;
  font-weight: 900;
  cursor: pointer;
}

.teacher-assessments,
.submission-inbox {
  display: grid;
  gap: 16px;
}

.teacher-content-editor,
.teacher-content-stack {
  display: grid;
  gap: 18px;
}

.teacher-content-card {
  overflow: hidden;
  border: 1px solid #dce7ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(32, 64, 84, .06);
}

.teacher-content-card > header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e3ebef;
  background: linear-gradient(135deg, #f8fbfc, #f1f7fa);
}

.teacher-content-card > header > span {
  color: #1e729c;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

.teacher-content-card > header small,
.teacher-content-card > header h2 {
  display: block;
}

.teacher-content-card > header small {
  color: #738894;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.teacher-content-card > header h2 {
  margin: 3px 0 0;
}

.teacher-content-card > .teacher-grid,
.teacher-content-card > .teacher-content-stack {
  padding: 22px;
}

.teacher-content-detail {
  border: 1px solid #dfe8ed;
  border-radius: 13px;
  background: #fbfcfd;
}

.teacher-content-detail summary {
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.teacher-content-detail summary::-webkit-details-marker {
  display: none;
}

.teacher-content-detail summary span {
  color: #24769c;
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

.teacher-content-detail[open] summary {
  border-bottom: 1px solid #e2eaee;
  background: #f2f8fa;
}

.teacher-content-detail > .teacher-grid {
  padding: 18px;
}

.teacher-assessment,
.submission-review {
  padding: 25px;
  border: 1px solid #d4e0e5;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 54, 72, .06);
}

.teacher-assessment > header {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.teacher-assessment > header > span {
  color: #1c718e;
  font-size: .8rem;
  font-weight: 900;
}

.teacher-assessment header small {
  color: #718b99;
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.teacher-assessment header h2 {
  margin: 3px 0 0;
}

.teacher-assessment header button {
  border: 0;
  color: #a5273f;
  background: transparent;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
}

.teacher-grid {
  display: grid;
  gap: 15px;
}

.teacher-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-grid.three {
  grid-template-columns: .65fr .45fr 1.4fr;
}

.teacher-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.teacher-field > span {
  color: #385a6e;
  font-size: .75rem;
  font-weight: 900;
}

.teacher-field input,
.teacher-field textarea,
.teacher-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c6d5dd;
  border-radius: 0;
  color: #17364e;
  background: #fbfcfd;
}

.teacher-field textarea {
  min-height: 105px;
  resize: vertical;
}

.delivery-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 17px;
  border: 1px solid #d7e3e8;
  background: #f5f9fa;
}

.delivery-methods legend {
  padding: 0 8px;
  color: #355a6d;
  font-size: .75rem;
  font-weight: 900;
}

.delivery-methods label {
  cursor: pointer;
}

.delivery-methods input {
  position: absolute;
  opacity: 0;
}

.delivery-methods span {
  display: block;
  padding: 9px 11px;
  border: 1px solid #bed0d9;
  color: #577080;
  background: #fff;
  font-size: .74rem;
  font-weight: 800;
}

.delivery-methods input:checked + span {
  border-color: #1c718e;
  color: #fff;
  background: #1c718e;
}

.test-game {
  display: inline-block;
  margin-top: 17px;
  color: #1d708f;
  font-size: .76rem;
  font-weight: 900;
}

.teacher-savebar {
  position: fixed;
  right: 0;
  left: 310px;
  bottom: 0;
  z-index: 1900;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 32px max(15px, env(safe-area-inset-bottom));
  color: #d7e6ed;
  background: #12394f;
  border-top: 1px solid #427082;
  box-shadow: 0 -5px 25px rgba(8, 35, 50, .18);
}

.teacher-save-message {
  display: grid;
  gap: 5px;
  min-width: 0;
  max-width: 720px;
  overflow-wrap: anywhere;
}

.teacher-save-message small {
  color: #b7cbd6;
  font-size: .72rem;
  line-height: 1.5;
}

.teacher-save-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.teacher-save-action > small {
  color: #b7cbd6;
  font-size: .69rem;
  white-space: nowrap;
}

.teacher-savebar span {
  font-size: .85rem;
  line-height: 1.4;
  font-weight: 700;
}

.teacher-savebar span.is-dirty {
  color: #ffdf99;
}

.teacher-savebar span.is-saved {
  color: #98f0c2;
}

.teacher-savebar span.is-error {
  color: #ffbfc8;
}

.teacher-savebar span.is-saving {
  color: #a8edff;
}

.teacher-savebar button {
  padding: 10px 14px;
  border: 0;
  color: #12394f;
  background: #77ddf2;
  font-weight: 900;
  cursor: pointer;
  border-radius: 6px;
  min-height: 44px;
}

.teacher-app .context-help {
  bottom: calc(var(--teacher-savebar-height, 100px) + 16px);
}

.teacher-app .context-help-panel {
  max-height: calc(100dvh - var(--teacher-savebar-height, 100px) - 100px);
}

.teacher-app :is(input, select, textarea, button, summary, a) {
  scroll-margin-bottom: calc(var(--teacher-savebar-height, 100px) + 24px);
}

.submission-review > header {
  display: flex;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.submission-review header span {
  color: #1b7d9c;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.submission-review h2 {
  margin: 5px 0;
}

.submission-review header p,
.submission-review time {
  margin: 0;
  color: #718895;
  font-size: .78rem;
}

.evidence-preview {
  margin-bottom: 20px;
  padding: 20px;
  background: #f0f6f8;
}

.evidence-preview img,
.evidence-preview video {
  display: block;
  max-width: 100%;
  max-height: 480px;
  margin: 0 auto;
}

.evidence-preview audio {
  width: 100%;
}

.submission-text-copy {
  color: #36576a;
  line-height: 1.7;
}

.teacher-empty {
  padding: 50px;
  border: 1px dashed #adc1ca;
  color: #667f8c;
  background: #fff;
  text-align: center;
}

.game-results-intro .mission-summary {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 9px;
  align-items: baseline;
  flex: 0 0 auto;
  padding: 15px 18px;
  border: 1px solid rgba(123, 223, 244, .32);
  background: rgba(4, 29, 43, .38);
}

.game-results-intro .mission-summary strong {
  color: #7be4f8;
  font-size: 1.5rem;
}

.game-results-intro .mission-summary span {
  color: #aac5d0;
  font-size: .62rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-results-list {
  display: grid;
  gap: 16px;
}

.game-result-card {
  border: 1px solid #d4e0e5;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 54, 72, .06);
}

.game-result-card > header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 23px 25px 18px;
}

.game-result-card header h2 {
  margin: 6px 0 4px;
}

.game-result-card header p,
.game-result-card header time {
  margin: 0;
  color: #718895;
  font-size: .76rem;
}

.result-status {
  display: inline-block;
  padding: 5px 8px;
  color: #596f7b;
  background: #edf3f5;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.result-status.is-complete {
  color: #126444;
  background: #dcf6e9;
}

.result-status.is-progress {
  color: #946509;
  background: #fff2d4;
}

.game-score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dce6ea;
  border-bottom: 1px solid #dce6ea;
  background: #f2f7f9;
}

.game-score-strip > div {
  display: grid;
  gap: 4px;
  padding: 15px 25px;
  border-right: 1px solid #dce6ea;
}

.game-score-strip > div:last-child {
  border-right: 0;
}

.game-score-strip span {
  color: #758b98;
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.game-score-strip strong {
  color: #245b78;
  font-size: 1.45rem;
}

.game-score-strip .is-total strong {
  color: #16825b;
}

.reasoning-review {
  padding: 0 25px 25px;
}

.reasoning-review summary {
  padding: 17px 0;
  color: #1c718e;
  font-size: .75rem;
  font-weight: 900;
  cursor: pointer;
}

.student-reasoning {
  padding: 18px;
  border-left: 4px solid #1c718e;
  background: #eff6f8;
}

.student-reasoning span {
  color: #597584;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.student-reasoning p {
  margin: 8px 0 0;
  color: #36576a;
  line-height: 1.65;
  white-space: pre-wrap;
}

.exam-answer-review {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.exam-answer-review > article {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dbe6ea;
}

.exam-answer-review > article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #647f8c;
  background: #eef4f6;
  font-size: .65rem;
  font-weight: 900;
}

.exam-answer-review article.is-correct {
  border-left: 4px solid #27a773;
}

.exam-answer-review article.is-wrong {
  border-left: 4px solid #d45469;
}

.exam-answer-review strong {
  color: #244a60;
  font-size: .78rem;
}

.exam-answer-review p,
.exam-answer-review small {
  display: block;
  margin: 5px 0 0;
  color: #6d8491;
  font-size: .72rem;
}

.attempt-in-progress {
  margin: 0;
  padding: 18px 25px 24px;
  color: #7b8790;
  font-size: .76rem;
}

@media (max-width: 980px) {
  .teacher-shell {
    grid-template-columns: 1fr;
  }

  .teacher-grid.three {
    grid-template-columns: 1fr;
  }

  .teacher-savebar { left: 0; }
}

@media (max-width: 680px) {
  .teacher-main {
    padding: 18px;
    padding-bottom: calc(var(--teacher-savebar-height, 120px) + 20px);
  }

  .teacher-heading,
  .teacher-intro,
  .submission-review > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-grid.two {
    grid-template-columns: 1fr;
  }

  .teacher-savebar {
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
    gap: 10px;
    flex-wrap: wrap;
  }

  .teacher-save-message { flex: 1 1 200px; }
  .teacher-save-action > small { display: none; }
  .teacher-save-action { margin-left: auto; }
  .teacher-savebar button { padding: 10px 12px; }
  .teacher-save-message small { font-size: .7rem; }
  .teacher-app .context-help-panel { bottom: calc(var(--teacher-savebar-height, 120px) + 82px); }

  .teacher-tabs {
    overflow-x: auto;
  }

  .teacher-tabs button {
    flex: 0 0 auto;
  }

  .game-result-card > header {
    flex-direction: column;
  }

  .game-score-strip {
    grid-template-columns: 1fr;
  }

  .game-score-strip > div {
    border-right: 0;
    border-bottom: 1px solid #dce6ea;
  }
}
.teacher-groups-link{display:block;padding:12px;border:1px solid #cce0d4;background:#edf7f0;color:#195b3d;border-radius:9px;font-weight:700;margin-bottom:16px;text-decoration:none}
