.hw-student-no-column { width: 72px; min-width: 72px; white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums; }
.hw-student-name-column { width: 120px; min-width: 120px; max-width: 120px; text-align: left; }
.hw-daily-grid-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 0 0 12px; color: var(--text-muted, #667085); font-size: 16px; line-height: 1.5; }
.hw-daily-grid-context strong { color: var(--text, #17202a); font-size: 19px; font-weight: 700; }
.hw-daily-grid-context time { font-variant-numeric: tabular-nums; }
.hw-daily-grid-wrap { max-height: min(65vh, 700px); overflow: auto; border: 0; border-radius: 0; }
.hw-daily-grid-table { min-width: 720px; }
.hw-daily-grid-table th, .hw-daily-grid-table td { padding: 7px 10px; text-align: center; }
.hw-daily-grid-table col.hw-daily-col-student-id { width: 72px; }
.hw-daily-grid-table col.hw-daily-col-student-name { width: 120px; }
.hw-daily-book-heading { display: inline-flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.hw-daily-book-subject { color: var(--text-muted, #667085); font-size: 11px; font-weight: 700; }
.hw-daily-book-name { font-weight: 800; }
.hw-daily-book-link { display: block; width: 100%; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.hw-daily-book-link .hw-daily-book-name { color: var(--primary, #2563eb); }
.hw-daily-book-link:hover .hw-daily-book-name { text-decoration: underline; }
.hw-daily-book-link:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 3px; border-radius: 2px; }
.hw-daily-grid-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-soft, #f8fafc); }
.hw-daily-grid-table thead th.hw-daily-student-id, .hw-daily-grid-table thead th.hw-daily-student-name { z-index: 4; text-align: left; }
.hw-daily-grid-table thead th.hw-daily-student-id, .hw-daily-grid-table tbody .hw-daily-student-id { position: sticky; left: 0; }
.hw-daily-grid-table thead th.hw-daily-student-name, .hw-daily-grid-table tbody .hw-daily-student-name { position: sticky; left: 72px; }
.hw-daily-grid-table tbody .hw-daily-student-id, .hw-daily-grid-table tbody .hw-daily-student-name { z-index: 1; text-align: left; background: var(--surface, #fff); }
.hw-daily-grid-table tbody tr.hw-daily-student-row--complete-muted { filter: grayscale(1); opacity: .62; }
.hw-daily-grid-table tbody tr.hw-daily-student-row--complete-muted:is(:hover, :focus-within) { filter: none; opacity: 1; }
.hw-daily-grid-table tbody .hw-daily-student-id { width: 72px; min-width: 72px; font-variant-numeric: tabular-nums; }
.hw-daily-grid-table tbody .hw-daily-student-name { width: 120px; min-width: 120px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-daily-student-link { display: inline-block; max-width: 100%; overflow: hidden; border: 0; padding: 0; background: transparent; color: var(--primary, #2563eb); font: inherit; font-weight: 700; text-align: left; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; cursor: pointer; }
.hw-daily-student-link:hover { text-decoration: underline; }
.hw-daily-student-link:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 3px; border-radius: 2px; }
.hw-daily-grid-table thead th.hw-daily-student-id { width: 72px; min-width: 72px; }
.hw-daily-grid-table thead th.hw-daily-student-name { width: 120px; min-width: 120px; max-width: 120px; }
.hw-daily-student-no { color: var(--text-muted, #667085); font-variant-numeric: tabular-nums; }
.hw-daily-cell { min-width: 92px; transition: background 120ms ease; }
.hw-daily-cell.is-hit { background: var(--success-bg, #ecfdf5); }
.hw-daily-cell.is-not-hit { background: var(--surface, #fff); }
.hw-daily-cell.is-missing { background: var(--danger-soft, #fef2f2); }
.hw-daily-cell.is-provisional { background: var(--warning-soft, #fffbeb); }
.hw-daily-cell.is-missing small { color: var(--danger, #b42318); font-weight: 700; }
.hw-daily-cell.is-provisional small { color: #92400e; font-weight: 700; }
.hw-daily-cell.is-empty { background: var(--surface-soft, #f8fafc); }
.hw-daily-cell.is-pending { background: var(--surface-soft, #f8fafc); }
.hw-daily-cell-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 34px; padding: 4px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text, #17202a); cursor: pointer; font: inherit; }
.hw-daily-cell-button:hover, .hw-daily-cell-button:focus-visible { border-color: var(--primary, #2563eb); outline: none; background: var(--primary-soft, #eff6ff); }
.hw-daily-cell-button small, .hw-daily-cell-readonly small { color: var(--text-muted, #667085); font-size: 11px; }
.hw-daily-cell-readonly { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 34px; padding: 4px 6px; font-size: 13px; }
.hw-daily-empty-mark { color: var(--text-muted, #667085); }
.hw-daily-draft-dot { color: var(--primary, #2563eb); font-size: 8px; }
/* Opt-in worksheet skin: the shared table keeps its existing state and controls. */
.hw-daily-worksheet { min-width: 0; max-width: 100%; border: 1px solid var(--hw-record-line, #cbd5e1); border-radius: 0; background: var(--surface, #fff); }
.hw-daily-worksheet .hw-daily-grid-table { width: 100%; min-width: var(--hw-worksheet-min-width); table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.hw-daily-worksheet .hw-daily-grid-table :is(th, td) { height: 38px; box-sizing: border-box; padding: 0 8px; border: 0; border-right: 1px solid var(--hw-record-line, #cbd5e1); border-bottom: 1px solid var(--hw-record-line, #cbd5e1); }
.hw-daily-worksheet .hw-daily-grid-table tr > :last-child { border-right: 0; }
.hw-daily-worksheet .hw-daily-grid-table tbody tr:last-child > * { border-bottom: 0; }
.hw-daily-worksheet .hw-daily-grid-table thead th { height: 54px; padding: 6px 8px; background: var(--surface-soft, #f1f5f9); color: var(--text, #17202a); }
.hw-daily-worksheet .hw-daily-grid-table col.hw-daily-col-student-id { width: 56px; }
.hw-daily-worksheet .hw-daily-grid-table col.hw-daily-col-student-name { width: 120px; }
.hw-daily-worksheet .hw-daily-grid-table .hw-daily-student-id { width: 56px; min-width: 56px; }
.hw-daily-worksheet .hw-daily-grid-table .hw-daily-student-name { left: 56px; }
.hw-daily-worksheet .hw-daily-student-link, .hw-daily-worksheet .hw-daily-book-link .hw-daily-book-name { color: var(--text, #17202a); font-weight: 600; }
.hw-daily-worksheet .hw-daily-book-heading { display: flex; min-width: 0; }
.hw-daily-worksheet .hw-daily-book-name { overflow-wrap: anywhere; white-space: normal; }
.hw-daily-worksheet .hw-daily-book-subject { align-self: center; }
.hw-daily-worksheet .hw-daily-cell { min-width: 0; padding: 0; }
.hw-daily-worksheet .hw-daily-cell-button, .hw-daily-worksheet .hw-daily-cell-readonly { min-height: 38px; padding: 4px; border-radius: 0; font-size: 16px; }
.hw-daily-worksheet .hw-daily-cell-button small, .hw-daily-worksheet .hw-daily-cell-readonly small { font-size: 12px; }
.hw-daily-worksheet .hw-daily-cell.is-hit small { color: var(--text, #17202a); }
.hw-daily-worksheet .hw-daily-cell:is(.is-empty, .is-pending, .is-sick, .is-lost) small { color: var(--text-secondary, #6b7280); }
.hw-daily-worksheet .hw-daily-grid-table tbody tr:is(:hover, :focus-within) > * { background-image: linear-gradient(rgb(37 99 235 / 4%), rgb(37 99 235 / 4%)); }
.hw-daily-worksheet .hw-daily-cell-button:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.hw-daily-worksheet .hw-daily-student-link:hover, .hw-daily-worksheet .hw-daily-book-link:hover { color: var(--primary, #2563eb); text-decoration: underline; }
.hw-correction-panel { margin-top: 12px; padding: 18px; border: 1px solid var(--border, #d9dee7); border-radius: var(--radius-md, 12px); background: var(--surface, #fff); box-shadow: var(--shadow-card, none); }
.hw-correction-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hw-correction-heading h2 { margin: 0; font-size: 18px; }
.hw-correction-heading p, .hw-correction-meta { margin: 5px 0 0; color: var(--text-muted, #667085); font-size: 13px; }
.hw-correction-date { color: var(--text-muted, #667085); font-size: 13px; white-space: nowrap; }
.hw-correction-meta { display: flex; gap: 12px; }
.hw-correction-panel form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.hw-correction-value { color: var(--text, #17202a); font-weight: 700; }
.hw-correction-remark-label { display: grid; flex: 1 1 220px; gap: 5px; color: var(--text-muted, #667085); font-size: 13px; }
.hw-correction-remark-label input { min-height: 36px; border: 1px solid var(--border, #d9dee7); border-radius: 8px; padding: 7px 9px; font: inherit; }
.hw-correction-save { min-height: 36px; border: 0; border-radius: var(--radius-sm, 8px); padding: 7px 12px; background: var(--primary, #2563eb); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.hw-correction-save:disabled { opacity: .6; cursor: wait; }
.hw-correction-bulk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hw-correction-bulk-actions [data-homework-bulk-cancel] { min-height: 36px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.hw-correction-status { margin: 12px 0 0; color: var(--text-muted, #667085); font-size: 13px; }
.hw-report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 0 0 16px; }
.hw-report-metric { min-width: 0; padding: 13px 14px; border: 1px solid var(--border, #d9dee7); border-radius: 10px; background: var(--surface-soft, #f8fafc); }
.hw-report-metric strong, .hw-report-metric span { display: block; }
.hw-report-metric strong { color: var(--text, #17202a); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hw-report-metric span { margin-top: 5px; color: var(--text-muted, #667085); font-size: 12px; font-weight: 700; }
.hw-report-metric.is-positive { border-color: #a7f3d0; background: var(--success-bg, #ecfdf5); }
.hw-report-metric.is-negative { border-color: #fecaca; background: var(--danger-soft, #fef2f2); }
.hw-report-metric.is-warning { border-color: #fde68a; background: var(--warning-soft, #fffbeb); }
.hw-student-summary { margin: 0 0 22px; border: 1px solid var(--border, #d9dee7); border-radius: 14px; padding: 20px; background: var(--surface, #fff); }
.hw-student-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hw-student-summary-heading h3 { margin: 0 0 6px; font-size: 22px; }
.hw-student-summary-heading h3 span { color: var(--text-muted, #667085); font-size: 15px; font-weight: 500; }
.hw-student-summary-heading p { margin: 0; color: var(--text-muted, #667085); font-size: 13px; }
.hw-student-summary-export { display: grid; justify-items: end; gap: 6px; }
.hw-student-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-student-summary-export > p { max-width: 280px; margin: 0; color: var(--text-muted, #667085); font-size: 12px; line-height: 1.4; text-align: right; }
.hw-student-summary-eyebrow { margin-bottom: 5px !important; color: var(--primary, #2563eb) !important; font-size: 11px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hw-student-summary-note { margin: 0 0 18px; color: var(--text-muted, #667085); font-size: 13px; line-height: 1.65; }
.hw-student-item-summary h4 { margin: 0 0 10px; font-size: 16px; }
.hw-student-item-summary th small { display: block; color: var(--text-muted, #667085); font-weight: 500; }
.hw-student-summary-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.hw-student-trend { margin-top: 20px; }
.hw-student-trend h4, .hw-student-item-summary h4 { margin: 0 0 10px; font-size: 16px; }
.hw-student-trend-chart { position: relative; overflow-x: auto; border: 1px solid var(--border, #d9dee7); border-radius: 12px; background: var(--surface-subtle, #f8fafc); }
.hw-student-trend-chart svg { display: block; width: 100%; min-width: 520px; height: auto; color: var(--primary, #2563eb); }
.hw-student-trend-interactive { position: absolute; visibility: hidden; width: 100%; height: 280px; }
.hw-student-trend-chart.has-interactive-chart { overflow: hidden; }
.has-interactive-chart .hw-student-trend-interactive { position: relative; visibility: visible; }
.has-interactive-chart > svg { display: none; }
@media print {
  .hw-student-trend-interactive { display: none !important; }
  .hw-student-trend-chart > svg { display: block !important; min-width: 0; }
}
.hw-student-trend-chart text { fill: var(--text-muted, #667085); font-size: 11px; }
.hw-student-trend-chart .axis { stroke: var(--border, #d9dee7); stroke-width: 1; }
.hw-student-trend-chart circle { fill: var(--surface, #fff); stroke: currentColor; stroke-width: 3; }
.hw-student-trend-chart .is-pending { color: #94a3b8; }
.hw-student-trend-key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--text-muted, #667085); font-size: 12px; }
.hw-student-trend-key i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: var(--primary, #2563eb); }
.hw-student-trend-key i.is-pending { background: #94a3b8; }
.hw-student-empty { margin: 0; padding: 18px; border: 1px dashed var(--border, #d9dee7); border-radius: 12px; color: var(--text-muted, #667085); }
.hw-subject-followup-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 12px; }
.hw-subject-followup-toolbar input, .hw-subject-followup-toolbar select { min-height: 38px; }
.hw-subject-followup .hw-followup-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 0 16px; }
.hw-subject-followup .hw-data-table { width: 100%; min-width: 650px; }
.hw-subject-followup .hw-data-table th, .hw-subject-followup .hw-data-table td { vertical-align: top; }
.hw-subject-followup-list summary { cursor: pointer; color: var(--primary, #2563eb); font-weight: 700; }
.hw-subject-roster-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hw-subject-roster-table :is(th, td) { border: 1px solid var(--hw-record-line, #94a3b8); padding: 10px 12px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.hw-subject-roster-table thead th { background: var(--hw-record-heading, #f5f6f8); text-align: left; }
.hw-subject-roster-table thead th:nth-last-child(3) { width: 12%; }
.hw-subject-roster-table thead th:nth-last-child(2) { width: 25%; }
.hw-subject-roster-table tbody th { text-align: left; background: var(--surface, #fff); }
.hw-followup-homework-table thead th:first-child { width: 18%; }
.hw-followup-homework-table thead th:nth-child(2) { width: auto; }
.hw-followup-homework-table thead th:last-child { width: 24%; }
.hw-followup-homework-table { margin: 10px 0 14px; background: var(--surface, #fff); }
.hw-subject-item-class { display: block; margin-top: 4px; font-weight: 400; color: var(--text-muted, #667085); }
.hw-subject-class-names { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px; }
.hw-subject-class-names + .hw-subject-class-names { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, #ddd); }
.hw-subject-class-label { line-height: 1.8; }
.hw-subject-roster { line-height: 1.8; }
.hw-subject-roster-entry { display: inline-block; }
.hw-subject-roster button { border: 0; padding: 1px 0; background: transparent; color: var(--primary, #2563eb); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hw-subject-roster button:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.hw-subject-name-group + .hw-subject-name-group { margin-top: 8px; }
.hw-subject-name-group > strong { font-size: 13px; color: var(--danger-text, #b91c1c); }
.hw-subject-name-group--provisional > strong { color: var(--warning-text, #925600); }
.hw-subject-receipt-details, .hw-subject-roster-table .hw-subject-followup-list { margin-top: 8px; font-size: 13px; }
.hw-subject-receipt-details summary { cursor: pointer; color: var(--text-muted, #667085); }
.hw-subject-receipt-details p, .hw-subject-empty-state { margin: 4px 0; }
.hw-subject-followup-month-days section + section { border-top: 1px solid var(--border, #ddd); margin-top: 10px; padding-top: 10px; }
.hw-subject-followup-list ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hw-subject-followup-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; white-space: nowrap; }
.hw-subject-followup-list button { border: 0; background: none; padding: 0; color: var(--primary, #2563eb); cursor: pointer; font: inherit; text-decoration: underline; }
.hw-subject-followup-list li span, .hw-subject-followup-note { color: var(--text-muted, #667085); font-size: 12px; }
.hw-subject-followup-note { margin: 12px 0 0; }
.hw-subject-followup-month-days > summary { color: var(--primary); cursor: pointer; font-weight: 700; }
.hw-subject-followup-month-days > ul { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.hw-subject-followup-month-days > ul > li { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.hw-subject-followup-month-days .hw-subject-followup-list ul { padding-left: 10px; }
.hw-subject-followup-filters { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; margin: 18px 0 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hw-subject-followup-filters--range { grid-template-columns: minmax(0, 1fr); container-type: inline-size; }
.hw-subject-followup-filters--range .hw-subject-followup-calendar { width: 100%; padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--border); }
.hw-report-range-calendars { display: grid; grid-template-columns: minmax(0, 320px); gap: 24px; }
.hw-report-range-month { min-width: 0; }
.hw-report-range-month h3 { margin: 0 0 8px; font-size: 14px; }
.hw-report-range-confirm { padding: 8px 18px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary); color: white; cursor: pointer; font: inherit; font-weight: 650; }
.hw-report-range-confirm:hover { background: var(--primary-hover); }
.hw-report-range-confirm:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.hw-report-range-confirm:disabled { opacity: .45; cursor: not-allowed; }
.hw-report-range-editor .hw-subject-followup-calendar { padding-bottom: 0; border-bottom: 0; }
.hw-report-range-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface, white); color: var(--text, #172b4d); }
.hw-report-range-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.hw-report-range-dialog > header, .hw-report-range-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hw-report-range-dialog h2 { margin: 0; font-size: 20px; }
.hw-report-range-dialog > footer { justify-content: flex-end; }
.hw-report-range-dialog [data-range-close] { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface, white); color: inherit; cursor: pointer; font: inherit; }
.hw-report-range-editor .hw-subject-followup-custom { margin: 0; }
.hw-report-range-editor > [data-subject-followup-custom-apply], .hw-report-range-editor > button { justify-self: end; }
.hw-report-range-calendars[data-narrow-month="first"] [data-range-month="second"], .hw-report-range-calendars[data-narrow-month="second"] [data-range-month="first"] { display: none; }
@container (min-width: 600px) {
  .hw-report-range-calendars { grid-template-columns: repeat(2, minmax(0, 320px)); }
  .hw-report-range-calendars[data-narrow-month] .hw-report-range-month { display: block; }
}
.hw-subject-followup-calendar { min-width: 0; padding-right: 16px; border-right: 1px solid var(--border); }
.hw-subject-followup-calendar-label { display: block; margin-bottom: 12px; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.hw-subject-followup-calendar .hw-mini-calendar { width: 100%; }
.hw-subject-followup-filter-controls { display: grid; align-content: start; gap: 18px; min-width: 0; }
.hw-subject-followup-filter-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: start; }
.hw-subject-followup-filter-label { padding-top: 9px; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.hw-subject-followup-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hw-subject-followup-scope { display: grid; gap: 8px; }
.hw-subject-followup-date-block { display: grid; gap: 9px; }
.hw-subject-followup-current-period { margin: 0; font-size: 14px; font-weight: 650; }
.hw-subject-followup-date-input { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text-muted); font-size: 13px; }
.hw-subject-followup-date-input input { min-height: 38px; }
.hw-subject-followup-custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hw-subject-followup-custom input { width: 100%; min-width: 0; min-height: 38px; }
.hw-subject-followup-custom label { color: var(--text-muted); font-size: 13px; font-weight: 650; }
.hw-report-date-field { display: grid; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.hw-report-date-field.is-active { border-color: var(--primary); background: var(--primary-soft, #eef4ff); }
.hw-report-date-field.is-active label { color: var(--primary); }
.hw-subject-followup-custom > :is(p, button) { grid-column: 1 / -1; }
.hw-subject-followup-custom > button { justify-self: start; }
.hw-report-date-format { margin: 0; color: var(--text-secondary); font-size: 12px; }
.hw-report-date-preview { margin: 4px 0; font-size: 14px; font-weight: 650; }
.hw-report-date-error { margin: 0; color: var(--danger-text, #991b1b); font-size: 13px; }
.hw-subject-followup-date-hint { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
.hw-subject-followup-subchoices { padding-top: 8px; border-top: 1px solid var(--border); }
.hw-subject-followup-choice, .hw-subject-followup-today { min-height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; }
.hw-subject-followup-choice { display: inline-flex; align-items: center; gap: 5px; }
.hw-subject-followup-choice small { color: var(--text-muted); font-size: 11px; }
.hw-subject-followup-choice.is-selected { border-color: var(--primary); background: #eef4ff; color: var(--primary); }
.hw-subject-followup-choice .hw-subject-tag { margin: 0; }
.hw-subject-followup-subject-choice, .hw-subject-followup-subject-choice.is-selected { min-height: 36px; border-color: transparent; padding: 0 2px; background: transparent; color: inherit; }
.hw-subject-followup-subject-choice .hw-subject-tag { padding: 5px 10px; }
.hw-subject-followup-subject-choice.is-selected .hw-subject-tag { font-weight: 800; }
.hw-subject-followup-subject-choice.is-selected .hw-subject-tag::after { margin-left: 6px; content: "✓"; color: var(--primary); }
.hw-subject-followup-today { width: 100%; margin-top: 10px; }
.hw-subject-followup-filter-row button:focus-visible, .hw-subject-followup-calendar button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 900px) { .hw-subject-followup-filters { grid-template-columns: 1fr; } .hw-subject-followup-calendar { width: min(100%, 320px); padding-right: 0; padding-bottom: 16px; border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 640px) {
  .hw-subject-followup-filter-row { grid-template-columns: 1fr; gap: 4px; }
  .hw-subject-followup-filter-label { padding-top: 0; }
  .hw-report-grade-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hw-report-grade-choices > button { justify-content: center; }
  .hw-report-grade-choices > button:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hw-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-student-summary { padding: 16px; }
  .hw-student-summary-heading { display: block; }
  .hw-student-summary-export { justify-items: start; margin-top: 14px; }
  .hw-student-summary-export > p { text-align: left; }
  .hw-student-summary-action { margin-top: 14px; }
  .hw-student-summary-columns { grid-template-columns: 1fr; }
}
/* School reports share the same numeric table and trend controls in both adapters. */
.hw-school-statistics { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: collapse; font-size: 16px; }
.hw-school-statistics--subject { min-width: 420px; }
.hw-school-statistics thead th:first-child { width: 64px; }
.hw-school-statistics .hw-student-name-column { width: auto; min-width: 120px; max-width: none; overflow-wrap: anywhere; }
.hw-school-statistics thead th:nth-child(n + 4) { width: 120px; text-align: center; }
.hw-school-statistics thead th:last-child { width: 140px; }
.hw-school-statistics .hw-stat-period-summary { display: flex; flex-wrap: wrap; align-items: baseline; }
.hw-school-statistics .hw-stat-date-endpoint { white-space: nowrap; }
.hw-school-statistics .hw-stat-period-cutoff { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--text-muted, #667085); }
.hw-school-statistics .hw-report-floating-header { position: relative; z-index: 5; background: var(--surface, white); }
.hw-school-statistics caption.hw-report-floating-header { padding: 10px 12px; box-sizing: border-box; }
.hw-school-statistics .hw-stat-subject-context { white-space: nowrap; font-size: 13px; color: var(--text-muted, #667085); }
@media print { .hw-school-statistics .hw-report-floating-header { transform: none !important; position: static; } }
.hw-school-statistics caption { text-align: left; padding: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.hw-report-student-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-report-student-filter [aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.hw-student-missing-table { min-width: 0; width: 100%; table-layout: fixed; border-collapse: collapse; }
.hw-student-missing-table th, .hw-student-missing-table td { padding: 10px 12px; border: 1px solid var(--border, #d9dee7); }
.hw-student-missing-table thead th { background: var(--surface-subtle, #f8fafc); }
.hw-student-missing-table thead th:first-child { width: 18%; }
.hw-student-missing-table thead th:last-child { width: 100px; text-align: right; }
.hw-student-missing-table tbody th { text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.hw-student-report-heading-actions { display: grid; justify-items: end; gap: 12px; }
.hw-student-period-report { border-radius: var(--hw-record-radius); box-shadow: none; font-family: var(--font); }
.hw-student-period-report .hw-student-summary-heading { align-items: center; margin-bottom: 16px; }
.hw-student-period-report .hw-student-summary-heading h3 { margin: 0; font: 700 22px/1.5 var(--font); text-decoration: underline; text-underline-offset: 6px; }
.hw-student-report-identity { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hw-record-line); }
.hw-student-report-identity > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.hw-student-report-identity dt { flex-shrink: 0; color: var(--text-muted, #667085); font-size: 13px; }
.hw-student-report-identity dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.hw-student-report-identity .hw-student-report-period,
.hw-student-report-identity .hw-student-report-updated { grid-column: 1 / -1; }
.hw-student-report-identity .hw-student-report-updated { font-size: 12px; color: var(--text-muted, #667085); }
.hw-student-period-report .table-wrap { border-radius: 0; border: 0; }
.hw-student-period-report .hw-data-table { border-collapse: collapse; font-size: var(--hw-record-type); }
.hw-student-period-report .hw-data-table :is(th,td) { border: 1px solid var(--hw-record-line); background: var(--surface, #fff); }
.hw-student-period-report .hw-data-table thead th { background: var(--hw-record-heading); color: var(--text, #17202a); }
.hw-student-period-report .hw-student-missing-table tfoot th { text-align: left; }
.hw-student-period-report .hw-student-missing-table tfoot :is(th,td) { border-top: 2px solid var(--hw-record-line); font-weight: 700; }
.hw-student-period-report .hw-student-trend-chart { border-radius: var(--hw-record-radius); background: var(--surface, #fff); }
.hw-student-period-report .hw-student-missing-table .hw-stat-number { text-align: right; }
.hw-student-missing-dates summary { cursor: pointer; color: var(--primary, #2563eb); }
.hw-student-missing-dates ul { padding-left: 20px; margin: 8px 0 0; color: var(--text-muted, #667085); font-size: 13px; font-weight: 400; }
.hw-student-trend-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.hw-student-trend-toolbar h4 { margin: 0; }
.hw-student-trend-toolbar .hw-trend-controls { margin: 0 0 0 auto; gap: 0; }
.hw-student-trend-subject select { max-width: 100%; padding: 6px 30px 6px 10px; border: 1px solid var(--border, #d9dee7); border-radius: 6px; background: var(--surface, #fff); color: var(--text, #1e293b); font: inherit; }
.hw-student-trend-choices { display: flex; flex-wrap: wrap; gap: 8px 14px; border: 0; padding: 0; margin: 0 0 12px; min-width: 0; font-size: 13px; }
.hw-student-trend-choices legend { margin-bottom: 8px; color: var(--text-muted, #667085); }
.hw-student-trend-choices label { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; cursor: pointer; }
.hw-student-trend-choices input { margin: 0; accent-color: var(--primary, #2563eb); }
.hw-student-trend-choices i { width: 16px; height: 3px; }
.hw-student-trend-choices label:has(input:disabled) { opacity: .55; cursor: default; }
@media print { .hw-student-trend-choices { display: none; } }
.hw-student-statistics-note, .hw-student-trend-note { margin-top: 12px; color: var(--text-muted, #667085); font-size: 13px; }
.hw-student-statistics-note summary, .hw-student-trend-note summary { cursor: pointer; padding: 6px 0; }
.hw-student-period-report [role="status"] { margin-top: 10px; }
.hw-student-period-report { container-type: inline-size; container-name: student-report; }
.hw-student-report-body { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; }
.hw-student-report-body > * { min-width: 0; }
.hw-student-report-body > .hw-student-trend { margin-top: 0; }
@media screen and (min-width: 1200px) {
  @container student-report (min-width: 1000px) {
    .hw-student-report-body { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
    .hw-student-report-missing h4 { min-height: 38px; display: flex; align-items: center; margin-bottom: 12px; }
    .hw-student-report-missing .hw-student-missing-table thead th:first-child { width: 60px; }
    .hw-student-report-missing .hw-student-missing-table thead th:last-child { width: 76px; }
    .hw-student-report-missing .hw-student-missing-table th,
    .hw-student-report-missing .hw-student-missing-table td { padding: 10px 8px; }
  }
}
@media (max-width: 640px) {
  .hw-student-report-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .hw-student-report-identity > div:first-child { grid-column: 1 / -1; }
  .hw-student-report-heading-actions { justify-items: start; margin-top: 12px; }
  .hw-student-report-heading-actions .hw-student-summary-export { margin-top: 0; }
  .hw-student-trend-toolbar .hw-trend-controls { margin-left: 0; }
  .hw-student-missing-table th, .hw-student-missing-table td { padding: 8px; }
  .hw-student-missing-table thead th:first-child { width: 60px; }
  .hw-student-missing-table thead th:last-child { width: 76px; }
}
@media print {
  .hw-student-period-report { container-type: normal; border: 0; padding: 0; }
  .hw-student-period-report .hw-student-summary-heading { display: block; text-align: center; }
  .hw-student-period-report .hw-student-report-heading-actions { display: none; }
  .hw-student-report-identity { break-inside: avoid; }
  .hw-student-period-report :is(.hw-student-report-identity dt, .hw-student-missing-dates ul, [role="status"]) { color: #333; }
  .hw-student-period-report .hw-student-report-details:not([open]) { display: none; }
  .hw-student-period-report .hw-student-summary-heading h3,
  .hw-student-period-report .hw-data-table { color: #111; font-family: var(--hw-print-font); }
  .hw-student-period-report .hw-data-table thead { display: table-header-group; }
  .hw-student-period-report .hw-data-table tfoot { display: table-row-group; }
  .hw-student-period-report .hw-data-table tr { break-inside: avoid; }
  .hw-student-report-body { grid-template-columns: minmax(0, 1fr); }
  .hw-student-trend-subject, .hw-student-trend-note, .hw-student-statistics-note { display: none; }
  .hw-student-missing-dates summary { color: inherit; }
}
.hw-student-missing-table td small { display: block; color: var(--text-secondary, #6b7280); }
.hw-student-missing-table .hw-stat-number { text-align: center; font-variant-numeric: tabular-nums; }
.hw-student-report-details { margin-top: 20px; }
.hw-student-report-details > summary { cursor: pointer; color: var(--primary); font-weight: 600; padding: 12px 0; }
.hw-student-report-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.hw-student-report-navigation span { color: var(--text-secondary); }
.hw-student-date-filters { margin-bottom: 20px; }
.hw-student-comparison-report .hw-student-report-body { display: block; }
.hw-student-report-selectors { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.hw-student-report-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hw-student-report-selectors label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 13px; }
.hw-student-report-selectors :is(input,select) { box-sizing: border-box; min-height: 34px; max-width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface, #fff); color: var(--text); font: inherit; }
.hw-student-report-selectors .hw-student-report-navigation { justify-content: flex-start; margin: 0; min-height: 34px; }
.hw-student-report-print-identity, [data-student-report-status]:empty { display: none; }
.hw-student-comparison-report .hw-student-report-missing > .hw-student-item-summary > h4 { display: none; }
.hw-student-comparison-report .hw-student-comparison-detail { border-top: 0; margin-top: 0; padding: 0 0 12px; }
.hw-student-report-update-note { color: var(--text-muted); font-size: 12px; }
.hw-student-report-update-note { margin: 10px 0 0; }
@media print { .hw-student-report-print-identity { display: grid; } }
.hw-student-overview-table { min-width: 600px; }
.hw-student-period-report .hw-student-overview-table thead th:nth-child(1) { width: 60px; }
.hw-student-period-report .hw-student-overview-table thead th:nth-child(2) { width: 60px; }
.hw-student-period-report .hw-student-overview-table thead th:nth-child(3) { width: 140px; }
.hw-student-period-report .hw-student-overview-table thead th:nth-child(4) { width: 72px; }
.hw-student-period-report .hw-student-overview-table thead th:nth-child(5) { width: auto; }
.hw-student-overview-table td[rowspan] { vertical-align: top; }
@media print { .hw-student-report-selectors { display: none; } }
.hw-student-comparison-workspace { margin: 20px 0; }
.hw-student-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hw-student-comparison-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.hw-student-comparison-panel { display: flex; flex-direction: column; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--hw-record-radius); background: var(--surface, #fff); }
.hw-student-comparison-panel .hw-student-trend-chart { margin-top: 0; }
.hw-student-comparison-panel :is(header,footer), .hw-student-comparison-add, .hw-student-comparison-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hw-student-comparison-panel header { min-height: 34px; }
.hw-student-comparison-period, .hw-student-comparison-actions { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.hw-student-comparison-period { flex: 1; min-width: 0; }
.hw-student-comparison-period > strong { display: flex; align-items: center; min-height: 34px; font-size: 14px; }
.hw-student-comparison-period > label { min-width: 0; }
.hw-student-comparison-actions { flex-shrink: 0; margin-left: auto; }
.hw-student-comparison-panel input[type="month"] { box-sizing: border-box; width: 144px; max-width: 100%; height: 34px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface, #fff); font: inherit; }
.hw-student-comparison-panel footer { justify-content: space-between; margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--text-muted, #667085); }
.hw-student-comparison-caption { min-height: 18px; line-height: 18px; margin: 8px 0; color: var(--text-muted, #667085); font-size: 12px; }
.hw-student-comparison-panel .hw-student-trend-notice { display: none; margin: 0; }
.hw-student-comparison-grid:has(.hw-student-trend-notice:not(:empty)) .hw-student-trend-notice { display: block; min-height: 36px; line-height: 18px; margin-bottom: 8px; }
.hw-student-comparison-add { margin-bottom: 12px; font-size: 13px; }
.hw-student-comparison-add > span { margin-right: auto; }
.hw-student-comparison-panel .hw-student-trend-chart svg { min-width: 0; }
.hw-student-comparison-detail { border-top: 1px solid var(--hw-record-line); padding: 16px 0; margin-top: 20px; }
.hw-student-comparison-detail h4 { margin: 0; font-size: 16px; flex: 1 1 100%; scroll-margin-top: 90px; }
.hw-student-comparison-detail small { margin-left: auto; color: var(--text-muted, #667085); }
.hw-student-comparison-detail .hw-trend-controls { margin: 0; }
.hw-student-comparison-panel [role="status"] { min-height: 280px; }
@container student-report (max-width: 740px) {
  .hw-student-comparison-grid { grid-template-columns: minmax(0, 1fr); }
  .hw-student-comparison-detail small { margin-left: 0; }
}
@media (max-width: 640px) {
  .hw-student-comparison-grid { grid-template-columns: minmax(0, 1fr); }
  .hw-student-comparison-panel { padding: 8px; }
}
@media print {
  .hw-student-comparison-workspace :is(.hw-student-trend-toolbar, .hw-student-comparison-add, button, input), .hw-student-comparison-detail :is(button,small) { display: none; }
  .hw-student-comparison-panel { break-inside: avoid; border: 1px solid var(--hw-record-line); box-shadow: none !important; }
  .hw-student-comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-student-comparison-grid.is-single { grid-template-columns: minmax(0, 1fr); }
}
@media print { .hw-student-date-filters { display: none; } }
@media print { .hw-student-report-navigation { display: none; } }
.hw-school-statistics :is(th,td) { padding: 12px 10px; border: 1px solid var(--border, #cbd5e1); }
.hw-school-statistics thead th { background: var(--surface-soft, #f8fafc); white-space: nowrap; }
.hw-school-statistics .hw-stat-number { text-align: center; font-variant-numeric: tabular-nums; }
.hw-school-statistics .hw-stat-note { overflow-wrap: anywhere; }
.hw-stat-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--text-secondary, #64748b); }
.hw-report-scope-control { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.hw-trend-controls { display: flex; gap: 8px; margin: 12px 0; }
.hw-trend-controls [aria-pressed="true"] { background: var(--primary, #2563eb); color: #fff; }
@media print { .hw-trend-controls { display: none; } }
