/* Teacher workspace: reading and feedback stay side by side on a desktop. */
.teacher-shell {
  --teacher-dock-top: 110px;
  --teacher-surface: #fffffc;
  --teacher-line: #dfe5da;
}

.teacher-shell .main {
  max-width: 1600px;
  padding: 26px 30px 48px;
}

.teacher-shell .page-heading { margin-bottom: 20px; }
.teacher-shell .page-heading h1 { font-size: 1.5rem; color: var(--teacher-ink, #35435f); }
.teacher-shell .page-heading p { font-size: .875rem; }
.teacher-shell .teacher-header { margin-bottom: 18px; }

/* Keep scope controls in the page flow so they never cover the next section. */
.teacher-toolbar {
  position: static;
  display: flex;
  align-items: flex-end;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--teacher-line);
  border-radius: 12px;
  background: var(--teacher-surface);
  box-shadow: 0 3px 12px #314a3608;
}

.teacher-toolbar .exam-picker { margin: 0; min-width: 210px; flex: 1 1 230px; }
.teacher-toolbar .exam-picker label,
.subject-scope-picker > span,
.subject-scope-picker > label { font-size: .75rem; font-weight: 500; color: #546351; }
.teacher-toolbar .exam-picker select,
.subject-scope-picker select { min-height: 40px; font-size: .875rem; background: #fffffc; }
.subject-scope-picker { display: grid; gap: 6px; min-width: 156px; flex: 0 1 200px; }
.subject-scope-picker select { width: 100%; min-width: 0; }
.permission-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #d9e3d4;
  border-radius: 6px;
  background: #f0f5eb;
  color: #42633d;
  font-size: .75rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.teacher-toolbar .permission-badge { margin-left: auto; }

.teacher-student-switcher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 1px 14px;
  margin-bottom: 4px;
  color: #566453;
  font-size: .8125rem;
}
.teacher-student-switcher .row { gap: 8px; flex-wrap: wrap; }
.teacher-student-switcher .btn { min-height: 38px; font-size: .8125rem; }
.teacher-student-switcher strong { color: #304b36; font-weight: 600; }
.teacher-student-switcher small { font-size: .75rem; color: #657066; }

/* Private subject follow-up is independent of exam rankings. */
.watch-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; margin: 0 0 24px; border: 1px solid #dce6e2; border-radius: 14px; background: #f5faf7; }
.watch-summary h2, .watch-profile h2 { margin: 5px 0 7px; font-size: 1.1rem; color: #29433a; }
.watch-summary p { margin: 0; max-width: 440px; font-size: .8rem; line-height: 1.7; color: #60756b; }
.watch-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.watch-shortcut { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px; border: 1px solid #dce5df; border-radius: 9px; background: white; color: #556b60; font-size: .8rem; cursor: pointer; }
.watch-shortcut strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.watch-shortcut.active { color: #fff; background: #376a52; border-color: #376a52; }
.watch-shortcut:focus-visible { outline: 3px solid #9ac3b1; outline-offset: 3px; }
.watch-results > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.watch-results > header h3 { margin: 0; font-size: 1rem; }
.watch-results > header span { color: #697d72; font-size: .8rem; }
.watch-note { margin: 12px 0; padding: 13px 14px; border: 1px solid #e0e9e4; border-radius: 8px; background: #f6faf8; overflow-wrap: anywhere; }
.watch-note > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.watch-badge, .watch-due { font-size: .72rem; color: #35684f; font-weight: 600; }
.watch-due { color: #8b662c; background: #f6eddc; padding: 2px 7px; border-radius: 5px; }
.watch-note p { font-size: .8rem; line-height: 1.7; color: #4a6255; margin: 8px 0; white-space: pre-wrap; }
.watch-note p > span { margin-right: 8px; color: #71847b; }
.watch-note small { font-size: .72rem; color: #6e7f75; }
.watch-note.is-completed { background: #f8f9f8; border-color: #e6e9e6; }
.watch-note.is-completed .watch-badge { color: #708078; }
.watch-profile { margin-bottom: 20px; padding: 18px 22px; background: #fff; border: 1px solid #e0e7e2; border-radius: 12px; }
.watch-profile > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.watch-profile .watch-note { margin-bottom: 0; }
.group-student > footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#group-board { scroll-margin-top: 140px; }
@media (max-width: 1250px) { .watch-summary { align-items: flex-start; flex-direction: column; gap: 16px; } }
@media (max-width: 560px) {
 .watch-summary, .watch-profile { padding: 18px 16px; }
 .watch-summary-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
 .watch-shortcut { justify-content: space-between; padding: 10px; }
 .watch-profile > header { flex-wrap: wrap; }
 .watch-profile button, .teacher-shell .group-student > footer .btn.small, .teacher-shell .group-student > footer .link-button { min-height: 44px; }
}
@media print { .watch-summary-actions, .watch-profile button { display: none; } }

/* Group index shortens the path from a teaching level to its students. */
.teacher-board-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.teacher-group-index {
  position: sticky;
  top: var(--teacher-dock-top);
  align-self: start;
  max-height: calc(100dvh - var(--teacher-dock-top) - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 14px 10px;
  border: 1px solid var(--teacher-line);
  border-radius: 12px;
  background: var(--teacher-surface);
}
.teacher-group-index h2 { font-size: .875rem; padding: 0 8px 9px; }
.teacher-group-index h3 { color: #657066; font-size: .75rem; font-weight: 500; padding: 14px 8px 7px; }
.teacher-group-index > h3:first-child { padding-top: 2px; }
.teacher-group-index > p { font-size: .75rem; color: #657066; padding: 4px 8px 10px; }
.teacher-group-index button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 9px 10px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #47544b;
  text-align: left;
  line-height: 1.65;
  white-space: normal;
}
.teacher-group-index button strong { font-weight: 500; font-size: .8125rem; overflow-wrap: anywhere; }
.teacher-group-index button small { font-size: .75rem; color: #657066; }
.teacher-group-index button:hover { background: #f3f6ef; border-color: #e0e7da; }
.teacher-group-index button.active,
.teacher-group-index button[aria-current="true"] { background: #eaf1e5; color: #31583e; border-color: #c9dac0; }
.teacher-group-index button.active strong { font-weight: 600; }
.teacher-board-content, .teacher-report-content, .teacher-review-aside { min-width: 0; }
.teacher-board-content .teaching-level { margin-top: 0; padding-top: 0; }
.teacher-board-content .group-detail { padding: 0; }
.teacher-board-content .group-detail-heading { margin-top: 14px; }
.teacher-board-content .group-detail-meta { justify-content: space-between; flex-wrap: wrap; }
.teacher-board-content .group-detail-meta .group-review-progress { min-width: 190px; margin-bottom: 0; }
.teacher-board-content .learning-groups,
.teacher-board-content .teaching-level .learning-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.teacher-board-content .learning-group { padding: 18px; }
.teacher-board-content .learning-group footer { flex-wrap: wrap; }
.teacher-shell .group-filters { margin-bottom: 18px; }
.teacher-shell .group-filters .search { flex: 1 1 220px; max-width: 390px; }
.teacher-shell .group-filters .input,
.teacher-shell .group-filters select { font-size: .8125rem; min-height: 40px; }
.teacher-shell .group-overview { padding: 20px 24px; margin-bottom: 18px; }
.teacher-shell .group-overview p { max-width: 540px; font-size: .8125rem; }
.teacher-shell .group-overview dd { font-size: 1.6rem; }
.teacher-shell .group-student-grid { gap: 14px; }
.teacher-shell .group-student { padding: 18px; }
.teacher-shell .group-student-reason { font-size: .8125rem; }

.teacher-report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.teacher-report-content .teacher-growth { margin-top: 0; padding: 20px; }
.teacher-report-content .growth-heading { margin-bottom: 16px; }
.teacher-report-content .growth-heading h2 { font-size: 1.125rem; }
.teacher-report-content .growth-record-grid { grid-template-columns: minmax(0, 1fr); }
.teacher-report-content .growth-record { padding: 16px; }
.teacher-report-content .growth-record > p { font-size: .875rem; }
.teacher-report-content .exam-highlights { margin-top: 18px; padding-top: 16px; }
.teacher-report-content .exam-highlight-grid { grid-template-columns: minmax(0, 1fr); }
.teacher-report-content .compact-overview { padding: 18px; }
.teacher-report-content .overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
.teacher-report-content .overview-strip > div:nth-child(odd) { border-left: 0; padding-left: 0; }
.teacher-report-content .overview-strip dd { font-size: 1.5rem; }
.teacher-report-content .overview-trend { align-items: center; gap: 10px; flex-wrap: wrap; }

/* Teachers can read every analysis immediately, without reveal animation. */
.subject-reading.teacher-reading { margin-top: 24px; }
.teacher-reading .subject-reading-heading { margin: 0 0 16px; gap: 12px; align-items: center; flex-wrap: wrap; }
.teacher-reading .subject-reading-heading h2 { font-size: 1.125rem; }
.teacher-reading .subject-reading-heading p { font-size: .8125rem; margin-top: 4px; }
.teacher-reading .subject-reading-eyebrow { margin-bottom: 4px; }
.teacher-reading .subject-progress-grid.subject-reading-grid { gap: 18px; }
.subject-reading.teacher-reading .subject-chapter { grid-template-columns: 148px minmax(0, 1fr); gap: 22px; padding: 22px; border-radius: 13px; box-shadow: var(--shadow); }
.teacher-reading .subject-chapter-number { margin-bottom: 14px; }
.teacher-reading .subject-chapter .subject-brief-header { gap: 16px; }
.teacher-reading .subject-chapter .subject-name { gap: 8px; }
.teacher-reading .subject-chapter .subject-name h3 { font-size: 1.125rem; }
.teacher-reading .subject-chapter .subject-letter { width: 28px; height: 28px; font-size: .8125rem; border-radius: 8px; }
.teacher-reading .subject-chapter .score-pair strong { font-size: 1.75rem; letter-spacing: -.03em; }
.teacher-reading .subject-chapter .score-pair > span { font-size: .8125rem; }
.teacher-reading .subject-chapter .subject-metrics { gap: 7px; margin-top: 14px; font-size: .75rem; }
.teacher-reading .subject-reading-label { margin-top: 16px; }
.teacher-reading .subject-guidance { padding-left: 20px; }
.teacher-reading .subject-chapter .subject-analysis h4 { font-size: 1rem; line-height: 1.65; margin-bottom: 8px; }
.teacher-reading .subject-chapter .subject-analysis p { font-size: .875rem; line-height: 1.85; }
.teacher-reading .subject-chapter .analysis-kicker { margin-bottom: 10px; gap: 7px 12px; }
.teacher-reading .subject-chapter .subject-strategy { margin-top: 18px; padding-top: 16px; }
.teacher-reading .subject-chapter .subject-strategy h4 { margin-bottom: 10px; }
.teacher-reading .subject-chapter .strategy-preview { gap: 10px; }
.teacher-reading .subject-chapter .strategy-preview > li { font-size: .875rem; gap: 10px; }
.teacher-reading .subject-chapter .step-time { min-width: 56px; }
.teacher-reading .subject-chapter .card-footer { margin-top: 18px; padding-top: 14px; flex-wrap: wrap; }
.teacher-reading [data-reveal-stage] { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }

/* Feedback fields scroll independently; the action area stays in view. */
.teacher-review-aside > .panel { margin-top: 0 !important; border-color: #d4dfcc; }
.teacher-review-aside .panel-header { padding: 18px 18px 15px; align-items: flex-start; gap: 8px; }
.teacher-review-aside .panel-header h2 { font-size: 1rem; line-height: 1.7; }
.teacher-review-aside .panel-header p { line-height: 1.75; }
.teacher-review-aside .review-form { padding: 0 18px 18px; }
.teacher-review-aside .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.teacher-review-aside .field { font-size: .8125rem; gap: 7px; }
.teacher-review-aside textarea { min-height: 102px; resize: vertical; font-size: .875rem; line-height: 1.8; }
.teacher-review-aside .form-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; padding-top: 12px; background: var(--teacher-surface); }
.teacher-review-aside .form-actions > .row { display: flex; gap: 8px; flex-wrap: wrap; }
.teacher-review-aside .form-actions .btn { min-height: 42px; flex: 1 1 120px; font-size: .8125rem; padding: 9px 10px; white-space: normal; }
.teacher-review-aside .form-actions .btn.danger { flex-basis: 100%; min-height: 34px; padding: 5px 10px; }
.teacher-review-aside #save-status { margin: 0; color: #657066; font-size: .75rem; line-height: 1.7; }

/* Administrator access settings share the same readable form system. */
.teacher-access-panel { border: 1px solid var(--teacher-line); border-radius: 14px; background: var(--teacher-surface); overflow: hidden; }
.teacher-access-panel > header { padding: 20px 24px 16px; border-bottom: 1px solid var(--teacher-line); }
.teacher-access-panel > header h2 { font-size: 1.125rem; }
.teacher-access-panel > header p { margin-top: 6px; color: #657066; font-size: .875rem; line-height: 1.8; }
.teacher-access-panel .table-scroll { border-radius: 0; }
.teacher-access-table { width: 100%; text-align: left; font-size: .875rem; }
.teacher-access-table th { background: #f2f6ed; font-size: .75rem; padding: 12px 16px; }
.teacher-access-table td { padding: 14px 16px; vertical-align: middle; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
.teacher-access-table td:first-child { min-width: 132px; }
.teacher-access-table td small { display: block; color: #657066; font-size: .75rem; }
.teacher-access-table td .permission-badge { margin: 2px 4px 2px 0; }
.teacher-access-table .row { flex-wrap: wrap; gap: 7px; }
.teacher-access-table .btn { min-height: 38px; font-size: .8125rem; }
.teacher-access-form { --teacher-line: #dfe5da; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; padding: 22px 24px; }
.teacher-access-form .field { min-width: 0; font-size: .8125rem; }
.teacher-access-form input,
.teacher-access-form select { min-width: 0; width: 100%; font-size: .875rem; }
.teacher-access-form fieldset { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--teacher-line); border-radius: 9px; }
.teacher-access-form legend { padding: 0 6px; color: #47544b; font-size: .8125rem; }
.teacher-access-form fieldset label { display: inline-flex; align-items: center; gap: 8px; margin: 4px 18px 4px 0; font-size: .875rem; min-height: 32px; }
.teacher-access-form input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--teal); }
.teacher-access-form > .notice,
.teacher-access-form > .hint,
.teacher-access-form > .form-actions,
.teacher-access-form > .row { grid-column: 1 / -1; }
.teacher-access-form .form-actions { margin-top: 0; }

@media (min-width: 1180px) {
  .teacher-shell { grid-template-columns: 198px minmax(0, 1fr); }
  .teacher-shell .sidebar { padding-left: 12px; padding-right: 12px; }
  .teacher-shell .sidebar .brand { padding-left: 10px; }
  .teacher-shell .group-overview { flex-direction: row; align-items: center; }
  .teacher-shell .group-overview dl { width: auto; }
  .teacher-report-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .teacher-review-aside { position: sticky; top: var(--teacher-dock-top); height: min(880px, calc(100dvh - var(--teacher-dock-top) - 20px)); min-height: 340px; }
  .teacher-review-aside > .panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .teacher-review-aside .panel-header { flex: none; }
  .teacher-review-aside > .panel > .panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .teacher-review-aside .review-form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: 0; }
  .teacher-review-aside .form-grid { display: grid; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 6px 18px 16px; align-content: start; }
  .teacher-review-aside .form-actions { position: sticky; bottom: 0; z-index: 1; flex: none; margin: 0; padding: 12px 18px 16px; box-shadow: 0 -5px 12px #314a3604; }
}

@media (min-width: 1600px) {
  .teacher-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .teacher-shell .main { padding-left: 36px; padding-right: 36px; }
  .teacher-report-layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 28px; }
  .teacher-report-content .overview-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .teacher-report-content .overview-strip > div:nth-child(3) { border-left: 1px solid var(--teacher-line); padding-left: 18px; }
  .teacher-report-content .growth-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1180px) and (max-width: 1399px) {
  .teacher-shell .main { padding-left: 24px; padding-right: 24px; }
  .teacher-board-layout { grid-template-columns: 192px minmax(0, 1fr); gap: 18px; }
}

@media (min-width: 1180px) and (max-width: 1279px) {
  .subject-reading.teacher-reading .subject-chapter { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
  .teacher-reading .subject-chapter .subject-brief-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .teacher-reading .subject-chapter .subject-metrics { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .teacher-reading .subject-guidance { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--teacher-line); }
  .teacher-reading .subject-reading-label { display: none; }
}

@media (max-width: 1179px) {
  .teacher-shell .main { padding: 24px; }
  .teacher-board-layout { grid-template-columns: 184px minmax(0, 1fr); gap: 18px; }
  .teacher-group-index { top: 18px; max-height: calc(100dvh - 40px); }
  .teacher-board-content .learning-groups,
  .teacher-board-content .teaching-level .learning-groups,
  .teacher-board-content .group-student-grid { grid-template-columns: minmax(0, 1fr); }
  .teacher-review-aside { position: static; height: auto; max-height: none; }
  .teacher-review-aside .form-actions { position: static; }
}

@media (max-width: 720px) {
  .teacher-shell .main { padding: 22px 18px 36px; }
  .teacher-shell .page-heading h1 { font-size: 1.4rem; }
  .teacher-shell .page-heading p { font-size: .8125rem; }
  .teacher-toolbar { padding: 14px; gap: 12px; margin-bottom: 18px; }
  .teacher-toolbar .exam-picker { flex-basis: 100%; min-width: 0; }
  .subject-scope-picker { flex: 1 1 150px; min-width: 0; }
  .teacher-toolbar .permission-badge { margin-left: 0; align-self: flex-end; margin-bottom: 5px; }
  .teacher-toolbar select { min-height: 44px; }
  .teacher-student-switcher { gap: 10px; }
  .teacher-student-switcher > .row { width: 100%; justify-content: space-between; }
  .teacher-student-switcher .btn { min-height: 44px; }
  .teacher-board-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .teacher-group-index { position: static; display: flex; flex-wrap: wrap; gap: 6px; max-height: none; padding: 12px; overflow: visible; }
  .teacher-group-index h2,
  .teacher-group-index h3,
  .teacher-group-index > p { width: 100%; flex-basis: 100%; padding: 5px 4px; margin: 0; }
  .teacher-group-index button { width: auto; flex: 1 1 125px; min-height: 48px; margin: 0; padding: 8px 10px; border-color: #e4e9dd; }
  .teacher-board-content .group-detail-meta { align-items: stretch; gap: 6px; }
  .teacher-board-content .group-detail-meta .group-review-progress { width: 100%; }
  .teacher-shell .group-overview { padding: 18px; }
  .teacher-shell .group-filters .search { flex-basis: 100%; max-width: none; }
  .teacher-shell .group-filters .input,
  .teacher-shell .group-filters select,
  .teacher-shell .group-student footer .link-button { min-height: 44px; }
  .teacher-report-layout { gap: 18px; }
  .teacher-report-content .teacher-growth { padding: 18px; }
  .teacher-report-content .overview-strip dd { font-size: 1.35rem; }
  .subject-reading.teacher-reading .subject-chapter { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 19px; }
  .teacher-reading .subject-chapter .subject-brief-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .teacher-reading .subject-chapter .subject-metrics { flex-direction: row; flex-wrap: wrap; gap: 8px 14px; }
  .teacher-reading .subject-guidance { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--teacher-line); }
  .teacher-reading .subject-chapter .score-pair strong { font-size: 1.625rem; }
  .teacher-reading .subject-reading-label { display: none; }
  .teacher-review-aside .form-actions .btn { min-height: 44px; }
  .teacher-access-panel > header { padding: 18px; }
  .teacher-access-form { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 16px; }
  .teacher-access-table th,
  .teacher-access-table td { padding: 12px; }
  .teacher-access-table td:first-child { min-width: 115px; }
  .teacher-access-table .btn { min-height: 44px; }
}

@media (min-width: 1180px) and (max-height: 620px) {
  .teacher-review-aside { position: static; height: auto; max-height: none; min-height: 0; }
  .teacher-review-aside > .panel { display: block; height: auto; }
  .teacher-review-aside > .panel > .panel-body { overflow: visible; }
  .teacher-review-aside .review-form { overflow: visible; }
  .teacher-review-aside .form-grid { overflow: visible; }
  .teacher-group-index { position: static; max-height: none; }
}

@media print {
  .teacher-toolbar,
  .teacher-student-switcher,
  .teacher-group-index,
  .teacher-review-aside { display: none !important; }
  .teacher-report-layout,
  .teacher-board-layout { display: block; }
  .teacher-shell .main { max-width: none; padding: 0; }
}

/* Read-only, cohort-scoped subject workspace. */
.subject-analytics { --sa-ink: #243444; --sa-muted: #718093; --sa-line: #e4e9ed; --sa-accent: #21857c; color: var(--sa-ink); min-width: 0; padding: 26px; margin-bottom: 28px; border: 1px solid var(--sa-line); border-radius: 16px; background: #fafbfb; font-size: 14px; }
.subject-analytics *, .subject-analytics *::before, .subject-analytics *::after { box-sizing: border-box; }
.subject-analytics button, .subject-analytics select, .subject-analytics input { font: inherit; }
.subject-analytics button, .subject-analytics select { cursor: pointer; }
.subject-analytics button:disabled { opacity: .5; cursor: default; }
.subject-analytics button:focus-visible, .subject-analytics select:focus-visible, .subject-analytics input:focus-visible, .subject-analytics [tabindex]:focus-visible, .subject-analytics summary:focus-visible { outline: 3px solid #75b4ad; outline-offset: 3px; }
.subject-analytics h2, .subject-analytics h3, .subject-analytics p, .subject-analytics dl { margin: 0; }
.subject-analytics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.subject-analytics-eyebrow { display: block; color: var(--sa-accent); font-size: 12px; margin-bottom: 8px; letter-spacing: .12em; font-weight: 600; }
.subject-analytics-heading h2 { color: var(--sa-ink); font-size: 26px; letter-spacing: -.03em; font-weight: 650; line-height: 1.4; }
.subject-analytics-heading h2 > span { font-size: 20px; font-weight: 500; }
.subject-analytics-heading p { margin-top: 8px; color: var(--sa-muted); line-height: 1.6; }
.subject-analytics-cohort-label { display: grid; gap: 7px; color: var(--sa-muted); min-width: 230px; max-width: 420px; }
.subject-analytics select, .subject-analytics input { border: 1px solid #d7dfe5; border-radius: 8px; background: #fff; color: var(--sa-ink); min-height: 40px; padding: 7px 11px; width: 100%; font-variant-numeric: tabular-nums; }
.subject-analytics-scope { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; color: var(--sa-muted); line-height: 1.6; }
.subject-analytics-scope > span:first-child { font-weight: 600; color: #4c6072; }
.subject-analytics-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px !important; }
.subject-analytics-stats > div { min-width: 0; padding: 18px 20px; border: 1px solid var(--sa-line); border-radius: 12px; background: #fff; }
.subject-analytics-stats dt { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #607184; margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
.sa-stat-label { display: inline-flex; align-items: center; gap: 9px; }
.sa-metric-icon { display: block; flex: none; width: 24px; height: 24px; color: #698894; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.subject-analytics-stats dd { margin: 0; color: var(--sa-ink); font-size: 32px; line-height: 1.25; font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; letter-spacing: -.04em; font-weight: 600; }
.subject-analytics-stats dd > span { font-size: 14px; letter-spacing: 0; font-weight: 400; color: var(--sa-muted); }
.subject-analytics-stats small { display: block; margin-top: 9px; color: var(--sa-muted); font-size: 12px; line-height: 1.5; }
.subject-analytics-plots { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(0, 1.8fr); padding: 18px 0; gap: 18px; align-items: stretch; }
.subject-analytics-plots h3, .subject-analytics-roster h3 { font-size: 17px; line-height: 1.5; font-weight: 600; }
.subject-analytics-distribution, .subject-analytics-trends { min-width: 0; padding: 20px; border: 1px solid var(--sa-line); border-radius: 12px; background: #fff; }
.subject-analytics-chart-title > .subject-analytics-chart-number { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border: 1px solid #dfe7eb; border-radius: 6px; color: #728697; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.subject-analytics-chart-title { display: flex; align-items: center; gap: 10px; color: var(--sa-ink); }
.subject-analytics-chart-subtitle { color: var(--sa-muted); font-size: 12px; line-height: 1.6; }
.subject-analytics-distribution header > span { display: block; margin-top: 6px; color: var(--sa-muted); line-height: 1.6; font-size: 12px; overflow-wrap: anywhere; }
.subject-analytics-distribution svg { display: block; width: 100%; min-width: 0; margin-top: 18px; overflow: visible; }
.subject-analytics svg text { fill: #63758a; font-family: inherit; font-size: 21px; font-variant-numeric: tabular-nums; }
.subject-analytics-distribution svg text { font-size: 14px; }
.subject-analytics-distribution svg .subject-analytics-chart-number { fill: #506d80; font-size: 14px; font-weight: 600; }
.subject-analytics-axis { stroke: #ced7df; stroke-width: 1; }
.subject-analytics-density-grid { stroke: #edf1f4; stroke-width: 1; }
.subject-analytics-density-label { fill: #718093; font-size: 12px; }
.subject-analytics-bin { cursor: pointer; }
.subject-analytics-bin-hit { fill: transparent; }
.subject-analytics-bar { fill: #a9c1ce; }
.subject-analytics-bin:hover .subject-analytics-bar, .subject-analytics-bin:focus .subject-analytics-bar { fill: #789faf; }
.subject-analytics-bar-selected { fill: var(--sa-accent); }
.subject-analytics-whisker { stroke: #92a9b7; stroke-width: 1.5; }
.subject-analytics-quartile { fill: #edf4f6; stroke: #9eb9c5; stroke-width: 1; }
.subject-analytics-median { stroke: #457686; stroke-width: 2; }
.subject-analytics-box-caption { font-size: 12px; color: var(--sa-muted); line-height: 1.7; }
.subject-analytics-box-caption > span { display: inline-block; width: 14px; height: 9px; margin-right: 5px; border: 1px solid #9eb9c5; background: #edf4f6; }
.subject-analytics-extent { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 12px !important; padding-top: 14px; border-top: 1px solid #edf1f4; }
.subject-analytics-extent dt { color: var(--sa-muted); font-size: 12px; }
.subject-analytics-extent dd { margin: 5px 0 0; color: var(--sa-ink); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.subject-analytics-hint { color: var(--sa-muted); font-size: 12px; line-height: 1.8; }
.subject-analytics-trends > header, .subject-analytics-roster > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.subject-analytics-trends header p, .subject-analytics-roster header p { color: var(--sa-muted); margin-top: 6px; line-height: 1.6; font-size: 12px; }
.subject-analytics-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; color: var(--sa-muted); margin-top: 5px; font-size: 12px; line-height: 1.5; }
.subject-analytics-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.subject-analytics-legend i { width: 18px; height: 2px; display: inline-block; flex: none; background: var(--sa-accent); }
.subject-analytics-legend-item.is-cohort i, .subject-analytics-legend-item .is-cohort { background: #9ab1bf; height: 1px; }
.subject-analytics-legend-item.is-mean i, .subject-analytics-legend-item .is-mean { background: transparent; height: 0; border-top: 2px dashed #436f80; }
.subject-analytics-legend-item.is-selected i, .subject-analytics-legend-item .is-selected { background: var(--sa-accent); }
.subject-analytics-chart-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #cbd6df transparent; padding: 8px 0 3px; margin-top: 18px; }
.subject-analytics-trend-svg { display: block; width: 100%; min-width: 560px; height: auto; aspect-ratio: 1000 / 382; overflow: visible; }
.subject-analytics-grid { stroke: #ebf0f4; stroke-width: 1; }
.subject-analytics-exam-axis { stroke: #eef2f5; stroke-width: 1; }
.subject-analytics-selected-axis { stroke: #8eb9b5; stroke-width: 1.2; stroke-dasharray: 3 5; }
.subject-analytics-brush-lane { fill: #f0f7f6; }
.subject-analytics-brush-hit { fill: transparent; cursor: ns-resize; touch-action: none; }
.subject-analytics-band { fill: #edf3f6; opacity: .85; stroke: none; pointer-events: none; }
.subject-analytics-line { fill: none; stroke: #9ab1bf; stroke-width: 1; opacity: .46; cursor: pointer; }
.subject-analytics-line polyline { vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; pointer-events: stroke; }
.subject-analytics-line circle { fill: #9ab1bf; stroke: #fff; stroke-width: .8; }
.subject-analytics-line:hover { opacity: .95; stroke-width: 2; }
.subject-analytics-line.is-muted { opacity: .12; }
.subject-analytics-line.is-selected { opacity: .85; stroke: var(--sa-accent); stroke-width: 1.8; }
.subject-analytics-line.is-selected circle { fill: var(--sa-accent); }
.subject-analytics-line.is-muted.is-selected { opacity: .12; }
.subject-analytics-line.is-focused { opacity: 1; stroke: #145f5b; stroke-width: 2.6; }
.subject-analytics-line.is-focused circle { fill: #145f5b; }
.subject-analytics-mean-line { fill: none; stroke: #436f80; stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.subject-analytics-mean-dot { fill: #fff; stroke: #436f80; stroke-width: 2; pointer-events: none; }
.subject-analytics-range, .subject-analytics-gesture { fill: #21857c20; stroke: var(--sa-accent); stroke-width: 1.3; pointer-events: none; }
.subject-analytics-readout { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-top: 17px; margin-bottom: 14px; padding: 13px 0; border-top: 1px solid #edf1f4; border-bottom: 1px solid #edf1f4; }
.subject-analytics-reading-title { display: block; color: var(--sa-muted); font-size: 12px; line-height: 1.5; }
.subject-analytics-reading-title > span { color: #8997a5; }
.subject-analytics-reading-value { display: block; margin-top: 4px; color: var(--sa-ink); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; }
.subject-analytics-reading-value small { color: var(--sa-muted); font-size: 12px; font-weight: 400; }
.subject-analytics-reading-caption { color: var(--sa-muted); font-size: 12px; line-height: 1.6; }
.subject-analytics-trends > .subject-analytics-hint { margin-top: 14px; }
.subject-analytics-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 25px; padding: 16px 18px; border: 1px solid var(--sa-line); border-radius: 10px; background: #f3f6f7; }
.subject-analytics-controls > label { min-width: min(190px, 100%); flex: 1 1 240px; max-width: 355px; }
.subject-analytics-controls label { display: grid; gap: 6px; color: #526679; font-size: 12px; }
.subject-analytics-range-fields { display: flex; align-items: flex-end; gap: 9px; }
.subject-analytics-range-fields label { width: 95px; }
.subject-analytics-range-fields > span { padding-bottom: 10px; color: var(--sa-muted); }
.subject-analytics-filter, .subject-analytics-clear { padding: 8px 14px; min-height: 40px; border-radius: 8px; border: 1px solid #d7dfe5; background: #fff; color: #506477; white-space: nowrap; }
.subject-analytics-filter { background: var(--sa-accent); border-color: var(--sa-accent); color: white; }
.subject-analytics-filter:hover { background: #1a6f68; }
.subject-analytics-clear:hover { border-color: #a9bbc7; color: #243444; }
.subject-analytics-selection { padding: 9px 0; font-size: 13px; color: #416e73; font-variant-numeric: tabular-nums; }
.subject-analytics-error:empty { display: none; }
.subject-analytics-error { width: 100%; color: #9d462f; line-height: 1.6; }
.subject-analytics-roster { border-top: 1px solid var(--sa-line); padding-top: 24px; }
.subject-analytics-roster h3 > span { font-size: 14px; font-weight: 400; color: var(--sa-muted); margin-left: 10px; }
.subject-analytics-roster .subject-analytics-focus { color: #34766e; padding-top: 3px; text-align: right; }
.subject-analytics-table-scroll { overflow: auto; max-width: 100%; max-height: 540px; scrollbar-width: thin; scrollbar-color: #cbd6df transparent; margin-top: 17px; border: 1px solid var(--sa-line); border-radius: 10px; background: #fff; }
.subject-analytics table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.subject-analytics th { position: sticky; top: 0; z-index: 1; color: #657789; background: #f6f8fa; font-size: 12px; font-weight: 500; white-space: nowrap; }
.subject-analytics td, .subject-analytics th { border-bottom: 1px solid #edf1f4; padding: 12px 14px; }
.subject-analytics td:first-child, .subject-analytics th:first-child { padding-left: 12px; }
.subject-analytics td { color: #4c6073; }
.subject-analytics td strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.subject-analytics td:first-child small { display: block; color: var(--sa-muted); font-size: 12px; margin-top: 4px; }
.subject-analytics td:last-child { text-align: right; }
.subject-analytics tbody tr:hover, .subject-analytics tbody tr.is-focused { background: #f0f7f6; }
.subject-analytics-name { padding: 0; background: transparent; border: 0; color: var(--sa-ink); font-size: 14px !important; font-weight: 600 !important; min-height: 28px; text-align: left; }
.subject-analytics-name[aria-pressed="true"] { color: #145f5b; }
.subject-analytics-open { padding: 5px 0; min-height: 32px; border: 0; background: transparent; color: var(--sa-accent); white-space: nowrap; }
.subject-analytics-open:hover, .subject-analytics-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.subject-analytics-sparkline { width: 110px; height: 38px; fill: #83a6b2; stroke: none; display: block; }
.subject-analytics-sparkline polyline { fill: none; stroke: #83a6b2; stroke-width: 1.5; stroke-linejoin: round; }
.subject-analytics-missing-label { color: var(--sa-muted); font-size: 12px; margin-left: 7px; }
.subject-analytics-empty { padding: 34px 20px !important; text-align: center; color: var(--sa-muted); line-height: 1.8; }
.subject-analytics-empty h3 { margin-bottom: 9px; font-size: 18px; color: #4c6073; }
.subject-analytics-missing, .subject-analytics-method { margin-top: 19px; color: var(--sa-muted); border-top: 1px solid var(--sa-line); padding-top: 16px; line-height: 1.8; }
.subject-analytics summary { cursor: pointer; color: #526b7c; font-size: 13px; }
.subject-analytics-method p, .subject-analytics-missing p { margin-top: 10px; }
.subject-analytics-missing ul { list-style: none; margin: 12px 0 0; padding: 0; }
.subject-analytics-missing li { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 8px 0; border-top: 1px solid #edf1f4; }
.subject-analytics-missing li small { font-size: 14px; }
.subject-analytics-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Other subjects stay compact in a teacher's focused student reading. */
.teacher-subject-compact { margin-top: 12px; border: 1px solid #dfe5da; border-radius: 10px; background: #fffffc; }
.teacher-subject-compact > summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 17px 20px; cursor: pointer; color: #42583e; font-size: 14px; }
.teacher-subject-compact > summary::after { content: '⌄'; color: #7c8e72; margin-left: auto; }
.teacher-subject-compact[open] > summary { border-bottom: 1px solid #e5eadd; }
.teacher-subject-compact[open] > summary::after { transform: rotate(180deg); }
.teacher-subject-compact > summary strong { font-size: 16px; }
.teacher-subject-compact > .subject-chapter { border: 0; margin: 0; border-radius: 0 0 10px 10px; }
.teacher-subject-depth { margin-top: 16px; border-top: 1px solid #e1e7d9; padding-top: 12px; }
.teacher-subject-depth > summary { color: #506747; font-size: 14px; cursor: pointer; padding: 3px 0; }
.teacher-subject-depth[open] > summary { margin-bottom: 14px; }

@media (max-width: 1100px) {
  .subject-analytics { padding: 22px; }
  .subject-analytics-plots { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .subject-analytics-distribution svg { max-width: 460px; margin-left: auto; margin-right: auto; }
  .subject-analytics-stats > div { padding: 16px; }
  .subject-analytics-trend-svg { min-width: 620px; }
}
@media (max-width: 850px) {
  .subject-analytics-heading { align-items: stretch; flex-wrap: wrap; }
  .subject-analytics-cohort-label { max-width: none; min-width: 0; width: 100%; }
  .subject-analytics-trends > header { flex-wrap: wrap; gap: 12px; }
  .subject-analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-analytics-stats dd { font-size: 27px; }
  .subject-analytics-stats dt { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 560px) {
  .subject-analytics { padding: 18px 14px; border-radius: 12px; }
  .subject-analytics-heading h2 { font-size: 23px; }
  .subject-analytics-heading h2 > span { font-size: 18px; }
  .subject-analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .subject-analytics-stats > div { padding: 14px 12px; }
  .subject-analytics-stats dd { font-size: 27px; }
  .subject-analytics-stats dt { font-size: 12px; }
  .subject-analytics-distribution, .subject-analytics-trends { padding: 16px 14px; }
  .subject-analytics-plots { gap: 12px; padding: 14px 0; }
  .subject-analytics-legend { gap: 8px 12px; }
  .subject-analytics-readout { gap: 12px 22px; }
  .subject-analytics-controls { padding: 12px; }
  .subject-analytics-controls > label { max-width: none; flex-basis: 100%; }
  .subject-analytics-range-fields { width: 100%; }
  .subject-analytics-range-fields label { flex: 1; min-width: 0; }
  .subject-analytics-controls button { min-height: 44px; }
  .subject-analytics-roster > header { flex-direction: column; gap: 6px; }
  .subject-analytics-roster .subject-analytics-focus { text-align: left; }
  .subject-analytics table { min-width: 620px; }
  .subject-analytics-missing li { align-items: flex-start; }
}
@media print {
  .subject-analytics { padding: 16px; background: #fff; }
  .subject-analytics-controls, .subject-analytics-open { display: none; }
  .subject-analytics-chart-scroll, .subject-analytics-table-scroll { overflow: visible; max-height: none; }
  .subject-analytics-plots { display: block; }
  .subject-analytics-distribution, .subject-analytics-trends { break-inside: avoid; margin-bottom: 16px; }
  .subject-analytics-distribution svg { max-width: 380px; }
  .subject-analytics-stats > div { break-inside: avoid; }
  .subject-analytics th { position: static; }
  .subject-analytics table { min-width: 0; }
  .subject-analytics-trend-svg { min-width: 0; }
}

/* Teacher pages move from a soft pink wash to pale blue with native scrolling.
   These tokens are separate from chart colors and warning/success semantics. */
:root[data-workspace-theme="teacher"], .teacher-shell {
  --teacher-surface: #fffffff0;
  --teacher-line: #e1dfe9;
  --teacher-ink: #35435f;
  --teacher-muted: #62697d;
  --teacher-accent: #68577d;
  --teacher-accent-strong: #514469;
  --teacher-soft: #f3eef8;
  --teacher-blue: #edf3fb;
  --teacher-focus: #816aa6;
}
:root[data-workspace-theme="teacher"] body {
  background: var(--teacher-scroll-background, #fbeff6);
  transition: none;
}
:root[data-workspace-theme="teacher"] body::before {
  background:
    radial-gradient(ellipse at 84% 8%, #ffffff85, transparent 57%),
    radial-gradient(ellipse at 8% 78%, #ffffff45, transparent 55%);
  background-size: auto;
  opacity: 1;
  transition: none;
}
:root[data-workspace-theme="teacher"] body::after {
  display: none;
}
.teacher-shell,
:root[data-workspace-theme="teacher"] #modal {
  --ink: var(--teacher-ink);
  --muted: var(--teacher-muted);
  --line: var(--teacher-line);
  --surface: var(--teacher-surface);
  --shadow: 0 4px 22px #404a6d06;
  color: var(--teacher-ink);
}
/* Review dialogs carry the same palette as the teacher workspace. */
:root[data-workspace-theme="teacher"] #modal {
  background: var(--teacher-surface);
  border-color: var(--teacher-line);
  box-shadow: 0 28px 100px #35435f29;
}
:root[data-workspace-theme="teacher"] #modal::backdrop { background: #35435f4d; }
:root[data-workspace-theme="teacher"] #modal .modal-head {
  background: var(--teacher-surface);
  border-color: var(--teacher-line);
}
:root[data-workspace-theme="teacher"] #modal :is(.modal-head h2,.field,.group-review-members legend,.group-review-members label) { color: var(--teacher-ink); }
:root[data-workspace-theme="teacher"] #modal .modal-close {
  background: var(--teacher-soft);
  color: var(--teacher-accent-strong);
}
:root[data-workspace-theme="teacher"] #modal .modal-close:hover { background: var(--teacher-blue); color: var(--teacher-ink); }
:root[data-workspace-theme="teacher"] #modal .group-review-intro {
  background: linear-gradient(115deg, var(--teacher-soft), var(--teacher-blue));
  color: var(--teacher-ink);
}
:root[data-workspace-theme="teacher"] #modal :is(.group-review-intro p,.group-review-members small,.field .hint) { color: var(--teacher-muted); }
:root[data-workspace-theme="teacher"] #modal .group-review-members {
  background: var(--teacher-surface);
  border-color: var(--teacher-line);
}
:root[data-workspace-theme="teacher"] #modal #group-review-form > .notice {
  background: var(--teacher-blue);
  border-color: var(--teacher-focus);
  color: var(--teacher-ink);
}
.teacher-shell .sidebar {
  background: #fdfbfff2;
  border-color: var(--teacher-line);
  color: var(--teacher-ink);
}
.teacher-shell .sidebar .brand,
.teacher-shell .sidebar-note p,
.teacher-shell .topbar-title strong,
.teacher-shell .teacher-student-switcher strong { color: var(--teacher-ink); }
.teacher-shell .sidebar .brand span,
.teacher-shell .sidebar-note small,
.teacher-shell .nav-caption,
.teacher-shell .nav-item,
.teacher-shell .account small,
.teacher-shell .account-actions button,
.teacher-shell .topbar-meta,
.teacher-shell .topbar-title,
.teacher-shell .teacher-student-switcher,
.teacher-shell .teacher-student-switcher small { color: var(--teacher-muted); }
.teacher-shell .sidebar-bottom { border-color: var(--teacher-line); }
.teacher-shell .sidebar .avatar,
.teacher-shell .avatar,
.teacher-shell .note-sprout { color: var(--teacher-accent); background: #eee8f6; }
.teacher-shell .nav-item:hover,
.teacher-shell .section-navigation a:hover { background: #f2edf8; color: var(--teacher-accent-strong); }
.teacher-shell .nav-item.active,
.teacher-shell .section-navigation a[aria-current="page"] {
  background: #eae5f4;
  border-color: #d8cde8;
  color: var(--teacher-accent-strong);
}
.teacher-shell .section-navigation a { color: var(--teacher-muted); }
.teacher-shell .workspace .topbar { background: #ffffffd9; border-color: var(--teacher-line); }
.teacher-shell .account-actions button:hover { color: var(--teacher-accent-strong); }
.teacher-shell .teacher-toolbar { box-shadow: 0 3px 14px #5b537009; }
.teacher-shell .teacher-header,
.teacher-shell .watch-summary { background: linear-gradient(110deg, #faf2f9f5, #edf3fcf0); border-color: var(--teacher-line); }
.teacher-shell .teacher-toolbar .exam-picker label,
.teacher-shell .subject-scope-picker > span,
.teacher-shell .subject-scope-picker > label,
.teacher-shell .teacher-group-index h3,
.teacher-shell .teacher-group-index > p,
.teacher-shell .teacher-group-index button small { color: var(--teacher-muted); }
.teacher-shell .teacher-toolbar select,
.teacher-shell .subject-scope-picker select { background: #fff; border-color: #cdd1e0; }
.teacher-shell .permission-badge,
:root[data-workspace-theme="teacher"] #modal .permission-badge {
  color: var(--teacher-accent-strong); background: #f2eef8; border-color: #ddd4e9;
}
.teacher-shell .teacher-group-index button { color: var(--teacher-ink); }
.teacher-shell .teacher-group-index button:hover { background: #f5f2fa; border-color: #e3daed; }
.teacher-shell .teacher-group-index button.active,
.teacher-shell .teacher-group-index button[aria-current="true"] { background: #eae6f5; border-color: #d6cbe7; color: var(--teacher-accent-strong); }

.teacher-shell .btn:not(.primary):not(.dark):not(.danger),
:root[data-workspace-theme="teacher"] #modal .btn:not(.primary):not(.dark):not(.danger) {
  background: #fff; border-color: #d6d7e4; color: var(--teacher-ink);
}
.teacher-shell .btn:not(.primary):not(.dark):not(.danger):hover,
:root[data-workspace-theme="teacher"] #modal .btn:not(.primary):not(.dark):not(.danger):hover { background: #f3eff9; border-color: #c7bdd9; }
.teacher-shell .btn.primary,
.teacher-shell .watch-shortcut.active,
:root[data-workspace-theme="teacher"] #modal .btn.primary {
  background: var(--teacher-accent); border-color: var(--teacher-accent); color: #fff;
}
.teacher-shell .btn.primary:hover,
.teacher-shell .watch-shortcut.active:hover,
:root[data-workspace-theme="teacher"] #modal .btn.primary:hover { background: var(--teacher-accent-strong); border-color: var(--teacher-accent-strong); }
.teacher-shell .btn.dark,
:root[data-workspace-theme="teacher"] #modal .btn.dark { background: #3f4b68; border-color: #3f4b68; color: #fff; }
.teacher-shell .link-button:not(.danger),
.teacher-shell .subtab.active,
:root[data-workspace-theme="teacher"] #modal .link-button:not(.danger) { color: var(--teacher-accent); }
.teacher-shell .subtab.active { border-bottom-color: var(--teacher-accent); }
.teacher-shell :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible,
:root[data-workspace-theme="teacher"] #modal :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
  outline-color: var(--teacher-focus);
}
.teacher-shell input[type="checkbox"],
.teacher-shell input[type="radio"],
:root[data-workspace-theme="teacher"] #modal input[type="checkbox"],
:root[data-workspace-theme="teacher"] #modal input[type="radio"] { accent-color: var(--teacher-accent); }
.teacher-shell .management-menu > summary { background: #fcfaff; border-color: var(--teacher-line); color: var(--teacher-accent-strong); }
.teacher-shell .management-menu > summary:hover,
.teacher-shell .management-menu[open] > summary { background: #f0eaf7; border-color: #cdbfe0; }
.teacher-shell .management-menu > summary > span { color: var(--teacher-muted); }

.teacher-shell :is(.panel,.growth-section,.group-overview,.learning-group,.group-student,.watch-profile,.student-results,.student-accounts-panel,.teacher-subject-compact),
.teacher-shell .teacher-review-aside > .panel,
.teacher-shell .subject-reading .subject-chapter { background: var(--teacher-surface); border-color: var(--teacher-line); }
.teacher-shell .learning-group:hover { border-color: #c6b8dc; box-shadow: 0 5px 20px #69557e0c; }
.teacher-shell :is(.group-overview h2,.group-overview dd,.learning-group h3,.group-student h4,.group-student-score strong,.watch-summary h2,.watch-profile h2),
.teacher-shell .teacher-subject-compact > summary,
.teacher-shell .teacher-subject-depth > summary,
.teacher-shell .student-results > summary,
.teacher-shell .subject-chapter .subject-analysis h4,
.teacher-shell .subject-chapter .score-pair strong { color: var(--teacher-ink); }
.teacher-shell :is(.group-overview p,.group-overview dt,.group-overview dd small,.learning-group > header,.learning-group footer,.group-student header div > span,.group-student-score,.group-student-reason,.watch-summary p,.watch-results > header span,.watch-note small,.watch-note p > span),
.teacher-shell .student-results > summary small,
.teacher-shell .student-accounts-panel p,
.teacher-shell .teacher-access-panel > header p,
.teacher-shell .teacher-access-table td small,
.teacher-shell .teacher-review-aside #save-status,
.teacher-shell .teacher-subject-compact > summary::after,
.teacher-shell .subject-chapter .subject-strategy h4 { color: var(--teacher-muted); }
.teacher-shell :is(.learning-group footer,.group-student footer,.group-student-score,.teacher-subject-depth),
.teacher-shell .teacher-subject-compact[open] > summary { border-color: var(--teacher-line); }
.teacher-shell .student-results > summary:hover { background: #f6f3fa; }
.teacher-shell .student-results-content { background: #f8f7fc; border-color: var(--teacher-line); }
.teacher-shell .subject-chapter .subject-analysis p,
.teacher-shell .watch-note p { color: #536078; }
.teacher-shell .subject-chapter .subject-letter { color: #5a6d8c; background: #edf2fa; }
.teacher-shell .subject-guidance,
.teacher-shell .subject-chapter .subject-strategy,
.teacher-shell .subject-chapter .card-footer { border-color: var(--teacher-line); }
.teacher-shell .watch-note { background: #f8f6fc; border-color: #e5e0ee; }
.teacher-shell .watch-note.is-completed { background: #f7f8fa; border-color: #e2e5eb; }
.teacher-shell .watch-shortcut { color: var(--teacher-ink); border-color: var(--teacher-line); }
.teacher-shell .watch-shortcut.active { color: #fff; }
.teacher-shell .teacher-access-form { --teacher-line: #e1dfe9; }
.teacher-shell .teacher-access-form legend { color: var(--teacher-ink); }
.teacher-shell .teacher-access-table th,
.teacher-shell .student-accounts-table th { background: #f4f1f9; }
.teacher-shell .subject-analytics { background: #fafaff; border-color: var(--teacher-line); }
.teacher-shell .subject-analytics-controls { background: #f5f4fb; }

/* Observation and reading modules share the teacher palette, including empty states. */
.teacher-shell :is(.growth-heading h2,.growth-section-label h3,.growth-record h3,.growth-empty strong,.exam-highlights h3,.exam-highlight-grid h4,.analysis-module h2,.teacher-note .panel-header h2,.review-section h3,.overview-strip dd) {
  color: var(--teacher-ink);
}
.teacher-shell :is(.growth-eyebrow,.growth-heading p,.growth-section-label,.growth-record-meta,.growth-record footer,.growth-empty p,.growth-empty-icon,.growth-history > summary,.growth-history > summary span,.exam-highlights header > span,.growth-exam-context,.growth-exam-note,.teacher-note .panel-header h2 .icon,.overview-strip dt,.overview-strip dd small,.overview-trend > p,.analysis-kicker,.analysis-kicker small,.record-date,.field-optional) {
  color: var(--teacher-muted);
}
.teacher-shell :is(.growth-record > p,.exam-highlight-grid p,.teacher-note .panel-body p,.review-section p,.strategy-preview > li,.plan-step-body dd) { color: #536078; }
.teacher-shell .growth-record { background: #fdfcff; border-color: var(--teacher-line); }
.teacher-shell :is(.growth-empty,.growth-next,.exam-highlight-grid > article) { background: #f4f1fa; border-color: #e7e1f0; }
.teacher-shell .growth-next { color: #536078; }
.teacher-shell .growth-next > span { color: var(--teacher-accent-strong); }
.teacher-shell .growth-window { background: #f2edf8; border-color: #ddd4e9; color: var(--teacher-muted); }
.teacher-shell :is(.exam-highlights,.compact-overview,.overview-strip > div,.overview-trend,.analysis-reference,.progress-method,.progress-records,.research-sources,.plan-detail) { border-color: var(--teacher-line); }
.teacher-shell .teacher-note.panel { background: #fbf8fdf0; border-color: var(--teacher-line); }
.teacher-shell .review-preview { background: #f7f5fc; border-color: var(--teacher-line); }
.teacher-shell .review-section { border-color: #b6a5ce; }
.teacher-shell :is(.plan-steps > li,.analysis-module > .progress-method,.analysis-module > .research-sources) { background: #faf9fd; border-color: var(--teacher-line); }
.teacher-shell :is(.plan-step-body dt,.progress-method dt,.research-sources p strong) { color: var(--teacher-ink); }
.teacher-shell :is(.analysis-reference summary,.progress-method summary,.progress-records summary,.research-sources summary,.plan-detail > summary,.research-intro,.research-sources p,.progress-method dd,.progress-method ul,.progress-records td,.progress-records th[scope="row"]) { color: var(--teacher-muted); }
.teacher-shell .strategy-preview .step-time { background: #edf1fa; color: #596783; }
.teacher-shell .progress-records th { background: #f4f1f9; color: var(--teacher-muted); }
.teacher-shell :is(.progress-records td,.research-sources li) { border-color: var(--teacher-line); }
.teacher-shell .progress-deltas { background: #f5f6fb; border-color: var(--teacher-line); }
.teacher-shell :is(.metric-switch,.detail-metric-tabs) { background: #f1edf7; border-color: #e1d8ed; }
.teacher-shell :is(.metric-switch,.detail-metric-tabs) button { color: var(--teacher-muted); }
.teacher-shell :is(.metric-switch,.detail-metric-tabs) button:hover { background: #e9e2f4; }
.teacher-shell :is(.metric-switch,.detail-metric-tabs) button[aria-pressed="true"],
.teacher-shell .detail-metric-tabs button.active { background: #fff; color: var(--teacher-accent-strong); box-shadow: 0 2px 5px #5b477a0a; }

.teacher-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea):not([aria-invalid="true"]),
:root[data-workspace-theme="teacher"] #modal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea):not([aria-invalid="true"]) {
  background: #fff; border-color: #c8cadb; color: var(--teacher-ink); box-shadow: 0 1px 2px #434c6c04;
}
.teacher-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea):not([aria-invalid="true"]):hover,
:root[data-workspace-theme="teacher"] #modal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea):not([aria-invalid="true"]):hover { border-color: #a69bba; }
.teacher-shell :is(input,textarea)::placeholder,
:root[data-workspace-theme="teacher"] #modal :is(input,textarea)::placeholder { color: var(--teacher-muted); }
/* Preserve the analytic series, selected ranges, success markers and warning colors. */

/* Native-scroll scenery sits behind the reading surface. Only decorative children
   move; the shell and workspace stay untransformed so their sticky tools work. */
.teacher-shell .teacher-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.teacher-shell .teacher-atmosphere::before,
.teacher-shell .teacher-atmosphere::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.teacher-shell .teacher-atmosphere::before {
  inset: -15% -5%;
  background:
    radial-gradient(ellipse at 88% 18%, #dab5e159, transparent 37%),
    radial-gradient(ellipse at 22% 70%, #a8ccf54d, transparent 37%),
    radial-gradient(ellipse at 75% 90%, #b9d5f252, transparent 32%);
  transform: translate3d(0, calc(var(--teacher-scroll-progress, 0) * -90px), 0);
}
.teacher-shell .teacher-atmosphere::after {
  inset: 0;
  background-image: radial-gradient(#7d7aab3b .8px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent 10%, #000 22%, transparent 47%, transparent 78%, #000);
  opacity: .48;
}
.teacher-shell .teacher-orbit-orb {
  position: absolute;
  width: 540px;
  height: 540px;
  top: 5vh;
  right: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, #d8bce525, transparent 66%);
  transform: translate3d(calc(var(--teacher-scroll-progress, 0) * -70px), calc(var(--teacher-scroll-progress, 0) * -185px), 0) rotate(calc(var(--teacher-scroll-progress, 0) * 38deg));
}
.teacher-shell .teacher-orbit-orb > span {
  position: absolute;
  inset: 0;
  border: 1px solid #9888bd47;
  border-radius: 50%;
}
.teacher-shell .teacher-orbit-orb > span:nth-child(2) { inset: 53px; border-color: #aaa0ce52; }
.teacher-shell .teacher-orbit-orb > span:nth-child(3) { inset: 106px; border-color: #a28bbb3d; }
.teacher-shell .teacher-orbit-orb > i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid #fcf7fe;
  border-radius: 50%;
  background: #a697c0;
  box-shadow: 0 0 0 6px #baa8d11c;
}
.teacher-shell .teacher-orbit-orb > i:nth-of-type(1) { top: 76px; left: 76px; }
.teacher-shell .teacher-orbit-orb > i:nth-of-type(2) { top: 316px; left: 61px; background: #88afd0; }
.teacher-shell .teacher-orbit-orb > i:nth-of-type(3) { top: 164px; left: 144px; width: 7px; height: 7px; background: #ccadc5; }
.teacher-shell .teacher-ribbon {
  position: absolute;
  top: 46vh;
  right: -220px;
  width: 510px;
  height: 820px;
  opacity: calc(.52 + var(--teacher-scroll-progress, 0) * .22);
  transform: translate3d(calc(var(--teacher-scroll-progress, 0) * -45px), calc(var(--teacher-scroll-progress, 0) * -290px), 0) rotate(calc(-12deg + var(--teacher-scroll-progress, 0) * 13deg));
}
.teacher-shell .teacher-ribbon svg { display: block; width: 100%; height: 100%; fill: none; stroke: #8aa6cb; stroke-width: 1; }
.teacher-shell .teacher-ribbon svg path:nth-child(2) { stroke: #b49dc8; opacity: .75; }
.teacher-shell .teacher-ribbon svg path:nth-child(3) { stroke: #8ea9cc; opacity: .45; }
.teacher-shell .teacher-paper-float {
  position: absolute;
  top: 74vh;
  left: clamp(132px, 14vw, 245px);
  width: 200px;
  height: 252px;
  opacity: .65;
  transform: translate3d(calc(var(--teacher-scroll-progress, 0) * 30px), calc(var(--teacher-scroll-progress, 0) * -230px), 0) rotate(calc(-18deg + var(--teacher-scroll-progress, 0) * 14deg));
}
.teacher-shell .teacher-paper-float > span {
  position: absolute;
  inset: 0;
  border: 1px solid #99afd047;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff47, #d6e4f417);
}
.teacher-shell .teacher-paper-float > span:nth-child(1) { transform: rotate(-10deg) translate(-17px, 5px); }
.teacher-shell .teacher-paper-float > span:nth-child(2) { transform: rotate(8deg) translate(12px, -2px); border-color: #b4a3cd47; }
.teacher-shell .teacher-paper-float > span:nth-child(3) { background: linear-gradient(145deg, #ffffff57, #e3e3f529); }
.teacher-shell .teacher-paper-float > span:nth-child(3)::before {
  content: "";
  position: absolute;
  top: 37px;
  left: 27px;
  right: 30px;
  height: 97px;
  background: repeating-linear-gradient(180deg, #8e9db43b 0 1px, transparent 1px 22px);
  mask-image: linear-gradient(90deg, #000 60%, transparent);
}
.teacher-shell .teacher-paper-float > span:nth-child(3)::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  bottom: 33px;
  right: 29px;
  border: 1px solid #9f90b24d;
  border-radius: 50%;
  box-shadow: -14px -8px 0 -4px #c4b8da40;
}

/* A small editorial opening introduces the visual rhythm without delaying tools. */
.teacher-shell .teacher-scroll-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 198px;
  max-width: 1528px;
  margin: 24px 30px 0;
  padding: 24px 30px;
  overflow: hidden;
  border: 1px solid #ffffffb3;
  border-bottom-color: #d7cce480;
  border-radius: 22px;
  background: linear-gradient(112deg, #ffffff45, #faf1f75c 48%, #e5eafa80);
}
.teacher-shell .teacher-scroll-intro-copy { position: relative; z-index: 1; min-width: 0; }
.teacher-shell .teacher-scroll-eyebrow { display: block; color: var(--teacher-muted); font-size: .6875rem; letter-spacing: .15em; line-height: 1.7; margin: 0 0 11px; }
.teacher-shell .teacher-scroll-title { color: var(--teacher-ink); font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.25; margin: 0; }
.teacher-shell .teacher-scroll-title > span { color: #756081; }
.teacher-shell .teacher-scroll-caption { color: var(--teacher-muted); font-size: .8125rem; line-height: 1.85; margin: 12px 0 0; }
.teacher-shell .teacher-scroll-cue { display: flex; align-items: center; gap: 10px; color: var(--teacher-muted); font-size: .6875rem; line-height: 1.8; margin: 16px 0 0; letter-spacing: .035em; }
.teacher-shell .teacher-scroll-cue::before { content: ""; width: 25px; height: 1px; flex: none; background: #ab99bc; }
.teacher-shell .teacher-scroll-intro-visual { position: relative; width: 230px; height: 148px; flex: none; pointer-events: none; user-select: none; }
.teacher-shell .teacher-scroll-intro-visual::before {
  content: "";
  position: absolute;
  inset: -25px -30px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #cfc3e561, transparent 65%);
}
.teacher-shell .teacher-mini-orbit { position: absolute; inset: 0; transform: rotate(calc(-19deg + var(--teacher-scroll-progress, 0) * 22deg)); }
.teacher-shell .teacher-mini-orbit > span { position: absolute; inset: 11px 0; border: 1px solid #aa93c078; border-radius: 50%; }
.teacher-shell .teacher-mini-orbit > span:nth-child(2) { inset: -18px 30px; transform: rotate(55deg); border-color: #88a4c766; }
.teacher-shell .teacher-mini-orbit > span:nth-child(3) { inset: 26px -22px; transform: rotate(-26deg); border-color: #b8a2c84d; }
.teacher-shell .teacher-mini-orbit::before,
.teacher-shell .teacher-mini-orbit::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #a08caf; box-shadow: 0 0 0 4px #d6c6e64d; }
.teacher-shell .teacher-mini-orbit::before { top: 13px; right: 48px; }
.teacher-shell .teacher-mini-orbit::after { bottom: 30px; left: 13px; width: 6px; height: 6px; background: #8fa9cb; }
.teacher-shell .teacher-mini-paper { position: absolute; width: 84px; height: 108px; left: 75px; top: 19px; transform: translateY(calc(var(--teacher-scroll-progress, 0) * -15px)) rotate(-8deg); }
.teacher-shell .teacher-mini-paper > i { position: absolute; inset: 0; border: 1px solid #a798bf66; border-radius: 9px; background: #f8f5fca8; }
.teacher-shell .teacher-mini-paper > i:nth-child(1) { transform: rotate(-11deg) translate(-8px, 2px); background: #d3dcef; border-color: #a8bbd16b; }
.teacher-shell .teacher-mini-paper > i:nth-child(2) { transform: rotate(9deg) translate(7px, 0); background: #e5dbee; }
.teacher-shell .teacher-mini-paper > i:nth-child(3) { background: linear-gradient(140deg, #fff, #f8f5fc); box-shadow: 0 6px 16px #84749212; }
.teacher-shell .teacher-mini-paper > i:nth-child(3)::before { content: ""; position: absolute; top: 23px; left: 15px; right: 15px; height: 32px; background: repeating-linear-gradient(180deg, #9da8c46b 0 1px, transparent 1px 10px); }
.teacher-shell .teacher-mini-paper > i:nth-child(3)::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; right: 16px; bottom: 17px; background: #d2c5e4; box-shadow: -7px -4px 0 #e6dff1; }

@media (min-width: 1600px) {
  .teacher-shell .teacher-scroll-intro { margin-left: 36px; margin-right: 36px; }
}
@media (min-width: 1830px) {
  .teacher-shell .teacher-scroll-intro { margin-left: auto; margin-right: auto; }
}
@media (max-width: 1179px) {
  .teacher-shell .teacher-scroll-intro { margin: 22px 24px 0; padding: 24px; }
  .teacher-shell .teacher-scroll-intro-visual { width: 190px; transform: scale(.88); transform-origin: center right; }
}
@media (max-width: 720px) {
  .teacher-shell .teacher-scroll-intro { min-height: 174px; margin: 18px 20px 0; padding: 21px 20px; border-radius: 17px; gap: 0; }
  .teacher-shell .teacher-scroll-intro-copy { max-width: 100%; }
  .teacher-shell .teacher-scroll-eyebrow { font-size: .625rem; letter-spacing: .08em; margin-bottom: 10px; }
  .teacher-shell .teacher-scroll-title { font-size: 1.625rem; }
  .teacher-shell .teacher-scroll-caption { max-width: 242px; font-size: .75rem; margin-top: 11px; }
  .teacher-shell .teacher-scroll-cue { font-size: .625rem; margin-top: 12px; }
  .teacher-shell .teacher-scroll-intro-visual { display: none; }
  .teacher-shell .teacher-orbit-orb { width: 370px; height: 370px; right: -260px; top: 15vh; opacity: .65; }
  .teacher-shell .teacher-orbit-orb > span:nth-child(2) { inset: 36px; }
  .teacher-shell .teacher-orbit-orb > span:nth-child(3) { inset: 72px; }
  .teacher-shell .teacher-orbit-orb > i:nth-of-type(2) { top: 249px; left: 42px; }
  .teacher-shell .teacher-paper-float { left: -120px; top: 67vh; opacity: .38; }
  .teacher-shell .teacher-ribbon { right: -365px; width: 450px; opacity: .43; }
  .teacher-shell .teacher-atmosphere::after { opacity: .3; background-size: 28px 28px; }
}
@media (max-width: 380px) {
  .teacher-shell .teacher-scroll-intro { margin-left: 15px; margin-right: 15px; padding-left: 17px; padding-right: 17px; }
  .teacher-shell .teacher-scroll-title { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-shell .teacher-atmosphere::before,
  .teacher-shell :is(.teacher-orbit-orb,.teacher-ribbon,.teacher-paper-float,.teacher-mini-orbit,.teacher-mini-paper) { transform: none; }
  .teacher-shell .teacher-ribbon { opacity: .52; }
}
@media (prefers-contrast: more) {
  .teacher-shell .teacher-atmosphere,
  .teacher-shell .teacher-scroll-intro-visual { display: none; }
  .teacher-shell .teacher-scroll-intro { background: #fff; border-color: var(--teacher-line); }
  .teacher-shell :is(.teacher-scroll-eyebrow,.teacher-scroll-caption,.teacher-scroll-cue) { color: var(--teacher-muted); }
}
@media print, (forced-colors: active) {
  .teacher-shell .teacher-atmosphere,
  .teacher-shell .teacher-scroll-intro { display: none; }
}

@media (max-width: 720px) {
  .teacher-shell .nav-item.active { background: transparent; border-bottom-color: var(--teacher-accent); }
  .teacher-shell .nav-item:hover { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  :root[data-workspace-theme="teacher"] body { background: linear-gradient(180deg, #fbeff6, #e6f1fe); }
  :root[data-workspace-theme="teacher"] body::before,
  :root[data-workspace-theme="teacher"] body::after { display: none; }
}
@media (prefers-contrast: more) {
  :root[data-workspace-theme="teacher"], .teacher-shell { --teacher-line: #8c879e; --teacher-muted: #505a70; }
}
@media print {
  :root[data-workspace-theme="teacher"] body { background: #fff; }
  :root[data-workspace-theme="teacher"] body::before,
  :root[data-workspace-theme="teacher"] body::after { display: none; }
  :root[data-workspace-theme="teacher"], .teacher-shell { --teacher-surface: #fff; --teacher-soft: #fff; --teacher-blue: #fff; --teacher-ink: #222; --teacher-muted: #444; --shadow: none; }
  :root[data-workspace-theme="teacher"] #modal { box-shadow: none; }
  .teacher-shell :is(.teacher-header,.watch-summary,.watch-note,.student-results-content,.subject-analytics,.subject-analytics-controls,.growth-record,.growth-empty,.growth-next,.exam-highlight-grid > article,.teacher-note.panel,.review-preview,.plan-steps > li,.analysis-module > .progress-method,.analysis-module > .research-sources,.progress-deltas) { background: #fff; }
}
@media (forced-colors: active) {
  :root[data-workspace-theme="teacher"] body { background: Canvas; }
  :root[data-workspace-theme="teacher"] body::before,
  :root[data-workspace-theme="teacher"] body::after { display: none; }
  :root[data-workspace-theme="teacher"], .teacher-shell {
    --teacher-surface: Canvas;
    --teacher-soft: Canvas;
    --teacher-blue: Canvas;
    --teacher-line: ButtonBorder;
    --teacher-ink: CanvasText;
    --teacher-muted: CanvasText;
    --teacher-accent: LinkText;
    --teacher-accent-strong: LinkText;
    --teacher-focus: Highlight;
  }
  :root[data-workspace-theme="teacher"] #modal { box-shadow: none; }
  .teacher-shell :is(.nav-item.active,.section-navigation a[aria-current="page"],.teacher-group-index button.active,.btn.primary,.watch-shortcut.active),
  :root[data-workspace-theme="teacher"] #modal .btn.primary { background: Highlight; color: HighlightText; border-color: Highlight; }
}
