.student-test-mode { max-width: 75rem; margin: 1.5rem auto 3rem; color: var(--text); }
.student-test-mode p { max-width: 70ch; color: var(--text-muted); line-height: 1.6; }
.student-test-mode h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 1rem; font-family: var(--font-ui); font-weight: 700; line-height: 1.2; text-transform: none; }
.student-test-mode h2 { font-size: 1.375rem; margin: 0 0 .75rem; }
.student-test-mode h3 { font-size: 1.125rem; margin: 1.5rem 0 .75rem; }
.student-test-mode label { display: grid; gap: .5rem; font-weight: 500; }
.student-test-mode :is(input,select,textarea) { min-width: 0; max-width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: .375rem; padding: .75rem; font: inherit; caret-color: var(--text); }
.student-test-mode :is(select,button) { min-height: 2.75rem; }
.student-test-mode :is(input,select,textarea,button,summary):focus-visible { outline: 2px solid var(--focus, var(--text)); outline-offset: 3px; }
.student-test-mode :is(input,textarea)::selection { color: var(--on-accent); background: var(--accent); }
.student-test-mode :disabled { opacity: .6; cursor: wait; }
.stm-heading { margin-bottom: 2rem; }
.stm-mode { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; padding-block: 1.5rem; border-block: 1px solid var(--line); }
.stm-mode p { margin-bottom: 0; }
.stm-mode button { flex-shrink: 0; }
.stm-practice { margin-block: 2rem; }
.stm-admin { margin-top: 2rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.stm-admin summary { cursor: pointer; font-weight: 600; }
.stm-admin form { display: grid; gap: 1.5rem; margin-top: 1.5rem; max-width: 50rem; }
.stm-admin fieldset { display: flex; gap: 1rem; flex-wrap: wrap; padding: 1rem; border: 1px solid var(--line); border-radius: .375rem; }
.stm-check { display: flex !important; align-items: center; gap: .5rem; }
.stm-check input { accent-color: var(--accent); }
.stm-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.stm-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.stm-statement { white-space: pre-wrap; max-width: 70ch; line-height: 1.6; }
.stm-task { margin-top: 1.5rem; }
.stm-task textarea { width: 100%; box-sizing: border-box; font-family: var(--font-code, monospace); font-size: .875rem; line-height: 1.6; tab-size: 4; resize: vertical; }
.stm-task pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-code, monospace); font-size: .875rem; line-height: 1.5; }
.stm-task form { margin-top: 1.5rem; }
.stm-history { padding-left: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1.8; }
.student-test-mode [data-stm-status]:empty { margin: 0; }
.student-test-mode [role=alert] { color: var(--danger); }
@media (max-width: 40rem) { .stm-mode { align-items: stretch; flex-direction: column; } .stm-groups { grid-template-columns: 1fr; } .stm-actions button { width: 100%; } }

.student-test-mode [hidden] { display: none !important; }
.student-test-mode * { min-width: 0; box-sizing: border-box; overflow-wrap: anywhere; }
.stm-section-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }
.stm-section-nav [aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.stm-read-section { margin-block: 2rem; }
.stm-month { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-block: 1.5rem; }
.stm-read-list { list-style: none; padding: 0; margin: 0; }
.stm-read-list > li { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.stm-read-list h3 { margin-block: 0 .75rem; }
.stm-read-list a { color: var(--accent-ink); text-underline-offset: .2em; }
.stm-public-table { width: 100%; border-collapse: collapse; margin-top: 1rem; text-align: left; font-variant-numeric: tabular-nums; }
.stm-public-table :is(th,td) { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.stm-public-table caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
@media (max-width: 40rem) { .stm-section-nav .ms-btn { flex: 1 1 45%; } .stm-month > * { flex: 1 1 100%; } }

.stm-bank-block { margin-block: 1.5rem; }
.stm-bank-task-list { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; }
.stm-bank-task-list button { text-align: left; }
.stm-bank-detail { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stm-bank-form { display: grid; gap: 1rem; max-width: 50rem; margin-top: 1.5rem; }
.stm-bank-code { font-family: var(--font-code, monospace) !important; line-height: 1.6; }
