.school-score-workbench { min-width: 0; color: var(--text); }
.school-score-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.school-score-heading h2 { margin: 0 0 6px; font-size: 20px; }
.school-score-heading .muted { font-size: 13px; }
.school-score-save-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.school-score-save-actions > span { color: var(--muted); font-size: 12px; margin-right: 8px; }
.school-score-workbench fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.school-score-workbench label { position: relative; display: grid; gap: 8px; min-width: 0; margin: 0; font-size: 12px; color: var(--muted); }
.school-score-workbench :is(input, select) { width: 100%; min-width: 0; height: 40px; margin: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--control-radius, 12px); font: inherit; font-size: 14px; padding: 8px 12px; box-sizing: border-box; }
.school-score-workbench :is(input, select, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.school-score-workbench select { appearance: none; padding-right: 40px; }
.school-score-workbench label:has(select)::after { content: ""; pointer-events: none; position: absolute; right: 16px; bottom: 18px; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.school-score-cut-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.school-score-workbench .school-score-filters { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(100px, .5fr) minmax(240px, 1.5fr); gap: 16px; margin-bottom: 16px; }
.school-score-workbench .school-score-exam-fields { display: grid; grid-template-columns: minmax(100px, .5fr) minmax(110px, .6fr) minmax(140px, .8fr) minmax(200px, 1.6fr); gap: 16px; margin-bottom: 24px; }
.school-score-cut-settings { border-top: 1px solid var(--border); padding: 16px 0 24px; }
.school-score-cut-settings summary { font-weight: 700; margin-bottom: 16px; font-size: 14px; cursor: pointer; }
.school-score-workbench .school-score-cut-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 12px; }
.school-score-table-wrap { border: 1px solid var(--border); border-radius: var(--panel-radius, 18px); overflow-x: auto; background: var(--surface); }
.school-score-table { width: 100%; table-layout: fixed; min-width: 760px; margin: 0; border-collapse: collapse; border-spacing: 0; }
.school-score-table th:first-child { width: 56px; }
.school-score-table th:nth-child(2) { width: 140px; }
.school-score-table th:nth-child(4), .school-score-table th:nth-child(5) { width: 160px; }
.school-score-table tbody tr { background: none; }
.school-score-table tbody tr:nth-child(even) > :is(th, td) { background: var(--surface-soft); }
.school-score-table tbody :is(th, td) { border-radius: 0; }
.school-score-table :is(th, td) { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.school-score-table thead { background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.school-score-table tbody tr:last-child :is(td, th) { border-bottom: 0; }
.school-score-unit-control { position: relative; width: 100%; }
.school-score-unit-control > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.school-score-table .school-score-cell { text-align: right; font-variant-numeric: tabular-nums; height: 44px; padding-right: 44px; background: var(--surface); }
.school-score-table tbody th { text-align: left; }
.school-score-table small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.school-score-student-link { display: inline; padding: 0; margin: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 700; box-shadow: none; text-align: left; }
.school-score-student-link:hover { color: var(--accent); background: transparent; transform: none; box-shadow: none; }
.school-score-grade { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); }
.school-score-error { color: var(--red); padding: 12px 0; margin: 0 0 12px; font-size: 13px; }
@media (max-width: 900px) {
  .school-score-workbench .school-score-exam-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .school-score-exam-name { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .school-score-workbench .school-score-filters { grid-template-columns: minmax(0, 1fr) minmax(0, .65fr); gap: 12px; }
  .school-score-history { grid-column: 1 / -1; }
  .school-score-heading { align-items: flex-start; margin-bottom: 20px; }
  .school-score-heading h2 { font-size: 18px; }
  .school-score-save-actions { width: 100%; }
  .school-score-save-actions > span { flex-basis: 100%; }
  .school-score-workbench .school-score-exam-fields { gap: 12px; }
  .school-score-workbench .school-score-cut-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
