.classwork-mode { letter-spacing: 0; }
.classwork-mode .workspace { min-width: 0; }
.classwork-mode button img, .classwork-mode a.secondary-button img { width: 18px; height: 18px; flex: 0 0 18px; }
.classwork-mode a.secondary-button { text-decoration: none; }
.classwork-mode .primary-button, .classwork-mode .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; padding: 10px 14px; }
.classwork-mode h3 { font-size: 20px; margin: 0 0 12px; overflow-wrap: anywhere; }
.classwork-mode #pageMessage:not(:empty) { margin-bottom: 20px; }
.classwork-start { max-width: 820px; padding: 24px 0; border-top: 1px solid var(--line); }
.classwork-start .primary-button { justify-self: start; }
.classwork-start h3 { margin-bottom: 0; }
.classwork-quiz-heading, .classwork-report-heading, .classwork-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 20px 0; }
.classwork-quiz-heading h3 { font-size: 24px; }
.classwork-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin: 14px 0; }
.classwork-identity strong { font-size: 24px; }
.classwork-identity span { font-size: 18px; }
.classwork-progress { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; background: var(--canvas); border-block: 1px solid var(--line); }
.classwork-section-picker { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.classwork-section-picker select { width: 220px; max-width: 100%; }
.classwork-section { border-bottom: 1px solid var(--line); padding: 28px 0 4px; scroll-margin-top: 110px; }
.classwork-section h3 { font-size: 18px; }
.classwork-question { border: 0; padding: 20px 0; margin: 0; min-width: 0; }
.classwork-question legend { font-weight: 650; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; max-width: 100%; padding: 0; }
.classwork-question pre { padding: 14px 16px; border-left: 3px solid var(--accent); background: #edf1f2; margin: 10px 0 14px; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.classwork-choices { display: grid; gap: 8px; margin-top: 10px; }
.classwork-option { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; background: #fff; min-width: 0; line-height: 1.6; }
.classwork-option:has(input:checked) { border-color: var(--accent); background: #eaf5f2; }
.classwork-option input[type=radio] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; padding: 0; margin: 3px 0 0; accent-color: var(--accent); }
.classwork-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.classwork-option span { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.classwork-option code { font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.classwork-submit { display: flex; justify-content: flex-end; padding: 24px 0; }
.classwork-completed { text-align: center; padding: 80px 0; }
.classwork-completed > img { width: 44px; height: 44px; margin-bottom: 20px; }
.classwork-completed h3 { font-size: 28px; margin-bottom: 32px; }
.classwork-filters { display: grid; grid-template-columns: 160px minmax(200px, 1fr); gap: 16px; flex: 1; max-width: 800px; min-width: 0; }
.classwork-toolbar { align-items: end; }
.classwork-report-heading { padding-top: 22px; border-top: 1px solid var(--line); }
.classwork-report-heading .header-actions { flex-wrap: wrap; }
.classwork-open-label { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 42px; }
.classwork-open-label input { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: var(--accent); }
.classwork-results { min-width: 900px; }
.classwork-results th:nth-child(1) { width: 70px; }
.classwork-results td { font-variant-numeric: tabular-nums; }
.classwork-synced { color: #0b6552; }
.classwork-conflict { color: #934c0b; }
.classwork-mode .icon-button { display: inline-grid; place-items: center; flex: 0 0 40px; }
.classwork-mode dialog { width: min(460px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
@media (max-width: 900px) {
  .classwork-report-heading { flex-direction: column; }
  .classwork-toolbar { flex-wrap: wrap; }
  .classwork-filters { flex-basis: 100%; max-width: none; }
}
@media (max-width: 760px) {
  .classwork-mode .sidebar { position: static; }
  .classwork-mode .page-header { flex-wrap: wrap; gap: 12px; }
  .classwork-mode .page-header > div:first-child { flex: 1 0 100%; }
  .classwork-mode .page-header .header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .classwork-mode #teacherIdentity { margin-right: auto; overflow-wrap: anywhere; }
  .classwork-identity { align-items: flex-start; flex-direction: column; gap: 6px; }
  .classwork-progress { align-items: flex-start; flex-direction: column; }
  .classwork-section-picker { width: 100%; }
  .classwork-section-picker select { flex: 1; width: 0; }
  .classwork-filters { grid-template-columns: minmax(0, 1fr); }
  .classwork-quiz-heading h3 { font-size: 22px; }
  .classwork-section { scroll-margin-top: 160px; }
}
