/* Shared screen design system. Print sizing remains in styles.css. */
@media screen {
  :root { --ui-small: .875rem; --ui-body: 1rem; --ui-h3: 1.125rem; --ui-h2: 1.5rem; --ui-border: #718596; --ui-gap: 1rem; }
  body { font-size: var(--ui-body); line-height: 1.55; }
  [hidden] { display: none !important; }
  :where(.step-panel, .resource-panel, .dialog-header, .account-body, .about-card, .about-creator, .about-footer, .example-canvas) { min-width: 0; overflow-wrap: break-word; }
  :where(.form-grid, .instruction-grid, .monitoring-grid, .ml-grid, .standard-meta) > * { min-width: 0; }
  .section-heading { grid-template-columns: 1fr; align-items: start; gap: .65rem; }
  .section-heading h2, .dialog-header h2, .resources-dialog .dialog-header h2, .guide-dialog .dialog-header h2, .document-dialog .dialog-header h2, .about-card h2, .about-creator h2, .about-connections h2 { font-size: var(--ui-h2); line-height: 1.3; font-weight: 750; margin: .25rem 0 0; }
  .section-heading p { max-width: 65ch; }
  .subsection h3, .instruction-card h3, .info-card h3, .language-card h3, .readiness-heading h3, .walkthrough h2 { font-size: var(--ui-h3); line-height: 1.35; }
  .field-help, .objective-note, .fine-print, .timeframe-field small, .print-option small, .benchmark-date-label, .ml-optional-body > .field-help, .ml-summary-label small { font-size: var(--ui-small); line-height: 1.5; font-weight: 400; }
  .resource-item-body, .language-card p, .ml-task-focus, .monitor-detail p, .summary-card dd { font-size: var(--ui-body); line-height: 1.55; }
  .eyebrow { font-size: .75rem; line-height: 1.4; letter-spacing: .075em; }
  .optional-tag, .counter, .grade-chip, .grade-fit, .scaffold-type, .inline-support-type { font-size: .8125rem; line-height: 1.4; }
  .ml-optional > summary .optional-tag { font-size: .75rem; }
  :where(input:not([type=checkbox]):not([type=radio]), select, textarea) { max-width: 100%; border: 1px solid var(--ui-border); border-radius: 8px; padding: .7rem .8rem; font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--surface); }
  :where(input:not([type=checkbox]):not([type=radio]), select) { min-height: 48px; }
  :where(button, .button, .template-action, summary) { min-height: 44px; }
  summary { padding-block: .6rem; line-height: 1.4; cursor: pointer; }
  :where(.button, .template-action, .button-secondary) { border-radius: 8px; line-height: 1.4; }
  .button-secondary { border-color: var(--ui-border); }
  .button-primary:hover { background: #24b9ad; box-shadow: inset 0 0 0 2px var(--navy); }
  .icon-button, .resources-dialog .icon-button, .guide-dialog .icon-button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--ui-border); border-radius: 8px; background: var(--surface); font-size: 1.75rem; }
  .dialog-header, .resources-dialog .dialog-header, .guide-dialog .dialog-header, .document-dialog .dialog-header { align-items: start; gap: .75rem; padding: 1rem 1.25rem; }
  .dialog-header > div { min-width: 0; flex: 1; }
  dialog { max-height: calc(100dvh - 2rem); overflow: auto; scroll-padding-block: 8rem 1rem; }
  .resource-panel, .account-body { padding: 1.25rem; }
  .resource-tabs { scroll-padding-inline: .75rem; }
  .resource-tab { font-size: .875rem; padding: .7rem .8rem; }
  .resource-item, .standard-review-item, .scaffold-choice, .wida-level { border-radius: 10px; }
  .resource-item > summary, .standard-review-item > summary, .wida-level > summary { padding: .8rem 1rem; font-size: 1rem; line-height: 1.45; }
  .resource-item-body, .standard-review-item > div, .wida-level > div { padding: 0 1rem 1rem; }
  .resource-item-body > p { margin: .65rem 0; }
  .form-grid { gap: 1.25rem 1rem; }
  .form-grid > label > :where(input, select, textarea) { margin-top: .45rem; }
  .subsection { margin-top: 1.5rem; padding-top: 1.25rem; }
  .subsection-title { flex-wrap: wrap; gap: .5rem .75rem; }
  .subsection-title > div { min-width: 0; flex: 1 1 14rem; }
  .readiness-list { list-style: none; padding: 0; margin-bottom: 0; }
  .readiness-item span:last-child, .readiness-jump { font-size: 1rem; line-height: 1.5; }
  .step-link { align-items: center; gap: .5rem; min-height: 48px; font-size: .875rem; }
  .step-link > span:first-child { flex: 0 0 1.8rem; font-size: .875rem; }
  .step-link .step-name { display: inline; width: auto; height: auto; border-radius: 0; background: transparent; color: inherit; font-size: .875rem; line-height: 1.3; }
  .step-link .sr-only { display: none; }
  .step-link.complete:not(.active) > span:first-child { background: #e5f4f2; border: 2px solid var(--teal); }
  .step-link.active { border-bottom-width: 4px; font-weight: 800; }
  .step-link:disabled { opacity: .65; cursor: not-allowed; }
  .quick-tool { min-width: 0; }
  .quick-tool span { font-size: 1rem; line-height: 1.4; }
  .panel-actions { gap: 1rem; padding: 1rem 1.25rem; }
  .panel-actions .button { min-width: 6rem; }
  :where(.progression-grid, .table-wrap) { scrollbar-width: auto; }
  .progression-grid { scroll-padding-inline: .25rem; }
  .builder-column { overflow: visible; }
  .panel-actions { border-radius: 0 0 var(--radius) var(--radius); }
  :where(a:not(.button):not(.brand-home):not(.header-link):not(.brand-icon-link)) { text-underline-offset: .2em; }
  .skip-link { z-index: 1000; }
  :where(.dialog-header, .resource-dialog-top) :focus-visible { outline-offset: -3px; }
  input[type=checkbox], input[type=radio] { accent-color: var(--teal); flex-shrink: 0; }
  .about-main { max-width: 1120px; }
  .about-intro h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.25; }
  .about-card, .about-creator { padding: 1.25rem; }
}
@media screen and (max-width: 700px) {
  :root { --ui-h2: 1.375rem; }
  .workspace { padding-inline: .75rem; }
  .step-panel { padding: 1rem; }
  .step-nav { padding: .5rem .75rem 0; gap: .25rem; }
  .step-link { flex-direction: column; justify-content: center; gap: .3rem; padding: .4rem .15rem; }
  .step-link .step-name { font-size: .75rem; }
  .grade-buttons { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
  .grade-button { min-width: 0; padding: .55rem .15rem; }
  .dialog-header, .resources-dialog .dialog-header, .guide-dialog .dialog-header, .document-dialog .dialog-header { padding: .85rem 1rem; }
  .resource-panel, .resource-panel[data-resource-panel=ml], .resource-panel[data-resource-panel=progression], .account-body { padding: 1rem; }
  dialog, .guide-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); border-radius: 12px; }
  .resource-item > summary, .standard-review-item > summary, .wida-level > summary { padding: .75rem .85rem; }
  .resource-item-body, .standard-review-item > div, .wida-level > div { padding-inline: .85rem; }
  .ml-optional > summary { grid-template-columns: .8rem minmax(0, 1fr); }
  .ml-optional > summary .optional-tag { grid-column: 2; justify-self: start; }
  .ml-summary-label strong { font-size: 1rem; }
  .completion-summary dl, .completion-summary .summary-actions { grid-template-columns: 1fr; }
  .output-heading { flex-wrap: wrap; gap: .5rem; }
  .readiness-heading { gap: .65rem; }
  .marked-word { flex-wrap: wrap; justify-content: center; }
}
@media screen and (max-width: 360px) {
  .grade-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .quick-tool-buttons { grid-template-columns: 1fr; }
  .quick-tool:last-child { grid-column: auto; }
  .draft-bar { grid-template-columns: 1fr; }
}
@media screen and (max-height: 500px) {
  .step-nav, .dialog-header, .resource-dialog-top, .guide-footer { position: static; }
  dialog { scroll-padding-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (forced-colors: active) { input, select, textarea, .button, .icon-button { border: 1px solid ButtonText; } .step-link.active { border-color: Highlight; } }

@media screen {
  .quick-tool-buttons { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .quick-tools-copy { min-width: 0; flex: 0 0 9rem; }
  .video-transcript { margin-top: .75rem; border-top: 1px solid var(--line); }
  .video-transcript summary { color: var(--blue); font-size: .875rem; font-weight: 700; }
  .video-transcript p { font-size: 1rem; max-width: 65ch; margin: .75rem 0; }
}
@media screen and (min-width: 701px) and (max-width: 1100px) {
  .quick-tools { display: block; }
  .quick-tools-copy { margin-bottom: .65rem; }
  .quick-tool-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 700px) { .quick-tool-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 360px) { .quick-tool-buttons { grid-template-columns: 1fr; } }

@media screen {
  #mlLens { margin: .85rem 0 1rem; padding: .65rem .8rem; border: 1px solid #bfd7e4; border-left: 3px solid var(--teal); border-radius: 10px; }
  #mlLens > summary { grid-template-columns: .8rem minmax(0, 1fr); gap: .55rem; padding: 0; }
  #mlLens .ml-summary-label small { margin-top: .15rem; font-size: .8125rem; }
}

@media screen {
  .language-need-options, .language-plan-choices { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
  .language-need-options legend, .language-plan-choices legend { font-weight: 700; margin-bottom: .6rem; line-height: 1.5; }
  .language-need-options > label { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; min-height: 44px; margin: 0 .4rem .4rem 0; border: 1px solid #718596; border-radius: 8px; cursor: pointer; }
  .language-need-options > label:has(input:checked) { background: var(--blue-soft); border-color: var(--teal); }
  .language-need-options input, .language-plan-choice input { width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; flex-shrink: 0; }
  .language-plan-choice { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem; margin-top: .6rem; border: 1px solid #718596; border-radius: 10px; cursor: pointer; }
  .language-plan-choice > span { min-width: 0; }
  .language-plan-choice strong, .language-plan-choice span span { display: block; }
  .language-plan-choice span span { margin-top: .35rem; font-size: .875rem; font-weight: 400; }
  #mlLens { border: 0; padding: 0; margin: .75rem 0 0; }
  .language-support-step > h3 { margin-top: 0; }
  #builderLanguageChoices .ml-more { margin-top: 1rem; }
}

@media screen {
  .wida-level > summary small { display: block; margin-top: .2rem; font-size: .8125rem; line-height: 1.5; font-weight: 400; color: var(--blue); }
}

@media screen {
  .field-error { display: block; color: #a33b3b; font-size: .875rem; line-height: 1.5; margin: .4rem 0 .75rem; font-weight: 600; }
  input[aria-invalid="true"] { border-color: #a33b3b; border-width: 2px; }
}

/* Keep worksheet previews readable at phone widths without changing print columns. */
@media screen {
  .template-heading > div, .template-box, .template-two > *, .template-three > * { min-width: 0; }
  .template-box > b { text-transform: none; letter-spacing: normal; }
  .template-heading { flex-wrap: wrap; gap: .65rem; }
  .template-heading > strong { white-space: normal; }
  .template-actions { gap: .5rem; }
  .template-action { overflow-wrap: anywhere; }
  .document-preview .template-table, .document-preview .record-table { overscroll-behavior-x: contain; }
}
@media screen and (max-width: 700px) {
  .document-preview { padding: 1rem; }
  .template-two, .template-three { grid-template-columns: minmax(0, 1fr); }
  .template-flow { grid-template-columns: minmax(0, 1fr); }
  .template-flow > span { justify-self: center; transform: rotate(90deg); }
  .sound-template-row { flex-wrap: wrap; gap: .35rem; }
  .sound-template-row b { flex: 0 0 100%; width: auto; }
  .sound-template-row span { width: 2.5rem; height: 2.5rem; }
  .chart-print-choice { grid-template-columns: auto minmax(0, 1fr); }
  .chart-print-choice em { grid-column: 2; justify-self: start; }
  .resource-item > summary { flex-wrap: wrap; }
  .resource-item .example-available { margin-left: 0; white-space: normal; }
}
@media print {
  #printExportRoot .template-box > b, #printExportRoot .sound-template-row b,
  #printExportRoot .template-table th { font-size: 11pt; line-height: 1.35; text-transform: none; letter-spacing: normal; }
  #printExportRoot .template-heading span, #printExportRoot .template-heading > strong { font-size: 9pt; }
  #printExportRoot .template-line { height: .34in; }
  #printExportRoot .template-table th { color: #17324d; background: #edf3f7; print-color-adjust: exact; }
  #printExportRoot .template-table tr { break-inside: avoid; }
  #printExportRoot .teacher-guidance-page { font-size: 10.5pt; line-height: 1.35; }
  #printExportRoot .teacher-guidance-page h3 { font-size: 10pt; }
}

@media screen {
  .flow-details { margin-top: 1rem; }
  .flow-details > summary, .passage-guide > summary { color: var(--navy); font-weight: 700; }
  #customBenchmarkFields { display: block; max-width: 26rem; margin: .75rem 0; }
  #customBenchmarkFields select { display: block; width: 100%; margin-top: .4rem; }
  #customBenchmarkFields small { display: block; font-size: .875rem; margin-top: .35rem; }
  .panel-actions { flex-wrap: wrap; }
  .step-nav { scroll-margin-top: 1rem; }
  .builder-column { scroll-margin-top: 6rem; }
}
@media screen and (max-width: 700px) { .panel-actions .button { flex: 1; min-width: 0; } }

.app-update-notice:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.app-update-notice small { flex-basis: 100%; font-size: .875rem; }
.app-update-notice .button { flex-shrink: 0; }

.teaching-steps { padding-left: 1.4rem; }
.teaching-steps li { margin-bottom: .8rem; line-height: 1.5; }

.passage-text { white-space: pre-wrap; }

.companion-plan-button { grid-column: 1 / -1; justify-self: start; white-space: normal; text-align: left; }

.companion-plan-note { grid-column: 1 / -1; margin: 0; }

.next-teaching-table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: .75rem 0; }
.next-teaching-table th, .next-teaching-table td { text-align: left; vertical-align: top; padding: .65rem; border: 1px solid #c5d5df; }
.next-teaching-table th { background: #eaf4f7; }
.next-teaching-table td:first-child { width: 32%; font-weight: 600; }
.paragraph-number { font-weight: 700; color: #17324d; margin-right: .35rem; }

/* Give the monitoring controls the same inset as the card content. */
.monitor-instructions > summary { padding: .85rem 1rem; }
.monitor-review-choice { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); align-items: start; gap: .65rem; margin: 0; padding: 1rem; border-top: 1px solid var(--line); cursor: pointer; line-height: 1.5; }
.monitor-review-choice input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; }
.monitor-review-choice span { min-width: 0; }
@media screen and (max-width: 700px) {
  .next-teaching-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .next-teaching-table, .next-teaching-table tbody { display: block; }
  .next-teaching-table tbody tr { display: block; margin-bottom: .75rem; border: 1px solid #c5d5df; border-radius: .5rem; overflow: hidden; }
  .next-teaching-table tbody td { display: block; width: auto; border: 0; padding: .75rem; overflow-wrap: anywhere; }
  .next-teaching-table tbody td:first-child { width: auto; background: #eaf4f7; }
  .next-teaching-table tbody td:nth-child(2)::before { content: "Teach next"; display: block; font-weight: 700; margin-bottom: .3rem; color: var(--navy); }
}

/* Keep starting over visible outside collapsed mobile save options. */
.start-over-control { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 700px) {
  .draft-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .draft-bar .draft-status { grid-column: 1 / -1; }
  .draft-bar .mobile-draft-toggle { grid-column: 1; }
  .draft-bar .start-over-control { grid-column: 2; padding: .55rem .8rem; }
  .draft-bar .companion-plan-button, .draft-bar .companion-plan-note { grid-column: 1 / -1; }
}

.plan-route-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .5rem; }
.plan-route-buttons .button { min-width: 0; width: 100%; min-height: 3rem; white-space: normal; overflow-wrap: break-word; text-align: center; }
@media screen and (max-width: 700px) { .plan-route-buttons { grid-template-columns: 1fr; } }

/* Consistent wrapping and insets across the builder, resources, and exports. */
@media screen {
  :where(.draft-bar, .draft-actions, .header-actions, .header-nav, .summary-actions,
    .output-heading, .monitor-card, .monitor-detail, .passage-card, .passage-card-body,
    .template-library-card, .group-member, .group-record-wrap) { min-width: 0; }
  .draft-bar { flex-wrap: wrap; }
  .draft-status { min-width: 0; flex: 1 1 14rem; }
  .draft-actions { min-width: 0; }
  :where(.button, .text-button, .template-action) { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
  :where(.step-panel, .resource-panel, .summary-card, .document-preview, .standards-guide-main) { overflow-wrap: break-word; }
  .subsection > h3 { margin: 0 0 .5rem; }
  .section-heading + .subsection { margin-top: 1rem; padding-top: 0; border-top: 0; }
  .group-control { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .75rem 0; }
  .group-control > label { margin: 0; }
  .group-control > :is(input, select) { width: 8rem; min-width: 0; min-height: 44px; padding: .5rem .65rem; font-weight: 400; }
  #groupMembers, #groupProgressRows { display: grid; gap: .5rem; margin-top: .75rem; }
  :is(#groupMembers, #groupProgressRows) > .baseline-guide { min-width: 0; margin: 0; padding: 0; }
  :is(#groupMembers, #groupProgressRows) > .baseline-guide > summary { min-height: 44px; padding: .6rem .8rem; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
  :is(#groupMembers, #groupProgressRows) > .baseline-guide[open] > summary { border-bottom: 1px solid var(--line); }
  .group-student-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; padding: 1rem; }
  .group-student-fields > label { display: block; min-width: 0; }
  .group-student-fields :is(input, textarea) { display: block; width: 100%; min-width: 0; margin: .4rem 0 0; font-weight: 400; }
  #groupProgressRows .group-student-fields > label:last-child, .group-student-fields > button { grid-column: 1 / -1; }
  .group-student-fields > button { justify-self: start; }
  #groupReview { overflow: visible; }
  #groupReview .group-member { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
  #groupReview .group-member h3 { margin: 0 0 .5rem; }
  #groupReview .group-member p { margin: .4rem 0; }
  .group-record-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin-top: .75rem; }
  .group-member .record-table { width: 100%; min-width: 40rem; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
  .group-member .record-table :is(th, td) { padding: .6rem; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  .group-member .record-table th { background: var(--blue-soft); color: var(--navy); font-size: .875rem; line-height: 1.4; }
  dialog { overscroll-behavior: contain; }
}
@media screen and (max-width: 700px) {
  .group-student-fields { grid-template-columns: minmax(0, 1fr); padding: .8rem; }
  .document-preview .doc-identification { flex-wrap: wrap; gap: .5rem; }
  .document-preview .doc-identification strong { white-space: normal; }
  .data-record-preview .record-heading { flex-wrap: wrap; gap: .5rem; }
  .data-record-preview .record-heading > strong { white-space: normal; }
}
@media screen and (max-width: 360px) {
  .draft-bar { grid-template-columns: minmax(0, 1fr); }
  .draft-bar .mobile-draft-toggle, .draft-bar .start-over-control { grid-column: 1; justify-self: start; }
  .readiness-heading { flex-wrap: wrap; }
  .readiness-heading > strong { white-space: normal; }
  .about-page .app-header { grid-template-columns: minmax(0, 1fr); }
  .about-page .app-header > .button { justify-self: start; }
}
@media print {
  #printExportRoot .group-member { break-inside: auto; }
  #printExportRoot .group-member h3 { break-after: avoid; }
  #printExportRoot .group-record-wrap { overflow: visible; }
  #printExportRoot .group-member .record-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; break-inside: auto; page-break-inside: auto; }
  #printExportRoot .group-member .record-table :is(th, td) { height: auto; border: 1px solid #aabcc8; padding: .06in; overflow-wrap: anywhere; vertical-align: top; text-align: left; }
  #printExportRoot .group-member .record-table th { background: #edf3f7; print-color-adjust: exact; }
  #printExportRoot .group-member .record-table thead { display: table-header-group; }
  #printExportRoot .group-member .record-table tr { break-inside: avoid; }
}

/* Reserve most of the paragraph organizer for the student's written ideas. */
.paragraph-main-ideas-table th:first-child, .paragraph-summary-table th:first-child { width: 20%; }
.paragraph-summary-table th:nth-child(2), .paragraph-summary-table th:nth-child(3) { width: 40%; }
@media screen {
  .document-preview .template-table { max-width: 100%; }
  .document-preview .template-table :is(th, td) { white-space: normal; }
}

@media screen {
  #scaffoldLibraryPicker { margin-top: 1rem; }
  #scaffoldLibraryPicker > summary { min-height: 44px; }
  #alternateScaffoldControls { margin-top: .75rem; }
  .alternate-scaffold-preview { overflow-wrap: break-word; }
  .alternate-scaffold-preview > p { margin: .75rem 0; }
  .alternate-scaffold-preview .visual-example { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; background: var(--surface); }
}

/* A paragraph label needs a readable minimum width on phone previews. */
@media screen and (max-width: 700px) {
  .document-preview :is(.paragraph-main-ideas-table, .paragraph-summary-table) th:first-child { width: 7rem; overflow-wrap: normal; word-break: normal; }
  .document-preview .paragraph-summary-table th:nth-child(2), .document-preview .paragraph-summary-table th:nth-child(3) { width: auto; }
  .document-preview .template-table th { vertical-align: top; }
}

@media screen {
  .benchmark-schedule > label, #textAccessFields > label { display: block; min-width: 0; }
  .benchmark-schedule input, #textAccessFields > label > :is(select, input) { display: block; width: 100%; min-width: 0; margin-top: .5rem; font-weight: 400; }
  #textAccessFields > label + label { margin-top: 1rem; }
  #groupAccessChoices { margin-top: 1rem; }
  #groupAccessChoices h3 { margin: 0 0 .75rem; font-size: 1.125rem; }
  .group-access-row { display: grid; grid-template-columns: minmax(6rem, .25fr) minmax(0, 1fr); align-items: center; gap: .5rem 1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
  .group-access-row > label { min-width: 0; }
  .group-access-other { grid-column: 2; }
  .group-access-other input { display: block; width: 100%; min-width: 0; margin-top: .4rem; font-weight: 400; }
  .group-access-row select { font-weight: 400; }
  .group-access-reminder { grid-column: 1 / -1; margin: 0; }
}
@media screen and (max-width: 700px) {
  .group-access-row { grid-template-columns: minmax(0, 1fr); }
  .group-access-other { grid-column: 1; }
}

/* Optional oral-language practice follows the existing stacked form layout. */
.oral-language-step > .select { width:100%; max-width:36rem; }
.oral-language-step .selected-plan { margin-top:1rem; }
.oral-language-step .selected-plan h2 { font-size:1.1rem; margin-top:0; }
.oral-language-step ol { padding-left:1.5rem; }
.oral-language-step li + li { margin-top:.65rem; }
.oral-language-note { display:block; margin:1rem 0; font-weight:600; }
.oral-language-note textarea { display:block; width:100%; margin-top:.5rem; box-sizing:border-box; }

/* Navigation focuses headings for screen readers without drawing a control border. */
@media screen {
  body :is(h2, h3)[tabindex="-1"]:focus { outline: none !important; }
}
/* Teach, check, and return to anonymous plans. */
.saved-plans { max-width: 1240px; margin: 0 auto; padding: .5rem 1.25rem 1rem; }
.saved-plans summary { font-weight: 700; color: var(--navy); cursor: pointer; }
.saved-plan-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 0; border-bottom:1px solid #cfdee3; }
.saved-plan-row p { margin:.3rem 0; color:#526674; font-size:.9rem; }
.saved-plan-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.plan-label-field { display:grid; gap:.3rem; max-width:20rem; font-weight:650; }
.plan-label-field input { width:100%; min-width:0; }
.teaching-card { background:#f3faf9; border:1px solid #bedbd8; border-left:4px solid #087f7f; border-radius:12px; padding:1rem 1.2rem; margin-bottom:1rem; }
.teaching-card h3 { margin-top:0; }
.teaching-card li { margin-bottom:.7rem; }
.lesson-language-move { background:white; border-radius:8px; padding:.75rem; }
.check-session-fields { display:grid; grid-template-columns:7rem 11rem minmax(10rem,1fr); gap:1rem; margin:1rem 0; }
.check-session-fields label { display:grid; gap:.4rem; font-weight:650; }
.check-session-fields input,.check-session-fields select { width:100%; min-width:0; }
.progress-entry-wrap { overflow-x:auto; margin-bottom:1rem; }
.progress-entry-table { width:100%; border-collapse:collapse; }
.progress-entry-table th,.progress-entry-table td { padding:.65rem; text-align:left; border:1px solid #c5d5dc; vertical-align:top; }
.progress-entry-table thead th { background:#e9f3f6; }
.progress-entry-table tbody th { min-width:9rem; max-width:13rem; }
.progress-entry-table small { display:block; color:#526674; font-weight:400; font-size:.82rem; margin-top:.35rem; }
.progress-entry-table input,.progress-entry-table select { width:100%; min-width:0; margin:0; font-size:.95rem; }
.progress-entry-table td { width:25%; }
.progress-review-row { padding:.65rem 0; border-bottom:1px solid #d4e1e5; }
.progress-review-row ul { margin:.4rem 0; padding-left:1.2rem; }
@media screen and (max-width:700px) {
 .check-session-fields { grid-template-columns:minmax(0,1fr); }
 .check-session-fields label { min-width:0; max-width:100%; }
 .check-session-fields input,.check-session-fields select { display:block; width:100%; max-width:100%; min-width:0; inline-size:100%; min-inline-size:0; max-inline-size:100%; }
 .progress-entry-table,.progress-entry-table tbody,.progress-entry-table tr,.progress-entry-table th,.progress-entry-table td { display:block; width:100%; max-width:none; }
 .progress-entry-table thead { display:none; }
 .progress-entry-table tr { border:1px solid #c5d5dc; border-radius:10px; margin-bottom:1rem; overflow:hidden; }
 .progress-entry-table th,.progress-entry-table td { border:0; padding:.6rem .75rem; }
 .progress-entry-table tbody th { background:#e9f3f6; width:100%; min-width:0; max-width:none; }
 .progress-entry-table .sr-only { position:static !important; width:auto; height:auto; padding:0; margin:0 0 .4rem; overflow:visible; clip:auto; clip-path:none; white-space:normal; display:block; line-height:1.4; font-size:.9rem; }
 .saved-plan-actions { width:100%; }
 .saved-plan-actions .button { flex:1 1 9rem; }
}
@media print { .teaching-card { padding:.4rem .6rem; background:white; } .lesson-language-move { padding:0; } }
.teaching-actions,.teach-toolbar { display:flex; flex-wrap:wrap; gap:.65rem; margin:1rem 0; }
.teach-dialog #teachContent { padding:1.2rem; }
.teach-toolbar { padding:0 1.2rem; }
.teaching-template { margin:1rem 0; border:1px solid #c5d5dc; border-radius:10px; padding:.8rem; overflow-x:auto; }
.component-scoring { margin-top:.6rem; font-size:.9rem; }
.component-scoring summary { color:#17677a; font-weight:650; cursor:pointer; }
.component-scoring label,.reteach-choice,#checkMaterialChoice>label { display:grid; gap:.4rem; margin:.7rem 0; }
.component-scoring select,.reteach-choice select { width:100%; }
.check-material-options { display:flex; flex-wrap:wrap; gap:1rem; border:0; padding:0; }
.check-material-options label { display:flex; flex:0 1 auto; gap:.6rem; align-items:center; min-width:0; max-width:100%; padding:.6rem .75rem; border:1px solid var(--line); border-radius:9px; cursor:pointer; }
.check-material-options input[type="radio"] { flex:0 0 1.1rem; width:1.1rem; min-width:1.1rem; height:1.1rem; margin:0; padding:0; accent-color:var(--teal); }
@media screen and (max-width:700px) { .check-material-options { flex-direction:column; gap:.5rem; } .check-material-options label { width:100%; } }
.reteach-focus { border-left:4px solid #197a78; padding:.6rem .8rem; margin:1rem 0; background:#e6f3f1; }
.reteach-focus h4 { margin:.2rem 0; }
.reteach-focus ul { padding-left:1.2rem; }
.lesson-print .template-page-break { break-before:page; margin-top:1.5rem; }
@media screen and (max-width:700px) { .teach-toolbar .button { flex:1 1 10rem; } .saved-plan-actions .button { flex:1 1 8rem; } }

/* Keep worksheet headings readable instead of splitting words into letters. */
@media screen {
  .document-preview .template-table th { overflow-wrap: normal; word-break: normal; hyphens: none; }
  .check-session-fields > label { min-width: 0; }
}
@media screen and (min-width:701px) and (max-width:900px) {
  .check-session-fields { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .check-session-fields > label:last-child { grid-column: 1 / -1; }
}
@media screen and (max-width:700px) {
  .document-dialog .dialog-header { position: static; }
  .document-dialog .dialog-header > div { flex-basis: 100%; }
  .document-dialog .document-back { margin-left: auto; }
  .document-preview .template-table th { padding: .4rem; font-size: .8125rem; }
}

.partner-stem-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: .7rem; }
.partner-stem-choices fieldset { min-width: 0; margin: 0; padding: .55rem .7rem; border: 1px solid currentColor; border-radius: .5rem; }
.partner-stem-choices legend { font-weight: 650; padding: 0 .25rem; }
.partner-stem-choices label { display: flex; align-items: baseline; gap: .45rem; padding: .4rem 0; }

.quick-tool.coaching-tool { text-decoration: none; grid-column: auto; }
@media screen and (min-width: 1101px) {
  .quick-tool-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media screen {
 .teaching-step-example { margin:.55rem 0 .8rem; border:1px solid #bfd5d2; border-radius:8px; background:white; }
 .teaching-step-example > summary { padding:.6rem .75rem; color:#08685f; font-weight:650; }
 .teaching-step-example > div { padding:0 .75rem .6rem; }
 .teaching-step-example p { margin:.5rem 0; line-height:1.5; }
}
@media print { .teaching-step-example { display:none; } }

@media screen {
 .check-mode-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; }
 .check-mode-tabs [aria-pressed="true"] { background:#087f7f; color:white; border-color:#087f7f; }
 .export-more-options { width:100%; }
 .export-more-options > summary { font-weight:700; color:#08685f; }
 .export-option-list { display:flex; flex-wrap:wrap; gap:.75rem; padding-top:.65rem; }
 .export-option-list .print-option { margin:0; flex:1 1 16rem; }
 .export-option-list .button { flex:0 1 auto; }
 .completion-summary { margin-top:1rem; }
}

@media screen {
 .draft-bar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.65rem 1rem; width:calc(100% - 2rem); max-width:1216px; }
 .draft-bar .start-over-control { grid-column:2; grid-row:1; justify-self:end; }
 .draft-actions { grid-column:1 / -1; width:100%; justify-content:start; align-items:end; padding-top:.65rem; border-top:1px solid var(--line); gap:.75rem; }
 .draft-actions .plan-label-field { flex:1 1 15rem; max-width:24rem; min-width:0; }
 .plan-label-field > span { display:flex; align-items:baseline; gap:.5rem; flex-wrap:wrap; }
 .plan-label-field small { font-size:.8rem; font-weight:400; }
 .draft-actions > .button { min-height:48px; }
 .draft-status { min-width:0; }
}
@media screen and (max-width:700px) {
 .draft-bar { grid-template-columns:minmax(0,1fr) auto; }
 .draft-bar .mobile-draft-toggle { grid-column:1; }
 .draft-bar .start-over-control { grid-row:2; }
 .draft-bar.open .draft-actions { display:flex; }
 .draft-actions .plan-label-field { flex-basis:100%; max-width:none; }
}

/* Review status and concise group output. */
.step-link.suggested::after { content:"Suggested"; display:block; font-size:.875rem; font-weight:400; }
.compact-group-table { width:100%; border-collapse:collapse; margin:.6rem 0; }
.compact-group-table th,.compact-group-table td { border:1px solid #c5d5dc; text-align:left; vertical-align:top; padding:.5rem; }
.compact-group-table thead { background:#edf3f5; }
.site-info-footer { max-width:1216px; margin:1.25rem auto; padding:0 1rem; display:flex; flex-wrap:wrap; gap:1rem; font-size:.9rem; }
@media print { .site-info-footer { display:none!important; } .compact-group-table th,.compact-group-table td { padding:.2rem .3rem; } .compact-group-table tr { break-inside:avoid; } }

/* Optional teacher-supplied standard, using the existing planning layout. */
.custom-standard-picker label{display:block;margin:1rem 0 .4rem;font-weight:700}
.custom-standard-picker input,.custom-standard-picker textarea,.custom-standard-picker select{display:block;width:100%;max-width:100%;margin-top:.4rem}
.custom-standard-actions{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;margin-top:1rem}
.custom-standard-note{border-left:3px solid #0a766d;padding:.65rem .85rem;margin:1rem 0;background:#f1f8f7;overflow-wrap:anywhere}
.custom-standard-note p{margin:.4rem 0}
#summaryCode,#selectedStandardHeading{overflow-wrap:anywhere}
@media print{.custom-standard-note{background:transparent;font-size:10pt}}


/* Keep the current five-step quick start ahead of the purpose video. */
.guide-intro,.guide-note{margin:1rem 1.35rem 0;font-size:1rem;line-height:1.55}
.guide-steps{font-size:1rem;line-height:1.55}
.guide-dialog .walkthrough{margin:1.25rem 0}
.about-steps{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1000px){.about-steps{grid-template-columns:1fr}}
@media(max-width:600px){.guide-intro,.guide-note{margin:.85rem .95rem 0}.about-steps{grid-template-columns:1fr}}

@media screen and (max-width:700px) {
  .step-link.suggested::after { content:none; }
  .step-nav .step-link { flex-wrap:nowrap; align-items:center; }
  .draft-bar { margin:.65rem auto 0; width:calc(100% - 1.5rem); border:1px solid var(--line); border-radius:10px; padding:.45rem .65rem; gap:.35rem .55rem; }
  .draft-bar .draft-status { grid-column:1; grid-row:1; }
  .draft-bar .draft-status > strong { display:none; }
  .draft-bar .mobile-draft-toggle { grid-column:2; grid-row:1; justify-self:end; min-height:44px; white-space:nowrap; font-size:.875rem; }
  .draft-bar:not(.open) .start-over-control { display:none; }
  .draft-bar.open .start-over-control { grid-row:auto; min-height:44px; }
  .saved-plans { padding:.25rem .8rem .35rem; }
  .saved-plans summary { min-height:44px; line-height:44px; font-size:.95rem; }
  .step-panel[data-panel="3"] .section-heading { margin-bottom:.65rem; }
  .step-panel[data-panel="3"] .subsection-title { flex-wrap:wrap; align-items:center; gap:.4rem .65rem; }
}
