/* Teacher workspace: shared Academy identity, operational rather than decorative. */
body[data-academy-role="teacher"] #app {
  max-width: 1600px;
  margin-inline: auto;
}
body[data-academy-role="teacher"] #app > .tabs {
  gap: 6px;
  padding: 8px;
  margin: 18px 0 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
body[data-academy-role="teacher"] #app > .tabs a {
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  padding: 12px 16px;
  color: var(--muted);
}
body[data-academy-role="teacher"] #app > .tabs a.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 3px 12px #3454d126;
}
body[data-academy-role="teacher"] .group-context {
  padding: 14px 0;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
body[data-academy-role="teacher"] .head h1 {
  font: 400 clamp(28px, 3vw, 44px)/1.25 var(--font-display);
  margin: 10px 0 16px;
}
body[data-academy-role="teacher"] .card {
  border-radius: 18px;
}
body[data-academy-role="teacher"] button,
body[data-academy-role="teacher"] .button {
  border-radius: 10px;
}
body[data-academy-role="teacher"] #app[data-view="groups"] > .grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.teacher-directory-heading {
  min-height: 210px;
  align-items: center;
  padding-right: 240px;
  position: relative;
}
.teacher-directory-heading:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 210px;
  height: 100%;
  background: url("/assets/academy/rotunda-exterior-small.webp") center /
    contain no-repeat;
  pointer-events: none;
}
.teacher-group-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr) auto;
  align-items: center;
  gap: 12px 36px;
  padding: 28px 32px;
  text-decoration: none;
}
.teacher-group-row h2 {
  margin: 0;
  grid-column: 2;
  grid-row: 1/3;
}
.teacher-group-row > p {
  grid-column: 3;
  grid-row: 1/3;
  font-weight: 500;
}
.teacher-group-row .eyebrow {
  line-height: 1.6;
}
body[data-academy-role="teacher"] .teacher-session-heading {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
}
.teacher-session-heading h2 {
  font: 400 clamp(28px, 3vw, 42px)/1.3 var(--font-display);
  max-width: 760px;
  margin: 12px 0;
}
.teacher-session-heading .muted {
  color: var(--muted);
}
.teacher-session-heading .head {
  gap: 24px;
}
.teacher-session-clock {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 500;
  padding: 10px 18px;
  border-right: 1px solid var(--line);
}
body[data-academy-role="teacher"] .academy-session-materials {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  background: var(--surface);
}
body[data-academy-role="teacher"] .academy-session-materials > summary {
  font-size: 18px;
  font-weight: 500;
  padding: 4px 0;
}
body[data-academy-role="teacher"] .academy-session-materials > .grid {
  margin-top: 24px;
  gap: 32px;
}
body[data-academy-role="teacher"] .academy-session-materials .card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
body[data-academy-role="teacher"] .academy-session-materials h2,
body[data-academy-role="teacher"] #app[data-view="pult"] > .stack h2 {
  font-size: 22px;
}
body[data-academy-role="teacher"] .taskrow {
  gap: 12px;
  padding: 18px 0;
  flex-wrap: wrap;
}
body[data-academy-role="teacher"] .taskrow .grow {
  min-width: 160px;
}
body[data-academy-role="teacher"] .taskrow .badge {
  background: color-mix(in srgb, var(--good) 10%, var(--surface));
  color: var(--good);
  border-radius: 8px;
}
body[data-academy-role="teacher"] .matrix {
  min-width: 680px;
}
body[data-academy-role="teacher"] .matrix th {
  background: var(--surface);
  min-width: 210px;
  vertical-align: top;
  padding: 20px;
}
body[data-academy-role="teacher"] .matrix th:first-child {
  min-width: 160px;
}
body[data-academy-role="teacher"] .matrix td {
  padding: 10px;
}
body[data-academy-role="teacher"] .matrix .cell {
  width: 100%;
  min-height: 76px;
  font-size: 20px;
  text-align: left;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 12px;
}
body[data-academy-role="teacher"] .matrix .cell.correct {
  color: #1f6248;
  background: #dbf0e4;
  border-color: #b7ddc7;
}
body[data-academy-role="teacher"] .matrix .cell.wrong {
  color: #923a40;
  background: #f9e0de;
  border-color: #edbfbb;
}
body[data-academy-role="teacher"] .matrix .cell small {
  font-size: 12px;
  margin-top: 8px;
}
body[data-academy-role="teacher"] .legend {
  font-size: 13px;
  gap: 18px;
  margin: 24px 0;
}
body[data-academy-role="teacher"] .academy-editor {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  background: transparent;
}
body[data-academy-role="teacher"] .academy-editor > aside {
  background: var(--graphite);
  color: #f3f2ed;
  padding: 24px 18px;
  border-radius: 18px;
  align-self: start;
}
body[data-academy-role="teacher"] .academy-editor > aside h3,
body[data-academy-role="teacher"] .academy-editor > aside small {
  color: inherit;
}
body[data-academy-role="teacher"] .academy-editor > aside .module {
  background: transparent;
  border-color: #ffffff24;
  padding: 16px 0;
}
body[data-academy-role="teacher"] .academy-editor > aside .topic-link {
  color: #dce0eb;
  border-radius: 9px;
  padding: 12px;
  line-height: 1.5;
}
body[data-academy-role="teacher"] .academy-editor > aside .topic-link.active {
  background: var(--blue);
  color: white;
}
body[data-academy-role="teacher"] .academy-editor > aside .outline,
body[data-academy-role="teacher"] .academy-editor > aside .quiet {
  color: #e8ecfb;
  background: transparent;
  border-color: #ffffff40;
}
body[data-academy-role="teacher"] .academy-editor > section {
  padding: 8px 0;
  min-width: 0;
}
body[data-academy-role="teacher"] .academy-editor-row {
  padding: 22px 0;
  gap: 18px;
}
body[data-academy-role="teacher"] .academy-editor-section {
  padding: 24px 0;
}
.teacher-homework-summary {
  display: flex;
  gap: 16px;
  margin: 30px 0 40px;
  flex-wrap: wrap;
}
.teacher-count {
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.teacher-count strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.teacher-count.active strong {
  color: var(--warn);
}
.teacher-count.missed strong {
  color: var(--bad);
}
.teacher-count.submitted strong {
  color: var(--good);
}
.teacher-work-section {
  margin: 36px 0 46px;
  scroll-margin-top: 28px;
}
.teacher-work-section h2 {
  font-size: 23px;
  margin-bottom: 18px;
}
.teacher-work-section h2 small {
  font-size: 14px;
  color: var(--muted);
  margin-left: 10px;
}
.teacher-homework-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.teacher-homework-table th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 16px;
}
.teacher-homework-table td {
  padding: 22px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.teacher-homework-table td:first-child {
  width: 35%;
}
.teacher-homework-table td a {
  text-decoration: none;
}
.teacher-homework-table td:first-child a {
  color: var(--ink);
}
.teacher-homework-table td span:not(.teacher-work-status),
.teacher-homework-table td small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.teacher-work-status {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  display: inline-block;
  white-space: nowrap;
  background: var(--ice);
  color: var(--blue);
}
.teacher-work-status.submitted {
  background: #dbf0e4;
  color: #1f6248;
}
.teacher-work-status.missed {
  background: #f9e0de;
  color: #923a40;
}
.teacher-work-status.in_progress {
  background: #fff0cf;
  color: #845b19;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body[data-academy-role="teacher"][data-teacher-theme="dark"]
  .matrix
  .cell.correct {
  background: #173d30;
  color: #b9e6d0;
  border-color: #2c624b;
}
body[data-academy-role="teacher"][data-teacher-theme="dark"]
  .matrix
  .cell.wrong {
  background: #48272b;
  color: #f4c2bd;
  border-color: #754249;
}
@media (max-width: 900px) {
  body[data-academy-role="teacher"] .academy-editor {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
  }
  .teacher-directory-heading {
    padding-right: 0;
  }
  .teacher-directory-heading:after {
    display: none;
  }
  .teacher-group-row {
    grid-template-columns: 1fr auto;
  }
  .teacher-group-row h2 {
    grid-column: 1;
    grid-row: 2;
  }
  .teacher-group-row > p {
    grid-column: 2;
    grid-row: 1/4;
  }
}
@media (max-width: 650px) {
  body[data-academy-role="teacher"] .academy-editor {
    display: block;
  }
  .academy-editor > aside {
    margin-bottom: 24px;
  }
  .teacher-group-row {
    display: block;
    padding: 24px;
  }
  .teacher-group-row h2 {
    margin: 12px 0;
  }
  .teacher-directory-heading {
    min-height: 0;
    margin: 24px 0;
  }
  .teacher-session-heading .head {
    display: block;
  }
  .teacher-session-heading .actions {
    margin-top: 16px;
  }
  .teacher-session-clock {
    padding-left: 0;
  }
  .teacher-count {
    flex: 1;
    padding: 14px;
  }
  .teacher-count strong {
    font-size: 24px;
  }
  .teacher-homework-summary {
    gap: 8px;
  }
  .teacher-count span {
    font-size: 13px;
  }
}
.teacher-member-map {
  margin: 30px 0 40px;
}
.teacher-member-map > summary,
.teacher-survey-summary > summary {
  font-size: 18px;
  font-weight: 500;
  padding: 16px 0;
  cursor: pointer;
}
.teacher-member-map > summary {
  margin-bottom: 18px;
}
.teacher-member-details {
  display: grid;
  gap: 14px;
  margin: 32px 0;
}
.teacher-member-details > details > summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 20px;
  cursor: pointer;
}
.teacher-member-details > details > summary span {
  color: var(--muted);
  font-size: 14px;
}
.teacher-member-details > details > .actions {
  margin-top: 24px;
}
.teacher-member-work {
  margin: 24px 0;
}
.teacher-member-homework {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.teacher-member-homework small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.teacher-progress-value {
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}
.teacher-progress-value .progress {
  margin-top: 8px;
}
.teacher-stage-icon {
  width: 24px;
  color: var(--blue);
  flex-shrink: 0;
}
.teacher-stage-icon .academy-icon {
  width: 24px;
  height: 24px;
}
body[data-academy-role="teacher"] #modal {
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 90px #171b2440;
}
body[data-academy-role="teacher"] #modal .modal-head {
  padding: 24px 28px;
}
.modal-head h2 {
  line-height: 1.35;
}
body[data-academy-role="teacher"] #modal .modal-content {
  padding: 24px 28px;
}
body[data-academy-role="teacher"] #modal input,
body[data-academy-role="teacher"] #modal textarea,
body[data-academy-role="teacher"] #modal select {
  border-radius: 10px;
}
body[data-academy-role="teacher"] .teacher-work-section .table-scroll {
  border-radius: 16px;
}
.teacher-member-map .academy-welcome {
  display: none;
}
.teacher-alerts {
  margin: 24px 0;
}
.teacher-alerts > summary {
  cursor: pointer;
  font-weight: 500;
}
.teacher-directory-heading {
  display: block;
  min-height: 260px;
  padding: 34px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--graphite);
  color: #f3f2ed;
  margin: 28px 0;
}
.teacher-directory-heading > div,
.teacher-directory-heading > button {
  position: relative;
  z-index: 1;
}
.teacher-directory-heading > button {
  margin-top: 22px;
}
.teacher-directory-heading .eyebrow,
.teacher-directory-heading .muted {
  color: #c3c8d2;
}
.teacher-directory-heading:after {
  width: 45%;
  background: url("/assets/academy/welcome-thinker-small.webp") center / cover
    no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.teacher-course-tree > summary {
  font-size: 14px;
  color: #cbd1df;
  cursor: pointer;
  margin-bottom: 20px;
}
.teacher-course-tree:not([open]) > summary {
  margin-bottom: 0;
}
@media (max-width: 650px) {
  .teacher-directory-heading {
    min-height: 0;
    padding: 26px;
  }
  .teacher-directory-heading:after {
    display: none;
  }
  .teacher-course-tree > .row {
    margin-top: 20px;
  }
}
body[data-academy-role="teacher"] .teacher-directory-heading .eyebrow,
body[data-academy-role="teacher"] .teacher-directory-heading .muted {
  color: #c3c8d2;
}
.teacher-topic-context {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.teacher-topic-context > div {
  display: grid;
  gap: 8px;
  min-width: 220px;
}
.teacher-topic-context small {
  color: var(--muted);
}
.teacher-topic-context strong {
  font-size: 16px;
}
.teacher-topic-context .notice {
  flex-basis: 100%;
  margin: 0;
}
.teacher-topic-context > div:nth-child(2) {
  border-left: 2px solid var(--blue);
  padding-left: 22px;
}
.teacher-topic-context > div button {
  justify-self: start;
}
.teacher-topic-picker {
  display: grid;
  gap: 24px;
}
.teacher-topic-picker h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.teacher-topic-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  gap: 20px;
  padding: 18px;
  margin: 8px 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.teacher-topic-option small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.teacher-topic-option.selected {
  border-color: var(--blue);
  background: var(--ice);
  color: var(--blue);
}
.teacher-bank-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.teacher-bank-filters select {
  max-width: 100%;
}
.teacher-bank-picked {
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--ink);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.teacher-bank-picked:empty {
  display: none;
}
.teacher-bank-picked > .actions {
  margin-top: 12px;
}
.bank-row .grow {
  min-width: 0;
}
.bank-row .grow small {
  display: block;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
}
.bank-toggle {
  min-width: 44px;
  font-size: 22px;
}
.bank-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
@media (max-width: 650px) {
  .teacher-bank-filters {
    grid-template-columns: 1fr;
  }
  .bank-row {
    flex-wrap: wrap;
  }
  .bank-row .grow {
    flex-basis: 60%;
  }
  .teacher-topic-context > div {
    min-width: 0;
    width: 100%;
  }
}

/* Queue controls keep bank identity visible and history recoverable. */
.queue-drag-handle{flex:none;cursor:grab;touch-action:none;color:var(--muted);background:transparent;border:0;padding:10px 6px;min-width:32px;font-size:20px;letter-spacing:-6px}
.queue-drag-handle:active{cursor:grabbing}
.queue-drag-handle:disabled{cursor:not-allowed;opacity:.35}
.queue-dragging{opacity:.45}
.queue-drop-target{box-shadow:0 -3px 0 var(--accent,#3454d1)}
.module-queue-entry .grow{min-width:0}
.module-queue-entry .grow small{display:block;margin-top:6px}
.module-queue-entry .text-button{text-align:left;font-weight:650}
.queue-position{font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px;min-width:20px}
.queue-hidden{margin-top:12px;padding:12px 0;border-top:1px solid var(--line)}
.queue-hidden>summary{color:var(--muted);font-size:15px}
.queue-hidden-entry{background:var(--surface);opacity:.8}
.queue-hint{font-size:14px}
.member-quick-links{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:0 0 24px 68px}
.member-quick-links>a{color:var(--accent,#3454d1);font-size:14px}
.academy-member-row{border-bottom:1px solid var(--line)}
.academy-member-row>.academy-next-row{border-bottom:0;padding-bottom:12px}
#hoverPreview[hidden]{display:none!important}
.module-queue-entry .text-button{min-height:0;padding:0;border:0;line-height:1.45}
.module-queue-editor summary .badge{background:color-mix(in srgb,var(--blue) 12%,var(--surface));color:var(--ink);margin-left:8px}
