    :root {
      color-scheme: light;
      --bg: #f4f7fb;
      --panel: #ffffff;
      --text: #182033;
      --muted: #5f6a7d;
      --line: #d8e0ea;
      --primary: #155eef;
      --primary-strong: #0f4ac1;
      --success: #046c4e;
      --danger: #b42318;
      --warn: #b54708;
      --shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; background: var(--bg); color: var(--text); }
    button, input, textarea, select { font: inherit; }
    button {
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--text);
      border-radius: 6px;
      padding: 10px 12px;
      cursor: pointer;
    }
    button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
    button.primary:hover { background: var(--primary-strong); }
    button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
      outline: 3px solid #8bb3ff;
      outline-offset: 2px;
    }
    a { color: var(--primary); }
    .hidden { display: none !important; }
    .pagination { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
    .pagination span { color: var(--muted); font-size: .92rem; }
    #cohortCurriculumSection { display: none !important; }
    .app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
    #adminSidebar {
      background: #101828;
      color: #fff;
      padding: 22px 16px;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }
    .admin-sidebar-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .brand { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
    .sub { color: #b7c0cf; font-size: 13px; margin-bottom: 22px; }
    .admin-menu-close, .admin-mobile-menu-button, .admin-menu-backdrop { display: none; }
    .admin-mobile-menu-button {
      width: 46px;
      height: 46px;
      flex: 0 0 46px;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
      padding: 9px;
      background: #fff;
      border-color: #aeb9c8;
    }
    .admin-mobile-menu-button span { width: 23px; height: 3px; border-radius: 2px; background: currentColor; }
    .nav { display: grid; gap: 8px; }
    .nav button {
      width: 100%;
      text-align: left;
      background: transparent;
      border-color: transparent;
      color: #e6edf7;
    }
    .nav button.active, .nav button:hover { background: #223149; border-color: #31445f; }
    main { padding: 24px; min-width: 0; }
    header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
    h1 { margin: 0; font-size: 24px; }
    h2 { margin: 0 0 12px; font-size: 18px; }
    h3 { margin: 14px 0 8px; font-size: 15px; }
    .muted { color: var(--muted); }
    .error { color: var(--danger); }
    .success { color: var(--success); }
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      padding: 18px;
      margin-bottom: 16px;
    }
    .analysis-center-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 12px;
      padding: 12px 16px;
      border: 1px solid #b9d8c9;
      border-radius: 10px;
      background: #edf8f2;
      color: #164c38;
    }
    .analysis-center-toolbar > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
    .analysis-center-toolbar span { color: #4f6c60; font-size: 13px; }
    .analysis-center-toolbar a { flex: 0 0 auto; font-weight: 700; text-underline-offset: 3px; }
    .analysis-center-toolbar .analysis-center-actions { justify-content: flex-end; }
    .analysis-center-primary-link {
      padding: 8px 12px;
      border-radius: 8px;
      background: #176b4d;
      color: #fff;
      text-decoration: none;
    }
    .analysis-center-primary-link:hover { background: #0f533b; }
    .analysis-center-frame-wrap {
      min-height: 680px;
      height: calc(100vh - 178px);
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f4f1e8;
      box-shadow: var(--shadow);
    }
    #analysisCenterFrame { width: 100%; height: 100%; border: 0; background: #f4f1e8; }
    .login-wrap {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 20px;
    }
    .login-card { width: min(460px, 100%); }
    .admin-boot-card { width: min(420px, 100%); text-align: center; }
    .admin-boot-card p { margin: 10px 0 0; }
    label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
    label > input:not([type="checkbox"]):not([type="radio"]), label > textarea, label > select, label > .rich-editor { flex: 1 0 100%; }
    label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; color: var(--text); }
    input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; accent-color: var(--primary); }
    input, textarea, select {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 10px 12px;
      background: #fff;
      color: var(--text);
    }
    textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
    .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .form-grid .full { grid-column: 1 / -1; }
    .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
    .quick-choice-group { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
    .quick-choice-group legend { padding: 0 4px; font-weight: 700; }
    .quick-choice-options { display: flex; flex-wrap: wrap; gap: 8px 14px; }
    .quick-choice-options label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-weight: 500; cursor: pointer; }
    .quick-choice-options input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
    .quick-choice-options input[type="radio"]:disabled + span { color: var(--muted); cursor: not-allowed; }
    .form-grid > label[hidden] { display:none !important; }
    .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .stat {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfcff;
      padding: 14px;
    }
    .stat strong { display: block; margin-top: 4px; font-size: 22px; }
    .split { display: grid; grid-template-columns: minmax(280px, 0.82fr) minmax(380px, 1.18fr); gap: 16px; align-items: start; }
    .list { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 62vh; }
    table { width: 100%; border-collapse: collapse; }
    th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
    th { color: var(--muted); font-size: 13px; font-weight: 700; }
    tr:hover td { background: #f8fbff; }
    .badge {
      display: inline-flex;
      border-radius: 999px;
      padding: 2px 8px;
      font-size: 12px;
      border: 1px solid var(--line);
      color: var(--muted);
    }
    .badge.ok { color: var(--success); border-color: #abefc6; background: #ecfdf3; }
    .badge.warn { color: var(--warn); border-color: #fedf89; background: #fffaeb; }
    .badge.danger { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
    .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .course-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      padding: 8px;
      background: #eef3f9;
      border: 1px solid var(--line);
      border-radius: 8px;
      position: sticky;
      top: 0;
      z-index: 5;
    }
    .course-tabs button { background: #fff; }
    .course-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
    .tab-panel { display: none; }
    .tab-panel.active { display: grid; gap: 16px; }
    .tree-layout { display: grid; grid-template-columns: minmax(250px, 0.62fr) minmax(540px, 1.38fr); gap: 16px; align-items: start; }
    .tree-panel { display: grid; gap: 12px; }
    .structure-tree { display: grid; gap: 10px; max-height: 68vh; overflow: auto; padding-right: 4px; }
    .tree-node { display: grid; gap: 8px; }
    .tree-node-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
    .tree-node-children { display: grid; gap: 8px; padding-left: 18px; border-left: 1px solid var(--line); margin-left: 10px; }
    .tree-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
    .tree-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .tree-controls button { padding: 6px 8px; min-width: 32px; }
    .structure-summary, .structure-children { display: grid; gap: 10px; }
    .structure-child { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcff; display: grid; gap: 6px; }
    .tree-item, .tree-subitem, .tree-module {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      padding: 10px 12px;
      width: 100%;
      text-align: left;
    }
    .tree-item.active, .tree-subitem.active, .tree-module.active {
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(21, 94, 239, 0.15);
    }
    .module-type { color: var(--primary); font-size: 12px; font-weight: 700; }
    .module-form, .course-form, .member-form, .grading-form { display: grid; gap: 12px; }
    .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .field-grid.five { grid-template-columns: 1.55fr 0.9fr 0.9fr 0.65fr 1.25fr; }
    .field-grid .full, .module-form > .full { grid-column: 1 / -1; }
    .editor-section { border: 2px solid #cbdaf5; border-radius: 10px; padding: 16px; background: #f8fbff; display: grid; gap: 12px; }
    .editor-section > h3 { margin: 0; color: var(--primary-strong); font-size: 17px; }
    .assessment-item { border: 1px solid #cbd5e1; border-radius: 9px; padding: 14px; background: #fff; display: grid; gap: 12px; }
    .assessment-item-head { display: grid; gap: 4px; }
    .assessment-item-head strong { color: #172033; }
    .assessment-item-fields { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); gap: 12px; align-items: start; }
    .assessment-followup { border-top: 1px dashed #b8c7dc; padding-top: 12px; }
    @media (max-width: 720px) { .assessment-item-fields { grid-template-columns: 1fr; } }
    .compact-textarea { min-height: 72px; }
    .case-date-field { display: grid; gap: 5px; align-content: start; }
    .case-date-confirm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
    .case-date-confirm-row button { width: auto; white-space: nowrap; }
    @media (max-width: 520px) { .case-date-confirm-row { grid-template-columns: 1fr; } .case-date-confirm-row button { width: 100%; } }
    .markdown-field { border: 1px solid #b8c1ce; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 9px rgba(15, 23, 42, .06); }
    .markdown-field-title { display: flex; gap: 4px; align-items: center; padding: 9px 12px; font-weight: 700; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
    .markdown-source { display: block; width: 100%; min-height: 250px; resize: vertical; border: 0; border-radius: 0; padding: 16px 18px; outline: none; font: 15px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; color: #18212f; background: linear-gradient(90deg, #f8fafc 0, #f8fafc 42px, #fff 42px); tab-size: 2; }
    .markdown-source:focus { box-shadow: inset 0 0 0 2px rgba(21, 94, 239, .18); }
    .rich-toolbar { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; padding: 7px 9px; border-bottom: 1px solid #d5dbe4; background: #fff; }
    .rich-toolbar button, .rich-toolbar .upload-tool { min-height: 32px; min-width: 32px; padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: #263445; cursor: pointer; font-size: 14px; }
    .rich-toolbar button:hover, .rich-toolbar button.active, .rich-toolbar .upload-tool:hover { background: #eaf1ff; color: #164ca1; }
    .rich-toolbar .tool-divider { width: 1px; height: 22px; margin: 0 5px; background: #d9dee7; }
    .rich-toolbar .upload-tool { display: inline-flex; width: auto; gap: 5px; align-items: center; font-weight: 600; }
    .rich-toolbar .upload-tool input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .markdown-canvas { min-height: 250px; padding: 18px 22px; line-height: 1.75; color: #172033; background: #fff; }
    .markdown-canvas.hidden { display: none; }
    .markdown-canvas img { max-width: 100%; height: auto; border-radius: 8px; }
    .markdown-canvas audio { width: min(100%, 520px); }
    .markdown-canvas video { display: block; width: min(100%, 760px); max-height: 65vh; border-radius: 8px; background: #101828; }
    .markdown-format-controls { display: flex; gap: 2px; align-items: center; flex: 1 1 auto; flex-wrap: wrap; }
    .markdown-view-tabs { display: inline-flex; gap: 3px; align-items: center; margin-left: auto; padding: 2px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; }
    .rich-toolbar .markdown-view-tabs button { min-width: 58px; font-weight: 700; }
    .rich-toolbar .markdown-view-tabs button[aria-pressed="true"] { background: #155eef; color: #fff; }
    .markdown-field[data-markdown-view="preview"] .markdown-format-controls { display: none; }
    .markdown-upload-status { min-height: 22px; padding: 5px 12px; border-top: 1px solid #edf0f4; background: #f8fafc; }
    .markdown-upload-status:empty { display: none; }
    .markdown-canvas blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid #7c9bd1; background: #f4f7fc; color: #40516a; }
    .markdown-canvas pre { overflow: auto; padding: 12px; border-radius: 7px; background: #172033; color: #edf4ff; }
    .markdown-canvas code { padding: 2px 5px; border-radius: 4px; background: #edf1f7; font-family: ui-monospace, monospace; }
    .markdown-canvas pre code { padding: 0; background: transparent; }
    .markdown-canvas table { width: 100%; border-collapse: collapse; margin: 12px 0; }
    .markdown-canvas th, .markdown-canvas td { padding: 8px 10px; border: 1px solid #d7dee9; text-align: left; }
    .markdown-canvas th { background: #f2f6fc; }
    .markdown-field .field-help { padding: 8px 12px; margin: 0; border-top: 1px solid #edf0f4; background: #fafbfc; }
    .resource-upload-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed #9fb4d8; border-radius: 8px; background: #fff; }
    .resource-upload-card input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
    .resource-file-picker { display: inline-flex; align-items: center; gap: 7px; width: auto; padding: 8px 12px; border-radius: 6px; background: #eef4ff; color: #17488f; font-weight: 700; cursor: pointer; }
    .resource-current { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #f8fafc; }
    .resource-current video { display: block; width: 100%; max-height: 62vh; border-radius: 8px; background: #101828; }
    .case-media-top { border-color: #9fb8e4; background: linear-gradient(135deg, #ffffff, #f5f8ff); }
    .case-media-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .case-media-heading h2 { margin-bottom: 4px; }
    .case-media-list { display: grid; gap: 12px; }
    .case-media-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
    .case-media-card h3, .case-media-card p { margin: 0; }
    .case-media-player { display: grid; gap: 6px; }
    .case-media-player video { display: block; width: 100%; max-height: 68vh; border-radius: 8px; background: #101828; }
    .case-media-player audio { width: 100%; }
    .case-media-upload { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
    .case-media-file-picker { display: grid; gap: 7px; }
    .case-media-file-picker > span:first-child { font-weight: 800; }
    .case-media-progress { display: grid; gap: 8px; padding: 12px; border: 1px solid #b9c9e4; border-radius: 8px; background: #f7faff; }
    .case-media-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .case-media-progress progress { width: 100%; height: 16px; accent-color: var(--primary); }
    .case-media-progress-value { min-width: 48px; color: var(--text); font-weight: 800; text-align: right; }
    .teacher-video-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(160px, 1fr) auto; gap: 10px; align-items: end; }
    .teacher-video-table { min-width: 980px; }
    .teacher-video-table td { vertical-align: middle; }
    .availability { display: inline-flex; min-width: 30px; justify-content: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
    .availability.yes { color: #08765f; background: #e4f6f0; }
    .availability.no { color: #667085; background: #eef1f5; }
    .teacher-video-watch-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
    #teacherVideoDetailPlayer { display: block; width: 100%; max-height: 68vh; border-radius: 10px; background: #101828; }
    .teacher-video-player-shell { display: grid; gap: 12px; min-width: 0; }
    .teacher-video-player-controls { display: grid; grid-template-columns: auto minmax(140px, 1fr) 52px auto minmax(110px, auto); align-items: center; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
    .teacher-video-player-controls label { color: var(--text); font-size: 13px; font-weight: 800; }
    .teacher-video-player-controls input[type="range"] { width: 100%; min-width: 120px; accent-color: var(--primary); }
    .teacher-video-player-controls output { min-width: 46px; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
    .teacher-video-player-controls select { min-height: 40px; }
    #teacherVideoPlaybackHelp { grid-column: 1 / -1; margin: 0; }
    .teacher-video-transcript { min-height: 360px; max-height: 68vh; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
    .teacher-video-transcript .workspace-heading { margin-bottom: 10px; }
    .teacher-video-transcript-content { overflow: auto; display: grid; align-content: start; gap: 7px; color: #182033; }
    .teacher-video-cue { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; width: 100%; padding: 9px 10px; color: #182033; text-align: left; border-color: transparent; background: #fff; }
    .teacher-video-cue span { color: var(--primary); font-variant-numeric: tabular-nums; }
    .teacher-video-cue .teacher-video-cue-copy { display: grid; gap: 3px; color: #182033; }
    .teacher-video-cue-copy b { color: #344054; font-size: 12px; }
    .teacher-video-cue strong { color: #182033; font-weight: 500; white-space: pre-wrap; }
    .teacher-video-cue.active { border-color: var(--primary); background: #eaf2ff; box-shadow: 0 0 0 2px rgba(21,94,239,.1); }
    .teacher-video-transcript-text { padding: 12px; color: #182033; white-space: pre-wrap; line-height: 1.75; background: #fff; border-radius: 8px; }
    .teacher-video-meeting-info { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
    .teacher-video-meeting-info div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
    .teacher-video-meeting-info span, .teacher-video-meeting-info strong { display: block; }
    .teacher-video-meeting-info span { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
    .teacher-video-meeting-info strong { overflow-wrap: anywhere; color: var(--text); font-size: 14px; }
    .teacher-video-attendance-section + .teacher-video-attendance-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
    .teacher-video-attendance-section h3 { margin: 0 0 10px; }
    .teacher-video-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 13px; }
    .teacher-video-description { white-space: pre-wrap; line-height: 1.6; }
    .teacher-video-overview-content { display: grid; gap: 16px; }
    .teacher-video-overview-metrics, .teacher-video-analysis-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
    .teacher-video-overview-metrics > div, .teacher-video-analysis-metrics > div { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
    .teacher-video-overview-metrics strong, .teacher-video-analysis-metrics strong { color: var(--primary); font-size: 25px; font-variant-numeric: tabular-nums; }
    .teacher-video-overview-metrics span, .teacher-video-analysis-metrics span { color: var(--muted); font-size: 13px; }
    .teacher-video-analysis-status:empty { display: none; }
    .teacher-video-analysis-status { margin-bottom: 16px; }
    dialog.teacher-video-analysis-editor-dialog { width: min(1180px,calc(100vw - 24px)); max-height: calc(100vh - 24px); }
    .teacher-video-analysis-editor-form { display: grid; gap: 16px; }
    .teacher-video-structured-editor { display: grid; gap: 16px; }
    .teacher-video-analysis-edit-section { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
    .teacher-video-editor-section-heading, .teacher-video-editor-subheading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .teacher-video-editor-section-heading h3 { margin: 0; }
    .teacher-video-analysis-edit-card { border: 1px solid #d7e2f1; border-radius: 10px; background: #fff; overflow: clip; }
    .teacher-video-analysis-edit-card > summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; }
    .teacher-video-analysis-edit-card[open] > summary { border-bottom: 1px solid var(--line); background: #f7faff; }
    .teacher-video-analysis-edit-card > .actions { padding: 0 14px 14px; }
    .teacher-video-analysis-edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 14px; }
    .teacher-video-analysis-edit-grid .full, .teacher-video-analysis-evidence-editor { grid-column: 1 / -1; }
    .teacher-video-analysis-evidence-editor { display: grid; gap: 10px; padding: 12px; border-radius: 8px; background: #f8fafc; }
    .teacher-video-analysis-evidence-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(130px,180px) auto; gap: 10px; align-items: end; }
    .teacher-video-analysis-version-panel { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
    .teacher-video-analysis-editor-actions { position: sticky; bottom: -16px; z-index: 2; padding: 12px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 20px rgba(35,67,112,.08); }
    .teacher-video-analysis-report { display: grid; gap: 18px; }
    .teacher-video-analysis-display-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 12px; border: 1px solid #d7e2f1; border-radius: 10px; background: #f8fafc; }
    .teacher-video-analysis-display-controls button { min-height: 38px; }
    .teacher-video-analysis-report > section, .teacher-video-analysis-columns > section { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
    .teacher-video-analysis-report h3 { margin: 0 0 10px; }
    .teacher-video-analysis-report p { line-height: 1.7; }
    .teacher-video-analysis-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .teacher-video-analysis-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 14px 0 0; }
    .teacher-video-analysis-facts div { padding: 10px 12px; border-radius: 8px; background: #f8fafc; }
    .teacher-video-analysis-facts dt { color: var(--muted); font-size: 12px; }
    .teacher-video-analysis-facts dd { margin: 5px 0 0; }
    .teacher-video-analysis-timeline { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
    .teacher-video-analysis-timeline li { min-width: 0; padding: 8px; border-left: 3px solid #9db9ef; background: #f8fafc; }
    .teacher-video-timeline-heading { display: grid; grid-template-columns: minmax(120px,auto) minmax(0,1fr); gap: 8px; align-items: center; }
    .teacher-video-analysis-timeline li > button { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; width: 100%; padding: 6px; color: var(--text); text-align: left; background: transparent; border-color: transparent; }
    .teacher-video-analysis-timeline li > button span { color: var(--primary); font-variant-numeric: tabular-nums; }
    .teacher-video-analysis-full-content > p { margin: 8px 0 2px; }
    .teacher-video-analysis-report:not(.teacher-video-analysis-show-full) .teacher-video-analysis-full-content { display: none; }
    .teacher-video-analysis-show-full .teacher-video-analysis-timeline { grid-template-columns: 1fr; gap: 12px; }
    .teacher-video-analysis-show-full .teacher-video-analysis-timeline li { padding: 12px; }
    .teacher-video-analysis-compact-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
    .teacher-video-analysis-compact-list li { min-width: 0; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
    .teacher-video-analysis-compact-list li:first-child { padding-top: 0; }
    .teacher-video-analysis-compact-list li:last-child { padding-bottom: 0; border-bottom: 0; }
    .teacher-video-analysis-compact-list li > strong { display: block; margin-bottom: 2px; }
    .teacher-video-evidence { display: inline-flex; gap: 6px; align-items: center; margin: 5px 6px 0 0; padding: 5px 8px; color: #344054; font-size: 12px; background: #eef4ff; border-color: #c8d7f4; }
    .teacher-video-evidence span { color: var(--primary); font-variant-numeric: tabular-nums; }
    .teacher-video-evidence .teacher-video-evidence-copy { color: #344054; font-variant-numeric: normal; }
    .teacher-video-analysis-report:not(.teacher-video-analysis-show-full) .teacher-video-analysis-compact-evidence .teacher-video-evidence-copy { display: none; }
    .teacher-video-evidence-static { border: 1px dashed #c8d7f4; border-radius: 8px; }
    .teacher-video-evidence-static span { color: var(--muted); }
    .teacher-video-evidence-approximate,.teacher-video-time-approximate { color: #7a4e00; background: #fff8e8; border: 1px dashed #d6a84b; }
    .teacher-video-evidence-approximate span { color: #7a4e00; }
    .teacher-video-analysis-scope { border-color: #c7d7f1 !important; background: #f7faff !important; }
    .teacher-video-analysis-scope > p { margin: 0; font-weight: 650; }
    .teacher-video-analysis-scope ul { margin: 10px 0 0; color: #5b6574; }
    .teacher-video-next-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 12px; }
    .teacher-video-next-action { min-width: 0; padding: 14px; border: 1px solid #d6e1f1; border-radius: 10px; background: #fbfdff; }
    .teacher-video-next-action > div:first-child { display: flex; gap: 8px; align-items: center; }
    .teacher-video-next-action > p { margin: 10px 0; }
    .teacher-video-next-action dl { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 8px; margin: 8px 0 0; }
    .teacher-video-next-action dt { color: var(--muted); font-size: 12px; }
    .teacher-video-next-action dd { margin: 0; }
    .teacher-video-action-priority, .teacher-video-analysis-level, .teacher-video-learning-state { display: inline-block; width: max-content; padding: 3px 7px; border-radius: 999px; font-size: 12px; white-space: nowrap; background: #eef4ff; color: #315a9a; }
    .teacher-video-learning-state[data-state="difficulty_observed"] { color: #8a3c24; background: #fff0eb; }
    .teacher-video-learning-state[data-state="demonstrated"], .teacher-video-learning-state[data-state="transfer_demonstrated"] { color: #24613e; background: #eaf8ef; }
    .teacher-video-analysis-level[data-level="C0"] { color: #6b7280; background: #f1f3f5; }
    .teacher-video-machine-notice { margin: 0; padding: 12px 14px; border-left: 4px solid #e7a52c; color: #5d481b; background: #fff9e8; }
    .link-button { padding: 0; color: var(--primary); text-align: left; text-decoration: underline; background: transparent; border: 0; }
    .teacher-video-cohort-trends { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
    .teacher-video-cohort-trends article { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
    .teacher-video-cohort-trends span { color: var(--muted); font-size: 13px; }
    .case-media-message { min-height: 1.5em; margin: 12px 0 0; }
    .member-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
    .member-search-row button { min-height: 42px; }
    .member-candidate-list { display: grid; gap: 7px; min-height: 74px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
    .member-candidate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid #dbe3ef; border-radius: 7px; background: #fff; }
    .member-candidate.active { border-color: var(--primary); background: #eef5ff; box-shadow: 0 0 0 2px rgba(21, 94, 239, .12); }
    .notice { padding: 10px 12px; border: 1px solid #d9e2ef; border-radius: 7px; background: #f7f9fc; }
    .notice.error { border-color: #e8b4b4; background: #fff5f5; color: #8b2525; }
    .rich-editor { min-height: 180px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; line-height: 1.65; }
    .option-list { display: grid; gap: 8px; }
    .option-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
    .option-row input[type="radio"], .option-row input[type="checkbox"] { width: auto; }
    .option-row button { padding: 7px 10px; }
    .chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .chart-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
    .chart-card.full { grid-column: 1 / -1; }
    .workspace-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
    .workspace-heading h3, .workspace-heading h4 { margin:0 0 5px; }
    .cohort-detail-toolbar { display:grid; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--line); }
    .cohort-detail-toolbar > .actions { justify-content:space-between; }
    .cohort-workspace-tabs { margin:0; padding:7px; width:100%; justify-content:flex-start; background:#eef3f9; border:1px solid var(--line); border-radius:9px; }
    .cohort-workspace-tabs button { min-height:40px; padding:8px 16px; background:#fff; font-weight:700; }
    .cohort-workspace-tabs button[aria-current="page"] { color:#fff; background:var(--primary); border-color:var(--primary); box-shadow:0 2px 8px rgba(21,94,239,.22); }
    .workspace-hero { padding:18px; border:1px solid #cbdaf5; border-radius:10px; background:linear-gradient(135deg,#f8fbff,#eef4ff); }
    .cohort-metric-cards { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:12px; }
    .cohort-metric-cards .card { min-height:108px; justify-content:center; border:1px solid #cad8ee; background:#fff; box-shadow:0 5px 18px rgba(35,67,112,.07); }
    .cohort-metric-cards .card strong { font-size:30px; line-height:1.1; color:var(--primary-strong); }
    .cohort-metric-cards .card span { margin-top:7px; color:var(--muted); font-weight:600; }
    .cohort-chart { display:grid; gap:10px; }
    .cohort-chart-row { display:grid; grid-template-columns:minmax(88px,auto) minmax(120px,1fr) 44px; align-items:center; gap:10px; }
    .cohort-chart-track { height:14px; overflow:hidden; border-radius:999px; background:#e8eef7; }
    .cohort-chart-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#2463d4,#6c92df); }
    .cohort-chart-fill.attendance { background:linear-gradient(90deg,#15856f,#56b79f); }
    #cohortResourceContentGroup,#cohortResourceDeliveryGroup { grid-column:1 / -1; }
    #cohortResourceContentGroup { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #cohortResourceContentGroup > p,#cohortResourceContentGroup > .full,#cohortResourceContentGroup > #cohortResourceTeachingEditors { grid-column:1 / -1; }
    .cohort-resource-identity { grid-column:1 / -1; display:grid; grid-template-columns:minmax(150px,.65fr) minmax(220px,1fr) minmax(240px,1.35fr); gap:12px; align-items:end; }
    .cohort-resource-source { grid-column:1 / -1; display:grid; gap:12px; padding:16px; border:1px solid #cbdaf5; border-radius:9px; background:#f9fbff; }
    .cohort-resource-source-options { display:flex; flex-wrap:wrap; gap:18px; }
    .cohort-resource-source-options label { display:flex; flex-direction:row; align-items:center; gap:7px; }
    .cohort-resource-upload-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:end; }
    .cohort-resource-upload-progress { width:100%; height:12px; accent-color:var(--primary); }
    #cohortResourceVideoFields { grid-column:1 / -1; background:#f8fbff; }
    #cohortResourceVideoFields > .field-help { margin:0; }
    #cohortResourceVideoFields > label { margin-top:4px; }
    #cohortResourceVideoFields textarea { min-height:120px; }
    #cohortResourceVideoUploadMessage { min-height:1.4em; }
    .cohort-resource-url-row { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
    .cohort-markdown-field { display:grid; gap:0; overflow:hidden; border:1px solid #b8c1ce; border-radius:8px; background:#fff; }
    .cohort-markdown-field > textarea { min-height:300px; border:0; border-radius:0; padding:16px 18px; font:15px/1.75 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; }
    .cohort-markdown-field > .rich-toolbar { width:100%; }
    #cohortResourceAssignmentFields,#cohortResourceProtectedFileFields { padding:16px; border:1px solid #cbdaf5; border-radius:9px; background:#fff; }
    #cohortResourceAssignmentFields:not(.hidden) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    #cohortResourceAssignmentFields > legend,#cohortResourceAssignmentFields > p,#cohortResourceAssignmentFields > textarea { grid-column:1 / -1; }
    #cohortResourceQuizFields:not(.hidden) { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; background:#f8fbff; }
    #cohortResourceQuestionList { display:grid; gap:12px; min-width:0; }
    #cohortResourceQuizFields > .actions { justify-content:flex-start; align-items:center; }
    #cohortResourceDeliveryGroup { grid-template-columns:repeat(4,minmax(150px,1fr)); align-items:end; padding:13px 14px; background:#f7f9fc; border-width:1px; }
    #cohortResourceDeliveryGroup > legend, #cohortResourceDeliveryGroup > p, #cohortResourceDeliveryGroup > #cohortResourceTimedFields { grid-column:1 / -1; }
    #cohortResourceDeliveryGroup label { gap:5px; font-size:13px; }
    #cohortResourceDeliveryGroup select, #cohortResourceDeliveryGroup input { min-height:44px; padding:8px 9px; }
    .detail-tabs button { min-height:44px; }
    #cohortCurriculumSection { display:none !important; }
    #cohortResourceEditorHost { display:none !important; }
    #cohortResourcePlacementSessionField { display:none !important; }
    .compact-timeline { max-height:none; border:0; display:grid; gap:8px; overflow:visible; }
    .timeline-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:#fff; }
    .timeline-row-title { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
    .timeline-row-title strong { font-size:15px; }
    .timeline-row-meta { margin-top:4px; color:var(--muted); font-size:13px; }
    .timeline-kind { padding:2px 7px; border-radius:999px; color:#265a9f; background:#eaf2ff; font-size:12px; font-weight:700; }
    .review-demo { margin-top:18px; border:1px dashed #a9b8cf; border-radius:12px; background:#f8faff; }
    .review-demo summary { cursor:pointer; padding:14px 16px; font-weight:700; }
    .review-demo-body { padding:0 16px 16px; }
    .review-demo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
    .review-demo-card { padding:14px; border:1px solid var(--line); border-radius:10px; background:#fff; }
    .review-demo-card h5 { margin:0 0 8px; }
    .review-demo-card p { margin:5px 0; }
    #cohortResourceContentGroup { padding:18px; }
    .workspace-columns { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr); gap:16px; align-items:start; }
    .workspace-stack { display:grid; gap:16px; }
    .section-card { border:1px solid var(--line); border-radius:10px; padding:16px; background:#fff; }
    .section-card > h4 { margin:0 0 10px; }
    .detail-tabs { display:flex; gap:6px; flex-wrap:wrap; padding:6px; margin:14px 0; border:1px solid var(--line); border-radius:9px; background:#eef3f9; }
    .detail-tabs button { min-height:42px; background:#fff; }
    .detail-tabs button[aria-current="page"] { color:#fff; background:var(--primary); border-color:var(--primary); }
    .detail-tab-panel { display:grid; gap:14px; }
    .session-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
    .session-summary > div { padding:12px; border:1px solid var(--line); border-radius:8px; background:#fbfcff; }
    .session-summary strong { display:block; margin-bottom:4px; }
    #cohortDetailPanel.session-page-active,
    #cohortDetailPanel.resource-page-active { padding:0; overflow:hidden; }
    #cohortDetailPanel.session-page-active > .cohort-detail-toolbar,
    #cohortDetailPanel.session-page-active > #cohortDetailTitle,
    #cohortDetailPanel.session-page-active > #cohortDetailMeta,
    #cohortDetailPanel.resource-page-active > .cohort-detail-toolbar,
    #cohortDetailPanel.resource-page-active > #cohortDetailTitle,
    #cohortDetailPanel.resource-page-active > #cohortDetailMeta { display:none; }
    #cohortDetailPanel.session-page-active #cohortScheduleSection,
    #cohortDetailPanel.resource-page-active #cohortScheduleSection { margin:0; }
    .session-workspace { display:grid; gap:0; background:#f6f8fc; }
    .session-page-header { display:grid; grid-template-columns:auto minmax(0,1fr); gap:18px; align-items:start; padding:22px 24px 14px; background:#fff; border-bottom:1px solid var(--line); }
    .session-page-header h3 { margin:4px 0 3px; font-size:24px; }
    .session-page-header h3:focus,.session-page h4:focus { outline:2px solid transparent; }
    .session-page-eyebrow { color:var(--primary-strong); font-size:12px; font-weight:800; letter-spacing:.08em; }
    .session-summary { display:flex; gap:8px 18px; flex-wrap:wrap; padding:10px 24px; background:#fff; border-bottom:1px solid var(--line); }
    .session-summary > div { display:flex; gap:7px; align-items:center; min-width:0; padding:0; border:0; background:transparent; font-size:13px; }
    .session-summary strong { display:inline; margin:0; color:var(--muted); font-size:12px; }
    .session-page-nav { position:sticky; top:0; z-index:5; flex-wrap:nowrap; margin:0; padding:10px 24px; overflow-x:auto; border:0; border-bottom:1px solid var(--line); border-radius:0; background:#fff; }
    .session-page-nav button { flex:0 0 auto; min-height:38px; padding:7px 14px; }
    .session-page { padding:22px 24px 28px; }
    .session-page > .workspace-heading { margin-bottom:16px; }
    .session-info-grid { display:grid; grid-template-columns:minmax(280px,.72fr) minmax(420px,1.28fr); gap:16px; align-items:start; }
    .compact-setting-card { align-self:start; }
    .compact-setting-card textarea { min-height:72px; }
    .teaching-save-bar,.page-save-bar { position:sticky; bottom:0; z-index:3; margin:8px -16px -16px; padding:12px 16px; border-top:1px solid var(--line); background:rgba(255,255,255,.96); box-shadow:0 -5px 16px rgba(30,50,80,.06); }
    .teaching-save-bar label { min-width:150px; }
    .learner-performance-list,.activity-list,.session-resource-list { display:grid; gap:12px; }
    .learner-performance-list > fieldset,.activity-list > fieldset { min-width:0; margin:0; padding:14px; border:1px solid var(--line); border-radius:10px; background:#fbfcff; }
    .learner-performance-list > fieldset > legend,.activity-list > fieldset > legend { padding:0 6px; font-weight:800; }
    .learner-performance-list .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; }
    .learner-performance-list textarea,.activity-list textarea { min-height:72px; }
    .learner-performance-list .quick-choice-group { padding:8px 10px; }
    .learner-performance-list .quick-choice-options { gap:6px 10px; }
    .learner-performance-table-wrap { display:block; max-height:none; overflow:auto; border-radius:10px; background:#fff; }
    .learner-performance-table { min-width:820px; table-layout:fixed; }
    .learner-performance-table thead { position:sticky; top:0; z-index:2; background:#f8fafc; }
    .learner-performance-table th:nth-child(1) { width:18%; }
    .learner-performance-table th:nth-child(2),.learner-performance-table th:nth-child(3) { width:15%; }
    .learner-performance-table th:nth-child(4) { width:12%; }
    .learner-performance-table th:nth-child(5) { width:24%; }
    .learner-performance-table th:nth-child(6) { width:16%; }
    .learner-performance-table th,.learner-performance-table td { vertical-align:middle; }
    .learner-performance-table select,.learner-performance-table input[type="number"] { min-height:38px; padding:7px 9px; }
    .learner-performance-table tbody tr[data-dirty="true"] > * { background:#fffaeb; }
    .learner-performance-table tbody tr:hover > * { background:#f8fbff; }
    .learner-performance-summary { display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
    .learner-performance-dialog-grid textarea { min-height:76px; }
    #cohortLearnerPerformanceDialog .dialog-heading h2 { margin-bottom:5px; }
    #cohortLearnerPerformanceDialog { max-height:calc(100dvh - 40px); overflow:auto; overscroll-behavior:contain; }
    #closeCohortLearnerPerformanceDialogTopBtn { min-width:42px; padding:7px 11px; font-size:20px; line-height:1; }
    .learner-more-details { grid-column:1 / -1; margin-top:2px; border-top:1px solid var(--line); }
    .learner-more-details summary { cursor:pointer; padding:11px 2px 4px; color:var(--primary-strong); font-weight:700; }
    .learner-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; padding-top:10px; }
    .learner-detail-grid .full { grid-column:1 / -1; }
    .activity-list .form-grid { grid-template-columns:minmax(180px,.6fr) minmax(150px,.4fr) minmax(0,1fr); gap:10px 12px; }
    .activity-list .form-grid .full { grid-column:1 / -1; }
    .session-resource-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; }
    .session-resource-row p { margin:6px 0 0; }
    .session-asset-list { display:grid; gap:10px; }
    .session-asset-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,.3fr) auto; gap:16px; align-items:center; padding:15px 16px; border:1px solid var(--line); border-radius:11px; background:#fff; }
    .session-asset-row.is-archived { background:#f8f9fb; }
    .session-asset-row h5 { margin:0 0 5px; font-size:16px; }
    .session-asset-row p { margin:3px 0 0; }
    .session-asset-kind { display:inline-block; margin-right:8px; color:var(--primary-strong); font-size:12px; font-weight:800; }
    .session-asset-status { display:grid; gap:5px; justify-items:start; }
    .session-asset-status small { color:var(--muted); line-height:1.35; }
    .session-asset-actions { justify-content:flex-end; }
    .session-asset-empty { padding:30px 20px; border:1px dashed var(--line); border-radius:11px; background:#fff; text-align:center; }
    .session-asset-empty h5 { margin:0 0 6px; }
    .session-asset-upload { margin-top:14px; }
    .session-asset-upload > .workspace-heading { margin-bottom:0; }
    .upload-progress { display:grid; grid-template-columns:minmax(160px,1fr) auto; gap:10px; align-items:center; }
    .upload-progress progress { width:100%; height:12px; accent-color:var(--primary); }
    .session-asset-preview { min-height:120px; padding:16px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
    .session-asset-preview audio,.session-asset-preview video { display:block; width:100%; max-height:55vh; }
    .session-asset-preview pre { max-height:55vh; margin:0; overflow:auto; white-space:pre-wrap; word-break:break-word; font:inherit; }
    .session-asset-preview .notice { margin:0; }
    .session-assignment-notice { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
    .danger-quiet { color:var(--danger); border-color:#efc1bd; background:#fff; }
    #cohortDetailPanel.resource-page-active #cohortResourceEditor { margin:0; border:0; border-radius:0; box-shadow:none; }
    #cohortDetailPanel.resource-page-active #cohortResourceEditor > .actions:first-child { padding:20px 22px 12px; border-bottom:1px solid var(--line); }
    #cohortDetailPanel.resource-page-active #cohortResourceForm { padding:18px 22px 24px; }
    .editor-shell { display:grid; grid-template-columns:minmax(220px,.55fr) minmax(480px,1.45fr); gap:16px; align-items:start; }
    .editor-nav { position:sticky; top:8px; display:grid; gap:8px; }
    .editor-nav button { text-align:left; }
    .editor-nav button.active { color:#fff; background:var(--primary); border-color:var(--primary); }
    dialog.wide-dialog { width:min(820px,calc(100vw - 32px)); }
    .table-toolbar { display:flex; align-items:end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
    .table-toolbar .search-control { width:min(420px,100%); }
    .role-switch { display:flex; gap:6px; flex-wrap:wrap; }
    .role-switch button.active { color:#fff; background:var(--primary); border-color:var(--primary); }
    .permission-dialog { width:min(1040px,calc(100vw - 28px)); max-width:none; max-height:92vh; padding:0; border:0; border-radius:16px; }
    .permission-dialog::backdrop { background:rgba(15,23,42,.58); }
    .permission-dialog .dialog-body { max-height:92vh; overflow:auto; gap:16px; }
    .permission-explanation { display:grid; gap:4px; padding:12px 14px; border:1px solid #bfdbfe; border-radius:10px; background:#eff6ff; color:#1e3a5f; }
    .permission-template-section { display:grid; gap:12px; padding:16px; border:1px solid #bbd7cc; border-radius:12px; background:#f3faf7; }
    .permission-template-section h3,.permission-section-heading h3 { margin:0 0 4px; font-size:17px; }
    .permission-templates { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
    .permission-template-card { display:grid; gap:6px; min-height:112px; padding:13px; text-align:left; align-content:start; background:#fff; border:1px solid #bfd5cc; }
    .permission-template-card:hover,.permission-template-card:focus-visible { border-color:var(--primary); box-shadow:0 0 0 2px rgba(15,118,110,.12); }
    .permission-template-card.selected { border-color:var(--primary); background:#eaf7f1; box-shadow:0 0 0 2px rgba(15,118,110,.16); }
    .permission-template-card strong { color:var(--primary-dark); }
    .permission-template-card span { color:var(--muted); font-size:13px; line-height:1.45; }
    .permission-template-card small { color:var(--primary); font-weight:700; }
    .permission-template-message { margin:0; padding:9px 11px; border-radius:8px; background:#fff; color:var(--muted); font-size:13px; }
    .permission-template-message.selected { color:#155e45; background:#dcfce7; }
    .permission-template-message.saved { color:#166534; background:#dcfce7; font-weight:700; }
    .permission-step-number { display:inline-grid; width:26px; height:26px; place-items:center; margin-right:4px; border-radius:50%; color:#fff; background:var(--primary); font-size:14px; }
    .permission-section-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; }
    .permission-expand-actions { display:flex; gap:8px; flex-wrap:wrap; }
    .permission-presets { display:flex; flex-wrap:wrap; gap:8px; padding-top:10px; }
    .permission-bulk-tools { padding:10px 13px; border:1px dashed var(--line); border-radius:10px; }
    .permission-bulk-tools summary { cursor:pointer; font-weight:700; }
    .permission-groups { display:grid; gap:14px; }
    .permission-group { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
    .permission-group[open] { border-color:#9cbfb2; box-shadow:0 5px 18px rgba(15,23,42,.06); }
    .permission-group > summary { display:grid; grid-template-columns:minmax(180px,1fr) auto auto; gap:12px; align-items:center; padding:13px 14px; background:#f7f9fb; cursor:pointer; list-style:none; }
    .permission-group > summary::-webkit-details-marker { display:none; }
    .permission-group-title { display:grid; gap:2px; }
    .permission-group-title strong { font-size:16px; }
    .permission-group-count { color:var(--muted); font-size:12px; }
    .permission-module-state { font-size:13px; font-weight:700; color:#315f50; }
    .permission-module-select { min-width:150px; }
    .permission-advanced-note { margin:0; padding:10px 14px; border-top:1px solid var(--line); background:#fffdf7; }
    .permission-table { width:100%; border-collapse:collapse; }
    .permission-table th,.permission-table td { padding:11px 14px; border-top:1px solid var(--line); vertical-align:top; text-align:left; }
    .permission-table th { width:26%; }
    .permission-table td:nth-child(2) { width:44%; }
    .permission-table select { width:100%; min-width:170px; }
    .permission-state { display:inline-block; margin-top:5px; font-size:12px; font-weight:700; }
    .permission-state.allowed { color:#166534; }
    .permission-state.denied { color:#991b1b; }
    .permission-dialog-footer { position:sticky; bottom:-1px; padding:12px 0 2px; background:#fff; border-top:1px solid var(--line); }
    .permission-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 14px; margin:14px 0; border:1px solid var(--line); border-radius:10px; background:#fafafa; }
    .teacher-permission-inline-card { margin:18px 0; padding:18px; border:2px solid #9fcabb; border-radius:14px; background:#f7fcfa; }
    .teacher-permission-intro { margin-bottom:14px; }
    .teacher-permission-intro h3 { margin:4px 0 6px; font-size:20px; }
    .teacher-permission-intro p { margin:0; color:var(--muted); line-height:1.55; }
    .permission-editor-inline { padding:0; max-height:none; overflow:visible; }
    .permission-editor-inline .dialog-heading { padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; }
    .permission-editor-inline #closeUserPermissionTopBtn,.permission-editor-inline #closeUserPermissionBtn { display:none; }
    .permission-editor-inline .permission-dialog-footer { margin-top:2px; padding:14px; border:1px solid #9fcabb; border-radius:10px; background:#edf8f3; z-index:2; }
    @media (max-width:900px) {
      .workspace-columns,.editor-shell { grid-template-columns:1fr; }
      .teacher-video-watch-grid { grid-template-columns:1fr; }
      .teacher-video-transcript { max-height:55vh; }
      .teacher-video-meeting-info { grid-template-columns:repeat(2,minmax(150px,1fr)); }
      .teacher-video-overview-metrics, .teacher-video-analysis-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .teacher-video-analysis-columns { grid-template-columns:1fr; }
      .teacher-video-analysis-edit-grid { grid-template-columns:1fr; }
      .teacher-video-analysis-evidence-row { grid-template-columns:1fr; }
      .teacher-video-cohort-trends { grid-template-columns:1fr; }
      .editor-nav { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }
      .session-summary { grid-template-columns:1fr; }
      .cohort-metric-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
      #cohortResourceDeliveryGroup { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .review-demo-grid { grid-template-columns:1fr; }
      .permission-group > summary { grid-template-columns:1fr; }
      .permission-module-select { width:100%; }
      .permission-section-heading { align-items:flex-start; flex-direction:column; }
      .permission-expand-actions,.permission-expand-actions button { width:100%; }
      .permission-table,.permission-table tbody,.permission-table tr,.permission-table th,.permission-table td { display:block; width:100%; }
      .permission-table thead { display:none; }
      .permission-table tr { padding:12px 14px; border-top:1px solid var(--line); }
      .permission-table th,.permission-table td { padding:3px 0; border:0; }
      .permission-table td:nth-child(2) { width:100%; color:var(--muted); }
      .permission-table select { min-width:0; margin-top:6px; }
      .teacher-permission-inline-card { padding:12px; margin-left:-2px; margin-right:-2px; }
      .cohort-resource-identity { grid-template-columns:1fr; }
      .session-info-grid,.learner-performance-list .form-grid,.activity-list .form-grid,.learner-detail-grid,.session-asset-row { grid-template-columns:1fr; }
    }
    @media (max-width:520px) { .cohort-metric-cards,#cohortResourceDeliveryGroup,#cohortResourceContentGroup,#cohortResourceAssignmentFields:not(.hidden),#cohortResourceQuizFields:not(.hidden),.cohort-resource-upload-row { grid-template-columns:1fr; } .session-page-header { grid-template-columns:1fr; } .teacher-video-player-controls { grid-template-columns:auto minmax(0,1fr) 48px; } .teacher-video-player-controls label[for="teacherVideoPlaybackRate"] { grid-column:1; } .teacher-video-player-controls select { grid-column:2 / -1; width:100%; } }
    @media (max-width:620px) { .timeline-row,.session-resource-row { grid-template-columns:1fr; } .session-page-header,.session-page,.session-summary,.session-page-nav { padding-left:14px; padding-right:14px; } .session-assignment-notice,.session-page > .workspace-heading { align-items:flex-start; flex-direction:column; } .session-page > .workspace-heading > button { width:100%; } .session-asset-actions { justify-content:flex-start; } }
    .bar-chart { display: grid; gap: 10px; margin-top: 12px; }
    .bar-row { display: grid; grid-template-columns: minmax(90px, 1fr) 3fr auto; gap: 10px; align-items: center; }
    .bar-track { height: 14px; border-radius: 999px; background: #e8eef7; overflow: hidden; }
    .bar-fill { height: 100%; border-radius: inherit; background: var(--primary); min-width: 2px; }
    .learning-dashboard { display: grid; gap: 16px; }
    .learning-chart { width: 100%; min-height: 220px; overflow: visible; }
    .learning-chart .grid-line { stroke: #d8e0ea; stroke-width: 1; }
    .learning-chart .axis-label { fill: var(--muted); font-size: 11px; }
    .learning-chart .metric-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
    .learning-chart .metric-point { fill: #fff; stroke: var(--primary); stroke-width: 3; }
    .lesson-data-list { display: grid; gap: 10px; }
    .lesson-data-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
    .lesson-data-card > summary { cursor: pointer; padding: 13px 14px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(90px, .7fr)); gap: 10px; align-items: center; }
    .lesson-data-card > summary:hover { background: #f8fbff; }
    .lesson-data-card > summary::marker { color: var(--primary); }
    .lesson-data-body { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 14px; }
    .metric-up { color: var(--success); }
    .metric-down { color: var(--danger); }
    @media (max-width: 900px) {
      .lesson-data-card > summary { grid-template-columns: 1fr 1fr; }
      .lesson-data-card > summary strong { grid-column: 1 / -1; }
    }
    .course-cover-preview { width: 180px; height: 110px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #eef2f7; }
    .course-basic-form { gap: 9px; }
    .course-cover-compact { display: grid; grid-template-columns: 132px auto minmax(240px, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafcff; }
    .course-cover-button { width: 132px; height: 78px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #eef2f7; cursor: zoom-in; }
    .course-cover-button .course-cover-preview { width: 100%; height: 100%; border: 0; border-radius: 0; }
    .course-cover-upload { display: inline-flex; width: auto; flex-wrap: nowrap; padding: 8px 12px; border: 1px solid #adc0de; border-radius: 6px; background: #eef4ff; color: #17488f; font-weight: 700; cursor: pointer; }
    .course-cover-upload input { position: absolute; width: 1px !important; height: 1px; opacity: 0; pointer-events: none; }
    .course-settings-grid { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: 8px; }
    .course-settings-grid label { font-size: 12px; }
    .course-settings-grid select { padding: 8px 7px; font-size: 13px; }
    .course-copy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .course-copy-grid textarea { min-height: 72px; }
    #courseCoverLargeImage { display: block; max-width: min(860px, calc(100vw - 80px)); max-height: calc(100vh - 150px); margin: auto; object-fit: contain; }
    .field-help { color: var(--muted); font-size: 13px; margin: -4px 0 0; }
    .required-mark { color: var(--danger); display: inline; line-height: 1; font-weight: 800; }
    fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; }
    legend { padding: 0 6px; color: var(--text); font-weight: 700; }
    .nav-help { margin: 0 4px 8px; color: #b7c0cf; font-size: 12px; line-height: 1.5; }
    .nav-level-one { display: grid; gap: 5px; }
    .nav-level-one[hidden] { display: none; }
    .nav-level-direct { margin-block: 2px; }
    .nav-primary { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; }
    .nav-primary .nav-disclosure { font-size: 18px; line-height: 1; transition: transform .15s ease; }
    .nav-level-one.expanded .nav-disclosure { transform: rotate(90deg); }
    .nav-primary.contains-active { background: #1a2940; border-color: #31445f; }
    .nav-submenu { display: grid; gap: 4px; margin: 0 0 4px 12px; padding: 4px 0 6px 10px; border-left: 2px solid #425979; }
    .nav-submenu[hidden] { display: none; }
    .nav button.nav-secondary { padding-left: 14px; color: #d9e4f2; }
    .nav button.nav-secondary::before { content: "\2014"; margin-right: 8px; color: #7f94b2; }
    .type-switch { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .type-switch button { min-height: 44px; }
    .audio-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfcff; display: grid; gap: 8px; }
    .audio-resource { display: grid; gap: 8px; }
    .audio-resource-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
    .file-upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
    .generation-list { display: grid; gap: 10px; }
    .generation-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; background: #fff; }
    .report-box, pre {
      white-space: pre-wrap;
      word-break: break-word;
      background: #f6f8fb;
      border: 1px solid var(--line);
      padding: 12px;
      border-radius: 6px;
      max-height: 380px;
      overflow: auto;
    }
    .compact { font-size: 13px; line-height: 1.45; }
    dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--panel); color: var(--text); box-shadow: 0 24px 70px rgba(16, 24, 40, .3); }
    #standardAudioGenerationDialog, #cohortAudioGenerationDialog { width: min(760px, calc(100vw - 32px)); }
    #courseCoverPreviewDialog { width: min(900px, calc(100vw - 32px)); }
    dialog::backdrop { background: rgba(16, 24, 40, .55); }
    .dialog-body { padding: 20px; display: grid; gap: 14px; }
    .sound-requirement { display: grid; gap: 7px; }
    .sound-requirement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
    .sound-requirement-head select { width: min(230px, 55%); padding: 7px 10px; }
    .sound-requirement textarea { min-height: 150px; }
    .reference-upload-row { display: flex; align-items: center; gap: 10px; min-height: 36px; flex-wrap: wrap; }
    .reference-audio-picker { display: inline-flex; flex-wrap: nowrap; width: auto; padding: 8px 13px; border: 1px solid #adc0de; border-radius: 6px; background: #f5f8fe; color: #17488f; font-weight: 700; cursor: pointer; }
    .reference-audio-picker:hover { border-color: var(--primary); background: #eaf1ff; }
    .reference-audio-picker input { position: absolute; width: 1px !important; height: 1px; opacity: 0; pointer-events: none; }
    .tree-primary-action { width: 100%; border-style: dashed; color: var(--primary); font-weight: 700; }
    .fixed-course-layout { display: grid; grid-template-columns: 210px 235px 270px minmax(360px, 1fr); gap: 12px; align-items: start; }
    .fixed-course-layout.basic-mode { grid-template-columns: 240px minmax(520px, 1fr); }
    .fixed-course-layout.basic-mode > section:nth-child(2), .fixed-course-layout.basic-mode > section:nth-child(3) { display: none; }
    .fixed-column { min-height: 66vh; max-height: 76vh; overflow: auto; }
    .fixed-course-card { display: grid; gap: 5px; width: 100%; text-align: left; margin-bottom: 8px; }
    .fixed-course-card.active { border-color: var(--primary); background: #eef5ff; box-shadow: 0 0 0 2px rgba(21, 94, 239, .12); }
    .registration-batch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 420px)); gap: 12px; margin-top: 16px; }
    .registration-batch-card { min-height: 112px; padding: 16px; align-content: center; }
    .registration-batch-card strong { font-size: 17px; }
    .fixed-workspace-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
    .fixed-workspace-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
    .mobile-cell-label { display: none; }
    audio { width: 100%; }
    .admin-page-heading { min-width: 0; }
    .header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
    .header-refresh { min-height: 42px; }
    .profile-menu-wrap { position: relative; }
    .profile-menu-trigger { display: flex; align-items: center; gap: 10px; min-width: 190px; padding: 6px 10px; text-align: left; background: #fff; }
    .header-avatar, .account-avatar-preview { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--avatar-color, #0f766e); color: #fff; font-weight: 800; flex: 0 0 auto; }
    .header-avatar { width: 38px; height: 38px; font-size: 16px; }
    .header-avatar img, .account-avatar-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .profile-menu-copy { display: grid; min-width: 0; flex: 1; }
    .profile-menu-copy strong, .profile-menu-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .profile-menu-copy small { color: var(--muted); margin-top: 1px; }
    .profile-menu-caret { color: var(--muted); font-size: 18px; transition: transform .15s ease; }
    .profile-menu-trigger[aria-expanded="true"] .profile-menu-caret { transform: rotate(180deg); }
    .profile-menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 220px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 16px 40px rgba(16,24,40,.18); }
    .profile-menu button { width: 100%; border: 0; text-align: left; background: transparent; }
    .profile-menu button:hover, .profile-menu button:focus-visible { background: #f2f5fa; }
    .profile-menu-separator { height: 1px; margin: 5px 4px; background: var(--line); }
    .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
    .panel-heading h2, .panel-heading p { margin-bottom: 0; }
    .verification-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid #b2ccff; border-radius: 10px; background: #eff4ff; }
    .verification-banner.approved { border-color: #abefc6; background: #ecfdf3; }
    .verification-banner.pending { border-color: #fedf89; background: #fffaeb; }
    .verification-banner-copy { display: grid; gap: 3px; }
    .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 13px; border-radius: 7px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
    .dashboard-stats { margin-bottom: 16px; }
    .dashboard-stat { min-height: 108px; padding: 17px; background: #fff; }
    .dashboard-stat strong { font-size: 28px; }
    .dashboard-stat.danger { border-color: #fecdca; background: #fff7f6; }
    .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; }
    .dashboard-chart-panel { min-height: 300px; }
    .activity-chart { display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); gap: 9px; min-height: 205px; align-items: end; padding-top: 14px; }
    .activity-day { display: grid; gap: 7px; justify-items: center; height: 188px; grid-template-rows: 1fr auto; }
    .activity-bars { display: flex; gap: 4px; align-items: end; height: 155px; width: 100%; justify-content: center; border-bottom: 1px solid var(--line); }
    .activity-bar { width: min(16px, 36%); min-height: 3px; border-radius: 4px 4px 0 0; background: #8bb3ff; }
    .activity-bar.submissions { background: #32d583; }
    .activity-legend { display: flex; grid-column: 1 / -1; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 13px; }
    .activity-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: #8bb3ff; }
    .activity-legend span:last-child::before { background: #32d583; }
    .workload-chart { display: grid; gap: 18px; padding-top: 8px; }
    .workload-row { display: grid; grid-template-columns: minmax(95px, auto) 1fr auto; align-items: center; gap: 10px; }
    .workload-track { height: 9px; overflow: hidden; border-radius: 999px; background: #edf1f7; }
    .workload-value { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--primary); }
    .dashboard-todo-panel { padding: 0; overflow: hidden; }
    .dashboard-todo-heading { padding: 18px; margin: 0; border-bottom: 1px solid var(--line); }
    .todo-filters { display: flex; gap: 4px; padding: 4px; border-radius: 8px; background: #eef2f7; }
    .todo-filters button { padding: 6px 10px; border: 0; background: transparent; }
    .todo-filters button.active { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
    .todo-list { display: grid; }
    .todo-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 15px 18px; border-bottom: 1px solid #edf1f5; }
    .todo-item:last-child { border-bottom: 0; }
    .todo-kind-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: #eef4ff; color: var(--primary); font-weight: 800; }
    .todo-item.overdue .todo-kind-icon { background: #fef0ef; color: var(--danger); }
    .todo-item-copy { min-width: 0; }
    .todo-item-copy strong { display: block; margin-bottom: 3px; }
    .todo-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
    .todo-status { display: inline-flex; padding: 2px 7px; border-radius: 999px; font-size: 12px; color: var(--muted); background: #eef2f7; }
    .todo-status.overdue { color: var(--danger); background: #fef0ef; }
    .todo-status.due_soon { color: var(--warn); background: #fff3dd; }
    .dashboard-empty { padding: 34px 18px; text-align: center; }
    .verification-layout, .account-layout { width: min(900px, 100%); margin: 0 auto; }
    .verification-status-card { border-left: 4px solid var(--primary); }
    .verification-status-summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
    .verification-status-summary strong { font-size: 17px; }
    .verification-documents { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
    .verification-upload-box { padding: 15px; border: 1px dashed #b8c4d4; border-radius: 9px; background: #fafcff; }
    .field-help { display: block; flex-basis: 100%; font-size: 12px; color: var(--muted); }
    .form-stack, .account-profile-form, .dialog-body, .crop-controls { display: grid; gap: 16px; }
    .form-footer { padding-top: 4px; }
    .account-profile-card { padding: 22px; }
    .avatar-editor-summary { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
    .account-avatar-preview { width: 96px; height: 96px; font-size: 34px; box-shadow: inset 0 0 0 4px #fff, 0 0 0 1px var(--line); }
    .avatar-upload-button { display: inline-flex; width: auto; padding: 9px 13px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #fff; cursor: pointer; font-weight: 700; }
    .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
    .account-readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .account-readonly-grid div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
    .account-readonly-grid span, .account-readonly-grid strong { display: block; }
    .account-readonly-grid span { margin-bottom: 5px; color: var(--muted); font-size: 13px; }
    .security-setting-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 4px 0; }
    .security-setting-row + .security-setting-row { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
    .security-setting-row p { margin: 5px 0 0; }
    .phone-verification-block { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
    .account-current-phone { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
    dialog.account-dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 80px rgba(16,24,40,.28); }
    dialog.account-dialog::backdrop { background: rgba(16,24,40,.55); }
    .account-dialog .dialog-body { padding: 22px; }
    .dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .dialog-heading h2, .dialog-heading p { margin-bottom: 0; }
    .icon-button { width: 38px; height: 38px; padding: 0; font-size: 23px; line-height: 1; }
    .avatar-crop-stage { display: grid; place-items: center; overflow: hidden; padding: 12px; border-radius: 10px; background: #eef2f6; }
    #avatarCropCanvas { display: block; width: min(420px, 100%); height: auto; max-height: 52vh; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 5px #b8c4d4; touch-action: none; cursor: grab; }
    #avatarCropCanvas:active { cursor: grabbing; }
    .inline-code-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; }
    .inline-code-field input { min-width: 0; }

    @media (max-width: 980px) {
      .app-shell { display: block; min-height: 100dvh; }
      #adminSidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(86vw, 330px);
        height: 100dvh;
        padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 12px 0 32px rgba(16, 24, 40, .28);
      }
      .app-shell.menu-open #adminSidebar { transform: translateX(0); }
      .admin-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        padding: 0;
        color: #fff;
        border-color: #52647f;
        background: #1a2940;
        font-size: 28px;
        line-height: 1;
      }
      .admin-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(16, 24, 40, .55);
      }
      .app-shell.menu-open .admin-menu-backdrop { display: block; }
      .admin-mobile-menu-button { display: inline-flex; }
      .admin-page-header { align-items: flex-start; justify-content: flex-start; }
      .admin-page-heading { min-width: 0; flex: 1; }
      .admin-page-header > .header-actions { margin-left: auto; }
      .stats, .split, .form-grid, .detail-grid, .tree-layout, .type-switch, .course-detail-header, .fixed-course-layout, .field-grid, .field-grid.three, .field-grid.five, .chart-grid, .course-settings-grid, .course-copy-grid, .course-cover-compact, .dashboard-grid { grid-template-columns: 1fr; }
      .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .dashboard-stats .dashboard-stat:last-child { grid-column: 1 / -1; }
      .fixed-column { min-height: auto; max-height: none; }
      .tree-node-header, .tree-row { grid-template-columns: 1fr; }
      .file-upload-row { grid-template-columns: 1fr; }
      main { padding: 14px; }
    }
    @media (max-width: 640px) {
      .teacher-video-filters { grid-template-columns:1fr; }
      .teacher-video-meeting-info { grid-template-columns:1fr; }
      .teacher-video-overview-metrics, .teacher-video-analysis-metrics, .teacher-video-analysis-facts { grid-template-columns:1fr; }
      .teacher-video-analysis-timeline li > button { grid-template-columns:1fr; }
      .analysis-center-toolbar { align-items: flex-start; flex-direction: column; }
      .analysis-center-frame-wrap { min-height: 620px; height: calc(100dvh - 245px); }
      .admin-page-header { display: grid; grid-template-columns: 46px minmax(0, 1fr); }
      .admin-page-header > .header-actions { grid-column: 1 / -1; margin-left: 0; width: 100%; }
      .profile-menu-wrap { flex: 1; }
      .profile-menu-trigger { width: 100%; min-width: 0; }
      .profile-menu { left: 0; right: auto; width: min(280px, 100%); }
      .verification-banner, .security-setting-row { align-items: flex-start; flex-direction: column; }
      .dashboard-todo-heading, .todo-item { grid-template-columns: 1fr; }
      .dashboard-todo-heading { flex-direction: column; }
      .todo-filters { width: 100%; }
      .todo-filters button { flex: 1; }
      .todo-kind-icon { display: none; }
      .todo-item .button-link { justify-self: start; }
      .avatar-editor-summary, .account-readonly-grid { grid-template-columns: 1fr; }
      .registration-batch-list { grid-template-columns: 1fr; }
      #caseListPage .panel > .actions[style] { align-items: stretch; }
      #caseListPage .panel > .actions[style], #caseListPage .panel > .actions[style] > .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
      #caseListPage .panel > .actions[style] input, #caseListPage .panel > .actions[style] select, #caseListPage .panel > .actions[style] button { width: 100% !important; max-width: none !important; }
      #cohortMembersSection .workspace-heading { display: grid; grid-template-columns: 1fr; gap: 12px; }
      #cohortMembersSection .workspace-heading > .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
      #cohortMembersSection .workspace-heading > .actions button { width: 100%; }
      #cohortMembersSection .role-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
      #cohortMembersSection .role-switch button { width: 100%; }
      .session-page-nav { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 14px; overflow: visible; }
      .session-page-nav button { width: 100%; min-width: 0; padding: 7px 5px; white-space: normal; }
      .admin-responsive-table-wrap { max-height: none; overflow: visible; border: 0; background: transparent; }
      .admin-responsive-table,
      .admin-responsive-table tbody,
      .admin-responsive-table tbody tr { display: block; width: 100%; }
      .admin-responsive-table { min-width: 0 !important; table-layout: auto; border: 0; }
      .admin-responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
      }
      .admin-responsive-table tbody { display: grid; gap: 12px; }
      .admin-responsive-table tbody tr { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(17, 24, 39, .05); }
      .admin-responsive-table tbody th,
      .admin-responsive-table tbody td { display: grid; grid-template-columns: minmax(92px, 32%) minmax(0, 1fr); gap: 10px; align-items: start; width: 100% !important; padding: 10px 0; border-bottom: 1px solid #edf1f6; background: transparent !important; overflow-wrap: anywhere; word-break: normal; }
      .admin-responsive-table tbody th:last-child,
      .admin-responsive-table tbody td:last-child { border-bottom: 0; }
      .admin-responsive-table tbody th::before,
      .admin-responsive-table tbody td::before { content: attr(data-mobile-label); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.55; }
      .admin-responsive-table .admin-mobile-action-cell { grid-template-columns: minmax(92px, 32%) minmax(0, 1fr); }
      .admin-responsive-table .admin-mobile-action-cell button { display: block; width: 100%; margin: 0 0 8px; white-space: normal; }
      .admin-responsive-table .admin-mobile-action-cell button:last-of-type { margin-bottom: 0; }
      .admin-responsive-table select,
      .admin-responsive-table input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-width: 0; }
      .admin-responsive-table .badge { width: max-content; max-width: 100%; white-space: normal; }
      .admin-responsive-table .admin-mobile-empty-row { padding: 14px; border-style: dashed; box-shadow: none; }
      .admin-responsive-table .admin-mobile-empty-row > * { display: block; padding: 0; border: 0; }
      .admin-responsive-table .admin-mobile-empty-row > *::before { display: none; }
      .responsive-member-list { max-height: none; overflow: visible; border: 0; }
      .responsive-member-table,
      .responsive-member-table tbody,
      .responsive-member-table tr { display: block; width: 100%; }
      .responsive-member-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
      }
      .responsive-member-table tbody { display: grid; gap: 12px; }
      .responsive-member-table tbody tr { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(17, 24, 39, .05); }
      .responsive-member-table tbody td { display: grid; grid-template-columns: minmax(88px, 32%) minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; padding: 10px 0; border-bottom: 1px solid #edf1f6; overflow-wrap: anywhere; }
      .responsive-member-table tbody td:last-child { border-bottom: 0; }
      .responsive-member-table .mobile-cell-label { display: block; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.55; }
      .responsive-member-table .member-action-cell { grid-template-columns: 1fr; gap: 8px; }
      .responsive-member-table .member-action-cell .mobile-cell-label { margin-bottom: 2px; }
      .responsive-member-table .member-action-cell .mobile-cell-value { display: grid; gap: 8px; }
      .responsive-member-table .member-action-cell button { display: block; width: 100%; margin: 0; }
      .responsive-member-table .member-empty-row { display: block; padding: 14px 2px; border: 0; box-shadow: none; }
      .responsive-member-table .member-empty-row td { display: block; border: 0; padding: 0; }
    }
.cohort-invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
  margin: 16px 0;
  border-left: 5px solid var(--primary, #4f46c8);
}
.cohort-invite-card h4,
.cohort-invite-card p { margin: 0; }
.cohort-invite-card .actions { justify-content: flex-end; }
.cohort-invite-card label { min-width: min(100%, 190px); }
.cohort-invite-card input[readonly] {
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cohort-invite-card > :last-child { grid-column: 1 / -1; }
#cohortMemberListPage { display: grid; gap: 16px; }
.cohort-member-tabs {
  align-items: center;
  margin: 0;
  padding: 6px;
  border: 1px solid #cbd8ea;
  border-radius: 12px;
  background: #eef3f9;
}
.cohort-member-tablist {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  width: min(520px, 100%);
  gap: 5px;
}
.cohort-member-tablist button {
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: #40516b;
  font-weight: 800;
}
.cohort-member-tablist button[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(21, 94, 239, .22);
}
.cohort-member-panel-heading { align-items: center; margin: 0; }
.cohort-member-panel-heading h4 { margin: 0; font-size: 19px; }
.cohort-add-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cohort-add-method {
  display: flex;
  min-width: 0;
  min-height: 158px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #fbfcff;
}
.cohort-add-method strong { display: block; margin-bottom: 6px; }
.cohort-add-method p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cohort-add-method button { width: 100%; }
.cohort-invite-card-compact { margin: 4px 0 0; background: #f6f9ff; }
#cohortStudentMemberList .member-action-cell { min-width: 340px; }
#cohortStudentMemberList .member-action-cell .mobile-cell-value,
#cohortTeachingMemberList .member-action-cell .mobile-cell-value { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#cohortStudentMemberList .member-action-cell button,
#cohortTeachingMemberList .member-action-cell button { margin: 0; padding: 7px 10px; white-space: nowrap; font-size: 13px; }
@media (max-width: 760px) {
  .cohort-invite-card { grid-template-columns: 1fr; }
  .cohort-invite-card .actions { justify-content: flex-start; }
  .cohort-add-methods { grid-template-columns: 1fr; }
  .cohort-add-method { min-height: 0; }
  .cohort-invite-card-compact .actions { display: grid; grid-template-columns: 1fr; }
  .cohort-invite-card-compact .actions label,
  .cohort-invite-card-compact .actions button { width: 100%; }
}
@media (max-width: 640px) {
  .cohort-member-tabs { padding: 5px; }
  .cohort-member-tablist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cohort-member-panel-heading { display: flex !important; align-items: center !important; }
  .cohort-member-panel-heading button { width: auto !important; }
  #cohortStudentMemberList .member-action-cell { min-width: 0; }
  #cohortStudentMemberList .member-action-cell .mobile-cell-value,
  #cohortTeachingMemberList .member-action-cell .mobile-cell-value { display: grid; gap: 8px; }
  #cohortStudentMemberList .member-action-cell button,
  #cohortTeachingMemberList .member-action-cell button { width: 100%; }
}
.teacher-video-item-review { display:flex; flex-wrap:wrap; gap:.45rem; align-items:center; margin-top:.55rem; }
.teacher-video-confidence,.teacher-video-review-status { display:inline-flex; align-items:center; border-radius:999px; padding:.18rem .55rem; font-size:.78rem; line-height:1.3; background:#eef2f7; color:#334155; }
.teacher-video-confidence[data-confidence="high"] { background:#dcfce7; color:#166534; }
.teacher-video-confidence[data-confidence="medium"] { background:#fef3c7; color:#92400e; }
.teacher-video-confidence[data-confidence="low"] { background:#fee2e2; color:#991b1b; }
.teacher-video-review-status[data-decision="accepted"] { background:#dcfce7; color:#166534; }
.teacher-video-review-status[data-decision="edited"] { background:#dbeafe; color:#1d4ed8; }
.teacher-video-review-status[data-decision="rejected"] { background:#fee2e2; color:#991b1b; }
.teacher-video-item-review-actions { display:inline-flex; flex-wrap:wrap; gap:.35rem; }
.teacher-video-item-review-actions button { padding:.25rem .55rem; font-size:.78rem; }
.teacher-video-review-summary { border-left:4px solid #2563eb; background:#eff6ff; }
.teacher-video-analysis-view-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin:.8rem 0; padding:.35rem; border-radius:.75rem; background:#eef2f7; }
.teacher-video-analysis-view-tabs button { border:0; background:transparent; }
.teacher-video-analysis-view-tabs button[aria-selected="true"] { background:#fff; color:#1d4ed8; box-shadow:0 1px 4px rgba(15,23,42,.16); }
#teacherVideoAnalysisReport[data-active-analysis-view] [data-analysis-panel] { display:none; }
#teacherVideoAnalysisReport[data-active-analysis-view="workbench"] [data-analysis-panel~="workbench"],
#teacherVideoAnalysisReport[data-active-analysis-view="behavior"] [data-analysis-panel~="behavior"],
#teacherVideoAnalysisReport[data-active-analysis-view="objective"] [data-analysis-panel~="objective"],
#teacherVideoAnalysisReport[data-active-analysis-view="student"] [data-analysis-panel~="student"],
#teacherVideoAnalysisReport[data-active-analysis-view="evidence"] [data-analysis-panel~="evidence"] { display:block; }
.teacher-video-review-queue { display:grid; gap:.65rem; padding-left:1.5rem; }
.teacher-video-review-queue li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.75rem; align-items:center; padding:.7rem; border:1px solid #dbe3ef; border-radius:.65rem; background:#fff; }
@media (max-width:720px) { .teacher-video-review-queue li { grid-template-columns:1fr; } }

/* Goal evidence remains compact until the teacher opens a specific goal or stage. */
.teacher-video-objective-card { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; background: var(--panel); }
.teacher-video-objective-card > summary { padding: 14px; cursor: pointer; overflow-wrap: anywhere; }
.teacher-video-objective-card > summary > span { margin-left: 12px; }
.teacher-video-objective-body { padding: 0 14px 14px; }
.teacher-video-objective-table { width: 100%; min-width: 0 !important; table-layout: fixed; }
.teacher-video-objective-table th:first-child { width: 20%; }
.teacher-video-objective-table th:nth-child(2) { width: 22%; }
.teacher-video-objective-table td, .teacher-video-objective-table th { vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.teacher-video-objective-record { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.teacher-video-objective-record dl { margin: 8px 0; }
.teacher-video-objective-record dt { font-weight: 600; }
.teacher-video-objective-record dd { margin: 0 0 8px; }
.teacher-video-objective-quotes { padding-left: 18px; }
.teacher-video-objective-quotes blockquote { margin: 8px 0; padding-left: 8px; border-left: 3px solid var(--line); white-space: pre-wrap; }
.teacher-video-objective-record .teacher-video-item-review-actions { flex-wrap: wrap; }
.teacher-video-editor-focus-toolbar { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.teacher-video-analysis-edit-section[hidden], .teacher-video-analysis-edit-card[hidden] { display: none !important; }
.teacher-video-analysis-evidence-row select { max-width: 100%; min-width: 0; }
.teacher-video-objective-card summary:focus-visible { outline: 3px solid #8bb3ff; outline-offset: 2px; }
@media (max-width: 600px) {
  .teacher-video-objective-table thead { display: none; }
  .teacher-video-objective-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .teacher-video-objective-table td, .teacher-video-objective-table th { display: block; width: 100% !important; border: 0; padding: 6px; }
  .teacher-video-objective-record { padding: 8px; }
}

.teacher-video-objective-body > .list { max-height: none; overflow: visible; }

/* Everyday teaching tables: goals stay in columns; details open only on request. */
.classroom-toolbar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding: 12px 0; }
.classroom-toolbar label, .classroom-checkbox { display: inline-flex; align-items: center; gap: 8px; }
.classroom-toolbar input, .classroom-checkbox input { width: 20px; height: 20px; }
#teacherVideoAnalysisReport[data-active-analysis-view="knowledge"] [data-analysis-panel="knowledge"] { display: block; }
#teacherVideoAnalysisReport[data-active-analysis-view="knowledge"] .classroom-toolbar { display: none; }
.classroom-knowledge-list { display: grid; gap: 16px; }
.classroom-knowledge-card { border: 1px solid var(--border, #d9e1ec); border-radius: 12px; padding: 16px; min-width: 0; }
.classroom-knowledge-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.classroom-knowledge-heading h4 { margin: 0; overflow-wrap: anywhere; }
.classroom-knowledge-heading button { flex-shrink: 0; min-height: 44px; }
.classroom-knowledge-card summary { cursor: pointer; padding: 12px 0; }
.classroom-knowledge-contents { padding-left: 20px; }
.classroom-knowledge-contents li { margin: 12px 0; }
.classroom-knowledge-contents li > span { display: block; font-size: .9em; color: #64748b; }
.classroom-knowledge-records { display: grid; gap: 8px; }
.classroom-knowledge-records button { text-align: left; white-space: normal; overflow-wrap: anywhere; min-height: 44px; }
.classroom-knowledge-choices { display: grid; gap: 12px; max-height: 360px; overflow: auto; }
.classroom-knowledge-choices label { align-items: flex-start; }
.classroom-knowledge-choices input { flex: 0 0 20px; }
.classroom-table-scroll { max-width: 100%; min-width: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; overscroll-behavior-x: contain; }
.classroom-matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; table-layout: fixed; }
.classroom-matrix th, .classroom-matrix td { width: 190px; min-width: 190px; max-width: 190px; padding: 0; vertical-align: middle; white-space: normal; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.classroom-matrix .classroom-row-heading { position: sticky; left: 0; z-index: 2; width: 140px; min-width: 140px; max-width: 140px; padding: 12px; background: #f5f7fa; box-shadow: 1px 0 var(--line); font-weight: 600; }
.classroom-matrix thead th { background: #f5f7fa; }
.classroom-matrix .classroom-clickable-cell { cursor: pointer; }
.classroom-matrix .classroom-clickable-cell:hover { background: #edf4ff; }
.classroom-cell-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 62px; padding: 12px; border: 0; border-radius: 0; background: transparent; color: var(--text); overflow-wrap: anywhere; text-align: center; }
.classroom-cell-button:hover { background: #edf4ff; }
.classroom-cell-button:focus-visible { outline-offset: -4px; position: relative; z-index: 3; }
.classroom-cell-button .classroom-mark { font-size: 23px; line-height: 1; font-weight: 700; }
.classroom-matrix [data-classroom-status="yes"] .classroom-mark { color: #067647; }
.classroom-matrix [data-classroom-status="maybe"] .classroom-mark { color: #934b0c; }
.classroom-matrix [data-classroom-status="not_seen"] .classroom-mark { color: #667085; }
.classroom-core-label { background: #eaf2ff; color: #174ea6; padding: 3px 7px; border-radius: 4px; font-size: 12px; }
.classroom-matrix small, .classroom-participation { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; font-weight: 400; }
.classroom-matrix [data-student-status="completed"] strong { color: #067647; }
.classroom-matrix [data-student-status="practice"] strong { color: #b42318; }
.classroom-matrix [data-student-status="unknown"] strong { color: #5f6a7d; }
.classroom-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.classroom-next-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.classroom-next-card h4 { margin-top: 0; font-size: 18px; }
.classroom-next-card li { margin-bottom: 16px; }
.classroom-more { padding: 12px; border-top: 1px solid var(--line); }
.classroom-more summary { cursor: pointer; margin-bottom: 12px; }
.classroom-save-message { margin: 0; min-height: 1.5em; }
.classroom-dialog { width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 12px; color: var(--text); box-shadow: var(--shadow); }
.classroom-dialog::backdrop { background: rgb(16 24 40 / 45%); }
.classroom-dialog-form { padding: 22px; display: grid; gap: 16px; }
.classroom-dialog h2 { margin: 0; font-size: 20px; }
.classroom-dialog .dialog-heading { align-items: flex-start; }
.classroom-dialog .dialog-heading button { flex-shrink: 0; min-width: 44px; }
.classroom-dialog fieldset { min-width: 0; display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.classroom-dialog fieldset > label:not(.classroom-checkbox) { display: grid; gap: 6px; }
.classroom-dialog input:not([type="checkbox"]), .classroom-dialog select, .classroom-dialog textarea { width: 100%; min-width: 0; padding: 10px; border: 1px solid #98a2b3; border-radius: 6px; color: var(--text); background: white; }
.classroom-dialog details summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.classroom-dialog-result { margin: 0; font-size: 20px; font-weight: 700; }
.classroom-dialog-actions { position: sticky; bottom: -22px; display: flex; flex-wrap: wrap; gap: 10px; background: white; padding: 12px 0; border-top: 1px solid var(--line); }
.classroom-quotes { margin: 0; padding-left: 22px; }
.classroom-quotes > li { margin: 12px 0; }
.classroom-quotes > li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.classroom-quotes p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.classroom-goal-list { padding: 0; list-style: none; display: grid; gap: 8px; }
.classroom-goal-list button { width: 100%; text-align: left; }
@media (max-width: 600px) {
  .classroom-matrix .classroom-row-heading { width: 112px; min-width: 112px; max-width: 112px; padding: 9px; }
  .classroom-matrix th, .classroom-matrix td { width: 165px; min-width: 165px; max-width: 165px; }
  .classroom-dialog-form { padding: 16px; }
  .classroom-dialog-actions { bottom: -16px; }
}

/* Keep the overview tables alongside inspectable classroom analysis and item review. */
#teacherVideoAnalysisReport[data-active-analysis-view="analysis"] [data-analysis-panel~="analysis"],
#teacherVideoAnalysisReport[data-active-analysis-view="review"] [data-analysis-panel~="review"] { display: block; }
.classroom-review-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #b2ccff; border-radius: 8px; background: #f5f8ff; }
.classroom-analysis-group { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 12px 0; }
.classroom-analysis-group > summary { cursor: pointer; min-height: 36px; font-weight: 700; }
.classroom-analysis-cards { display: grid; gap: 12px; margin-top: 12px; }
.classroom-analysis-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
.classroom-analysis-card p { white-space: pre-wrap; line-height: 1.7; }
.classroom-analysis-heading, .classroom-analysis-card-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.classroom-analysis-heading h4 { flex: 1 1 200px; margin: 0; }
.classroom-analysis-heading > span { color: var(--muted); font-size: 13px; }
.classroom-review-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.classroom-review-filter select { max-width: 100%; min-height: 44px; }
.classroom-related-analysis button { display: block; width: 100%; margin: 8px 0; text-align: left; white-space: normal; }
.classroom-review-dialog p { white-space: pre-wrap; overflow-wrap: anywhere; }
.classroom-review-dialog h3 { margin: 0; font-size: 17px; }
.classroom-review-dialog details[open] > fieldset { margin: 12px 0; }
.classroom-review-dialog details[open] > button { margin: 4px 4px 4px 0; }
.classroom-review-player:empty { display: none; }
.classroom-review-player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 240px; background: #101828; border-radius: 8px; }
.classroom-review-state { margin: 0; color: var(--muted); }
#teacherVideoAnalysisReport[data-active-analysis-view="analysis"] .classroom-toolbar,
#teacherVideoAnalysisReport[data-active-analysis-view="review"] .classroom-toolbar { display: none; }

.classroom-time-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.classroom-time-buttons button { min-height: 44px; color: #174ea6; white-space: nowrap; font-size: 14px; }
.classroom-time-buttons small { flex-basis: 100%; }

.classroom-task-progress { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0; }
.classroom-progress-summary { color: #174ea6; }

/* Stable-width teaching records on phones, including 320px layouts. */
#cohortOverviewSection .workspace-stack,
#cohortOverviewSection .section-card,
#teachingWorkspace, #twDialog .dialog-body { min-width: 0; }
#teachingWorkspace { margin-top: 16px; padding: 0; overflow-wrap: anywhere; }
#teachingWorkspace > details { margin-top: 16px; }
#teachingWorkspace summary { cursor: pointer; min-height: 36px; font-weight: 600; }
#teachingWorkspace .workspace-heading { flex-wrap: wrap; }
#teachingWorkspace .workspace-heading > div { flex: 1 1 240px; min-width: 0; }
#teachingWorkspace .list { max-width: 100%; overflow-x: auto; }
#teachingWorkspace button { white-space: normal; max-width: 100%; }
#twDialog input, #twDialog select, #twDialog textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
#twDialog .review-content, #twDialog li { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  #cohortOverviewSection .workspace-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  #cohortOverviewSection .cohort-chart-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 6px; }
  #teachingWorkspace { padding: 0; }
  #twDialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); padding: 0; }
  #twDialog .dialog-body { padding: 12px; }
  #twDialog .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Shared resource center */
.resource-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin:16px 0; }
.resource-toolbar > div:first-child { flex:1; }
.resource-toolbar label { display:grid; gap:6px; }
.resource-toolbar h2 { margin:0; }
.resource-form { display:grid; gap:10px; max-width:720px; }
.resource-form textarea { width:100%; }
.resource-description { white-space:pre-wrap; overflow-wrap:anywhere; }
#resourceList td, #resourceDetail { overflow-wrap:anywhere; }
#resourceDetail video { width:100%; max-height:480px; background:#111; }
#resourceDetail audio { width:100%; }
.resource-download { display:inline-block; margin:4px; }

/* Keep the class name and homework controls above the first student rows. */
.cohort-title-row { display:flex; align-items:center; flex-wrap:wrap; gap:14px; min-width:0; }
.cohort-title-row #cohortDetailTitle { margin:0; font-size:20px; overflow-wrap:anywhere; }
.tw-filterbar { display:grid; grid-template-columns:minmax(120px,1fr) minmax(180px,1.6fr) minmax(110px,.8fr) minmax(120px,1fr) auto; align-items:end; gap:12px; }
.tw-filterbar label { display:grid; gap:5px; min-width:0; }
.tw-filterbar input, .tw-filterbar select { width:100%; min-width:0; }
.tw-filter-actions { flex-wrap:nowrap; padding-bottom:1px; }
#twRosterSummary { margin:10px 0; }
#twMessage:empty { display:none; }
@media (max-width:1100px) { .tw-filterbar { grid-template-columns:repeat(2,minmax(0,1fr)); } .tw-filter-actions { grid-column:1 / -1; justify-content:flex-end; } }
@media (max-width:520px) { .tw-filterbar { gap:8px; } .cohort-title-row { gap:8px; } .cohort-title-row #cohortDetailTitle { font-size:18px; } }

.assignment-attachment { margin: 12px 0; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; }
.assignment-attachment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
.assignment-attachment-heading button { flex-shrink: 0; }
.assignment-attachment-preview { display: block; max-width: 100%; width: 100%; }
img.assignment-attachment-preview, video.assignment-attachment-preview { max-height: 420px; object-fit: contain; }
iframe.assignment-attachment-preview { height: 360px; border: 1px solid #e2e8f0; background: white; }
.assignment-attachment-preview[hidden] { display: none; }
iframe.assignment-text-preview { height: 180px; }

/* Cohort lists use the document scrollbar, including on narrow screens. */
#cohortListPanel .cohort-list-table { max-height: none; overflow: visible; }
#cohortListPanel table { table-layout: fixed; }
#cohortListPanel th, #cohortListPanel td { overflow-wrap: anywhere; }
#cohortListPanel th:first-child { width: 28%; }
.cohort-list-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 16px 0; }
.cohort-list-filters > label { margin: 0; min-width: 130px; }
.cohort-list-filters > label:first-child { flex: 1 1 240px; }
@media (max-width: 640px) {
  .cohort-list-filters > label { flex: 1 1 140px; min-width: 0; }
  .cohort-list-filters > .actions { width: 100%; }
}

/* Keep actual teaching notes visible together without hiding optional fields. */
.session-info-grid { grid-template-columns:minmax(250px,.55fr) minmax(0,1.45fr); gap:12px; }
#cohortTeachingRecordForm.compact-teaching-record { grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px 10px; padding:14px; }
.compact-teaching-record > label,.compact-teaching-record > .cohort-help-field,.compact-teaching-record > .teaching-attendance-summary { grid-column:span 2; min-width:0; }
.compact-teaching-record > label { display:grid; align-content:start; gap:4px; }
.compact-teaching-record > .teaching-half { grid-column:span 3; }
.compact-teaching-record > .full { grid-column:1 / -1; }
.compact-teaching-record h5 { margin:0 0 2px; }
.compact-teaching-record input,.compact-teaching-record select { min-width:0; padding:7px 9px; }
.compact-teaching-record textarea { min-height:64px; height:64px; padding:7px 9px; }
.compact-teaching-record .quick-choice-group { padding:5px 8px 8px; }
.compact-teaching-record .quick-choice-options { gap:4px 10px; }
.compact-teaching-record .quick-choice-options label { font-size:13px; }
.compact-teaching-record .field-help { font-size:12px; }
.compact-teaching-record > .muted { margin:0; font-size:12px; }
.compact-teaching-record > .teaching-attendance-summary { align-self:center; line-height:1.7; }
.compact-teaching-record .teaching-save-bar { margin:4px -14px -14px; padding:9px 14px; gap:8px; }
#cohortMeetingForm.compact-setting-card { gap:8px; padding:14px; }
#cohortMeetingForm.compact-setting-card h5 { margin:0 0 2px; }
#cohortMeetingForm.compact-setting-card input,#cohortMeetingForm.compact-setting-card select { padding:7px 9px; }
#cohortMeetingForm.compact-setting-card textarea { min-height:64px; height:64px; padding:7px 9px; }
@media (max-width:1199px) {
  .session-info-grid { grid-template-columns:minmax(0,1fr); }
  #cohortMeetingForm.compact-setting-card { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #cohortMeetingForm.compact-setting-card > .full { grid-column:auto; }
  #cohortMeetingForm.compact-setting-card > h5,#cohortMeetingForm.compact-setting-card > .actions,#cohortMeetingForm.compact-setting-card > p { grid-column:1 / -1; }
}
@media (max-width:767px) {
  #cohortTeachingRecordForm.compact-teaching-record { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .compact-teaching-record > label,.compact-teaching-record > .cohort-help-field,.compact-teaching-record > .teaching-half,.compact-teaching-record > .teaching-attendance-summary { grid-column:span 1; }
  #cohortMeetingForm.compact-setting-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
  #cohortTeachingRecordForm.compact-teaching-record,#cohortMeetingForm.compact-setting-card { grid-template-columns:minmax(0,1fr); }
  .compact-teaching-record > label,.compact-teaching-record > .cohort-help-field,.compact-teaching-record > .teaching-half,.compact-teaching-record > .teaching-attendance-summary { grid-column:1 / -1; }
}

/* Per-student session registration, with existing profile and homework context. */
.student-session-dialog { width:min(1060px,calc(100vw - 32px)); }
.student-session-dialog .dialog-body { gap:10px; }
.student-session-dialog .learner-performance-dialog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 12px; }
.student-session-dialog .learner-performance-dialog-grid > label { display:grid; align-content:start; min-width:0; gap:4px; }
.student-session-dialog .learner-performance-dialog-grid input,.student-session-dialog .learner-performance-dialog-grid select { padding:7px 9px; }
.student-session-dialog .learner-performance-dialog-grid textarea { min-height:64px; height:64px; padding:7px 9px; }
.student-session-dialog h3 { margin:4px 0; font-size:16px; }
.student-session-profile { padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:#f8fafc; }
.student-session-profile summary { cursor:pointer; }
.student-session-profile dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:12px 0; }
.student-session-profile dt { color:var(--muted); font-size:12px; }
.student-session-profile dd { margin:2px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.student-session-homework { border-top:1px solid var(--line); padding-top:8px; }
.student-session-homework > .workspace-heading { margin-bottom:8px; }
.student-session-homework-item { padding:10px 12px; border:1px solid var(--line); border-radius:8px; margin:8px 0; }
.student-session-homework-item .workspace-heading { margin:0 0 6px; gap:8px; }
.student-session-homework-item select { max-width:300px; padding:6px 8px; }
.student-session-text { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
.student-session-save-bar { position:sticky; bottom:-20px; background:#fff; z-index:2; border-top:1px solid var(--line); padding:10px 0; }
[data-learner-homework-summary] { margin:6px 0 0; font-size:12px; }
@media(max-width:767px) {
  .student-session-dialog .learner-performance-dialog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .student-session-profile dl { grid-template-columns:1fr; }
}
@media(max-width:520px) {
  .student-session-dialog { width:calc(100vw - 20px); }
  .student-session-dialog .learner-performance-dialog-grid { grid-template-columns:1fr; }
  .student-session-save-bar { bottom:-14px; }
}

/* Classroom sheet facts stay readable in the student table. */
.learner-performance-table .learner-fact{white-space:pre-wrap;overflow-wrap:anywhere;max-width:34rem;margin:.35rem 0;line-height:1.6}.learner-performance-table [data-learner-recorded-homework]:not(:empty){border-top:1px solid #dce4ed;margin-top:.65rem;padding-top:.65rem}.classroom-import-panel{margin:0 0 1rem}.classroom-import-panel .actions{margin-top:.5rem}

.learner-performance-table .learner-fact{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.learner-performance-table th,.learner-performance-table td{vertical-align:top}.learner-performance-table th:nth-child(1){width:12%}.learner-performance-table th:nth-child(2){width:11%}.learner-performance-table th:nth-child(3){width:10%}.learner-performance-table th:nth-child(4){width:23%}.learner-performance-table th:nth-child(5){width:31%}.learner-performance-table th:nth-child(6){width:13%}

/* Template-only columns stay hidden when mobile tables become block layouts. */
.learner-performance-table th[hidden], .learner-performance-table td[hidden] { display: none !important; }

/* Native disclosure keeps publication details out of the initial reading order. */
.cohort-publish-notice { padding: 0; }
.cohort-publish-notice > summary { cursor: pointer; padding: 14px 16px; min-height: 44px; font-weight: 600; }
.cohort-publish-notice > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
.cohort-publish-hint { display: inline-block; margin-left: 12px; color: var(--primary-strong); font-weight: 400; }
.cohort-publish-details { padding: 0 16px 16px; }
.cohort-publish-details h4 { margin: 16px 0 8px; }
.cohort-publish-details li { margin-bottom: 8px; }

/* Keyboard date entry with a visible native calendar action. */
.cohort-date-input { font-variant-numeric: tabular-nums; direction: ltr; text-align: left; }
.cohort-date-control { display:flex; align-items:center; position:relative; min-width:0; gap:4px; }
.cohort-date-control > .cohort-date-input { flex:1; width:0; min-width:0; }
.cohort-date-control > .cohort-date-button { display:flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; min-height:36px; padding:6px; color:#334155; background:#fff; }
.cohort-date-button svg { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.cohort-date-control > .cohort-date-native { position:absolute; width:1px; height:1px; padding:0; border:0; opacity:0; pointer-events:none; }
.cohort-date-control > .cohort-date-native-fallback { top:100%; left:0; width:100%; height:auto; padding:8px; opacity:1; pointer-events:auto; background:#fff; z-index:20; border:1px solid #64748b; }
.cohort-date-button[hidden] { display:none; }
.cohort-required { color:#b42318; font-weight:700; }

/* Cohort help: one keyboard-operable information icon, hidden prose until expanded. */
.cohort-help { min-width:0; margin:0; border:0; padding:0; }
.cohort-help > summary { display:inline-flex; align-items:center; justify-content:center; width:24px; min-height:24px; padding:0; border:0; border-radius:4px; color:#475569; background:transparent; cursor:pointer; list-style:none; font-size:16px; font-weight:400; line-height:1; }
.cohort-help > summary::-webkit-details-marker { display:none; }
.cohort-help > summary:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
.cohort-help[open] > summary { background:#eef4ff; }
.cohort-help > [data-cohort-help], .cohort-help > .cohort-publish-details { margin:8px 0 0; padding:12px; border-left:3px solid #64748b; background:#f5f7fa; color:#334155; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.cohort-help-field { min-width:0; display:grid; grid-template-columns:minmax(0,max-content) minmax(24px,1fr); column-gap:4px; row-gap:6px; position:relative; align-content:start; }
.cohort-help-field > label { display:contents; margin:0; }
.cohort-help-field > label > * { grid-column:1 / -1; }
.cohort-help-field > label > .cohort-field-title { grid-column:1; grid-row:1; align-self:center; }
.cohort-help-field > .cohort-help { grid-column:2; grid-row:1; align-self:center; }
.cohort-help-field > .cohort-help > [data-cohort-help] { position:absolute; left:0; top:28px; z-index:30; width:min(360px,100%); box-sizing:border-box; box-shadow:0 4px 16px #0f172a26; }
.cohort-help[hidden], .cohort-help-field[hidden] { display:none !important; }

/* Writing first, then a single Tab stop for formatting and preview controls. */
.markdown-field > .rich-toolbar { border-top:1px solid #d5dbe4; border-bottom:0; }
.rich-toolbar button:focus-visible { outline:3px solid var(--primary); outline-offset:1px; background:#eaf1ff; }
.markdown-source:focus-visible, .markdown-canvas:focus-visible { outline:3px solid var(--primary); outline-offset:-3px; }

.rich-toolbar .upload-tool { padding:0; min-height:0; min-width:0; }
.rich-toolbar .upload-tool input[hidden] { display:none; }

/* Course outline: fixed disclosure column, nested lists, and quiet row actions. */
.course-outline-panel { min-width: 0; padding: 14px 10px; gap: 8px; }
.course-outline-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.course-outline-heading h3 { margin: 0; font-size: 16px; }
.course-outline-heading .outline-skip { border: 0; padding: 5px 4px; font-size: 12px; color: var(--primary); background: transparent; }
.course-outline-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); }
.course-outline-toolbar button { padding: 6px 9px; font-size: 13px; min-height: 34px; }
#structureTree { display: block; padding: 2px; max-height: 72vh; overflow-y: auto; overflow-x: hidden; }
#structureTree ul { list-style: none; margin: 0; }
#structureTree .course-outline { padding: 0; }
#structureTree li { min-width: 0; }
#structureTree .tree-node { display: block; }
#structureTree .tree-chapter + .tree-chapter { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e9edf3; }
#structureTree .tree-node-header, #structureTree .tree-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 30px; align-items: start; gap: 2px; position: relative; border-radius: 5px; }
#structureTree .tree-node-header:hover, #structureTree .tree-row:hover { background: #f4f7fb; }
#structureTree .tree-node-children { display: block; margin: 0 0 0 13px; padding: 0 0 0 13px; border-left: 1px solid #cbd5e1; }
#structureTree .tree-node-children[hidden] { display: none; }
#structureTree .tree-node-children > li { position: relative; }
#structureTree .tree-node-children > li::before { content: ''; position: absolute; left: -13px; top: 20px; width: 11px; border-top: 1px solid #cbd5e1; }
#structureTree [data-tree-select] { min-width: 0; width: 100%; border: 0; background: transparent; box-shadow: none; border-radius: 4px; padding: 7px 5px; line-height: 1.45; }
#structureTree [data-tree-select].active { background: #eaf2ff; color: #104da8; box-shadow: inset 3px 0 0 var(--primary); }
#structureTree .tree-label-line { display: flex; align-items: baseline; gap: 6px; }
#structureTree .tree-label-line strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; }
#structureTree .tree-item strong { font-size: 15px; font-weight: 700; }
#structureTree .tree-subitem strong { font-weight: 600; }
#structureTree .tree-kind { flex: none; font-size: 11px; font-weight: 500; color: #53657c; }
#structureTree .tree-kind-module { color: #1859a7; }
#structureTree .tree-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
#structureTree .tree-toggle { width: 28px; min-width: 28px; height: 34px; margin-top: 2px; padding: 0; border: 0; background: transparent; color: #52647b; font-size: 17px; }
#structureTree .tree-leaf-mark { width: 5px; height: 5px; border-radius: 50%; background: #a1adbd; margin: 17px auto 0; }
#structureTree .tree-actions { display: block; grid-column: 1 / -1; min-width: 0; }
#structureTree .tree-actions > summary { position: absolute; top: 2px; right: 0; list-style: none; width: 30px; min-height: 34px; border-radius: 4px; cursor: pointer; display: grid; place-items: center; color: #52647b; font-size: 21px; }
#structureTree .tree-actions > summary::-webkit-details-marker { display: none; }
#structureTree .tree-actions > summary:focus-visible { outline: 3px solid #8bb3ff; outline-offset: -2px; }
#structureTree .tree-actions[open] > summary, #structureTree .tree-toggle:hover { background: #e8eef6; }
#structureTree .tree-actions > .tree-action-menu { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin: 0 0 5px 30px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; }
#structureTree .tree-actions:not([open]) > .tree-action-menu { display: none; }
#structureTree .tree-action-menu button { padding: 6px 8px; min-height: 32px; font-size: 12px; }
#structureTree .tree-empty { padding: 10px 5px; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  #structureTree { max-height: 48vh; }
  #structureTree .tree-node-children { margin-left: 11px; padding-left: 10px; }
  #structureTree .tree-node-children > li::before { left: -10px; width: 8px; }
}

@media (max-width: 1100px) {
  .course-outline-layout { grid-template-columns: minmax(0, 1fr); }
}
