/* User-approved reference geometry; existing student-cabinet colour tokens. */
.teacher-scene { min-height: 100dvh; }
.teacher-scene .teacher-workspace {
  max-width: none; width: 100%; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none;
  --teacher-line: var(--account-border);
  --teacher-tone: var(--account-accent);
}
.teacher-scene .teacher-workspace :is(.secretary-app, .sec-overlay, [data-onboarding-v2]) {
  --sec-bg: var(--account-page-bg);
  /* Embedded homework tools use legacy aliases; inherit the same site palette. */
  --theme-text: var(--account-heading);
  --theme-text-secondary: var(--account-muted);
  --theme-bg-elevated: var(--account-panel-raised);
  --theme-bg-soft: var(--account-panel-bg);
  --theme-border-strong: var(--account-border);
  --theme-focus: var(--interactive-focus-color);
  --sec-surface: var(--account-panel-bg);
  --sec-surface-2: var(--account-panel-raised);
  --sec-surface-3: var(--workspace-surface-hover);
  --sec-sidebar-shell: var(--account-glass-bg);
  --sec-ink: var(--account-heading);
  --sec-ink-2: var(--account-text);
  --sec-ink-3: var(--account-muted);
  --sec-line: var(--account-border);
  --sec-line-strong: var(--account-border-strong);
  --sec-accent: var(--action-primary-bg);
  --sec-accent-ink: var(--action-primary-text);
  --sec-accent-soft: color-mix(in srgb, var(--action-primary-bg) 12%, transparent);
  --sec-ok-bg: var(--success-bg); --sec-ok-ink: var(--success-text); --sec-ok-line: var(--success-border);
  --sec-warn-bg: var(--warning-bg); --sec-warn-ink: var(--warning-text); --sec-warn-line: var(--warning-border);
  --sec-danger-bg: var(--error-bg); --sec-danger-ink: var(--error-text); --sec-danger-line: var(--error-border);
  --sec-info-bg: var(--info-bg); --sec-info-ink: var(--info-text); --sec-info-line: var(--info-border);
  --sec-radius: var(--account-radius); --sec-radius-sm: var(--oge-radius-lg);
  --sec-shadow: var(--account-shadow); --sec-font: var(--font-inter), sans-serif;
}
.teacher-scene .secretary-app {
  grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 80px minmax(0, 1fr);
  gap: 0; background: transparent; font-family: var(--font-inter), sans-serif;
}
.teacher-scene .sec-topbar {
  grid-column: 1 / -1; grid-row: 1; margin: 0 10px; padding: 12px 24px;
  min-height: 80px; border: 1px solid var(--header-glass-border);
  border-radius: calc(var(--account-radius) * 2); background: var(--header-glass-bg-solid);
  box-shadow: var(--header-glass-shadow); z-index: 50;
}
@supports (backdrop-filter: blur(1px)) {
  .teacher-scene .sec-topbar { background: var(--header-glass-bg); backdrop-filter: var(--header-glass-blur); }
  .teacher-scene .sec-sidebar { background: var(--account-glass-bg); backdrop-filter: blur(var(--account-glass-blur)); }
}
.teacher-scene .sec-topbar__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: nowrap; max-width: none; width: 100%; }
.teacher-scene .sec-topbar__lead { flex: 0 0 auto; gap: 16px; }
.teacher-scene .sec-topbar:not([data-section="today"]) .sec-topbar__titles p { display: none; }
.teacher-scene .sec-topbar__menu { display: none; }
.teacher-scene .sec-topbar__tools { gap: 8px; flex: 0 0 auto; }
.teacher-profile { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: var(--account-radius); border: 1px solid var(--teacher-line); background: color-mix(in srgb, var(--info-bg) 35%, var(--account-glass-bg)); color: var(--account-heading); text-decoration: none; }
.teacher-profile strong, .teacher-profile small { display: block; font-size: 12px; }
.teacher-profile small { color: var(--account-muted); margin-top: 3px; font-weight: 400; }
.teacher-scene .sec-bell svg { width: 22px; height: 22px; }
.teacher-scene .sec-sidebar { position: relative; grid-row: 2; padding: 28px 16px 16px; gap: 14px; border: 0; border-right: 1px solid var(--teacher-line); }
.teacher-scene .sec-sidebar__brand { position: absolute; top: 0; right: 8px; min-height: 24px; padding: 0; margin: 0; border: 0; }
.teacher-scene .sec-sidebar__brand .sec-sidebar__logo { display: none; }
.teacher-scene .sec-sidebar__collapse { width: 24px; height: 24px; min-height: 24px; padding: 0; opacity: .6; }
.teacher-scene .sec-sidebar__nav { gap: 4px; }
.teacher-scene .sec-navitem { min-height: 46px; padding: 0 14px; border-radius: var(--oge-radius-lg); font-size: 12px; gap: 14px; font-weight: 450; }
.teacher-scene .sec-navitem[data-active] { background: linear-gradient(105deg, var(--account-accent-soft), color-mix(in srgb, var(--account-accent-soft) 45%, var(--info-bg))); box-shadow: none; font-weight: 650; }
.teacher-scene .sec-navitem--programs { margin: 0; border: 0; padding-top: 0; color: var(--account-muted); }
.teacher-scene .sec-navitem__icon, .teacher-scene .sec-navitem__icon svg { width: 21px; height: 21px; }
.teacher-scene .sec-navitem[data-active] .sec-navitem__icon { color: var(--account-heading); }
.teacher-pupil-sections summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 12px; color: var(--account-muted); cursor: pointer; }
.teacher-pupil-sections summary::-webkit-details-marker { display: none; }
.teacher-pupil-sections .sec-navitem { font-size: 12px; }
.teacher-scene .sec-sidebar[data-collapsed] .teacher-pupil-sections summary span:first-child { display: none; }
.teacher-scene .sec-sidebar[data-collapsed] .sec-navitem { padding: 0 6px; }
.teacher-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.teacher-nav-count { margin-left: auto; padding: 1px 6px; border-radius: var(--oge-radius-md); color: var(--account-heading); background: var(--account-accent-soft); font-size: 12px; }
.teacher-scene .sec-navitem:has(.teacher-nav-count) { gap: 6px; padding-inline: 8px; }
.teacher-scene .sec-navitem:has(.teacher-nav-count) .sec-navitem__label { white-space: nowrap; font-size: 12px; }
.teacher-deadline { white-space: nowrap; }
.teacher-scene .sec-sidebar[data-collapsed="true"] .teacher-nav-count { display: none; }
.teacher-scene .sec-sidebar__profile { display: none; }
.teacher-scene .sec-main { grid-row: 2; min-height: 0; display: block; overflow: hidden; }
.teacher-scene .sec-content { height: 100%; overflow: auto; }
html[data-secretary-shell="true"] .teacher-scene main.sec-content { padding: 18px 18px 24px !important; scrollbar-width: thin; }
.teacher-scene .sec-content[data-secretary-screen="today"] { max-width: none; }

/* The schedule owns a bounded workspace; only its hours/list scroll. Other
   secretary screens retain their existing page flow. */
.teacher-scene .sec-schedule__upcoming-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.teacher-scene .sec-schedule__upcoming-rail .sec-rail__card--tip { display: grid; }
.teacher-scene .sec-schedule__upcoming-rail .sec-rail__card--upcoming { min-height: 0; }
.teacher-scene .sec-schedule__body { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) var(--sec-rail-width); }
.teacher-scene .sec-schedule__main { min-height: 0; }

@media (min-width: 1201px) {
  .teacher-scene .sec-content[data-secretary-screen="schedule"] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .teacher-scene .sec-content[data-secretary-screen="schedule"] > .sec-schedule {
    width: 100%;
    max-width: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .teacher-scene .sec-schedule__toolbar { flex: none; }
  .teacher-scene .sec-schedule__body { flex: 1; min-height: 0; align-items: stretch; }
  .teacher-scene .sec-schedule__main { overflow: auto; overscroll-behavior: contain; }
  .teacher-scene .sec-schedule__main:has(.sec-grid) { overflow: hidden; }
  .teacher-scene .sec-schedule__main .sec-grid { height: 100%; }
  .teacher-scene .sec-schedule__main .sec-grid__scroll { height: 100%; max-height: none; overscroll-behavior: contain; }
  .teacher-scene .sec-schedule__upcoming-rail .sec-rail__card--upcoming { grid-template-rows: auto minmax(0, 1fr); }
  .teacher-scene .sec-schedule__upcoming-rail .sec-rail__upcoming { overflow: auto; overscroll-behavior: contain; }
  /* Extremely short windows still keep every auxiliary control reachable. */
  .teacher-scene .sec-schedule__rail { min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .teacher-scene .sec-schedule__rail .sec-rail__status:empty { display: none; }
}
@media (min-width: 1201px) and (max-width: 1600px) {
  .teacher-scene .sec-schedule__body { grid-template-columns: 200px minmax(0, 1fr) 232px; gap: 12px; }
}
@media (max-width: 1200px) {
  .teacher-scene .sec-schedule__body { grid-template-columns: minmax(0, 1fr) 232px; }
  .teacher-scene .sec-schedule__main { grid-column: 1; grid-row: 1 / span 2; }
  .teacher-scene .sec-schedule__rail { grid-column: 2; grid-row: 1; display: grid; }
  .teacher-scene .sec-schedule__upcoming-rail { grid-column: 2; grid-row: 2; }
}
@media (max-width: 1024px) {
  .teacher-scene .sec-schedule__body { display: flex; flex-direction: column; }
  .teacher-scene .sec-schedule__main { order: 0; width: 100%; }
  .teacher-scene .sec-schedule__rail { order: 1; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-scene .sec-schedule__upcoming-rail { order: 2; width: 100%; }
  .teacher-scene .sec-schedule :is(.sec-rail__filter, .sec-rail__action) { min-height: 44px; }
}
@media (max-width: 540px) {
  .teacher-scene .sec-schedule__rail { grid-template-columns: minmax(0, 1fr); }
}
.teacher-scene :is(.sec-grid__scroll, .sec-schedule__main):focus-visible { outline: 3px solid var(--interactive-focus-color); outline-offset: -3px; }
@media (min-width: 1201px) and (max-height: 850px) {
  .teacher-scene .sec-schedule__rail { gap: 10px; }
  .teacher-scene .sec-schedule__rail .sec-rail__card:not(.sec-rail__card--calendar) { padding: 10px; gap: 8px; }
}

.teacher-dashboard { width: 100%; max-width: 1900px; margin: 0 auto; display: grid; gap: 14px; }
.teacher-scene .teacher-panel { min-width: 0; padding: 18px; border-width: 1px; border-style: solid; border-radius: var(--account-radius-sm); color: var(--account-text); }
.teacher-dashboard [data-tone="accent"] { --teacher-tone: var(--account-accent); }
.teacher-dashboard [data-tone="cool"] { --teacher-tone: color-mix(in srgb, var(--account-success) 25%, var(--info-text)); }
.teacher-dashboard [data-tone="info"] { --teacher-tone: var(--info-border); }
.teacher-dashboard [data-tone="success"] { --teacher-tone: var(--account-success); }
.teacher-dashboard [data-tone="error"] { --teacher-tone: var(--account-error); }
.teacher-dashboard [data-tone="neutral"] { --teacher-tone: var(--account-muted); }
.teacher-dashboard :is(h1, h2, p, ol, ul) { margin: 0; }
.teacher-dashboard :is(ol, ul) { padding: 0; list-style: none; }
.teacher-dashboard button { font-family: inherit; }
.teacher-dashboard :is(a, button, summary):focus-visible { outline: 3px solid var(--interactive-focus-color); outline-offset: 3px; }
.teacher-hero-row { display: grid; grid-template-columns: minmax(0, 750fr) minmax(0, 438fr) minmax(160px, 215fr); gap: 12px; }
.teacher-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 34%; align-items: center; min-height: 184px; padding: 22px 24px; overflow: hidden; }
.teacher-date { font-size: 12px; color: var(--account-muted); margin-bottom: 10px !important; }
.teacher-hero h1 { font-size: clamp(26px, 2vw, 36px); line-height: 1.1; font-weight: 750; letter-spacing: -.025em; }
.teacher-hero p:not(.teacher-date) { margin-top: 12px; color: var(--account-text); font-size: 13px; line-height: 1.5; }
.teacher-heart { color: var(--account-accent); }
.teacher-hero__art { width: 100%; max-width: 215px; margin-left: auto; transform: rotate(-5deg); animation: teacher-laptop-float 7s ease-in-out infinite; }
.teacher-hero__art img { width: 100%; height: auto; display: block; }
.teacher-hero__spark { position: absolute; width: 12px; aspect-ratio: 1; background: var(--account-accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.teacher-hero__spark--one { top: 6%; right: 2%; }
.teacher-hero__spark--two { bottom: 12%; left: -4%; width: 9px; }
@keyframes teacher-laptop-float { 50% { transform: translateY(-5px) rotate(-2deg); } }
.teacher-quote { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px; }
.teacher-quote > span { color: var(--account-accent); font-size: 46px; line-height: .7; font-weight: 800; }
.teacher-quote p { font-size: 16px; line-height: 1.65; color: var(--account-heading); }
.teacher-scene .teacher-day { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 30px; padding: 24px; }
.teacher-day strong { font-size: 14px; font-weight: 600; }
.teacher-day p { color: var(--account-muted); font-size: 13px; line-height: 1.5; position: relative; z-index: 1; }
.teacher-day svg { position: absolute; bottom: 0; right: 0; width: 100%; height: 110px; color: var(--info-border); }
.teacher-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.teacher-metric { display: flex; align-items: center; gap: 16px; min-height: 110px; text-decoration: none; padding: 18px; transition: border-color .15s; }
.teacher-metric:hover { border-color: var(--account-accent); }
.teacher-metric > div { min-width: 0; }
.teacher-metric__label { color: var(--account-text); font-size: 12px; display: block; }
.teacher-metric strong { display: block; font-size: clamp(21px, 1.6vw, 29px); line-height: 1.25; font-weight: 750; font-variant-numeric: tabular-nums; margin: 5px 0; overflow-wrap: anywhere; }
.teacher-metric small { display: block; color: var(--account-muted); font-size: 12px; line-height: 1.4; }
.teacher-scene .teacher-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--oge-radius-lg); color: var(--teacher-tone); background: color-mix(in srgb, var(--teacher-tone) 13%, transparent); }
.teacher-icon svg { width: 23px; height: 23px; }
.teacher-metric .teacher-icon { width: 54px; height: 54px; }
.teacher-metric .teacher-icon svg { width: 28px; height: 28px; }
.teacher-middle { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.teacher-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.teacher-panel__head h2 { font-size: 17px; line-height: 1.3; font-weight: 700; }
.teacher-scene .teacher-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: 0 0 auto; min-height: 32px; padding: 4px 10px; border: 1px solid var(--teacher-line); border-radius: var(--oge-radius-lg); background: var(--action-secondary-bg); color: var(--action-secondary-text); font-size: 11px; font-weight: 450; text-decoration: none; cursor: pointer; box-shadow: none; }
.teacher-link:hover { border-color: var(--account-accent); color: var(--account-heading); }
.teacher-timeline, .teacher-list { display: grid; gap: 8px; }
.teacher-timeline li { display: flex; gap: 16px; min-width: 0; align-items: stretch; }
.teacher-timeline__time { width: 54px; flex: 0 0 auto; padding: 10px 0; position: relative; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.teacher-timeline__time small { color: var(--account-muted); font-size: 12px; }
.teacher-timeline__time::after { position: absolute; content: ""; right: 0; top: 16px; width: 8px; height: 8px; border-radius: var(--oge-radius-xl); background: var(--teacher-tone); }
.teacher-timeline li:not(:last-child) .teacher-timeline__time::before { content: ""; position: absolute; right: 3px; top: 8px; bottom: -16px; width: 1px; background: var(--teacher-line); }
.teacher-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 60px; padding: 9px 12px; border: 1px solid var(--account-border); border-radius: var(--oge-radius-md); background: var(--account-panel-raised); color: var(--account-heading); text-decoration: none; text-align: left; cursor: pointer; transition: border-color .15s; }
.teacher-scene .teacher-dashboard .teacher-row { background: var(--account-panel-raised); border-color: var(--teacher-line); font-weight: 400; box-shadow: none; }
.teacher-row:hover { border-color: var(--account-accent); }
.teacher-row__copy { min-width: 0; flex: 1 1 auto; }
.teacher-row__copy strong { font-size: 12px; font-weight: 650; display: block; overflow-wrap: anywhere; }
.teacher-row__copy small { font-size: 12px; color: var(--account-muted); margin-top: 3px; display: block; overflow-wrap: anywhere; }
.teacher-row__meta { font-size: 11px; color: var(--account-muted); flex: 0 1 auto; text-align: right; max-width: 140px; }
.teacher-row__meta small { display: block; font-size: 11px; margin-top: 4px; color: var(--account-muted); }
.teacher-row__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 32px; padding: 4px 8px; border: 1px solid var(--action-secondary-border); border-radius: var(--oge-radius-md); background: var(--action-secondary-bg); color: var(--action-secondary-text); font-size: 11px; font-weight: 450; }
.teacher-row__cta span { font-size: 16px; line-height: 1; }
.teacher-scene .teacher-review-status { color: var(--info-text); }
.teacher-review-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: var(--oge-radius-md); background: var(--info-text); }
.teacher-row__arrow { color: var(--account-accent); flex: 0 0 auto; }
.teacher-panel__footer { margin-top: 12px; background: transparent; border-color: transparent; padding-left: 0; }
.teacher-empty { padding: 20px 0; color: var(--account-muted); font-size: 14px; line-height: 1.6; }
.teacher-footnote { color: var(--account-muted); font-size: 12px; margin-top: 12px !important; }
.teacher-bottom { display: grid; grid-template-columns: minmax(0, 497fr) minmax(0, 490fr) minmax(0, 411fr); gap: 14px; }
.teacher-list--compact { gap: 6px; }
.teacher-list--compact .teacher-row { min-height: 48px; padding: 7px 10px; gap: 10px; }
.teacher-list--compact .teacher-icon { width: 32px; height: 32px; }
.teacher-list--compact .teacher-icon svg { width: 19px; height: 19px; }
.teacher-list--compact .teacher-row__meta { font-size: 11px; max-width: 95px; }
.teacher-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.teacher-scene .teacher-actions :is(a, button) { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 62px; padding: 12px; font-size: 11px; font-weight: 550; text-decoration: none; border: 1px solid var(--teacher-line); border-radius: var(--oge-radius-lg); color: var(--account-heading); background: var(--action-secondary-bg); text-align: left; cursor: pointer; box-shadow: none; }
.teacher-actions svg { flex: 0 0 auto; width: 25px; height: 25px; color: var(--account-accent); }
.teacher-actions :is(a, button):hover { border-color: var(--account-accent); }
.teacher-scene .teacher-details { padding: 0 18px; }
.teacher-details > summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; }
.teacher-details[open] { padding-bottom: 18px; }
.teacher-details .sec-today { padding-top: 18px; border-top: 1px solid var(--account-border); }
.teacher-details summary::-webkit-details-marker { display: none; }
@media (min-width: 1181px) {
  .teacher-scene .teacher-hero { min-height: 170px; padding: 18px 24px; }
  .teacher-hero h1 { font-size: 28px; line-height: 1.08; }
  .teacher-hero p:not(.teacher-date) { margin-top: 10px; font-size: 12px; line-height: 1.4; }
  .teacher-date { margin-bottom: 8px !important; }
  .teacher-hero__art { position: absolute; right: 24px; top: 50%; width: 34%; max-width: 260px; transform: translateY(-50%) rotate(-5deg); animation-name: teacher-laptop-float-desktop; }
  .teacher-scene .teacher-metric { min-height: 114px; padding: 18px; }
  .teacher-scene .teacher-metric .teacher-icon { width: 60px; height: 60px; }
  .teacher-middle > .teacher-panel { min-height: 300px; padding: 12px 18px; }
  .teacher-bottom > .teacher-panel { min-height: 210px; padding: 12px 18px; }
  .teacher-panel__head { margin-bottom: 8px; }
  .teacher-panel__head .teacher-link { min-height: 32px; }
  .teacher-timeline__time { padding: 4px 0; }
  .teacher-middle .teacher-row { min-height: 52px; padding: 5px 10px; line-height: 1.3; }
  .teacher-timeline .teacher-row__copy :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-timeline .teacher-row__meta { flex: 0 0 105px; max-width: 105px; }
  .teacher-middle .teacher-icon { width: 38px; height: 38px; }
  .teacher-middle .teacher-icon svg { width: 20px; height: 20px; }
  .teacher-reviews .teacher-row { min-height: 44px; }
  .teacher-reviews .teacher-list { gap: 4px; }
  .teacher-reviews .teacher-icon { width: 34px; height: 34px; }
  .teacher-timeline, .teacher-list { gap: 6px; }
  .teacher-list--compact .teacher-row { min-height: 34px; padding: 3px 6px; line-height: 1.25; }
  .teacher-list--compact .teacher-icon { width: 26px; height: 26px; }
  .teacher-list--compact .teacher-icon svg { width: 17px; height: 17px; }
  .teacher-groups .teacher-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 10px; gap: 9px; }
  .teacher-groups .teacher-row__copy small { font-size: 10px; margin-top: 2px; }
  .teacher-groups .teacher-row__copy strong { font-size: 11px; }
  .teacher-groups .teacher-row__copy :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-groups .teacher-list--compact { gap: 4px; }
  .teacher-groups .teacher-row { min-height: 32px; padding-block: 2px; }
  .teacher-groups .teacher-row__copy strong { line-height: 1.15; }
  .teacher-groups .teacher-row__copy small, .teacher-groups .teacher-row__meta { line-height: 1.2; }
  .teacher-groups .teacher-row__meta { font-size: 10px; }
  .teacher-scene .teacher-attention .teacher-row { min-height: 44px; background: transparent; border: 0; border-bottom: 1px solid var(--teacher-line); border-radius: 0; }
  .teacher-attention .teacher-row__copy strong { font-size: 11px; }
  .teacher-attention .teacher-row__copy small { font-size: 10px; }
}
@keyframes teacher-laptop-float-desktop { 50% { transform: translateY(calc(-50% - 5px)) rotate(-2deg); } }
@media (max-width: 1450px) {
  .teacher-profile > span:nth-child(2) { display: none; }
  .teacher-metric { gap: 10px; padding: 16px 12px; }
  .teacher-metric .teacher-icon { width: 40px; height: 40px; }
  .teacher-row__meta { max-width: 95px; }
}
@media (max-width: 1180px) {
  .teacher-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .teacher-hero-row { grid-template-columns: minmax(0, 1.6fr) 1fr; }
  .teacher-scene .teacher-day { grid-column: 1 / -1; }
  .teacher-bottom { grid-template-columns: 1fr 1fr; } .teacher-bottom > section:last-child { grid-column: 1 / -1; }
  .teacher-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teacher-middle { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .teacher-scene .secretary-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 72px minmax(0, 1fr); }
  .teacher-scene .sec-sidebar { position: fixed; top: 72px; bottom: 0; width: min(280px, 85vw); z-index: 60; background: var(--account-panel-bg); }
  .teacher-scene .sec-topbar { margin: 6px 8px 0; padding: 8px 14px; min-height: 60px; }
  .teacher-scene .sec-topbar__inner { gap: 8px; }
  .teacher-scene .sec-topbar__lead { flex: 1 1 0; min-width: 0; gap: 8px; }
  .teacher-scene .sec-topbar__titles { flex: 1 1 0; min-width: 0; }
  .teacher-scene .sec-topbar__titles h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-scene .sec-topbar__tools { gap: 4px; }
  .teacher-scene :is(.sec-topbar__menu, .sec-topbar__search, .sec-topbar__create) { flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .teacher-scene .sec-topbar__create-label { display: none; }
  .teacher-scene .sec-topbar__menu { display: inline-flex; align-items: center; justify-content: center; }
  .teacher-scene .sec-main { grid-column: 1; }
  html[data-secretary-shell="true"] .teacher-scene main.sec-content { padding: 16px !important; }
  .teacher-hero-row { grid-template-columns: 1fr; } .teacher-quote { display: none; }
  .teacher-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .teacher-metrics > :last-child { grid-column: 1 / -1; }
  .teacher-bottom { grid-template-columns: 1fr; } .teacher-bottom > section:last-child { grid-column: auto; }
  .teacher-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-panel__head h2 { font-size: 18px; }
  .teacher-scene .teacher-link { min-height: 44px; }
  .teacher-scene .teacher-actions :is(a, button) { font-size: 14px; min-height: 82px; }
  .teacher-row__copy strong, .teacher-row__copy small { font-size: 14px; }
  .teacher-scene .sec-navitem { font-size: 16px; min-height: 48px; }
  .teacher-scene .sec-sidebar__collapse { width: 44px; height: 44px; min-height: 44px; }
  .teacher-scene .sec-sidebar { padding-top: 48px; }
  .teacher-metric__label { font-size: 14px; } .teacher-metric small { font-size: 12px; }
  .teacher-metric strong { font-size: 26px; }
  .teacher-link { font-size: 13px; }
  .teacher-scene .sec-scrim { top: 72px; }
}
@media (max-width: 540px) {
  .teacher-panel { padding: 16px; }
  .teacher-hero { grid-template-columns: minmax(0, 1fr) 28%; padding: 20px 16px; }
  .teacher-hero h1 { font-size: 27px; }
  .teacher-hero p:not(.teacher-date) { font-size: 14px; }
  .teacher-metric { display: block; padding: 14px; min-height: 150px; }
  .teacher-metric .teacher-icon { margin-bottom: 8px; width: 32px; height: 32px; }
  .teacher-metric .teacher-icon svg { width: 21px; height: 21px; }
  .teacher-metric__label { min-height: 40px; display: flex; align-items: flex-end; }
  .teacher-metrics > :last-child .teacher-metric__label { min-height: auto; }
  .teacher-metrics > :last-child { display: flex; align-items: center; gap: 16px; min-height: 100px; }
  .teacher-timeline li { gap: 10px; }
  .teacher-timeline__time { width: 42px; }
  .teacher-timeline__time::after { display: none; }
  .teacher-timeline__time::before { display: none; }
  .teacher-timeline .teacher-row > .teacher-icon { display: none; }
  .teacher-row { flex-wrap: wrap; gap: 8px; }
  .teacher-row__meta { flex-basis: 100%; max-width: none; text-align: left; padding-left: 0; }
  .teacher-row__meta small { display: inline; margin-left: 10px; }
  .teacher-list .teacher-row__meta { padding-left: 54px; }
  .teacher-row__copy { flex-basis: 55%; }
  .teacher-timeline .teacher-row__copy { flex-basis: calc(100% - 90px); }
  .teacher-timeline .teacher-row__cta { order: 1; }
  .teacher-timeline .teacher-row__meta { order: 2; }
  .teacher-list--compact .teacher-row__meta { padding-left: 42px; }
  .teacher-link { padding: 4px 8px; font-size: 12px; }
  .teacher-panel__head { gap: 8px; }
  .teacher-panel__head h2 { font-size: 17px; }
  .teacher-actions :is(a, button) { padding: 12px; min-height: 82px; font-size: 14px; }
  .teacher-desktop-break { display: none; }
}
@media (pointer: coarse) {
  .teacher-scene .teacher-link, .teacher-list--compact .teacher-row, .teacher-scene .sec-sidebar__collapse { min-height: 44px; }
  .teacher-scene .sec-sidebar__collapse { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) { .teacher-hero__art { animation: none; } .teacher-dashboard * { transition: none; } }

/* Same palette trigger and action colours as the shared platform header. */
.teacher-scene .theme-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: var(--account-radius); border: 1px solid var(--header-glass-control-border); background: var(--header-glass-control-bg); color: var(--header-glass-text); }
.teacher-scene .theme-button:hover, .teacher-scene .theme-button[aria-expanded="true"] { background: var(--header-glass-control-hover); border-color: var(--header-glass-active-border); }
.teacher-scene .theme-button:focus-visible, .teacher-scene .palette-option:focus-visible { outline: 2px solid var(--interactive-focus-color); outline-offset: 2px; }
.teacher-scene :is(.teacher-link, .teacher-actions > a, .teacher-actions > button) { border-color: var(--action-secondary-border); color: var(--action-secondary-text); }
.teacher-scene .sec-btn.is-primary { border-color: var(--action-primary-border); background: var(--action-primary-bg); color: var(--action-primary-text); box-shadow: var(--action-primary-glow); }
.teacher-scene .sec-btn.is-primary:hover:not(:disabled) { background: var(--action-primary-hover); border-color: var(--action-primary-border); }

.teacher-dashboard :is(h1, h2) { color: var(--account-heading); }

/* Forms belong to the same input system as the student cabinet. */
.teacher-scene .teacher-workspace :is(.secretary-app, .sec-overlay, [data-onboarding-v2]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea) {
  box-sizing: border-box;
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--input-border); border-radius: var(--oge-radius-lg);
  background: var(--input-bg); color: var(--input-text); font: inherit;
}
.teacher-scene .teacher-workspace :is(.secretary-app, .sec-overlay, [data-onboarding-v2]) :is(input, textarea)::placeholder { color: var(--input-placeholder); }
.teacher-scene .teacher-workspace :is(.secretary-app, .sec-overlay, [data-onboarding-v2]) :is(input, select, textarea):focus-visible { outline: 2px solid var(--input-focus); outline-offset: 2px; }
.teacher-scene .teacher-workspace :is(.secretary-app, .sec-overlay, [data-onboarding-v2]) :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--error-border); }
.teacher-scene [data-onboarding-v2] { background: transparent; text-align: left; }
/* The archive scene resets every main; keep this form's own readable width. */
html[data-design-scene="true"] .teacher-scene main[data-onboarding-v2-body] {
  box-sizing: border-box; width: min(100%, 1040px) !important; max-width: 1040px !important;
  margin: 0 auto !important; padding: 18px clamp(14px, 3vw, 32px) 120px !important;
}
.teacher-scene .sec-overlay__titles p { text-transform: none; }
.teacher-scene [aria-label="Вопросы по домашнему заданию"] button {
  border-color: var(--action-secondary-border); background: var(--action-secondary-bg);
  color: var(--action-secondary-text); border-radius: var(--oge-radius-lg);
}
.teacher-scene [aria-label="Вопросы по домашнему заданию"] button:hover:not(:disabled) { background: var(--workspace-surface-hover); }
/* A single immediate teaching action, using the existing palette and wave. */
.teacher-scene .teacher-day--action { gap: 12px; padding: 20px; min-width: 0; }
.teacher-day--action > time { position: relative; z-index: 1; color: var(--account-muted); font-size: 13px; }
.teacher-day__copy { position: relative; z-index: 1; min-width: 0; }
.teacher-day--action .teacher-day__label { font-size: 12px; margin: 0 0 6px; }
.teacher-day--action h2 { margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.teacher-day--action .teacher-day__detail { font-size: 13px; margin: 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teacher-day__action { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; width: 100%; margin-top: auto; padding: 10px 0; border: 0; background: transparent; color: var(--account-text); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; }
.teacher-day__action:hover { color: var(--account-accent); }
.teacher-day__action:focus-visible { outline: 2px solid var(--account-accent); outline-offset: 4px; border-radius: 4px; }
.teacher-day--action > svg { height: 68px; pointer-events: none; }
@media (max-width: 900px) { .teacher-day--action h2 { font-size: 20px; } .teacher-day--action .teacher-day__detail, .teacher-day--action .teacher-day__label, .teacher-day__action { font-size: 16px; } }

/* Sections live in the sidebar; the header provides context and actions. */
.teacher-scene .sec-topbar__lead { flex: 1 1 auto; min-width: 0; }
.teacher-scene .sec-topbar__titles { min-width: 0; }
.teacher-scene .sec-topbar__titles h1 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-scene .sec-topbar__search { display: inline-flex; align-items: center; gap: 10px; width: auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--account-border); border-radius: var(--account-radius); }
.teacher-search-label { font-size: 14px; white-space: nowrap; }
.teacher-search-key { color: var(--account-muted); font-size: 11px; }
.teacher-scene :is(.sec-topbar__search, .teacher-profile):focus-visible { outline: 3px solid var(--interactive-focus-color); outline-offset: 3px; }
@media (max-width: 1180px) { .teacher-search-key { display: none; } .teacher-search-label { font-size: 12px; } }
@media (max-width: 900px) {
  .teacher-search-label, .teacher-search-key { display: none; }
  .teacher-scene .sec-topbar__titles { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .teacher-scene .sec-topbar__search { width: 44px; padding: 0; justify-content: center; }
  .teacher-scene .sec-topbar__menu { border: 1px solid var(--account-border); border-radius: var(--account-radius); font-size: 22px; }
}
.teacher-scene .sec-topbar :is(a, button):focus-visible { outline: 3px solid var(--interactive-focus-color); outline-offset: 3px; }

/* Keep all cabinet actions reachable when the lead and tools cannot share a row. */
@media (max-width: 390px) {
  .teacher-scene .secretary-app { grid-template-rows: 120px minmax(0, 1fr); }
  .teacher-scene .sec-sidebar, .teacher-scene .sec-scrim { top: 120px; }
  .teacher-scene .sec-topbar__inner { flex-wrap: wrap; }
  .teacher-scene .sec-topbar__lead { flex: 1 1 100%; }
  .teacher-scene .sec-topbar__tools { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; justify-content: flex-end; position: relative; }
  .teacher-scene .sec-topbar__tools .theme-control { flex: 0 0 44px; position: static; }
  .teacher-scene .sec-topbar__tools .palette-switcher { top: calc(100% + 8px); right: 0; left: auto; }
}
