.context-field { display: grid; gap: 3px; font-size: 10px; color: var(--muted); }
.context-field select { max-width: 200px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: white; color: var(--ink); }
.workspace-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.workspace-actions button { text-align: left; cursor: pointer; }
.workspace-actions small,.lesson-assignment small { display: block; margin-top: 6px; }
.workspace-section { padding: 22px; }
.lesson-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lesson-assignment { display: block; width: 100%; text-align: left; margin-bottom: 8px; cursor: pointer; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.lesson-projector { position: fixed; inset: 0; z-index: 10000; background: #fff; color: #153d50; padding: 5vh 7vw; overflow: auto; font-size: clamp(18px,2vw,30px); }
.lesson-projector h1 { font-size: clamp(32px,4vw,64px); }
.lesson-projector > button { float: right; }
.projector-address { font-size: 1.3em; font-weight: 700; margin-top: 2em; }
.assignment-settings { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.assignment-settings summary { cursor: pointer; font-weight: 700; }
.assignment-settings[open] summary { margin-bottom: 14px; }
.assignment-helper { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.student-work-preview { max-width: 760px; margin: auto; }
.clickable-total { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 5px; }
.gradebook-table [hidden] { display: none !important; }
.roster-preview-table { max-height: 360px; overflow: auto; }
.teacher-page .timeline-item[role=button] { cursor: pointer; }
.homework-item .source-icon { width: 80px; font-size: 11px; }
.teacher-page .assignment-tabs { display:flex;gap:8px;margin-bottom:22px;flex-wrap:wrap; }
.teacher-page .assignment-tabs button { border:1px solid var(--line);border-radius:12px;padding:12px 18px;background:#fff;color:var(--ink);font:inherit;cursor:pointer; }
.teacher-page .assignment-tabs button[aria-selected=true] { background:var(--navy,#112749);color:#fff; }
.teacher-page .diagnostic-layout { grid-template-columns:minmax(0,1fr); }
.teacher-page .diagnostic-runs-panel .source-list { display:flex;overflow-x:auto; }
.teacher-page .diagnostic-runs-panel .source-row { min-width:260px;flex:1; }
.teacher-page .diagnostic-runs-panel .notice { margin:12px 18px; }
.teacher-page .diagnostic-monitor { min-width:0;overflow:hidden; }
.teacher-page .diagnostic-table-wrap { max-height:65vh;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-gutter:stable; }
.teacher-page .diagnostic-table { width:max-content;min-width:100%;border-collapse:separate;border-spacing:0; }
.teacher-page .diagnostic-table thead th { position:sticky;top:0;z-index:2;background:#edf2f8;min-width:115px; }
.teacher-page .diagnostic-table th:first-child { position:sticky;left:0;min-width:200px;width:200px;max-width:240px;background:#fff;box-shadow:3px 0 6px #10254d18;z-index:3; }
.teacher-page .diagnostic-table thead th:first-child { z-index:4;background:#edf2f8; }
.teacher-page .diagnostic-table tbody th strong { display:block;white-space:normal; }
.teacher-page .diagnostic-table tbody th small { white-space:normal; }
.teacher-page .diagnostic-table th .link-button { display:block;margin-top:8px; }
.teacher-page .diagnostic-cell { padding:0;min-width:115px; }
.teacher-page .diagnostic-cell > button { display:grid;gap:4px;min-height:90px;width:100%;padding:9px 7px;background:transparent;border:0;color:inherit;cursor:pointer;text-align:center;font:inherit; }
.teacher-page .diagnostic-cell > button > span { font-size:11px; }
.teacher-page .diagnostic-cell > button > small { font-size:10px; }
.teacher-page .diagnostic-result--correct { background:#e7f4ed;color:#17633e; }
.teacher-page .diagnostic-result--incorrect { background:#fff0f0;color:#a63036; }
.teacher-page .diagnostic-result--partial,.teacher-page .review-number--partial { background:#fff5dc;color:#795613;border-color:#e7c47e; }
.teacher-page .diagnostic-result--manual_review { background:#eef3fb;color:#365481; }
.teacher-page .diagnostic-result--no_answer,.teacher-page .diagnostic-result--not_seen { background:#f7f8fa;color:#687588; }
.teacher-page .diagnostic-help { padding:0 18px;font-size:12px;color:var(--muted); }
.teacher-page .diagnostic-legend { flex-wrap:wrap; }
.teacher-page .diagnostic-legend > span { border-radius:7px;padding:5px 8px; }
.teacher-page .diagnostic-scroll-controls { display:flex;gap:10px;justify-content:space-between;align-items:center;padding:8px 16px;font-size:12px; }
.teacher-page .diagnostic-top-scroll { overflow-x:scroll;overflow-y:hidden;height:22px;margin:0 16px; }
.teacher-page .diagnostic-top-scroll > div { height:1px; }
.teacher-page .diagnostic-top-scroll::-webkit-scrollbar { height:12px; }
.teacher-page .diagnostic-top-scroll::-webkit-scrollbar-thumb { background:#8295b0;border-radius:8px; }
.teacher-page .diagnostic-top-scroll::-webkit-scrollbar-track { background:#e8eef5; }
.teacher-page .review-layout { grid-template-columns:minmax(300px,390px) minmax(0,1fr);align-items:start; }
.teacher-page .review-queue-panel { min-width:0;position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto; }
.teacher-page .review-queue-toolbar { display:grid;gap:12px;padding:14px; }
.teacher-page .review-queue-toolbar .row { flex-wrap:wrap;gap:10px; }
.teacher-page .review-queue-toolbar label { font-size:12px;display:flex;gap:6px;align-items:center; }
.teacher-page .review-queue-table { width:100%;border-collapse:collapse;font-size:12px; }
.teacher-page .review-queue-table th { text-align:left;padding:9px 6px;font-size:10px;color:var(--muted);background:#f3f6fa; }
.teacher-page .review-queue-table td { vertical-align:top;padding:10px 6px;border-top:1px solid var(--line); }
.teacher-page .review-queue-table tr.is-active { background:#edf3ff;box-shadow:inset 3px 0 #245599; }
.teacher-page .review-queue-table td:first-child { width:28px;padding-left:12px; }
.teacher-page .review-queue-table input[type=checkbox],.teacher-page #review-select-all { width:18px;height:18px;accent-color:#234b85; }
.teacher-page .review-queue-open { border:0;display:grid;gap:5px;width:100%;text-align:left;background:transparent;color:var(--ink);font:inherit;cursor:pointer; }
.teacher-page .review-queue-table small { display:block;font-size:10px;color:var(--muted);margin-top:4px; }
.teacher-page .review-queue-table .pill { white-space:normal;font-size:10px;padding:4px; }
.teacher-page .review-queue-table td:last-child { width:72px; }
.teacher-page #review-next-unreviewed,.teacher-page #review-reopen-confirmed { margin-top:14px; }
.teacher-page :is(.diagnostic-cell button,.diagnostic-table-wrap,.diagnostic-top-scroll,.review-queue-open,.assignment-tabs button):focus-visible { outline:3px solid #436cb8;outline-offset:-3px; }
@media(max-width:1100px) { .teacher-page .review-layout { grid-template-columns:1fr; }.teacher-page .review-queue-panel { position:static;max-height:440px; }.teacher-page .review-queue-table td:last-child { width:100px; } }
@media(max-width:650px) { .teacher-page .diagnostic-table th:first-child { min-width:145px;width:145px;max-width:145px; }.teacher-page .diagnostic-table-wrap { max-height:62vh; }.teacher-page .diagnostic-scroll-controls > span { display:none; }.teacher-page #teacher-back { margin-left:auto; } }
@media(max-width:1100px) { .teacher-topbar { height: auto; min-height: 78px; flex-wrap: wrap; padding: 12px 18px; } .teacher-topbar .topbar-actions { flex-wrap: wrap; } .workspace-actions { grid-template-columns: 1fr 1fr; } }
@media(max-width:650px) { .lesson-columns,.workspace-actions { grid-template-columns: 1fr; } .context-field select { max-width: 170px; } .teacher-topbar .topbar-actions { width:100%; } .workspace-section { padding:14px; } }
.revision-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
#cumulative-grade-table td > small { display: block; margin-top: .3rem; white-space: normal; line-height: 1.45; }
.revision-comparison > section { min-width: 0; padding: 1rem; border: 1px solid var(--border, #d7dee5); border-radius: .75rem; overflow-wrap: anywhere; }
.revision-comparison pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.modal .table-wrap { max-width: 100%; overflow: auto; }
.modal .data-table td { vertical-align: top; }
.modal .data-table textarea { min-width: 12rem; width: 100%; }
.modal .data-table input[type="number"] { width: 6rem; }
[data-choice-rows] > .row textarea { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .revision-comparison { grid-template-columns: minmax(0, 1fr); }
  [data-choice-rows] > .row { flex-wrap: wrap; }
  [data-choice-rows] > .row textarea { flex-basis: 100%; }
}

/* File uploads remain accessible from the first assignment screen. */
.source-dropzone {border:2px dashed #bdcce5;border-radius:12px;padding:20px;background:#f7faff;min-width:0;}
.source-dropzone.is-dragging {border-color:#315dcc;background:#eaf0ff;}
.source-dropzone input {max-width:100%;}
.source-upload-row {display:flex;align-items:center;gap:12px;padding:10px;border-bottom:1px solid #e3e8f0;}
.source-upload-row > span {flex:1;min-width:0;overflow-wrap:anywhere;}
.source-upload-row small,.source-picker small {display:block;}
.source-picker {max-height:380px;overflow:auto;}
.assignment-materials {min-width:0;}
.assignment-materials .notice {overflow-wrap:anywhere;}
.assignment-settings > .stack {margin-top:16px;}
.assignment-delivery [data-delivery-items] {max-height:340px;overflow:auto;}
@media (max-width:600px) {.source-upload-row {flex-wrap:wrap;}.source-dropzone {padding:12px;}}

#page-sources .source-item {grid-template-columns:auto auto minmax(0,1fr) auto auto;}
#page-sources .source-filters {grid-template-columns:170px minmax(160px,1fr) 150px 170px;}
#page-sources .panel > .toolbar-actions {padding:14px;}
@media (max-width:900px) {
  #page-sources .source-filters {grid-template-columns:1fr 1fr;}
  #page-sources .source-item {grid-template-columns:auto minmax(0,1fr) auto;}
  #page-sources .source-icon {display:none;}
  #page-sources .source-item .pill {grid-column:2;justify-self:start;}
  #page-sources .source-item > button {grid-column:3;grid-row:1;}
}
@media (max-width:600px) {#page-sources .source-filters {grid-template-columns:1fr;}}
