.student-room{max-width:46rem;margin:auto;padding:clamp(16px,4vw,44px);overflow-wrap:anywhere}
.room-bar,.student-room nav,.study-actions,.student-room footer,.listen-tools{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem .75rem}
.room-bar{justify-content:space-between;border-bottom:1px solid #c8d6cd;padding-bottom:.55rem;margin-bottom:.7rem}
.student-room a,.student-room summary,.listen-tools label{display:inline-flex;align-items:center;min-height:48px}
.student-room summary{display:list-item;align-content:center;cursor:pointer;font-weight:700}
.student-room nav,.student-room footer{margin:.6rem 0 1rem}
.student-room nav a[aria-current="page"]{font-weight:700;text-decoration:underline;text-underline-offset:.22em;text-decoration-thickness:2px}
.student-room nav a.secondary[aria-current="page"]{background:#214d3e;border-color:#214d3e;color:#fff}
.student-room footer{border-top:1px solid #c8d6cd;margin-top:1.5rem}
.student-room select,.student-room button,dialog button{font:inherit;min-height:48px;max-width:100%}
.student-room select{padding:.35rem;border:1px solid #68776e;border-radius:.4rem}
.student-room .unit{display:block;width:100%;margin:.45rem 0;text-align:left}
.student-room .answers{display:grid;gap:.58rem;margin:1rem 0}.student-room .answer{display:flex;align-items:center;gap:.7rem;text-align:left;white-space:normal;width:100%;padding:.7rem .85rem;border:2px solid #809489;border-radius:.8rem;background:white;color:#203d30}
.student-room .answer.chosen,.student-room .answer.right{border-color:#216043;background:#e8f4e8}
.student-room .answer:disabled{opacity:1;color:#294136}
.student-room .option-no{font-weight:750;min-width:1.5em}.student-room .choice-state{display:block;font-size:.9em;color:#174a32;font-weight:700}.choice-state:empty{display:none}
.student-room .jump{margin:.75rem 0}.student-room details{margin:.6rem 0}
.study-position{color:#355240;font-weight:650;margin-bottom:.35rem}.student-room h1{font-size:clamp(1.35rem,3vw,1.9rem);line-height:1.5;margin:.35rem 0 .75rem}
.listen-tools{padding:.6rem .7rem;background:#f1f4eb;border-radius:.8rem}.listen-tools button{margin:0}.listen-tools label{gap:.4rem}.listen-tools input{width:1.2rem;height:1.2rem}.listen-status:not(:empty){flex-basis:100%}
.student-room #message:empty{margin:0}.student-room #message{color:#623410}.student-room .feedback{border-left:.3rem solid #507052}.student-room .feedback h2{margin-top:0}
.student-room :focus-visible,dialog :focus-visible{outline:3px solid #174d8b;outline-offset:3px}.room-skip{position:absolute;left:1rem;top:-100%;padding:.65rem;background:white;color:#17452d;z-index:2}.room-skip:focus{top:.5rem}
#hand-in{background:white;color:#1d392e;padding:1.2rem;width:min(94vw,28rem);max-height:90dvh;border:2px solid #346247;border-radius:1rem}#hand-in::backdrop{background:#152b2199}
@media(prefers-reduced-motion:no-preference){html:not([data-motion="false"]) .student-room .feedback{animation:reveal-feedback .22s ease-out}@keyframes reveal-feedback{from{transform:translateY(4px)}to{transform:none}}}

.daily-label { margin-bottom:.2rem; font-weight:700; color:#24563d; }
.daily-progress { width:100%; height:12px; accent-color:#32694b; }
.daily-choices summary { padding:.75rem 0; min-height:48px; cursor:pointer; }
.daily-reaction { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:1rem 0; }
.daily-reaction > div { width:6rem; }
.daily-reaction svg { display:block; width:100%; height:auto; }

.student-room .answer.chosen { background:#eaf2fb; border-color:#3d688f; }
.student-room .answer.right { background:#e9f5ee; border-color:#31734e; }
.student-room .answer.incorrect { background:#fff1e9; border-color:#a85432; }
.student-room .right .choice-state { color:#195436; }
.student-room .incorrect .choice-state { color:#843a20; }
.student-room .chosen .choice-state { color:#254e77; }
.student-room .answer .choice-state:not(:empty) { margin-top:.22em; font-weight:650; }
.student-room .answer, .student-room .feedback, .planner { line-height:1.72; word-break:keep-all; overflow-wrap:anywhere; }
.student-room h1, .student-room h2, .planner h1, .planner h2 { letter-spacing:-.025em; font-weight:700; }
.student-room a.plan-next { display:flex; justify-content:center; text-decoration:none; margin:.8rem 0; }

.room-bar {align-items:flex-start}
.room-bar #room-settings {margin:0}
.room-bar #room-settings[open] {flex:1 1 100%;padding:0 .7rem .6rem;background:#f1f4eb;border-radius:.7rem}
#room-settings summary,.listen-settings summary {color:#24553f}
#room-settings nav {margin-bottom:0}
.student-room .listen-tools {padding:0;background:transparent}
.student-room .listen-settings {margin:0}
.listen-settings[open] {flex-basis:100%;padding:.25rem .75rem .6rem;background:#f1f4eb;border-radius:.7rem}
.listen-settings[open] label {margin-right:.6rem}

.answer-comparison {display:grid;gap:.45rem}
.answer-comparison p {margin:0;padding:.55rem .75rem;border-radius:.55rem;background:#fff1e9;color:#71341c}
.answer-comparison p+p {background:#e9f5ee;color:#20563c}
.answer-comparison strong {display:block}
.daily-finish>a,.daily-finish~a {margin:.3rem .45rem .3rem 0}

.exam-review-actions {display:grid;gap:.4rem}
.exam-review-actions button {margin:0;text-align:start}

.compare-choices .compare-option{margin-block:.45rem;border:1px solid #a2b8aa;border-radius:.55rem;padding:.2rem .65rem;background:#fff}.compare-option>summary{font-weight:500}.compare-option[open]>summary{font-weight:700}

.room-help summary{cursor:pointer;padding:.65rem 0;font-weight:700}.room-help form{margin-top:1rem;display:grid;gap:.7rem}.room-help select{font:inherit;max-width:100%;min-height:48px}.room-help form button{justify-self:start}.room-help p:empty{display:none}

.student-room .unit-finish{border:2px solid #4b785c;background:#edf6ed;padding:clamp(1rem,4vw,2rem);scroll-margin-top:1rem}.student-room .unit-finish h2{margin-top:0}.student-room .unit-finish p strong{font-size:1.25em;color:#174a36}

/* Keep the completed-set action hierarchy stable at large text and phone widths. */
.student-room .unit-result-actions{display:grid;gap:12px;margin-top:1.25rem}
.student-room .unit-result-secondary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px}
.student-room .unit-result-actions :is(button,a){box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-width:0;min-height:52px;width:100%;margin:0;text-align:center;line-height:1.45}
.student-room .unit-result-actions>.primary{width:100%}

/* Secondary tools stay available without competing with the next study action. */
.student-room .study-toolbox{margin:1rem 0;border:1px solid #bbcbbf;border-radius:.8rem;background:#fff;overflow:hidden}
.student-room .study-toolbox>summary{min-height:52px;padding:.65rem 1rem;box-sizing:border-box;cursor:pointer;font-weight:650;line-height:1.5}
.student-room .study-toolbox[open]>summary{background:#eef4ed;border-bottom:1px solid #d5dfd6}
.student-room .study-toolbox-content{padding:1rem;display:grid;gap:.7rem;min-width:0}
.student-room .study-toolbox-content>:is(button,p,details){margin:0}
.student-room .study-toolbox-content :is(button,select,a){max-width:100%;box-sizing:border-box}
.student-room .exam-main-action{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:12px;margin-top:1rem}
.student-room .exam-main-action>button{margin:0;min-height:52px;width:100%;line-height:1.45}
.student-room .exam-save-note{color:#405b4e;margin:.6rem 0}
.student-room .exam-unanswered-note{padding:.6rem .8rem;background:#fff6df;border-radius:.5rem}

/* A chapter is a direct study action; setup remains optional. */
.student-room .unit-entry{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;margin:12px 0;border:1px solid #a4b9ad;border-radius:14px;background:#fff;text-decoration:none;color:#173f32;min-height:64px;box-sizing:border-box}
.student-room .unit-entry>span{min-width:0}.student-room .unit-entry small{display:block;font-size:.85em;color:#50665b;margin-top:6px}
.student-room .unit-entry-action{flex-shrink:0;font-weight:700}.student-room .unit-entry:hover{background:#edf5e9}.student-room .unit-entry:focus-visible{outline:3px solid #245f4b;outline-offset:3px}
.student-room .unit-start{margin:20px 0}.student-room .unit-start>.primary{width:100%;min-height:56px}
.student-room #unit-options nav{display:flex;flex-wrap:wrap;gap:8px}.student-room #unit-options nav>a{margin:0}
@media(max-width:520px){.student-room .unit-entry{align-items:stretch;flex-direction:column;gap:8px}.student-room .unit-entry-action{align-self:flex-end}}
.student-room .unit-choice{position:relative;margin:12px 0 24px}.student-room .unit-choice .unit-entry{margin-bottom:0}.student-room .unit-options-link{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;font-size:.9em;color:#405b4e}
