/* Subject accents decorate navigation; teacher-selected slide colours stay intact. */
:root{--subject-accent:#126d69;--subject-soft:#eaf6f3}
body[data-subject-theme="math"]{--subject-accent:#28559e;--subject-soft:#edf3fc}
body[data-subject-theme="science"]{--subject-accent:#216b49;--subject-soft:#ecf7ee}
body[data-subject-theme="social"]{--subject-accent:#92551c;--subject-soft:#fcf4e9}
body[data-subject-theme="ela"]{--subject-accent:#7150a0;--subject-soft:#f4effb}
body[data-subject-theme="sel"]{--subject-accent:#9d456d;--subject-soft:#fceff5}
#subjectChoices{grid-template-columns:minmax(0,1fr);width:100%;min-width:0}
#subjectChoices>.choice{display:grid;grid-template-columns:1.6em minmax(0,1fr);gap:.6rem;align-items:center;justify-content:start;width:100%;min-width:0;min-height:48px;height:auto;padding:.65rem .8rem;text-align:left;white-space:normal}
.subject-grid .choice[aria-pressed="true"]{background:var(--subject-soft);border-color:var(--subject-accent);color:var(--subject-accent)}
#subjectChoices>.choice>.subject-icon{font-size:1.2rem;line-height:1.2}
#subjectChoices>.choice>.subject-name{min-width:0;font:inherit;line-height:1.4;color:inherit;white-space:normal;overflow-wrap:anywhere}
.lesson-toolbar{flex-wrap:wrap}
.lesson-toolbar>div:first-child{min-width:0}
.lesson-position-line{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-top:.5rem;font-size:.8rem;color:#52626c}
.subject-identity{display:inline-flex;align-items:center;border:1px solid var(--subject-accent);background:var(--subject-soft);color:var(--subject-accent);border-radius:99px;padding:.22rem .6rem;font-weight:700}
.lesson-toolbar-actions{max-width:100%;flex-wrap:wrap}
.draft-save-state{font-size:.72rem;line-height:1.45;color:#52626c;max-width:24rem;margin:.3rem 0 0;overflow-wrap:anywhere}
.activity-directions{flex:0 0 100%;border:1px solid #d8e2e6;border-radius:12px;background:#fff;padding:.55rem .75rem;font-size:.82rem}
.activity-directions>summary{font-weight:700;color:var(--subject-accent);cursor:pointer;min-height:24px}
.activity-directions ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;list-style:none;padding:0;margin:.75rem 0}
.activity-directions li{display:flex;gap:.5rem;align-items:flex-start;min-width:0}
.activity-directions li>span{font-size:1.5rem;flex:0 0 1.8rem}
.activity-directions b,.activity-directions small{display:block;line-height:1.5;overflow-wrap:anywhere}
.activity-directions small{color:#52626c}
.question-attempted .thumb-count{outline:2px solid #39776c;outline-offset:2px}
.question-attempted-tick{background:#286859!important;color:#fff!important;font-weight:900!important;min-width:18px;min-height:18px;border-radius:50%;font-size:13px!important}
.welcome-character{width:88px;height:88px;display:grid;place-items:center;margin:0 auto .5rem;font-size:3rem}
.welcome-character img{width:100%;height:100%;object-fit:contain;display:block}
.welcome-lesson{font-weight:700;color:var(--subject-accent);line-height:1.45;overflow-wrap:anywhere}
#studentStartDialog[open] .start-card{animation:studio-welcome .24s ease-out both}
.start-card{max-height:calc(100dvh - 3rem);overflow-y:auto;overscroll-behavior:contain}
.saved-lesson-thumbnail{display:grid;place-items:center;flex:0 0 74px;width:74px;height:66px;overflow:hidden;border:1px solid #dce4e6;border-radius:10px;background:#f5f8f9;font-size:1.8rem}
.saved-lesson-thumbnail img{height:100%;width:100%;object-fit:contain}
.saved-lesson-card{display:flex;min-width:0;flex-wrap:wrap}
.saved-lesson-copy{min-width:0;flex:1 1 200px}
.saved-lesson-copy h3{overflow-wrap:anywhere}
.saved-lesson-actions{flex-wrap:wrap;min-width:0;max-width:100%}
.saved-lesson-subject-tag{display:inline-block;color:var(--subject-accent);font-size:.75rem;font-weight:700}
.challenge-presets{display:flex;flex-wrap:wrap;gap:.5rem}
.workbench-dialog{padding:0;border:0;border-radius:20px;width:min(840px,calc(100vw - 2rem));max-width:calc(100vw - 2rem);max-height:calc(100dvh - 2rem);color:#16324f;box-shadow:0 24px 80px #102d4340}
.workbench-card{position:relative;padding:1.5rem;max-height:calc(100dvh - 2rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.workbench-card h2{padding-right:2rem;margin:.3rem 0 1rem;overflow-wrap:anywhere}
.workbench-card button{max-width:100%;white-space:normal}
.workbench-card input:not([type="checkbox"]),.workbench-card select{width:100%;box-sizing:border-box;min-height:44px;margin:.4rem 0 .7rem}
.home-current{border:1px solid #c8dedb;border-radius:14px;background:#f0f8f6;padding:1rem;margin-bottom:1rem}
.home-current h3{margin:.3rem 0;overflow-wrap:anywhere}
.home-current>small{color:#49696b}
.home-current .field-note{margin:.3rem 0}
.home-current button{margin-top:.5rem}
.teacher-home-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.teacher-home-actions button{display:flex;flex-direction:column;gap:.45rem;text-align:left;align-items:flex-start;padding:1rem;background:#fff;border:1px solid #d6e1e5;border-radius:14px;min-height:124px;min-width:0;cursor:pointer;color:#16324f;font:inherit}
.teacher-home-actions button:hover{background:#f3f8f8;border-color:#618d88}
.teacher-home-actions button>span{font-size:1.5rem;color:#126d69}
.teacher-home-actions small{color:#52626c;line-height:1.45;overflow-wrap:anywhere}
.teacher-template-panel{margin-top:1rem;border:1px solid #d6e1e5;border-radius:12px;padding:.8rem}
.teacher-template-panel>summary{font-weight:700;cursor:pointer}
.teacher-template{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;border-top:1px solid #e0e7e9;padding:.7rem 0}
.teacher-template>div{flex:1 1 200px;min-width:0;overflow-wrap:anywhere}
.teacher-template small{display:block;color:#52626c;margin-top:.25rem}
.teacher-template-panel label{display:block;margin-top:.8rem;font-weight:700}
.organiser-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;position:sticky;top:-1.5rem;z-index:2;background:#fff;padding:.75rem 0;border-bottom:1px solid #dae4e8}
.organiser-controls label{display:flex;align-items:center;gap:.4rem;min-height:44px}
#organiserSelection{font-size:.8rem;color:#52626c;margin-right:auto}
.organiser-list{display:grid;gap:.65rem}
.organiser-slide{display:flex;gap:.6rem;align-items:center;min-width:0;border:1px solid #d8e2e6;border-radius:12px;padding:.65rem;background:#fff}
.organiser-slide label{display:flex;gap:.7rem;align-items:center;min-width:0;flex:1;cursor:pointer}
.organiser-slide label>span:last-child{min-width:0}
.organiser-slide b,.organiser-slide small{display:block;overflow-wrap:anywhere;line-height:1.4}
.organiser-slide small{font-size:.75rem;color:#52626c;margin-top:.2rem}
.organiser-thumbnail{width:74px;height:56px;flex:0 0 74px;border-radius:8px;background:#eff4f5;display:grid;place-items:center;overflow:hidden;font-size:1.7rem}
.organiser-thumbnail img{width:100%;height:100%;object-fit:contain}
.organiser-confirm{background:#fff5ee;padding:.8rem;border:1px solid #e1b38e;border-radius:10px;margin:.6rem 0}
.organiser-confirm p{margin:0 0 .6rem}
.teacher-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:.65rem;margin:.8rem 0}
.teacher-overview>div{border:1px solid #d6e4e1;border-radius:12px;padding:.75rem;background:#f5faf8;min-width:0}
.teacher-overview strong,.teacher-overview span{display:block;overflow-wrap:anywhere}
.teacher-overview strong{font-size:1.35rem;color:#196058}
.teacher-overview span{font-size:.78rem;line-height:1.4;margin-top:.3rem}
.share-checklist{border:1px solid #d5e3de;border-radius:12px;padding:.75rem;margin:1rem 0;background:#f6faf8}
.share-checklist[data-state="review"]{background:#fff9ef;border-color:#dac99e}
.share-checklist>summary{font-weight:700;cursor:pointer}
.share-checklist ol{padding-left:1.3rem;max-height:240px;overflow-y:auto}
.share-checklist li{padding:.4rem 0;font-size:.85rem;line-height:1.5;overflow-wrap:anywhere}
.share-checklist li button{margin-left:.4rem}
.workbench-dialog button:focus-visible,.activity-directions button:focus-visible,.activity-directions summary:focus-visible{outline:3px solid #2a7e94;outline-offset:3px}
body.student-view .workbench-dialog,body.student-view .draft-save-state{display:none!important}
body.calm-mode #studentStartDialog .start-card{animation:none!important}
#studentStartDialog[data-motion="off"] .start-card{animation:none!important}
@keyframes studio-welcome{from{opacity:.7}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#studentStartDialog .start-card{animation:none!important}}
@media(max-width:700px){.teacher-home-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-card{padding:1rem}.organiser-controls{top:-1rem}.organiser-thumbnail{width:48px;flex-basis:48px;height:48px}.activity-directions ol{grid-template-columns:1fr}.saved-lesson-thumbnail{width:56px;flex-basis:56px;height:56px}}
@media(max-width:390px){.teacher-home-actions{grid-template-columns:1fr}.teacher-home-actions button{min-height:100px}.organiser-slide{flex-wrap:wrap}.organiser-slide label{flex-basis:100%}}
@media print{.activity-directions,.lesson-position-line,.draft-save-state,.workbench-dialog,.challenge-presets{display:none!important}}
.private-draft-dialog-card{padding:28px;display:grid;gap:16px;width:min(520px,calc(100vw - 48px));max-height:calc(100dvh - 56px);overflow:auto;box-sizing:border-box}
.private-draft-dialog-card h2,.private-draft-dialog-card p{margin:0}
.private-draft-dialog-card label{display:grid;gap:8px;font-weight:700}
.private-draft-dialog-card input{width:100%;min-width:0;box-sizing:border-box;padding:12px;border:1px solid #bccbd5;border-radius:10px;font:inherit}
.private-draft-actions,.private-draft-share-note{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.private-draft-actions{justify-content:flex-end}
.private-draft-share-note{padding:14px;border-radius:12px;background:#eef6ff;margin:16px 0}
.private-draft-share-note span{flex:1 1 210px}
.private-draft-label{display:inline-block;margin:4px 0;padding:4px 9px;border-radius:8px;background:#e9efff;color:#29498d;font-size:.82rem}
.private-draft-card{border-style:dashed}
#privateDraftStatus[data-state="error"]{color:#a42a32}
@media(max-width:520px){.private-draft-dialog-card{padding:20px;width:calc(100vw - 40px)}.private-draft-actions>*{flex:1 1 180px}}
