
/* Isolated Unit Test module. Uses separate classes; no changes to existing SGK tabs. */
.sgk-u3test-entry[hidden],.sgk-u3test-teacher[hidden],.sgk-u3test-overlay[hidden]{display:none!important}
.sgk-u3test-entry{margin-top:18px;padding:16px 18px;border:1px solid #a6cabb;border-radius:16px;background:#f0f9f4;color:#183b30}
.sgk-u3test-entry p{margin:9px 0;line-height:1.5}
.sgk-u3test-entry h3{margin:0;font-size:1.1rem}
.sgk-u3test-entry .u3t-meta,.sgk-u3test-teacher .u3t-meta{font-size:.87rem;color:#46665a}
.u3t-entry-title{display:flex;align-items:center;gap:12px}
.u3t-entry-title>span{font-size:2rem}
.u3t-entry-title small{display:block;margin-top:4px;color:#526b5f}
.u3t-entry-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.sgk-u3test-entry button,.sgk-u3test-teacher button,.u3t-dialog button{cursor:pointer}
.u3t-primary,.u3t-teacher-row button{border:0;background:#196f55;color:white;border-radius:10px;padding:11px 16px;font-weight:750}
.u3t-primary:hover,.u3t-teacher-row button:hover{background:#125b45}
.u3t-error{color:#a23636}
.u3t-score{color:#106a4b;font-size:1.12rem;font-weight:800}
.sgk-u3test-teacher{margin-top:18px;border:1px solid #d1e1da;border-radius:16px;padding:16px;background:#f9fcfa}
.sgk-u3test-teacher h3{margin:0 0 9px}
.u3t-teacher-list{display:grid;gap:10px;max-height:680px;overflow:auto}
.u3t-teacher-row{border:1px solid #deebe4;border-radius:12px;padding:12px;background:white}
.u3t-teacher-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.u3t-teacher-heading small{color:#567166}
.u3t-teacher-row p{margin:8px 0;font-size:.9rem}
.u3t-controls{display:flex;flex-wrap:wrap;align-items:end;gap:8px}
.u3t-controls label{display:flex;flex-direction:column;gap:4px;font-size:.82rem;color:#456056}
.u3t-controls input,.u3t-controls select{border:1px solid #bfd0c7;padding:8px;border-radius:8px;max-width:210px;background:white;color:#173b2b}
.u3t-controls label.u3t-check{flex-direction:row;align-items:center;padding-bottom:9px}
.u3t-controls input[type=checkbox]{width:17px;height:17px}
.u3t-row-msg{display:block;margin-top:6px}
body.sgk-u3test-open{overflow:hidden}
.sgk-u3test-overlay{position:fixed;inset:0;background:rgba(11,31,26,.76);z-index:99999;display:flex;align-items:center;justify-content:center;padding:8px}
.u3t-dialog{width:min(920px,100%);height:min(96dvh,860px);max-height:96dvh;overflow:auto;background:#fff;color:#172e26;border-radius:18px;box-shadow:0 18px 50px #081b1866;display:flex;flex-direction:column}
.u3t-top{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:14px 18px;background:#134e3e;color:#fff;position:sticky;top:0;z-index:2}
.u3t-top>div:first-child{display:flex;flex-direction:column;gap:3px}
.u3t-top small{font-size:.8rem;opacity:.87}
.u3t-top>div:last-child{display:flex;align-items:center;gap:10px}
.u3t-top #u3tClock{font-variant-numeric:tabular-nums;font-size:1.25rem;white-space:nowrap}
.u3t-top #u3tClock.urgent{color:#ffcc8c}
.u3t-top button{background:#fff2;border:1px solid #fff4;color:white;border-radius:8px;padding:4px 10px;font-size:1.2rem}
.u3t-progress{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 18px;font-size:.84rem;color:#536e60}
.u3t-jump{padding:6px 18px 10px;display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:5px;border-bottom:1px solid #e8eee9}
.u3t-jump button{padding:5px 0;min-width:0;border:1px solid #c8d9ce;background:#fff;border-radius:7px;color:#376450;font-weight:700;font-size:.77rem}
.u3t-jump button.answered{background:#e1f6ec;border-color:#82bf9c}
.u3t-jump button.active{background:#116b4c!important;color:white;border-color:#116b4c}
.u3t-main{padding:18px 24px;flex:1}
.u3t-section{display:inline-flex;padding:6px 11px;background:#e8f5ec;color:#196f50;border-radius:999px;font-weight:750;font-size:.82rem}
.u3t-main h3{margin:12px 0 4px;color:#204636;font-size:1.12rem}
.u3t-main .u3t-prompt{font-size:1.1rem;line-height:1.5}
.u3t-context{white-space:pre-wrap;background:#f7faf7;border-left:4px solid #87b59b;border-radius:7px;padding:12px;line-height:1.68;color:#30473c;margin:12px 0}
.u3t-audio{background:#f0faf5;border:1px solid #b8dcc7;border-radius:12px;padding:12px;margin:14px 0;display:flex;flex-direction:column;gap:8px}
.u3t-audio audio{width:100%;min-height:46px}
.u3t-audio small{color:#5f7567}
.u3t-options{display:grid;gap:10px;margin:18px 0}
.u3t-option{border:1px solid #bfcfc4;background:#fff;border-radius:12px;padding:12px;display:flex;gap:10px;align-items:center;cursor:pointer;line-height:1.45}
.u3t-option.selected{border:2px solid #1c8a59;background:#effaf4}
.u3t-option b{color:#196f50}
.u3t-option input{accent-color:#196f50;min-width:18px;min-height:18px}
.u3t-main textarea{width:100%;min-height:84px;box-sizing:border-box;border:1px solid #a9bfb0;border-radius:10px;padding:12px;font:inherit;resize:vertical}
.u3t-footer{position:sticky;bottom:0;background:#fff;border-top:1px solid #e2e9e3;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 18px}
.u3t-footer button{padding:11px 14px;border:1px solid #a6cbb1;border-radius:10px;background:white;font-weight:700;color:#245643}
.u3t-footer button.u3t-primary{background:#196f55;color:white}
.u3t-footer button:disabled{opacity:.45;cursor:not-allowed}
.u3t-footnote{color:#6a7c72;font-size:.75rem}
@media(max-width:680px){
 .sgk-u3test-entry{padding:12px}
 .sgk-u3test-overlay{padding:0}
 .u3t-dialog{height:100dvh;max-height:100dvh;border-radius:0}
 .u3t-top{padding:10px 12px}
 .u3t-top>div:first-child{max-width:65%}
 .u3t-top small{font-size:.69rem}
 .u3t-progress{padding:9px 12px}
 .u3t-jump{grid-template-columns:repeat(10,minmax(0,1fr));padding:8px 12px;gap:4px}
 .u3t-main{padding:14px}
 .u3t-main .u3t-prompt{font-size:1rem}
 .u3t-footer{padding:10px 12px}
 .u3t-footnote{width:100%}
 .u3t-controls{flex-direction:column;align-items:stretch}
 .u3t-controls input,.u3t-controls select{max-width:100%}
}

/* Unit 3 teacher monitoring and class-level assignment; scoped, responsive. */
.sgk-u3test-teacher .u3t-summary{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.sgk-u3test-teacher .u3t-summary b{font-size:.84rem;background:#eaf5ee;border:1px solid #c5dfd0;padding:8px 10px;border-radius:8px}
.sgk-u3test-teacher .u3t-bulk{background:#f0f8f3;border:1px solid #bfdac7;border-radius:12px;padding:12px;margin:12px 0}
.sgk-u3test-teacher h4{margin:0 0 10px;color:#16483f}
.sgk-u3test-teacher .u3t-bulk small{display:block;margin-top:9px;color:#486557;line-height:1.5}
.sgk-u3test-teacher .u3t-controls button{border:1px solid #bed3c5;border-radius:9px;padding:9px 12px;background:#1a6b50;color:#fff;font-weight:700}
.sgk-u3test-teacher .u3t-controls button:disabled{background:#abc2b4;color:#426353;cursor:not-allowed}
.sgk-u3test-teacher .u3t-roster-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:18px 0 10px}
.sgk-u3test-teacher .u3t-roster-head h4{margin:0}
.sgk-u3test-teacher .u3t-roster-head button{padding:8px 12px;border:1px solid #aacbb6;background:#fff;border-radius:9px;color:#205e49}
.sgk-u3test-teacher .u3t-details[hidden]{display:none!important}
.sgk-u3test-teacher .u3t-details{border:1px solid #d1e6d6;border-radius:10px;padding:12px;margin-top:10px;background:#f9fdfb}
.sgk-u3test-teacher .u3t-attempt{border:1px solid #d4e3d8;border-radius:9px;margin:9px 0;padding:9px;background:#fff}
.sgk-u3test-teacher .u3t-attempt summary{cursor:pointer;font-weight:700;color:#245642;line-height:1.5}
.sgk-u3test-teacher .u3t-answer-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px 0}
.sgk-u3test-teacher .u3t-answer-row{padding:9px;border-radius:8px;border:1px solid #d5e3da;background:#fff;min-width:0}
.sgk-u3test-teacher .u3t-answer-row b,.sgk-u3test-teacher .u3t-answer-row span{font-size:.81rem}
.sgk-u3test-teacher .u3t-answer-row span{float:right}
.sgk-u3test-teacher .u3t-answer-row p{clear:both;overflow-wrap:anywhere;margin:6px 0 0}
.sgk-u3test-teacher .u3t-answer-row.u3t-right{background:#e9f7ee;border-color:#a7d1b6}
.sgk-u3test-teacher .u3t-answer-row.u3t-wrong{background:#fff4ef;border-color:#e7c6b6}
.sgk-u3test-teacher .u3t-answer-row.u3t-empty{background:#f4f5f4;color:#607369}
@media(max-width:680px){
 .sgk-u3test-teacher .u3t-summary b{flex:1 0 38%}
 .sgk-u3test-teacher .u3t-answer-list{grid-template-columns:minmax(0,1fr)}
 .sgk-u3test-teacher .u3t-roster-head{align-items:flex-start}
}

/* Teacher-first Unit Test layout: top of Dashboard, legacy homework stays untouched. */
.panel[data-panel="teacher"] > #sgkU3TestTeacher{margin:0 0 18px;padding:18px;border:2px solid #a8cdb5;background:#f8fcf9}
.panel[data-panel="teacher"] > #sgkU3TestTeacher > h3{font-size:clamp(1.2rem,2.2vw,1.65rem)}
.sgk-u3test-teacher .u3t-roster-hint{font-size:.85rem;color:#536e60;margin:0 0 10px;line-height:1.5}
.sgk-u3test-teacher .u3t-bulk p.u3t-meta{margin:0 0 12px;line-height:1.5}
@media(max-width:680px){.panel[data-panel="teacher"] > #sgkU3TestTeacher{padding:12px;margin-bottom:12px}}

/* Unit Test 3: released per-section results and class-only Top. */
.sgk-u3test-entry .u3t-report,.sgk-u3test-teacher .u3t-report{margin-top:16px;padding:14px;border:1px solid #bbd9c8;border-radius:14px;background:#fff}
.u3t-report h4,.u3t-leader h4{margin:0 0 9px;font-size:1.1rem;color:#194b3c}
.u3t-report>p{line-height:1.5}
.u3t-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.u3t-skill{border:1px solid #dce8df;border-radius:11px;padding:12px;background:#f9fbf9;min-width:0}
.u3t-skill.strong{border-color:#a8d5b8;background:#f0f9f3}
.u3t-skill.weak{border-color:#edcbb7;background:#fff7f0}
.u3t-skill-title{display:flex;justify-content:space-between;align-items:baseline;gap:9px;flex-wrap:wrap;font-size:.88rem}
.u3t-skill-title strong{white-space:nowrap;color:#174d38;font-variant-numeric:tabular-nums}
.u3t-skill-info{font-size:.79rem;color:#4c695d;margin:6px 0}
.u3t-skill-bar{height:8px;background:#e2eae4;border-radius:999px;overflow:hidden}
.u3t-skill-bar i{display:block;background:#287c5b;height:100%;border-radius:999px}
.u3t-skill.weak .u3t-skill-bar i{background:#bd7943}
.u3t-skill small{display:block;margin-top:9px;color:#6f523c;line-height:1.5}
.u3t-score-total{border-top:1px solid #e4eee7;margin-top:12px;padding-top:12px;font-size:1.05rem}
.u3t-report>small{color:#587062;line-height:1.5;display:block}
.u3t-leader{margin:15px 0;padding:14px;border:1px solid #ded8b7;border-radius:12px;background:#fffef6;color:#234438}
.u3t-leader .u3t-leader-list{display:grid;gap:7px;margin:10px 0}
.u3t-leader-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border-radius:9px;background:#fff;border:1px solid #eee8cb;flex-wrap:wrap}
.u3t-leader-row b{font-size:.88rem}
.u3t-leader-row span{font-size:.83rem;font-variant-numeric:tabular-nums}
.u3t-leader-row.self{background:#e6f6ed;border-color:#9ccbaf}
.u3t-leader small{display:block;font-size:.78rem;color:#6b6a55;line-height:1.5}
.u3t-my-rank{font-weight:700}
.sgk-u3test-teacher .u3t-leader{margin:10px 0 13px}
@media(max-width:680px){
 .u3t-skills{grid-template-columns:minmax(0,1fr)}
 .u3t-leader-row{align-items:flex-start;flex-direction:column}
 .sgk-u3test-entry .u3t-report,.sgk-u3test-teacher .u3t-report{padding:10px}
}

/* Result Publishing Center — scoped to SGK G6/U3 teacher panel only. */
#sgkU3TestTeacher .u3t-publish-center{border:1px solid #b4d1bf;background:#f7fbf8;border-radius:16px;padding:16px;margin:14px 0}
#sgkU3TestTeacher .u3t-publish-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
#sgkU3TestTeacher .u3t-publish-heading h4{font-size:1.16rem;margin:0 0 6px}
#sgkU3TestTeacher .u3t-publish-heading p{margin:0;color:#527063;font-size:.91rem;line-height:1.45}
#sgkU3TestTeacher .u3t-publish-pill{border:1px solid #bfdac7;background:white;border-radius:999px;padding:6px 10px;font-size:.79rem;font-weight:700;color:#31634c}
#sgkU3TestTeacher .u3t-publish-stats{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}
#sgkU3TestTeacher .u3t-publish-stats span{border:1px solid #d7e6db;background:#fff;border-radius:9px;padding:9px 11px;font-size:.85rem}
#sgkU3TestTeacher .u3t-publish-stats b{font-variant-numeric:tabular-nums;color:#155f45;font-size:1.04rem}
#sgkU3TestTeacher .u3t-publish-list{display:grid;gap:7px;margin:12px 0}
#sgkU3TestTeacher .u3t-publish-student{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1px solid #d6e7db;border-radius:10px;padding:10px}
#sgkU3TestTeacher .u3t-publish-student label{display:flex;align-items:flex-start;gap:9px;min-width:0;flex:1;cursor:pointer}
#sgkU3TestTeacher .u3t-publish-student label input{height:18px;width:18px;accent-color:#196f55;flex-shrink:0;margin-top:2px}
#sgkU3TestTeacher .u3t-publish-student label span{min-width:0;overflow-wrap:anywhere;line-height:1.45}
#sgkU3TestTeacher .u3t-publish-student strong{display:block;color:#204c3c}
#sgkU3TestTeacher .u3t-publish-student small{display:block;font-size:.79rem;color:#547166}
#sgkU3TestTeacher .u3t-publish-student button,#sgkU3TestTeacher .u3t-publish-preview-head button{border:1px solid #a7c6b3;background:#fff;color:#16583e;border-radius:9px;padding:8px 11px;font-weight:700}
#sgkU3TestTeacher .u3t-publish-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
#sgkU3TestTeacher .u3t-publish-actions .u3t-select-all{display:flex;align-items:center;gap:7px;font-size:.88rem;color:#32594b}
#sgkU3TestTeacher .u3t-publish-actions input{accent-color:#1a7855;width:17px;height:17px}
#sgkU3TestTeacher .u3t-publish-actions button{border:1px solid #196c52;background:#196c52;border-radius:10px;padding:10px 13px;color:white;font-weight:700}
#sgkU3TestTeacher .u3t-publish-actions button.u3t-publish-class{background:#fff;color:#19634b}
#sgkU3TestTeacher .u3t-publish-actions button:disabled,#sgkU3TestTeacher .u3t-publish-student button:disabled{opacity:.43;cursor:not-allowed}
#sgkU3TestTeacher .u3t-publish-empty{padding:13px;background:#ecf5ef;border-radius:10px;font-weight:600;color:#315c43}
#sgkU3TestTeacher .u3t-publish-feedback{font-size:.86rem;min-height:1.1em;margin:9px 0}
#sgkU3TestTeacher .u3t-publish-preview[hidden]{display:none!important}
#sgkU3TestTeacher .u3t-publish-preview{margin-top:13px;border:1px solid #b5d9c0;padding:12px;border-radius:12px;background:#fff}
#sgkU3TestTeacher .u3t-publish-preview-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
#sgkU3TestTeacher .u3t-publish-center>small{color:#5f7567;display:block;font-size:.8rem;line-height:1.5}
@media(max-width:680px){
 #sgkU3TestTeacher .u3t-publish-center{padding:12px}
 #sgkU3TestTeacher .u3t-publish-student{flex-direction:column;align-items:stretch}
 #sgkU3TestTeacher .u3t-publish-student button{align-self:flex-end}
 #sgkU3TestTeacher .u3t-publish-actions{flex-direction:column;align-items:stretch}
 #sgkU3TestTeacher .u3t-publish-actions button{width:100%;min-height:43px}
}

#sgkU3TestTeacher .u3t-publish-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:14px 0}
#sgkU3TestTeacher .u3t-publish-filter label{display:flex;flex-direction:column;gap:5px;color:#24513f;font-size:.86rem;font-weight:700}
#sgkU3TestTeacher .u3t-publish-filter select{min-width:240px;max-width:100%;padding:9px 11px;border:1px solid #b7cebc;border-radius:10px;background:#fff;color:#183f30;font:inherit}
#sgkU3TestTeacher .u3t-publish-filter small{max-width:360px;color:#637e70;line-height:1.4;font-size:.78rem}
@media(max-width:680px){#sgkU3TestTeacher .u3t-publish-filter{align-items:stretch;flex-direction:column}#sgkU3TestTeacher .u3t-publish-filter select{width:100%;min-width:0}}

/* Grade 6 Unit 3 teacher workspace: preserve old homework in collapsible original DOM. */
[data-panel="teacher"] > .sgk-u3test-homework-fold{margin:16px 0;border:1px solid #ccded4;border-radius:16px;background:#fff;overflow:hidden}
[data-panel="teacher"] > .sgk-u3test-homework-fold > summary{padding:15px 18px;font-weight:800;color:#1a4d3c;cursor:pointer;background:#eff8f1;list-style-position:inside;line-height:1.5}
[data-panel="teacher"] > .sgk-u3test-homework-fold > summary:hover{background:#e6f4ea}
[data-panel="teacher"] > .sgk-u3test-homework-fold > .panel-card{margin:0;border:0;box-shadow:none}
#sgkU3TestTeacher .u3t-qa-switch{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;border:1px dashed #b8cebe;background:#f4f8f5;padding:10px 13px;border-radius:11px;margin:10px 0;color:#476554;font-size:.87rem}
#sgkU3TestTeacher .u3t-qa-switch button{border:1px solid #a9c9b5;border-radius:8px;background:white;color:#195b43;padding:8px 12px;font-weight:750;cursor:pointer}
#sgkU3TestTeacher .u3t-release-state{font-size:.81rem;line-height:1.35;font-weight:650;padding:8px 10px;background:#f0f5f1;border:1px solid #d8e7df;border-radius:8px}
@media(max-width:680px){
 #sgkU3TestTeacher .u3t-teacher-list{max-height:none;overflow:visible}
 #sgkU3TestTeacher .u3t-qa-switch{align-items:stretch}
 #sgkU3TestTeacher .u3t-qa-switch button{width:100%;min-height:44px}
 #sgkU3TestTeacher .u3t-controls button{min-height:44px}
 [data-panel="teacher"] > .sgk-u3test-homework-fold > summary{padding:13px 12px}
}

/* Unit 3 read-only teacher exam preview — isolated from student attempts. */
#sgkU3TestTeacher .u3t-preview-entry{display:flex;align-items:center;gap:13px;flex-wrap:wrap;padding:12px 0 14px}
#sgkU3TestTeacher .u3t-preview-entry button{border:1px solid #155c46;background:#176e51;border-radius:11px;color:#fff;font-weight:800;padding:12px 17px;min-height:44px;cursor:pointer}
#sgkU3TestTeacher .u3t-preview-entry span{color:#537264;font-size:.86rem;line-height:1.4}
body.sgk-u3test-teacher-preview-open{overflow:hidden}
.u3t-preview-overlay[hidden]{display:none!important}
.u3t-preview-overlay{position:fixed;inset:0;background:rgba(13,35,28,.8);z-index:999990;display:flex;justify-content:center;align-items:center;padding:12px;color:#193a2e}
.u3t-preview-dialog{width:min(1100px,100%);height:min(94dvh,900px);background:#fff;border-radius:18px;overflow:auto;box-shadow:0 15px 55px rgba(0,0,0,.33);overscroll-behavior:contain}
.u3t-preview-header{position:sticky;top:0;z-index:3;background:#144d3b;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:13px;padding:16px 19px}
.u3t-preview-header strong{display:block;font-size:1.03rem}
.u3t-preview-header small{display:block;margin-top:4px;line-height:1.5;color:#d9efe3;font-size:.79rem}
.u3t-preview-header button{flex-shrink:0;border:1px solid rgba(255,255,255,.5);background:#fff;color:#1d543d;font-weight:750;border-radius:9px;padding:9px 12px;cursor:pointer;min-height:42px}
.u3t-preview-body{display:grid;grid-template-columns:minmax(190px,250px) minmax(0,1fr);gap:17px;padding:17px}
.u3t-preview-sidebar{border:1px solid #d8e7de;background:#f5faf7;border-radius:12px;padding:12px;align-self:start}
.u3t-preview-sidebar h4{margin:0 0 10px;font-size:.97rem}
.u3t-preview-sections{display:grid;gap:5px}
.u3t-preview-sections button{font-size:.81rem;text-align:left;background:#fff;border:1px solid #d5e4dc;color:#315847;border-radius:8px;padding:9px;cursor:pointer;line-height:1.45}
.u3t-preview-sections button small{color:#718477;font-size:.76rem;display:block}
.u3t-preview-sections button.selected{background:#e1f3e8;border-color:#2d9165;font-weight:750;color:#15573e}
.u3t-preview-summary{display:grid;grid-template-columns:auto 1fr;gap:5px 9px;padding-top:11px;margin-top:12px;border-top:1px solid #d7e7dd;font-size:.8rem}
.u3t-preview-summary b{white-space:nowrap;color:#176145;font-variant-numeric:tabular-nums}
.u3t-preview-summary span{color:#65766e}
.u3t-preview-content{min-width:0}
.u3t-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.u3t-preview-toolbar p{font-size:.82rem;margin:0;color:#647d6d}
.u3t-preview-toolbar button{background:#f0f8f3;border:1px solid #b4d7bf;color:#165e43;border-radius:8px;font-weight:750;padding:9px 12px;cursor:pointer}
.u3t-preview-toolbar button.active{background:#e5f3eb}
.u3t-preview-jump{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;margin-bottom:15px}
.u3t-preview-jump button{border:1px solid #d3e4db;background:#fff;border-radius:7px;padding:8px 0;color:#355e4d;cursor:pointer;min-width:0}
.u3t-preview-jump button.selected{background:#1b7455;color:#fff;border-color:#1b7455;font-weight:750}
.u3t-preview-question{border:1px solid #dbe9df;border-radius:12px;padding:16px;min-height:265px}
.u3t-preview-question-head{display:flex;justify-content:space-between;align-items:center;gap:9px;flex-wrap:wrap;color:#476a55;font-size:.82rem}
.u3t-preview-question h3{font-size:1.09rem;line-height:1.6;margin:13px 0;color:#1c4635}
.u3t-preview-context{white-space:pre-wrap;background:#f5f8f5;border-left:3px solid #a3cdb1;padding:12px 13px;margin:12px 0;border-radius:7px;line-height:1.65;font-size:.93rem}
.u3t-preview-choices{display:grid;gap:8px}
.u3t-preview-choice{padding:11px 12px;border:1px solid #dce6df;border-radius:9px;background:#fff;line-height:1.45}
.u3t-preview-choice b{display:inline-block;min-width:25px;color:#1c7052}
.u3t-preview-answer-sim{border:1px dashed #b1c8b8;background:#f9fbf9;color:#798b7e;padding:17px 12px;border-radius:9px;font-style:italic}
.u3t-preview-audio{display:grid;gap:8px;background:#f1f8f4;border:1px solid #c1ddcc;padding:11px;border-radius:11px;margin:12px 0}
.u3t-preview-audio audio{width:100%;max-width:100%}
.u3t-preview-audio small{font-size:.8rem;color:#557763}
.u3t-preview-key{margin:16px 0 0;border:1px solid #b1d6bb;background:#ebf9f0;border-radius:10px;padding:12px;line-height:1.5}
.u3t-preview-key p{margin:5px 0 0}
.u3t-preview-key small{display:block;margin-top:6px}
.u3t-preview-key-error{color:#aa4940}
.u3t-preview-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 0}
.u3t-preview-footer button{border:1px solid #afcebc;background:#eff7f1;color:#1b664b;font-weight:750;border-radius:9px;padding:11px 13px;cursor:pointer;min-height:43px}
.u3t-preview-footer button:disabled{opacity:.45;cursor:not-allowed}
.u3t-preview-footer b{font-size:.9rem;color:#345b48}
.u3t-preview-disclaimer{border-top:1px solid #dce8e0;padding:9px 0;margin:0;font-size:.78rem;line-height:1.45;color:#62806e}
@media(max-width:760px){
 .u3t-preview-overlay{padding:4px}
 .u3t-preview-dialog{height:99dvh;border-radius:10px}
 .u3t-preview-header{padding:11px 12px}
 .u3t-preview-header strong{font-size:.9rem}
 .u3t-preview-header button{font-size:.82rem}
 .u3t-preview-body{display:block;padding:10px}
 .u3t-preview-sidebar{margin:0 0 10px;padding:9px}
 .u3t-preview-sidebar h4{margin:0 0 7px}
 .u3t-preview-sections{display:flex;overflow-x:auto;gap:7px;padding-bottom:5px;scroll-snap-type:x mandatory}
 .u3t-preview-sections button{min-width:145px;scroll-snap-align:start}
 .u3t-preview-sections button small{display:inline}
 .u3t-preview-summary{display:none}
 .u3t-preview-jump{grid-template-columns:repeat(8,minmax(0,1fr))}
 .u3t-preview-question{padding:11px}
 .u3t-preview-footer{gap:5px}
 .u3t-preview-footer button{padding:9px;font-size:.83rem}
 #sgkU3TestTeacher .u3t-preview-entry button{width:100%}
}

/* Grade 6 · Unit 3 only: compact, content-sized layout (no empty hero background). */
html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-card{
  padding:13px 16px!important;margin:8px 0 11px!important;box-shadow:none!important;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-head{gap:8px;align-items:center}
html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-head h2{margin:2px 0 0;font-size:clamp(19px,2vw,23px);line-height:1.25}
html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-head .sub,
html[data-sgk-grade="6"][data-sgk-unit="3"] #catalogNotice{display:none!important}
html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-status{padding:8px 12px;min-width:0;border-radius:11px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-row{gap:10px;margin-top:8px;align-items:end}
html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-row label{min-width:0}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero{gap:10px;align-items:start}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(165px,38%)!important;
  grid-template-rows:auto auto auto;align-items:center;align-content:center;
  gap:5px 14px;min-height:0!important;padding:14px 16px!important;
  box-sizing:border-box;overflow:hidden;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>.pill,
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>#unitHeroTitle,
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>#unitHeroDesc{grid-column:1;min-width:0}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>.pill{grid-row:1;justify-self:start}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>#unitHeroTitle{
  grid-row:2;font-size:clamp(21px,2.5vw,29px);line-height:1.25;margin:3px 0;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main>#unitHeroDesc{
  grid-row:3;margin:0;font-size:clamp(13px,1.4vw,15px)!important;line-height:1.45;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main .unit-hero-visual{
  grid-column:2;grid-row:1/4;position:static!important;inset:auto!important;
  width:100%!important;max-width:none;margin:0!important;min-width:0;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main .unit-hero-visual img{
  display:block;width:100%;height:148px!important;max-height:148px;object-fit:cover;
  border-radius:12px;box-shadow:none;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-hero-caption{display:none!important}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero .today{align-self:start;padding:14px 16px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero .today h3{font-size:clamp(17px,1.8vw,20px);line-height:1.35;margin:8px 0}
html[data-sgk-grade="6"][data-sgk-unit="3"] .hero .today ul{margin:8px 0;padding-left:18px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .section{margin-top:12px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .section>h2{font-size:clamp(18px,2vw,22px)}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-map{gap:8px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-map button{
  padding:11px 13px;min-height:64px;box-shadow:none;gap:2px;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-map button small{line-height:1.35}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-scope-banner{margin:9px 0;padding:9px 12px}
html[data-sgk-grade="6"][data-sgk-unit="3"] #study .tabs{padding-bottom:8px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .panel-card{padding:16px}

/* Teacher: stronger information hierarchy, less repeated microcopy and blank space. */
#sgkU3TestTeacher{padding:14px 16px!important;margin:0 0 12px!important}
#sgkU3TestTeacher>h3{font-size:clamp(19px,2.3vw,25px);line-height:1.3;margin:0 0 4px}
#sgkU3TestTeacher>.u3t-meta{margin:0 0 9px}
#sgkU3TestTeacher .u3t-preview-entry{padding:5px 0 10px;gap:7px 12px}
#sgkU3TestTeacher .u3t-preview-entry button{padding:9px 14px;min-height:42px}
#sgkU3TestTeacher .u3t-summary{margin:8px 0 10px;gap:7px}
#sgkU3TestTeacher .u3t-summary b{font-size:.82rem;padding:7px 9px}
#sgkU3TestTeacher .u3t-bulk,
#sgkU3TestTeacher .u3t-publish-center,
#sgkU3TestTeacher .u3t-leader{padding:12px 13px;margin:9px 0;border-radius:13px}
#sgkU3TestTeacher .u3t-bulk h4,
#sgkU3TestTeacher .u3t-leader h4,
#sgkU3TestTeacher .u3t-publish-center h4{font-size:1.02rem;line-height:1.4}
#sgkU3TestTeacher .u3t-publish-heading p{font-size:.84rem}
#sgkU3TestTeacher .u3t-publish-stats{margin:9px 0}
#sgkU3TestTeacher .u3t-publish-stats span{padding:7px 9px}
#sgkU3TestTeacher .u3t-publish-filter{margin:9px 0}
#sgkU3TestTeacher .u3t-controls{gap:8px;align-items:end}
#sgkU3TestTeacher .u3t-controls button{min-height:42px}
#sgkU3TestTeacher .u3t-roster-head{margin:14px 0 6px}
#sgkU3TestTeacher .u3t-qa-switch{margin:5px 0;padding:8px 10px}
#sgkU3TestTeacher .u3t-roster-hint{margin:4px 0 8px}
#sgkU3TestTeacher .u3t-teacher-row{padding:11px}
#sgkU3TestTeacher .u3t-teacher-row p{margin:5px 0}
#sgkU3TestTeacher .u3t-teacher-list{max-height:540px}
#sgkU3TestTeacher .u3t-publish-feedback:empty{min-height:0;margin:0}
#sgkU3TestTeacher .u3t-details[hidden]{display:none!important}

/* Exam and teacher preview: fit the content rather than painting empty fullscreen panels. */
@media(min-width:761px){
 .sgk-u3test-overlay .u3t-dialog{height:auto!important;min-height:0;max-height:94dvh}
 .sgk-u3test-overlay .u3t-main{flex:0 1 auto;padding:14px 20px}
 .u3t-preview-overlay .u3t-preview-dialog{height:auto;min-height:0;max-height:94dvh}
}
.u3t-preview-question{min-height:0}
.u3t-preview-header{padding:12px 16px}
.u3t-preview-sidebar{padding:10px}
.u3t-preview-body{gap:12px;padding:13px}
.u3t-preview-question{padding:12px}
.u3t-preview-choices{gap:6px}
.u3t-preview-choice{padding:9px 11px}
.u3t-preview-disclaimer{padding:7px 0}
.u3t-preview-audio{margin:8px 0;padding:9px}
.u3t-context,.u3t-preview-context{margin:8px 0;padding:9px 11px;line-height:1.5}
.u3t-audio{margin:9px 0;padding:9px;gap:5px}
.u3t-options{margin:10px 0;gap:7px}
.u3t-option{padding:10px}
.u3t-footnote{flex:1 1 100%;font-size:.71rem}

/* Small screens: no sideways overflow, usable buttons and short hero. */
@media(max-width:900px){
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main{
  grid-template-columns:minmax(0,1fr) minmax(120px,35%)!important;
  padding:12px!important;
 }
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main .unit-hero-visual img{height:124px!important}
}
@media(max-width:700px){
 html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-card{padding:10px 12px!important;margin:6px 0 9px!important}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .catalog-status{padding:7px 10px}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main{
  grid-template-columns:minmax(0,1fr)!important;gap:5px;padding:12px!important;
 }
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main .unit-hero-visual{
  grid-column:1;grid-row:4;width:100%!important;margin:5px 0 0!important
 }
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero-main .unit-hero-visual img{height:112px!important;max-height:112px}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .hero .today{padding:12px}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-map button{min-height:60px;padding:10px}
 #sgkU3TestTeacher{padding:11px!important}
 #sgkU3TestTeacher .u3t-preview-entry button{width:100%}
 #sgkU3TestTeacher .u3t-teacher-list{max-height:none;overflow:visible}
 #sgkU3TestTeacher .u3t-controls input,#sgkU3TestTeacher .u3t-controls select{max-width:100%}
 #sgkU3TestTeacher .u3t-controls label{min-width:0;flex:1 1 125px}
 #sgkU3TestTeacher .u3t-controls button{flex:1 1 140px}
 #sgkU3TestTeacher .u3t-publish-actions{gap:8px}
 .u3t-preview-dialog{height:100dvh;max-height:100dvh}
 .u3t-preview-header{padding:10px}
 .u3t-preview-body{padding:9px}
 .u3t-preview-question{padding:10px}
 .u3t-preview-jump{gap:4px}
 .u3t-preview-jump button{min-height:35px}
 .u3t-footer{padding:9px 11px;gap:7px}
 .u3t-footer button{min-height:42px}
}
@media(prefers-reduced-motion:reduce){
 .u3t-dialog,.u3t-preview-dialog{scroll-behavior:auto}
}

/* Unit 3: remove unused second catalog column and hide unavailable tabs. */
html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-row{display:flex!important;align-items:flex-end;gap:8px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-row label{flex:0 1 420px;max-width:100%}
html[data-sgk-grade="6"][data-sgk-unit="3"] #lessonMapHint{display:none!important}
html[data-sgk-grade="6"][data-sgk-unit="3"] #tabs button:disabled,
html[data-sgk-grade="6"][data-sgk-unit="3"] #tabs button[aria-disabled="true"]{display:none!important}

/* Results are ready when needed, not a tall empty pane during setup. */
#sgkU3TestTeacher .u3t-outcome-fold{margin:13px 0 0;background:#fff;border:1px solid #c7dcd0;border-radius:12px;overflow:hidden}
#sgkU3TestTeacher .u3t-outcome-fold>summary{
  display:flex;justify-content:space-between;gap:10px;align-items:center;
  padding:11px 13px;cursor:pointer;color:#1e5943;background:#f0f8f2;
  font-weight:800;font-size:1.02rem;line-height:1.4;list-style-position:inside
}
#sgkU3TestTeacher .u3t-outcome-fold[open]>summary{border-bottom:1px solid #d8e9dc}
#sgkU3TestTeacher .u3t-outcome-fold>summary small{font-weight:600;color:#5b7365;font-size:.81rem;white-space:nowrap}
#sgkU3TestTeacher .u3t-outcome-content{padding:10px 12px 12px}
#sgkU3TestTeacher .u3t-outcome-content>.u3t-publish-center,
#sgkU3TestTeacher .u3t-outcome-content>.u3t-leader{margin:6px 0}
#sgkU3TestTeacher .u3t-roster-head{padding-top:4px}
@media(max-width:680px){
 #sgkU3TestTeacher .u3t-outcome-fold>summary{font-size:.94rem;padding:10px}
 #sgkU3TestTeacher .u3t-outcome-content{padding:8px}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .unit-row label{flex:1 1 100%}
 html[data-sgk-grade="6"][data-sgk-unit="3"] #tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
}

/* Preserve assignment/lesson guidance but avoid oversize panels in Unit 3. */
html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner{
  margin:7px 0 9px;padding:10px 13px;gap:8px 12px;min-height:0;
}
html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner>div{gap:2px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner strong{font-size:clamp(14px,1.5vw,17px);line-height:1.3}
html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner button{min-height:40px;padding:8px 12px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-mission-guide{margin:8px 0;padding:11px 13px;box-shadow:none}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-mission-head{margin-bottom:8px;gap:8px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-mission-head h3{font-size:clamp(17px,1.8vw,20px);margin:3px 0}
html[data-sgk-grade="6"][data-sgk-unit="3"] .lesson-mission-grid{gap:8px}
@media(max-width:680px){
 html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner{padding:10px}
 html[data-sgk-grade="6"][data-sgk-unit="3"] .vnn-sgk-assigned-banner button{width:100%}
}

/* U3 presentation audit: redundant notices are not lesson content. */
html[data-sgk-grade="6"][data-sgk-unit="3"] .grade-route-note{display:none!important}
html[data-sgk-grade="6"][data-sgk-unit="3"] #lessonScopeBanner > div:first-child > small{display:none!important}
html[data-sgk-grade="6"][data-sgk-unit="3"] #lessonScopeBanner{min-height:0!important;padding:8px 12px;gap:7px}
html[data-sgk-grade="6"][data-sgk-unit="3"] .grade-picker{align-content:start}
/* Defense in depth: teacher-only panels must never be visible under a student session. */
html[data-sgk-role="student"] [data-panel="teacher"],
html[data-sgk-role="student"] #sgkU3TestTeacher,
html[data-sgk-role="student"] #sgkU3TeacherPreview{display:none!important}

/* Unit Test 3: mobile touch targets and Safari safe-area, isolated to test overlays. */
@media (max-width:680px){
 .sgk-u3test-overlay .u3t-dialog{
  min-height:0;height:100dvh;max-height:100dvh;
  overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
 }
 .sgk-u3test-overlay .u3t-top{
  padding-top:max(10px,env(safe-area-inset-top));
  flex-shrink:0;
 }
 .sgk-u3test-overlay .u3t-jump{
  display:grid;grid-template-columns:none;grid-auto-flow:column;
  grid-template-rows:repeat(2,44px);grid-auto-columns:44px;
  gap:6px;overflow-x:auto;overflow-y:hidden;min-width:0;
  padding:9px 12px 12px;scroll-snap-type:x proximity;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  touch-action:pan-x;
 }
 .sgk-u3test-overlay .u3t-jump button{
  min-width:44px;min-height:44px;padding:0;scroll-snap-align:start;
 }
 .sgk-u3test-overlay .u3t-main{min-width:0;overflow-wrap:anywhere}
 .sgk-u3test-overlay .u3t-main textarea{
  max-width:100%;font-size:16px; /* prevents iOS Safari focus zoom */
 }
 .sgk-u3test-overlay .u3t-footer{
  padding-bottom:max(12px,env(safe-area-inset-bottom));
  flex-shrink:0;
 }
 .sgk-u3test-overlay .u3t-footer button{min-height:44px}
 .sgk-u3test-overlay .u3t-audio audio{max-width:100%}
 .u3t-preview-overlay .u3t-preview-dialog{
  overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
 }
 .u3t-preview-overlay .u3t-preview-header{padding-top:max(10px,env(safe-area-inset-top))}
 .u3t-preview-overlay .u3t-preview-jump{
  display:grid;grid-template-columns:none;grid-auto-flow:column;
  grid-template-rows:repeat(2,44px);grid-auto-columns:44px;
  overflow-x:auto;overflow-y:hidden;gap:6px;padding:7px 0 10px;
  scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
  touch-action:pan-x;
 }
 .u3t-preview-overlay .u3t-preview-jump button{min-height:44px;min-width:44px;padding:0}
}

/* iPad/tablet widths need finger-sized numbered answer buttons too. */
@media (min-width:681px) and (max-width:1024px){
 .sgk-u3test-overlay .u3t-jump,
 .u3t-preview-overlay .u3t-preview-jump{
  display:grid;grid-template-columns:none;grid-auto-flow:column;
  grid-template-rows:repeat(2,44px);grid-auto-columns:44px;
  gap:6px;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x proximity;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;touch-action:pan-x;
 }
 .sgk-u3test-overlay .u3t-jump button,
 .u3t-preview-overlay .u3t-preview-jump button{
  min-width:44px;min-height:44px;padding:0;scroll-snap-align:start;
 }
 .sgk-u3test-overlay .u3t-footer button{min-height:44px}
}

/* Compact Unit Test 3 results: keep total grade visible, expand the 8-skill report and Top on demand. */
.u3t-result-fold{min-width:0;overflow:hidden}
.u3t-result-fold>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:48px;font-weight:750;font-size:1rem;line-height:1.45;color:#19583f;cursor:pointer;padding:9px 0}
.u3t-result-fold>summary::-webkit-details-marker{display:none}
.u3t-result-fold>summary::marker{content:""}
.u3t-result-fold>summary::after{content:"⌄";margin-left:auto;flex-shrink:0;font-size:1.35rem;line-height:1}
.u3t-result-fold[open]>summary::after{content:"⌃"}
.u3t-result-fold>summary small{font-size:.75rem;font-weight:500;color:#567765;margin-left:auto;white-space:nowrap}
.u3t-result-fold>summary:focus-visible{outline:3px solid #218258;outline-offset:2px;border-radius:6px}
.u3t-result-fold[open]>summary{border-bottom:1px solid #d6e8db;margin-bottom:11px}
#sgkU3TestTeacher .u3t-outcome-fold>summary{min-height:48px}
@media(max-width:600px){.u3t-result-fold>summary{flex-wrap:wrap;min-height:48px}.u3t-result-fold>summary small{white-space:normal}}
