/* Scoped presentation: native forms stay mounted with their original handlers. */
/* Own the teacher canvas: the legacy desktop grid has a narrow sidebar track. */
body.tw-v2 #view-teacher>.container,body.tw-v2 #view-teacher.active>.container{display:block!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box;padding-inline:clamp(12px,2.5vw,40px)}
body.tw-v2 #view-teacher>.container>#teacherWorkspaceV2{grid-column:1/-1!important;grid-row:auto!important;justify-self:stretch!important;align-self:stretch!important;width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box}
body.tw-v2 #view-teacher>.container>.teacher-panel.tw-panel-visible{grid-column:1/-1!important;grid-row:auto!important;width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box}
body.tw-v2 #view-teacher>.container> :is(.teacher-hero,.teacher-stats,.teacher-tabs,#v465TeacherWorkspace,#vnnTeacherActionHub,.vnn-teacher-mobile-nav,.v357-coord-entry,.vnn-teacher-panel-nav){display:none!important}
body.tw-v2 #view-teacher :is(#vnnTeacherZones,.vnn-three-zone-scope,.vnn-scope-badge,.hw471-zone-switch,#vnnSgkApprovalShortcut){display:none!important}
body.tw-v2 #view-teacher .teacher-panel{display:none!important}
body.tw-v2 #view-teacher .teacher-panel.tw-panel-visible{display:block!important}
body.tw-v2 #view-teacher .teacher-section{box-shadow:none}
body.tw-v2 #view-teacher :is(.v357-coord-alert,.vnn-teacher-mobile-tabs,.vnn-teacher-mobile-navigation){display:none!important}
body.tw-v2 #view-teacher .v357-mobile-teacher-nav{display:none!important}
body.tw-v2[data-tw-job=common] #teacherWorkspaceV2 :is(.tw-context,.tw-attention,.tw-jobs){display:none!important}
body.tw-v2 #teacherWorkspaceV2{--tw-ink:#173e36;--tw-green:#116955;--tw-line:#d6e5df;--tw-muted:#63776e;color:var(--tw-ink);background:#f5f8f6;border:1px solid var(--tw-line);border-radius:20px;padding:24px;margin:12px 0 20px;font:15px/1.55 system-ui,sans-serif}
#teacherWorkspaceV2 *{box-sizing:border-box;min-width:0}
#teacherWorkspaceV2 [hidden]{display:none!important}
#teacherWorkspaceV2 button,#teacherWorkspaceV2 input,#teacherWorkspaceV2 select,#teacherWorkspaceV2 textarea,#teacherWorkspaceV2 summary{font:inherit}
#teacherWorkspaceV2 button{border:1px solid var(--tw-line);border-radius:10px;background:#fff;padding:10px 15px;color:var(--tw-ink);cursor:pointer;min-height:44px}
#teacherWorkspaceV2 button:disabled{opacity:.55;cursor:wait}
#teacherWorkspaceV2 :is(button,input,select,textarea,summary):focus-visible{outline:3px solid #21a888;outline-offset:3px}
#teacherWorkspaceV2 :is(h2,h3,p){margin:0}
#teacherWorkspaceV2 h2{font-size:26px;letter-spacing:-.5px;margin:5px 0}
#teacherWorkspaceV2 h3{font-size:21px}
#teacherWorkspaceV2 p,#teacherWorkspaceV2 small{color:var(--tw-muted)}
#teacherWorkspaceV2 .tw-eyebrow{font-size:11px;letter-spacing:1.2px;font-weight:750}
#teacherWorkspaceV2 .tw-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px 20px;align-items:center;margin-bottom:14px}
#teacherWorkspaceV2 .tw-heading>div{flex:1 1 360px;min-width:0}
#teacherWorkspaceV2 .tw-common{position:relative;flex:none}
#teacherWorkspaceV2 .tw-common summary{padding:10px 15px;border:1px solid var(--tw-line);border-radius:10px;background:white;cursor:pointer}
#teacherWorkspaceV2 .tw-common>div{position:absolute;right:0;top:50px;width:220px;background:#fff;border:1px solid var(--tw-line);padding:8px;z-index:10;border-radius:12px;box-shadow:0 12px 32px #12382b21;display:grid;gap:5px}
#teacherWorkspaceV2 .tw-common button{text-align:left;border:0}
#teacherWorkspaceV2 .tw-zones{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#teacherWorkspaceV2 .tw-zones button{text-align:left;padding:18px;display:grid;gap:5px;border:2px solid transparent;box-shadow:0 0 0 1px var(--tw-line)}
#teacherWorkspaceV2 .tw-zones button>span{font-size:24px}
#teacherWorkspaceV2 .tw-zones strong{font-size:18px}
#teacherWorkspaceV2 .tw-zones small{font-size:13px}
#teacherWorkspaceV2 .tw-zones [aria-pressed=true]{border-color:var(--tw-green);background:#e8f5ed;box-shadow:none}
#teacherWorkspaceV2 .tw-context{display:flex;align-items:end;gap:14px;background:white;border:1px solid var(--tw-line);border-radius:12px;padding:14px;margin:18px 0}
#teacherWorkspaceV2 label{display:grid;gap:5px;font-size:13px;font-weight:650}
#teacherWorkspaceV2 input,#teacherWorkspaceV2 select,#teacherWorkspaceV2 textarea{width:100%;background:#fff;border:1px solid #bdcec5;border-radius:8px;padding:10px;min-height:44px;color:var(--tw-ink)}
#teacherWorkspaceV2 .tw-context label{min-width:170px}
#teacherWorkspaceV2 .tw-context p{flex:1;font-size:13px;align-self:center}
#teacherWorkspaceV2 .tw-attention{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0 24px}
#teacherWorkspaceV2 .tw-attention button{display:flex;align-items:center;gap:13px;text-align:left;padding:16px}
#teacherWorkspaceV2 .tw-attention strong{font-size:27px;color:var(--tw-green)}
#teacherWorkspaceV2 .tw-attention span{font-size:14px}
#teacherWorkspaceV2 .tw-jobs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;border-bottom:1px solid var(--tw-line);padding-bottom:12px}
#teacherWorkspaceV2 .tw-jobs button{border:0;background:transparent;display:flex;align-items:center;gap:8px;padding:10px;justify-content:center;font-weight:650}
#teacherWorkspaceV2 .tw-jobs span{display:grid;place-items:center;background:#e6ede8;width:24px;height:24px;border-radius:50%;font-size:12px;flex:none}
#teacherWorkspaceV2 .tw-jobs [aria-current=page]{color:white;background:var(--tw-green)}
#teacherWorkspaceV2 .tw-jobs [aria-current=page] span{background:#ffffff24}
#teacherWorkspaceV2 .tw-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}
#teacherWorkspaceV2 #twSubnav{display:flex;gap:6px;flex-wrap:wrap}
#teacherWorkspaceV2 #twSubnav button{padding:7px 12px;font-size:13px}
#teacherWorkspaceV2 #twSubnav [aria-pressed=true]{background:#e4f1e9;border-color:var(--tw-green)}
#teacherWorkspaceV2 #twLoad{font-size:13px;margin:12px 0}
#teacherWorkspaceV2 .tw-class-list{display:grid;gap:10px}
#teacherWorkspaceV2 .tw-class-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;padding:16px;border:1px solid var(--tw-line);border-radius:12px}
#teacherWorkspaceV2 .tw-class-list small{display:block;margin-top:4px}
#teacherWorkspaceV2 .tw-create{background:white;border:1px solid var(--tw-line);border-radius:12px;padding:15px;margin-top:16px}
#teacherWorkspaceV2 .tw-create summary{font-weight:700;cursor:pointer}
#teacherWorkspaceV2 .tw-create form{margin-top:15px;display:grid;gap:14px}
#teacherWorkspaceV2 .tw-form-grid,#teacherWorkspaceV2 .tw-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#teacherWorkspaceV2 fieldset{border:1px solid var(--tw-line);border-radius:10px;display:flex;gap:14px;flex-wrap:wrap}
#teacherWorkspaceV2 fieldset label{display:flex;align-items:center;gap:5px}
#teacherWorkspaceV2 fieldset input{width:auto;min-height:0}
#teacherWorkspaceV2 .tw-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}
#teacherWorkspaceV2 .tw-filters>label{flex:1}
#teacherWorkspaceV2 .tw-filters>span{font-size:13px;color:var(--tw-muted);padding-bottom:10px}
#teacherWorkspaceV2 .tw-result{border:1px solid var(--tw-line);border-radius:12px;background:#fff;margin:10px 0;overflow:hidden}
#teacherWorkspaceV2 .tw-result>summary{padding:16px;display:flex;align-items:center;gap:12px;cursor:pointer}
#teacherWorkspaceV2 .tw-result>summary>span:first-child{flex:1}
#teacherWorkspaceV2 .tw-result small{display:block}
#teacherWorkspaceV2 .tw-status{font-size:12px;padding:5px 10px;background:#edf2ee;border-radius:20px;white-space:nowrap}
#teacherWorkspaceV2 .tw-status[data-status=released]{background:#ddf4e5;color:#176a3f}
#teacherWorkspaceV2 .tw-status[data-status=waiting]{background:#fff0ce;color:#855300}
#teacherWorkspaceV2 .tw-overdue{font-size:12px;color:#a04430}
#teacherWorkspaceV2 .tw-result-body{padding:18px;border-top:1px solid var(--tw-line)}
#teacherWorkspaceV2 .tw-evidence{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 0;border-bottom:1px solid #edf2ee}
#teacherWorkspaceV2 .tw-evidence small{flex-basis:100%}
#teacherWorkspaceV2 .tw-editor{margin-top:18px;background:#f6f9f6;padding:16px;border-radius:10px}
#teacherWorkspaceV2 .tw-wide{grid-column:1/-1}
#teacherWorkspaceV2 .tw-editor-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#teacherWorkspaceV2 [data-tw-save=release],#teacherWorkspaceV2 .tw-create [type=submit]{background:var(--tw-green);color:white}
#teacherWorkspaceV2 .tw-empty{background:white;border:1px dashed var(--tw-line);border-radius:12px;padding:30px;text-align:center}
.tw-confirm{width:min(480px,calc(100% - 32px));box-sizing:border-box;border:1px solid #c9dacc;border-radius:16px;padding:24px;color:#173928;background:#fff;font:inherit}.tw-confirm::backdrop{background:#102c2399}.tw-confirm p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.tw-confirm form>div{display:flex;gap:12px;justify-content:flex-end}.tw-confirm button{padding:10px 18px;border:1px solid #c9dacc;border-radius:8px;cursor:pointer}.tw-confirm [value=confirm]{background:#256448;color:white}
@media(max-width:850px){body.tw-v2 #teacherWorkspaceV2{padding:16px}.tw-v2 #teacherWorkspaceV2 .tw-context{flex-wrap:wrap}.tw-v2 #teacherWorkspaceV2 .tw-context p{flex-basis:100%}.tw-v2 #teacherWorkspaceV2 .tw-jobs{grid-template-columns:repeat(3,minmax(0,1fr))}.tw-v2 #teacherWorkspaceV2 .tw-section-head{align-items:start;flex-direction:column}}
@media(max-width:540px){body.tw-v2 #teacherWorkspaceV2{padding:12px;border-radius:14px}.tw-v2 #teacherWorkspaceV2 h2{font-size:22px}.tw-v2 #teacherWorkspaceV2 .tw-heading{display:block}.tw-v2 #teacherWorkspaceV2 .tw-common{margin-top:12px}.tw-v2 #teacherWorkspaceV2 .tw-common>div{right:auto;left:0}.tw-v2 #teacherWorkspaceV2 .tw-zones{gap:6px}.tw-v2 #teacherWorkspaceV2 .tw-zones button{padding:10px}.tw-v2 #teacherWorkspaceV2 .tw-zones strong{font-size:14px}.tw-v2 #teacherWorkspaceV2 .tw-zones small{display:none}.tw-v2 #teacherWorkspaceV2 .tw-context label{min-width:0;flex:1}.tw-v2 #teacherWorkspaceV2 .tw-attention{gap:6px}.tw-v2 #teacherWorkspaceV2 .tw-attention button{display:grid;gap:2px;padding:10px}.tw-v2 #teacherWorkspaceV2 .tw-attention span{font-size:12px}.tw-v2 #teacherWorkspaceV2 .tw-jobs{grid-template-columns:repeat(2,minmax(0,1fr))}.tw-v2 #teacherWorkspaceV2 .tw-jobs button{justify-content:start}.tw-v2 #teacherWorkspaceV2 .tw-form-grid,.tw-v2 #teacherWorkspaceV2 .tw-editor{grid-template-columns:1fr}.tw-v2 #teacherWorkspaceV2 .tw-result>summary{padding:12px;flex-wrap:wrap}.tw-v2 #teacherWorkspaceV2 .tw-class-list article{align-items:start;flex-direction:column}}

/* Class context and Lesson tools stay inside the selected program. */
body.tw-v2[data-tw-job=classes] #vnnStudentDirectoryToolbar>.vnn-directory-tabs,body.tw-v2[data-tw-job=classes] #vnnStudentDirectoryToolbar>button{display:none!important}
#teacherWorkspaceV2 .tw-bulk{background:white;border:1px solid var(--tw-line);padding:18px;border-radius:12px}#teacherWorkspaceV2 .tw-bulk>label{display:grid;gap:6px;margin:12px 0}#teacherWorkspaceV2 .tw-bulk select{width:100%;padding:10px;border:1px solid var(--tw-line);border-radius:8px}#teacherWorkspaceV2 .tw-bulk fieldset{border:1px solid var(--tw-line);border-radius:10px;margin:12px 0;padding:12px}#teacherWorkspaceV2 .tw-bulk-pupil{display:flex;align-items:center;gap:10px;padding:8px}#teacherWorkspaceV2 .tw-bulk-pupil input{width:18px;height:18px}

body.tw-v2[data-tw-job=classes][data-tw-sub=review] #teacherWorkspaceV2 :is(.tw-context,.tw-attention){display:none!important}#teacherWorkspaceV2 .tw-placement article{background:white;border:1px solid var(--tw-line);border-radius:10px;padding:12px;margin:12px 0}#teacherWorkspaceV2 .tw-placement h4{margin:0 0 8px}#teacherWorkspaceV2 .tw-placement li{padding:6px 0}#teacherWorkspaceV2 .tw-placement li span{color:var(--tw-muted);margin-left:10px}

/* Program -> classes -> pupil status. */
body.tw-v2[data-tw-job=classes][data-tw-sub=classes] #teacherWorkspaceV2 .tw-attention,body.tw-v2[data-tw-job=classes][data-tw-sub=classes] #teacherWorkspaceV2 .tw-context label:has(#twClass),body.tw-v2[data-tw-job=classes][data-tw-sub=classes] #twScope{display:none!important}#teacherWorkspaceV2 .tw-class-card{display:grid;text-align:left;gap:7px;width:100%;padding:18px}#teacherWorkspaceV2 .tw-class-card strong{font-size:18px}#teacherWorkspaceV2 .tw-class-card span{color:var(--tw-green);font-weight:650}#teacherWorkspaceV2 .tw-class-pupils h3{margin:16px 0 4px}#teacherWorkspaceV2 .tw-pupil-list{display:grid;gap:10px;margin-top:16px}#teacherWorkspaceV2 .tw-pupil-list article{padding:16px;border:1px solid var(--tw-line);border-radius:12px;background:white}#teacherWorkspaceV2 .tw-pupil-list article>div{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap}#teacherWorkspaceV2 .tw-pupil-list article p{margin:8px 0}

/* Keep routine teaching actions prominent; authoring tools stay available. */
#teacherWorkspaceV2 .tw-tools{position:relative}#teacherWorkspaceV2 .tw-tools summary{padding:10px 12px;border:1px solid var(--tw-line);border-radius:9px;cursor:pointer;background:#fff}#teacherWorkspaceV2 .tw-tools>div{position:absolute;right:0;top:100%;z-index:30;min-width:220px;display:grid;gap:5px;padding:10px;background:#fff;border:1px solid var(--tw-line);border-radius:12px;box-shadow:0 10px 28px #163e2520}#teacherWorkspaceV2 .tw-tools button{text-align:left}#teacherWorkspaceV2 .tw-muted{color:var(--tw-muted);font-size:13px;line-height:1.6}#teacherWorkspaceV2 .tw-pupil-actions{display:flex;justify-content:flex-start;gap:8px;flex-wrap:wrap}#teacherWorkspaceV2 .tw-pupil-actions button:first-child{background:var(--tw-green);color:white}#teacherWorkspaceV2 .tw-class-card small{font-size:13px;line-height:1.5}
body.tw-v2 #teacher-homework-preview .hw471-skills{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
body.tw-v2 #teacherWorkspaceV2 .tw-jobs button[aria-current=page],body.tw-v2 #teacherWorkspaceV2 .tw-jobs button[aria-current=page] *,body.tw-v2 #teacherWorkspaceV2 .tw-pupil-actions button:first-child,body.tw-v2 #teacherWorkspaceV2 .tw-pupil-actions button:first-child *{color:#fff!important}
@media(max-width:540px){#teacherWorkspaceV2 .tw-tools>div{right:auto;left:0}#teacherWorkspaceV2 .tw-pupil-actions button{flex:1;min-width:130px}}

/* The action queue is global; class work remains scoped below it. */
#teacherWorkspaceV2 .tw-tasks{padding:16px;border:1px solid #bfd9ce;border-radius:14px;background:#fff;margin:18px 0}#teacherWorkspaceV2 .tw-tasks h3{margin:0}#teacherWorkspaceV2 .tw-tasks-head{display:flex;justify-content:space-between;gap:12px;align-items:start}#teacherWorkspaceV2 .tw-tasks-head p{margin:4px 0 12px;color:var(--tw-muted);font-size:13px}#teacherWorkspaceV2 .tw-task-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}#teacherWorkspaceV2 .tw-task-counts button{text-align:left;display:grid;gap:3px;padding:12px;background:#f3f8f5}#teacherWorkspaceV2 .tw-task-counts strong{font-size:24px;color:var(--tw-green)}#teacherWorkspaceV2 .tw-task-counts span{font-size:13px}#teacherWorkspaceV2 .tw-task-counts [aria-pressed=true]{border:2px solid var(--tw-green)}#teacherWorkspaceV2 .tw-task-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;margin:14px 0 6px}#teacherWorkspaceV2 .tw-task-toolbar small{margin-left:auto;color:var(--tw-muted)}#teacherWorkspaceV2 .tw-task-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 0;border-top:1px solid var(--tw-line)}#teacherWorkspaceV2 .tw-task-item p{margin:3px 0;font-size:13px}#teacherWorkspaceV2 .tw-task-item small{color:var(--tw-muted)}#teacherWorkspaceV2 .tw-task-item button{flex-shrink:0}#teacherWorkspaceV2 .tw-task-note{display:block;color:var(--tw-muted);line-height:1.6;margin-top:12px}
@media(max-width:700px){#teacherWorkspaceV2 .tw-task-counts{grid-template-columns:repeat(2,minmax(0,1fr))}#teacherWorkspaceV2 .tw-task-item{align-items:start;flex-direction:column}#teacherWorkspaceV2 .tw-tasks-head{flex-wrap:wrap}}

/* Compact overview on wide screens, stacked and readable on phones. */
#teacherWorkspaceV2 .tw-class-list,#teacherWorkspaceV2 .tw-pupil-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#teacherWorkspaceV2 .tw-class-card{align-content:start;padding:14px;gap:5px}
#teacherWorkspaceV2 .tw-zones button{padding:12px 15px;gap:3px}
#teacherWorkspaceV2 .tw-zones button>span{font-size:20px}
#teacherWorkspaceV2 .tw-tasks{margin:12px 0;padding:14px}
#teacherWorkspaceV2 .tw-context{margin:12px 0;padding:12px}
#teacherWorkspaceV2 .tw-attention{margin:12px 0}
#teacherWorkspaceV2 .tw-attention button{padding:12px}
#teacherWorkspaceV2 .tw-section-head{margin-top:14px}
@media(min-width:1101px){#teacherWorkspaceV2 #twTaskList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}#teacherWorkspaceV2 .tw-task-toolbar,#teacherWorkspaceV2 .tw-task-note,#teacherWorkspaceV2 [data-tw-task-expand],#teacherWorkspaceV2 #twTaskList>p{grid-column:1/-1}#teacherWorkspaceV2 .tw-task-item>div{flex:1;min-width:0}}
@media(max-width:1100px){#teacherWorkspaceV2 .tw-class-list,#teacherWorkspaceV2 .tw-pupil-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){#teacherWorkspaceV2 .tw-class-list,#teacherWorkspaceV2 .tw-pupil-list{grid-template-columns:minmax(0,1fr)}#teacherWorkspaceV2 .tw-heading>div{flex-basis:100%}#teacherWorkspaceV2 .tw-common{margin-top:0}#teacherWorkspaceV2 .tw-tasks{padding:10px}#teacherWorkspaceV2 .tw-zones button{padding:10px 7px}#teacherWorkspaceV2 h2{font-size:22px}}

/* Clear entry to class creation; SGK-only tools never mount visibly in common/communication work. */
#teacherWorkspaceV2 .tw-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}body.tw-v2 #teacherWorkspaceV2 [data-tw-create]{background:var(--tw-green);color:#fff!important;font-weight:700}body.tw-v2:not([data-vnn-teacher-zone=sgk]) #view-teacher #vnnManagedStudentCreate{display:none!important}
body.tw-v2 #teacherWorkspaceV2 .tw-heading>.tw-heading-actions{flex:0 0 auto}#teacherWorkspaceV2 [data-tw-create]{white-space:nowrap}
body.tw-v2 #view-teacher #vnnManagedStudentCreate :is(.vnn-sgk-progress-head,#vnnSgkStudentProgressList,.vnn-sgk-tab-assign-link){display:none!important}
