:root{--ink:#20333b;--muted:#71838b;--border:#e1e9e9;--bg:#f5f8f8;--surface:#fff;--deep:#0b5055;--primary:#0e777b;--pale:#e7f4f0;--shadow:0 12px 32px rgba(21,52,54,.05)}*{box-sizing:border-box}html{font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--bg)}body{margin:0;font-size:14px;line-height:1.5}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0}button:disabled{cursor:not-allowed;opacity:.55}a{color:var(--primary)}.shell{display:flex;min-height:100vh}.sidebar{width:254px;flex:0 0 254px;background:#103b42;color:#dde8e5;padding:26px 18px;position:sticky;top:0;height:100vh;overflow:auto;display:flex;flex-direction:column}.brand{display:flex;gap:10px;align-items:center;margin:0 8px 37px}.brand strong{display:block;font-size:17px;line-height:1.15;color:#fff}.brand small{display:block;color:#a5c6bf;font-size:9px;letter-spacing:1.1px;margin-top:6px}.logo-mark{height:41px;width:41px;border-radius:12px;background:#f1c979;color:#143e43;font-size:16px;font-weight:800;display:grid;place-items:center;letter-spacing:-1px;flex-shrink:0}.sidebar-overline,.nav-label{padding:0 16px 11px;font-size:10px;letter-spacing:1.4px;color:#86a9a6;font-weight:800}.nav-label{padding-top:23px}nav button{width:100%;text-align:left;display:flex;gap:13px;align-items:center;padding:11px 15px;color:#c5dad5;background:transparent;border-radius:8px;font-weight:600;margin-bottom:3px;font-size:13px}nav button:hover,nav button.current{background:#286166;color:#fff}nav button.current{box-shadow:inset 3px 0 #f0ca80}nav button>span{flex:1}.sidebar-bottom{margin-top:auto;padding:26px 12px 0;color:#b2cdc7;font-size:11px}.sidebar-bottom small{display:block;margin-top:8px;color:#7eaaa1}.dot{display:inline-block;height:7px;width:7px;border-radius:50%;background:#69cda7;margin-right:5px}.main-frame{min-width:0;flex:1}.topbar{height:90px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:15px 36px;border-bottom:1px solid var(--border);gap:15px}.header-title h1{font-size:24px;margin:1px 0 0;font-weight:750;letter-spacing:-.7px}.header-title>span{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#7f9898}.top-actions{display:flex;align-items:center;gap:12px}.top-actions select{max-width:265px;background:#fafcfc;min-width:150px}.button-quiet{background:#e5f0ee;color:var(--deep);border-radius:22px;font-size:12px;font-weight:700;padding:10px 13px}.tag{display:inline-flex;border-radius:30px;background:#e3eeeb;color:#2f6566;font-size:10px;font-weight:800;letter-spacing:.65px;padding:7px 10px;white-space:nowrap}.content{max-width:1490px;margin:auto;padding:30px 38px 65px}.view{display:none}.view.active{display:block}.hero{display:flex;min-height:262px;justify-content:space-between;align-items:center;gap:15px;padding:32px 42px;background:linear-gradient(115deg,#0b5457,#138488);border-radius:16px;color:#fff;position:relative;overflow:hidden}.hero>div:first-child{max-width:690px;z-index:1}.hero h2{font-size:30px;line-height:1.2;margin:7px 0 12px;letter-spacing:-.7px}.hero p{font-size:14px;line-height:1.7;color:#dbf4ed;max-width:630px;margin:0}.hero-label{letter-spacing:1.8px;font-weight:800;font-size:10px;color:#c5eadf}.hero-actions{display:flex;gap:11px;margin-top:22px}.primary,.secondary,.ghost-light,.danger{padding:11px 16px;border-radius:9px;font-weight:750;font-size:13px}.primary{background:#10787b;color:#fff}.primary:hover{background:#0b6066}.hero .primary{background:#f3cc7c;color:#21474c}.secondary{background:#e8f3f1;color:#13575b}.secondary:hover{background:#d4e8e3}.ghost-light{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.35);color:#fff}.danger{background:#ffeded;color:#a02b2b}.full{width:100%}.hero-art{min-width:180px;flex:0 0 200px;display:grid;place-items:center}.art-outer{width:185px;height:185px;border-radius:50%;background:rgba(255,255,255,.1);display:grid;place-items:center;transform:rotate(9deg);position:relative}.art-paper{height:138px;width:105px;background:#fff;border-radius:8px;padding:27px 15px;box-shadow:0 14px 25px #083b3d33}.art-paper div{height:5px;background:#b2dcd6;border-radius:5px;margin-bottom:10px}.art-paper div:nth-child(1){width:56%}.art-paper div:nth-child(3){width:77%}.art-paper div:nth-child(5){width:48%}.art-outer span{position:absolute;right:20px;bottom:28px;color:#104a4b;background:#f3c774;height:38px;width:38px;border-radius:50%;display:grid;place-items:center;font-weight:bold;font-size:21px}.stats-grid,.action-grid,.three-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin:22px 0}.stat-card,.panel,.action-card,.billing-card{background:#fff;border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow)}.stat-card{padding:22px}.stat-card .stat-label{font-size:12px;color:#72858b}.stat-card .stat-value{font-size:29px;font-weight:800;letter-spacing:-1px;line-height:1.35}.stat-card small{display:block;color:#77918e;margin-top:4px}.section-heading{display:flex;align-items:end;justify-content:space-between;margin-top:27px}.section-heading h3{margin:0;font-size:18px}.section-heading p{margin:0;color:var(--muted);font-size:12px}.action-card{display:flex;flex-direction:column;gap:9px;text-align:left;padding:22px;align-items:start;color:var(--ink)}.action-card:hover{transform:translateY(-2px);border-color:#a6cbc8}.action-card strong{font-size:14px}.action-card span{font-size:12px;color:#72868a;line-height:1.55;min-height:36px}.action-card>b:last-child{font-size:12px;color:#168084}.action-icon{height:38px;width:38px;border-radius:11px;display:grid;place-items:center;font-size:20px}.action-icon.blue{background:#e2f0ff;color:#547dc4}.action-icon.gold{background:#fff3d9;color:#b8782b}.action-icon.green{background:#dff4e5;color:#478967}.action-icon.purple{background:#f2e9fb;color:#8c60a6}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.split-layout{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(400px,1.2fr);gap:20px;margin-bottom:20px}.panel{padding:24px;margin-bottom:20px;min-width:0}.two-cols>.panel{margin:0}.panel h3{margin:0 0 17px;font-size:17px}.panel h4{margin:10px 0 12px;font-size:14px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.panel-head h3{margin:0}.panel-head .button-row{margin:0}.item-list{display:flex;flex-direction:column;gap:9px}.item-list.tall{max-height:750px;overflow:auto}.item{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);padding:13px 14px;border-radius:9px;background:#fff}.item:hover{background:#fafdfc}.item h4,.item strong{display:block;margin:0 0 3px;font-size:13px}.item p,.item small{color:#788b90;font-size:12px;display:block;margin:2px 0}.item .item-actions{display:flex;gap:5px;flex-shrink:0}.item .mini{padding:6px 8px;border-radius:6px;background:#eef5f3;color:#125a60;font-size:11px;font-weight:700}.item .mini.warn{background:#fff0e5;color:#a95b2b}.page-description{color:#627980;font-size:13px;margin:0 0 19px;line-height:1.7}.form-stack{display:flex;flex-direction:column;gap:13px}.form-row,.inline-form{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.form-row.three{grid-template-columns:repeat(3,1fr)}.inline-form{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));align-items:end}.inline-form button{height:43px}.form-stack label,label{display:flex;flex-direction:column;gap:5px;color:#50656c;font-weight:650;font-size:12px}.tick{display:flex!important;flex-direction:row!important;gap:8px!important;align-items:flex-start;color:#50656c}.tick input{margin-top:3px}input:not([type=checkbox]):not([type=file]),select,textarea{background:#fff;border:1px solid #d6e0e1;border-radius:8px;padding:10px 11px;min-height:41px;width:100%;color:#23373d;outline:0}input:focus,textarea:focus,select:focus{border-color:#16878c;box-shadow:0 0 0 2px #d8eeec}textarea{resize:vertical;line-height:1.55}.code-area{font-family:Consolas,monospace;font-size:11px}.button-row{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin-top:10px}.notice,.warn-strip,.explanation,.match-detail{border-radius:9px;padding:13px 16px;margin:0 0 18px;font-size:13px}.notice{background:#e3f3eb;color:#185e47;border:1px solid #b7dcc5}.notice.is-error{background:#fff0ed;border-color:#edc9c1;color:#9d2f20}.warn-strip{background:#fff4e6;border:1px solid #f1d4ab;color:#855622}.match-detail{background:#f2f8f7;border:1px solid #e0edeb;margin-top:10px;color:#496e72}.explanation{background:#f4f9f8;border:1px solid #e5eeec}.explanation ol{padding-left:18px;margin:6px 0}.explanation li{margin:7px 0}.muted{color:#778a91}.small{font-size:12px}.file-drop{background:#f4faf8;border:2px dashed #adccc7;border-radius:12px;padding:23px;text-align:center;align-items:center;gap:6px;margin-bottom:12px}.file-drop strong{font-size:16px}.file-drop span{font-weight:400}.file-drop input{max-width:260px}.logo-preview{width:80px;height:80px;object-fit:contain;border:1px solid #dce7e5;border-radius:12px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{border-bottom:1px solid #e4ebec;text-align:left;padding:12px 10px;vertical-align:top}th{color:#58737a;background:#f6faf9;letter-spacing:.2px;font-size:11px}td input{min-width:85px}.editor-panel{margin-top:22px}.tab-row{display:flex;gap:7px;border-bottom:1px solid var(--border);margin:22px 0}.tab-row button{background:transparent;border-bottom:3px solid transparent;padding:12px 16px;color:#647a80;font-weight:800}.tab-row button.selected{border-bottom-color:#1b7d7f;color:#0f6466}.field-block{margin-bottom:16px}.field-block label{font-size:12px;margin:0 0 5px}.field-block textarea{font-family:Georgia,'Times New Roman',serif;font-size:14px;min-height:80px}.period-divider{background:#e9f4f1;border-radius:8px;padding:9px 13px;margin:19px 0 13px;color:#176a6e;font-weight:bold}.editor-meta{background:#f8fbfa;border:1px solid var(--border);border-radius:9px;padding:13px;margin-bottom:10px;font-size:12px}.catalogue-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.catalogue-grid>div{background:#f7faf9;border:1px solid var(--border);border-radius:9px;padding:13px}.catalogue-grid strong{display:block;margin-bottom:5px}.catalogue-grid p{font-size:11px;color:#6a8186;margin:0}.score-preview{background:#eaf7ef;border-radius:9px;padding:15px;font-weight:700}.report-preview{background:#fff;border:1px solid var(--border);border-radius:9px;min-height:165px;padding:16px;font-family:Georgia,'Times New Roman',serif;white-space:pre-wrap}.billing-card{padding:20px}.billing-card span{display:block;color:#78918c;font-size:12px}.billing-card strong{display:block;font-size:22px;margin-top:6px}.three-cards{grid-template-columns:repeat(3,1fr)}.login-overlay{position:fixed;inset:0;background:#0b3137e8;z-index:30;display:grid;place-items:center;padding:24px}.login-card{background:#fff;border-radius:16px;padding:32px;max-width:420px;width:100%;box-shadow:0 30px 50px #0004}.login-card h1{font-size:24px;margin:14px 0 4px}.login-card p{color:#698087}.login-card form{display:grid;gap:15px;margin:23px 0}.error{color:#b53122!important}.mobile-menu{display:none}.status-ok{color:#23815a}.status-warning{color:#a3631e}.status-bad{color:#bd473e}#print-sheet{display:none}.hide{display:none!important}hr{border:0;border-top:1px solid var(--border);margin:19px 0}#account-details{margin-bottom:20px}.mini-link{color:#20777c;font-weight:700}.footnote{font-size:11px;color:#788b91}
@media(max-width:1200px){.sidebar{width:220px;flex-basis:220px}.content{padding:23px}.topbar{padding:16px 24px}.action-grid,.stats-grid{grid-template-columns:repeat(2,1fr)}.hero-art{flex-basis:160px}}@media(max-width:930px){.sidebar{position:fixed;left:-260px;width:254px;z-index:22;transition:left .2s;box-shadow:15px 0 50px #14343e15}.sidebar.open{left:0}.mobile-menu{display:inline-flex;padding:8px;border-radius:7px;background:#eef3f2;color:var(--deep)}.hero-art{display:none}.hero{min-height:245px}.split-layout,.two-cols{grid-template-columns:1fr}.topbar{height:auto;min-height:75px}.top-actions{flex-wrap:wrap;justify-content:flex-end}}@media(max-width:600px){.content{padding:16px}.topbar{padding:11px 14px}.header-title h1{font-size:18px}.header-title>span{font-size:9px}.top-actions select{min-width:100px;max-width:135px;font-size:11px;padding:7px}.top-actions .tag{display:none}.button-quiet{font-size:10px;padding:7px}.hero{padding:24px;min-height:0}.hero h2{font-size:24px}.hero p{font-size:12px}.hero-actions{flex-wrap:wrap}.stats-grid,.action-grid,.three-cards,.form-row,.form-row.three,.catalogue-grid{grid-template-columns:1fr;gap:11px}.panel{padding:16px}.panel-head{align-items:start;flex-wrap:wrap}.button-row button{flex:1}.stat-card{padding:15px}.stat-card .stat-value{font-size:24px}}
@media print{body{background:white}body>*:not(#print-sheet){display:none!important}#print-sheet{display:block!important;max-width:none;margin:0;padding:0;color:#111;font:12pt/1.5 'Times New Roman',serif}#print-sheet .print-header{text-align:center;font-size:15pt;font-weight:bold;border-bottom:2px solid #555;padding-bottom:12px;margin-bottom:18px}#print-sheet .print-text{white-space:pre-wrap;word-break:break-word} @page{size:A4;margin:18mm}}
[hidden]{display:none!important}

.brand-thumb{float:left;height:42px;width:42px;object-fit:contain;border:1px solid var(--border);border-radius:9px;margin-right:13px;background:white}
@media print{#print-sheet .print-logo{width:72px;height:72px;object-fit:contain;display:block;margin:0 auto 9px}}

/* V5.1 School creation feedback — always visible beside the submit control. */
.school-create-status{grid-column:1/-1;margin:0;padding:13px 15px;border:1px solid #c7d5e1;border-radius:9px;background:#eef5fb;color:#244b64;line-height:1.55;font-weight:650;font-size:13px}
.school-create-status[data-state="busy"]{background:#eef5fb;color:#1c5e83}
.school-create-status[data-state="error"]{background:#fff0ed;border-color:#d8988d;color:#9d2f20}
.school-create-status[data-state="warning"]{background:#fff7e7;border-color:#dba956;color:#7b5219}
.school-create-status[data-state="success"]{background:#e6f7eb;border-color:#7fc89b;color:#216840}

/* V5.2: mobile-friendly school member and approval controls. */
#school-member-requests .item,#school-member-list .item,#my-member-requests .item{flex-wrap:wrap}
#school-member-requests .item-actions{flex-wrap:wrap;justify-content:flex-start}
#school-member-requests .item-actions button{white-space:normal}
#school-member-status,#membership-request-status{margin-top:12px}
@media(max-width:600px){#school-member-requests .item-actions{width:100%}#school-member-requests .item-actions button{flex:1}}

/* V6 integrated school management */
.attendance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px;margin:12px 0 18px}.attendance-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #d7e4e5;border-radius:9px;background:#fbffff}.attendance-row input{width:19px;height:19px}.attendance-row span{display:flex;flex-direction:column;gap:2px}.attendance-row small{color:#668184}.table-wrap{overflow:auto}.table-wrap table{min-width:600px}#extra-message{border:1px solid #c6ddd9;padding:12px;border-radius:9px;background:#edf8f4;margin-bottom:8px}#extra-message.is-error{background:#ffefef;color:#922020;border-color:#f5b9b9}

/* School-branded entry: never show the multi-school workspace picker or owner registrar. */
body.school-client #school-picker, body.school-client #owner-create-school, body.school-client #school-members-card {display:none !important;}
body.school-client .login-card .logo-mark{margin:0 auto 14px;width:84px;height:84px;border-radius:16px;background-color:var(--school-brand,#0c5e62);color:#fff;}

#owner-control-link{display:block;padding:12px 16px;text-decoration:none;color:#d8f5eb;border-radius:9px;margin:5px 12px;font-size:13px}#owner-control-link[hidden]{display:none !important}#owner-control-link:hover{background:#ffffff24}

/* V8: source completeness and printable class report packs */
.coverage-panel{border:1px solid #d6e7e2;padding:14px 15px;background:#fbfefd;border-radius:12px;margin-top:12px}
.coverage-panel>strong{display:block;margin-bottom:4px;color:#185d61;font-size:14px}
.coverage-panel p{margin:5px 0 11px}.coverage-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-top:1px solid #ecf3f1;padding:8px 0}
.coverage-row span{font-size:12px;font-weight:650;flex:1}.coverage-row small{max-width:46%;font-size:11px;text-align:right}
.coverage-panel .warn-strip{margin:10px 0 0}
@media(max-width:600px){.coverage-row{flex-direction:column;gap:2px}.coverage-row small{max-width:none;text-align:left}}
@media print{#print-sheet .print-report-page{page-break-after:always;break-after:page;min-height:245mm;position:relative}#print-sheet .print-report-page:last-child{page-break-after:auto;break-after:auto}#print-sheet .print-report-footer{font-size:9pt;color:#444;text-align:center;margin-top:15px}}

/* V9: school application is visually and functionally separate from private
   platform owner control. Every school uses this same responsive school UI. */
body.school-edition{--deep:#17414c;--school-brand:#0c5e62}
body.school-edition .sidebar{background:#173942}
body.school-edition .brand{margin-bottom:29px}
body.school-edition .sidebar .logo-mark{width:52px;height:52px;background-color:#e8f2ed;background-size:contain;background-position:center;background-repeat:no-repeat;color:#1a6a67;font-size:24px;border-radius:15px;border:2px solid #ffffff44}
body.school-edition .brand strong{font-size:16px;max-width:178px;overflow-wrap:anywhere}
body.school-edition .sidebar-overline{font-size:10px;letter-spacing:1.7px}
body.school-edition .nav-label{border-top:1px solid #ffffff1b;padding-top:19px;margin-top:16px}
body.school-edition .topbar{border-bottom:3px solid var(--school-brand)}
.school-identity-panel{display:flex;align-items:center;gap:17px;background:linear-gradient(115deg,#fff 0%,#f3faf7 100%);border:1px solid #d7e6e2;border-left:5px solid var(--school-brand);border-radius:14px;box-shadow:0 8px 30px #173a3f08;padding:17px 23px;margin-bottom:20px;min-width:0}
.school-identity-symbol{width:76px;height:76px;flex:0 0 76px;border-radius:17px;background:white;border:1px solid #d7e5e3;display:grid;place-items:center;font-size:34px;overflow:hidden}
.school-identity-symbol img{height:100%;width:100%;object-fit:contain}
.school-identity-copy{min-width:0;flex:1}
.school-identity-kicker{font-weight:800;color:#377f79;letter-spacing:1.2px;font-size:10px;display:block;margin-bottom:4px}
.school-identity-copy h2{margin:0;font-size:23px;line-height:1.2;color:#19464b;overflow-wrap:anywhere}
.school-identity-copy p{margin:7px 0 0;font-size:12px;color:#5c7a7c}
.school-identity-role{background:#e7f4ed;color:#22654d;padding:9px 12px;font-size:10px;font-weight:800;letter-spacing:.55px;border-radius:8px;text-align:center;max-width:165px}
.school-profile-head{display:flex;gap:14px;align-items:center}
.school-profile-head h4{font-size:18px;margin:0 0 7px;color:#19464b}
.school-profile-head p{margin:3px 0}
.profile-crest,.profile-crest-placeholder{width:86px;height:86px;border:1px solid #d3e7e3;object-fit:contain;border-radius:13px;background:#fff;display:grid;place-items:center;font-size:36px;flex:0 0 86px}
.school-access-explanation{margin-top:20px;max-width:930px}
body.school-edition #school-picker[hidden]{display:none}
@media(max-width:640px){.school-identity-panel{padding:14px;gap:11px;flex-wrap:wrap}.school-identity-symbol{width:54px;height:54px;flex-basis:54px;border-radius:12px}.school-identity-copy h2{font-size:18px}.school-identity-role{margin-left:65px}.sidebar .brand strong{font-size:15px}}

/* V10: Scheme text detector and curriculum-source browser */
.v10-parser-box{border:1px solid var(--line,#d8e2e3);background:var(--paper,#fafcfb);border-radius:12px;margin-top:16px;padding:16px}
.v10-parser-box h4{margin:0 0 5px}.v10-parser-box textarea{width:100%;font-family:inherit}
.v10-extraction-note{white-space:pre-line;line-height:1.6;padding-top:5px}
.v10-extraction-note.has-warning{color:#8b470b}
.v10-extraction-note.has-error{color:#a12727}
.v10-coverage-chip{display:inline-block;border:1px solid #cbd5d5;background:#f2f6f5;border-radius:99px;padding:2px 10px;font-size:.76rem;margin-top:5px}
.v10-coverage-chip.good{border-color:#92bda5;background:#effbf2;color:#176b3a}
.v10-coverage-chip.warning{border-color:#e4c894;background:#fff8e9;color:#955a11}
.v10-scheme-readiness{margin-top:14px;font-size:.86rem;line-height:1.5;color:#475569}
.v10-source-meta{background:#f1f6f5;padding:12px;border-radius:10px;margin:10px 0}
.v10-source-content{white-space:pre-wrap;overflow-wrap:anywhere;max-height:370px;overflow:auto;background:#fcfdfc;padding:12px;border:1px solid #dde5e4;border-radius:8px;line-height:1.5}
.v10-source-part{margin:12px 0}.v10-source-part strong{display:block;margin-bottom:4px}
#curriculum-detail .item-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media(max-width:670px){.v10-parser-box{padding:12px}}

/* V11: Distinct headmaster and teacher interfaces, terminal report workflow. */
[data-headmaster-only][hidden]{display:none!important}
.term-report-panel{margin-top:22px;border-left:4px solid var(--school-brand,#0c5e62)}
.term-topline{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}
.term-topline h3{margin:0 0 7px;color:#1b5054}
.term-topline p{margin:0}
.term-state{display:inline-block;padding:5px 10px;border-radius:50px;background:#edf3f4;color:#315d68;font-weight:750;font-size:11px;white-space:normal}
.term-submitted{background:#fff4df;color:#85520b}
.term-returned{background:#ffe9e7;color:#a23632}
.term-finalised{background:#e2f6e8;color:#26683d}
.term-draft{background:#edf3f4;color:#475569}
.term-summary{margin:12px 0;display:flex;gap:12px;flex-wrap:wrap;padding:12px;border-radius:9px;background:#f4f8f8;font-size:12px;color:#385660;align-items:center}
.term-summary strong{color:#194e4d;font-size:14px}
.term-feedback{padding:12px 14px;border:1px solid #d2e7e4;background:#eff8f5;border-radius:9px;color:#255a56;font-size:12px;margin-top:13px;line-height:1.55}
.term-feedback.is-error{background:#fff2f0;border-color:#efb8b2;color:#93392c}
.term-feedback.term-success{background:#e7f9eb;border-color:#a8deb4;color:#25663b}
.term-editor{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:15px 0}
.term-editor label:last-child{grid-column:1/-1}
.term-editor select,.term-editor textarea,.term-review-layout textarea,.term-review-layout select{width:100%}
.term-editor label{font-size:12px;font-weight:700;color:#284b4e}
.term-review-layout{display:grid;grid-template-columns:1.25fr 1fr;gap:18px;margin:16px 0}
.term-review-layout label{display:block;margin-bottom:12px;font-size:12px;color:#264b51;font-weight:750}
.term-inbox-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.term-inbox-item{text-align:left;display:flex;align-items:flex-start;flex-direction:column;gap:9px;background:#fbfefd;border:1px solid #d7e3df;border-radius:11px;padding:13px;cursor:pointer;color:#244b50}
.term-inbox-item.selected{border:2px solid var(--school-brand,#0c5e62);background:#f1faf7}
.term-inbox-item small{font-size:11px;color:#678184}
.term-class-table{width:100%}
.term-roster{padding-top:15px}
.term-roster-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.term-roster-grid>span{padding:10px;border-radius:9px;background:#f3f7f7;font-size:12px;color:#224c52}
.term-roster-grid small{display:block;color:#71858a;margin-top:3px}
.term-student-summary{padding:12px;border-radius:10px;background:#f9fcfa;border:1px solid #e0ece9}
.term-student-summary>strong{display:block;font-size:17px;margin-bottom:4px;color:#1a4f54}
.term-student-summary>small{display:block;font-size:11px;color:#647b80;margin-bottom:14px}
.term-student-summary table{width:100%;font-size:12px}
.term-student-summary p{font-size:12px;line-height:1.55;margin:9px 0}
#headmaster-review-panel{margin-top:18px}
@media(max-width:770px){.term-review-layout,.term-editor{grid-template-columns:1fr}.term-editor label:last-child{grid-column:auto}.term-topline{flex-direction:column}}
@media print{.term-report-panel,#headmaster-dashboard,#headmaster-inbox{display:none!important}}

/* Keep submission foremost; optional older draft tools stay discoverable but do not compete with the class workflow. */
.draft-report-details{margin-top:18px;padding:8px 0}.draft-report-details>summary{cursor:pointer;font-weight:750;color:#24565b;background:#eef6f4;border:1px solid #d4e5df;padding:14px 18px;border-radius:10px;margin-bottom:16px}.draft-report-details[open]>summary{background:#e3f2ed}

/* V12: Unmistakably different workspaces for teachers and headmasters. */
.workspace-role-card{margin:5px 12px 18px;padding:12px;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.16);border-radius:13px;display:flex;align-items:flex-start;gap:10px;color:white}
.workspace-role-card .role-card-icon{font-size:18px;background:#fff2;border-radius:9px;padding:7px}
.workspace-role-card strong{display:block;font-size:13px;margin-bottom:4px;line-height:1.25}
.workspace-role-card small{font-size:11px;line-height:1.3;color:#d9e6e4;display:block}
.workspace-role-banner{padding:12px 16px;border-radius:12px;background:#dcf3e9;color:#145f47;letter-spacing:.8px;font-size:12px;font-weight:800;margin-bottom:18px;border-left:5px solid #15875e}
body.role-headmaster .workspace-role-banner{background:#e5ecff;color:#1c3c80;border-left-color:#285db3}
body.role-headmaster .sidebar{background:linear-gradient(168deg,#122544,#233d77)!important}
body.role-headmaster .topbar{border-bottom:3px solid #346bc5!important}
body.role-teacher .sidebar{background:linear-gradient(165deg,#123f43,#0c6260)!important}
body.role-teacher .topbar{border-bottom:3px solid #1e8a7b!important}
body.role-unassigned .sidebar{background:linear-gradient(168deg,#5c5364,#514d64)!important}
body.role-unassigned .workspace-role-banner{background:#f7eede;color:#715121;border-left-color:#b88c39}
#navigation button .nav-glyph{display:inline-block;min-width:18px;margin-right:7px;text-align:center}
.headmaster-welcome{display:flex;gap:18px;align-items:center;padding:24px 27px;border-radius:16px;background:linear-gradient(115deg,#1b3766,#27549b);color:#fff;margin-bottom:18px;box-shadow:0 10px 25px #1f467e25}
.headmaster-welcome-icon{font-size:45px;background:rgba(255,255,255,.13);height:78px;min-width:78px;display:grid;place-items:center;border-radius:14px}
.headmaster-welcome h2{font-size:22px;margin:5px 0}
.headmaster-welcome p{font-size:13px;color:#dfebff;line-height:1.65;margin:0}
.headmaster-eyebrow{font-size:10px;letter-spacing:1.6px;color:#ccdcff;font-weight:800}
.two-cols:has(>article[hidden]){grid-template-columns:1fr}
@media(max-width:640px){.headmaster-welcome{padding:18px;align-items:flex-start;gap:11px}.headmaster-welcome-icon{height:48px;min-width:48px;font-size:26px}.headmaster-welcome h2{font-size:17px}.workspace-role-banner{font-size:11px}}

/* V13 — clear account access diagnosis when a staff UID was not found */
.assignment-help {border:1px solid #bddfdc;background:#f8fcfc;}
.assignment-details {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0;}
.assignment-details div {background:#fff;border:1px solid #dbe6e7;border-radius:10px;padding:12px;min-width:0;}
.assignment-details .full {grid-column:1/-1;}
.assignment-details span {display:block;font-size:0.78rem;color:#425f68;margin-bottom:6px;}
.assignment-details strong,.copyable-uid {display:block;font-size:0.92rem;overflow-wrap:anywhere;user-select:text;}
.assignment-help .button-row {display:flex;flex-wrap:wrap;gap:10px;}
@media(max-width:600px){.assignment-details{grid-template-columns:1fr}.assignment-details .full{grid-column:1}}

/* V14: practical Teacher Desk and editable lesson-linked assessments. */
.teacher-desk-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:27px 30px;background:linear-gradient(115deg,#0e4c4f,#0c8070);color:#fff;border-radius:17px;margin-bottom:18px}
.teacher-desk-hero h2{margin:5px 0 9px;font-size:29px;line-height:1.15}
.teacher-desk-hero p{max-width:650px;line-height:1.6;color:#e4f4ed;margin:0}
.desk-hero-mark{font-size:58px;line-height:1;color:#f7d388;padding:4px 20px}
.teacher-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.teacher-mini-stat{background:#f2f9f6;border:1px solid #d9ece6;padding:15px;border-radius:12px;display:flex;flex-direction:column}
.teacher-mini-stat strong{font-size:25px;color:#0d6363;line-height:1.25}
.teacher-mini-stat span{font-size:11px;color:#5c7a78}
.teacher-week-list{display:grid;gap:10px}
.teacher-week-card{border:1px solid #dce8e4;border-radius:12px;background:white;display:flex;align-items:center;padding:14px;gap:14px}
.week-circle{display:grid;place-items:center;border-radius:12px;background:#e9f3eb;flex:0 0 40px;height:40px;font-weight:800;color:#145b57}
.week-content{min-width:0;flex:1}.week-content strong{display:block;overflow-wrap:anywhere;margin-bottom:4px}.week-content small{display:block;color:#667f82;margin:2px 0}
.week-actions{display:flex;gap:6px;flex-wrap:wrap}.week-actions .mini{border-radius:8px;background:#e7f2ee;color:#155b59;padding:8px 12px;font-size:12px;font-weight:700}
.teacher-process{padding-left:22px;line-height:1.85;color:#46656b}.teacher-process li{margin-bottom:9px}
.teacher-source-box{background:#f7faf9;border:1px solid #cedfdb;border-radius:12px;padding:16px;margin:8px 0}
.teacher-source-box h4{margin:0 0 6px}.teacher-source-box p{margin:6px 0 14px}.teacher-source-box label{margin:11px 0}
.teacher-source-box textarea{font-family:Georgia,'Times New Roman',serif;font-size:14px}
#assessment-source{background:#f1f7f4;padding:10px 12px;border-radius:8px;color:#466d67}
#bulk-score-preview{max-height:460px;overflow:auto}
#bulk-score-preview td small{display:block;font-size:10px;color:#71858c;margin-top:3px}
#assessment-notice,#bulk-score-notice{margin-top:13px;white-space:pre-wrap}
#assessment-notice.is-error,#bulk-score-notice.is-error{background:#fff0ed;color:#9b3b2d;border-color:#e6aea5}
@media(max-width:980px){.teacher-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.teacher-desk-hero{padding:23px 20px}.teacher-desk-hero h2{font-size:24px}.desk-hero-mark{display:none}.teacher-week-card{flex-wrap:wrap}.week-actions{width:100%;margin-left:54px}.teacher-week-card .mini{flex:1}.teacher-stats{gap:8px}.teacher-mini-stat{padding:12px}.teacher-mini-stat strong{font-size:21px}}
/* V15: school photographs and a deliberately learner-first teacher UI */
.teacher-home-card[hidden],.school-photo-editor[hidden]{display:none!important}
.teacher-home-card{background:var(--surface,#fff);border:1px solid #cfdedd;border-radius:24px;overflow:hidden;margin-bottom:24px;box-shadow:0 14px 28px rgba(7,47,47,.075)}
.teacher-home-gallery{position:relative;display:grid;grid-template-columns:1.4fr 1fr;gap:6px;height:205px;background:#d9eae9}
.teacher-home-photo{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#c9e4df,#f1f7f4);color:#406461;background-size:cover;background-position:center;text-align:center;padding:18px;font-weight:600;font-size:14px}
.teacher-home-photo.second{background:linear-gradient(135deg,#f5edd3,#cce3dd);background-size:cover;background-position:center}
.teacher-home-photo.has-photo>span{display:none}
.teacher-home-crest{position:absolute;bottom:-36px;left:24px;width:80px;height:80px;border:5px solid white;border-radius:20px;background:#ffffff;box-shadow:0 8px 22px rgba(2,32,35,.18);display:flex;align-items:center;justify-content:center;font-size:36px;overflow:hidden}
.teacher-home-crest img{width:100%;height:100%;object-fit:contain}
.teacher-home-info{padding:47px 24px 24px}
.teacher-home-tag{font-size:11px;letter-spacing:.12em;font-weight:800;color:#128179}
.teacher-home-info h2{font-size:clamp(24px,3vw,34px);margin:8px 0;color:#183c45}
.teacher-home-info p{font-weight:650;margin:0 0 12px}
.teacher-home-classes{display:flex;flex-wrap:wrap;gap:8px;color:#44616c;margin-bottom:18px;font-size:14px}
.teacher-class-pill{background:#edf5f1;padding:7px 12px;border-radius:99px}
.role-teacher #view-dashboard .school-identity-panel,.role-teacher #view-dashboard .hero,.role-teacher #view-dashboard>.section-heading,.role-teacher #view-dashboard>.action-grid{display:none}
.teacher-view-heading{padding:24px;border-radius:20px;background:linear-gradient(100deg,#0c6363,#1c8b7c);color:white;margin-bottom:19px}
.teacher-view-heading span{font-size:11px;letter-spacing:.14em;opacity:.86;font-weight:750}
.teacher-view-heading h2{color:white;font-size:26px;margin:10px 0}
.teacher-view-heading p{color:#e4f8f3;margin-bottom:0;max-width:680px}
.learner-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:12px;margin-top:18px}
.learner-tile{background:#f6faf9;color:#1b4848;text-align:left;border-radius:15px;padding:15px;border:1px solid #d5e6e2;cursor:pointer;min-height:105px;display:flex;flex-direction:column;gap:7px}
.learner-tile:hover{border-color:#117f77;background:#e8f6f2}.learner-tile small{color:#64817c}
.learner-summary{display:flex;gap:10px;flex-wrap:wrap}.learner-stat{background:#edf6f4;padding:14px;border-radius:12px;min-width:120px}
.learner-history-item{border:1px solid #dae6e3;border-radius:13px;padding:16px;margin-top:12px;background:#fcfefd}
.inline-filter-label{display:block;max-width:340px}
.quick-teaching-preview{white-space:pre-line;margin-top:15px;line-height:1.7}.quick-teaching-preview:not(:empty){border-left:4px solid #199184;background:#f0f8f5;border-radius:10px;padding:14px}
.school-photo-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.school-photo-preview{width:100%;max-height:210px;object-fit:cover;border-radius:12px;margin-top:8px}
.wizard-steps{display:flex;gap:7px;flex-wrap:wrap;margin:15px 0}
.wizard-step{padding:8px 13px;border-radius:99px;background:#eaf1ef;font-size:12px;color:#52716d;font-weight:700}
.wizard-step.current{background:#007c75;color:white}
.wizard-panel{background:#f8fbfa;border:1px solid #d7e9e4;border-radius:16px;padding:18px;margin:15px 0}
.wizard-panel h3{margin-top:0}.wizard-grade-table input{min-width:65px;width:100%}.wizard-score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.wizard-badge{display:inline-block;background:#e8f5ee;color:#166953;border-radius:99px;padding:5px 9px;font-size:12px;font-weight:700}
.wizard-entry{margin:10px 0;padding:12px;border-radius:10px;border:1px solid #dce7e5;background:white}
.wizard-progress{height:8px;border-radius:99px;background:#e2efec;overflow:hidden;margin:12px 0}.wizard-progress>div{background:#10a087;height:100%}
.teacher-wizard-feedback{white-space:pre-wrap;color:#2f6a5b;line-height:1.5}.teacher-wizard-feedback.is-error{color:#b42b2b}
#teacher-library-preview{margin-top:16px}.library-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
@media(max-width:700px){.teacher-home-gallery{height:160px}.teacher-home-crest{width:68px;height:68px;bottom:-30px}.teacher-home-info{padding:42px 18px 20px}.school-photo-grid,.wizard-score-grid{grid-template-columns:1fr}.teacher-view-heading{padding:18px}}

/* V16 curriculum-first teaching flow — school-branded, touch-friendly */
.smart-flow-note{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0 20px}
.smart-flow-note span{background:#eaf5f1;color:#16655a;border-radius:999px;padding:9px 14px;font-weight:750;font-size:.85rem}
.v16-planner-panel{border:1px solid #d8e6e2;box-shadow:0 6px 20px rgba(12,63,67,.035)}
.v16-planner-panel .form-row{gap:14px;align-items:start}
.v16-planner-panel .form-row>label{flex:1;min-width:165px}
.v16-planner-panel label small{display:block;font-size:.76rem;font-weight:400;margin-top:5px;line-height:1.5}
.smart-mode-tabs,.smart-type-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.smart-mode-tabs button,.smart-type-tabs button{appearance:none;background:#f5f8f8;color:#254c50;border:1px solid #d1e2df;border-radius:12px;padding:12px 16px;font-weight:700;cursor:pointer;min-height:44px}
.smart-mode-tabs button.selected,.smart-type-tabs button.selected{background:#0c676a;color:white;border-color:#0c676a;box-shadow:0 3px 9px rgba(12,103,106,.15)}
.smart-mode-tabs button:focus-visible,.smart-type-tabs button:focus-visible,.smart-topic-result:focus-visible{outline:3px solid #ffb347;outline-offset:2px}
.smart-mode-content{background:#f9fbfb;border:1px solid #dce7e6;border-radius:16px;padding:18px;margin:14px 0}
.smart-mode-content[hidden]{display:none!important}
.smart-mode-content label{display:block}
.smart-topic-results{margin-top:12px;display:grid;gap:8px;max-height:310px;overflow:auto}
.smart-topic-result{border:1px solid #d7e3e3;background:white;text-align:left;border-radius:12px;padding:12px 14px;display:grid;gap:4px;cursor:pointer;color:#1b3e42;width:100%;font:inherit}
.smart-topic-result span,.smart-topic-result small{font-size:.8rem;color:#62767a}
.smart-topic-result.selected{border:2px solid #0b7b78;background:#eff9f7}
.smart-source-preview{border:1px solid #d0e2dd;background:#f4f9f7;border-radius:16px;padding:16px;margin-top:12px}
.smart-reference-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}
.smart-reference-head strong{font-size:1.05rem;display:block}
.smart-reference-head small{color:#6b777e;display:block;line-height:1.5;margin-top:5px}
.smart-reference-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.smart-reference-facts>div{border:1px solid #e5efed;background:white;border-radius:10px;padding:11px}
.smart-reference-facts dt{font-size:.75rem;font-weight:700;color:#57726c;margin-bottom:5px}
.smart-reference-facts dd{margin:0;font-size:.87rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.smart-source-preview .status-warning{color:#9c5d15}
.smart-source-preview .status-ok{color:#11644f}
.smart-empty{color:#8b501a;background:#fff6ea;border:1px solid #eed3ad;border-radius:10px;padding:15px;line-height:1.55}
.smart-reference-extra{border:1px solid #dce6e1;border-radius:12px;padding:13px 15px;margin:14px 0}
.smart-reference-extra>summary{font-weight:700;cursor:pointer;color:#265a5d}
.smart-reference-extra>label{display:block;margin:11px 0}
.smart-generate-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:20px 0 8px}
.smart-generate-footer p{max-width:590px;margin:0;line-height:1.55}
.smart-generate-footer button{min-height:48px;font-size:.96rem;white-space:nowrap}
.v16-advanced-scheme{margin:16px 0;border-radius:12px;border:1px solid #d6e5e3;background:#f7fbfa;padding:12px 14px}
.v16-advanced-scheme>summary{color:#3c6366;font-weight:700;cursor:pointer}
.v16-advanced-scheme>.two-cols{margin-top:12px}
@media(max-width:760px){.v16-planner-panel .form-row{display:grid;grid-template-columns:1fr;gap:12px}.smart-reference-facts{grid-template-columns:1fr}.smart-generate-footer{flex-direction:column;align-items:stretch}.smart-generate-footer button{width:100%}.smart-mode-tabs button{flex:1 1 140px;font-size:.85rem}.smart-type-tabs button{flex:1 1 130px}.smart-flow-note span{font-size:.74rem;padding:8px 10px}.smart-reference-head{flex-direction:column}}

/* V17 AI generation, clearly separate from free source-based drafts. */
.v17-generate-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.v17-ai-button{background:#4338ca;color:#fff;border:0;border-radius:10px;padding:12px 20px;font-weight:700;cursor:pointer;box-shadow:0 3px 9px rgba(56,41,166,.16)}.v17-ai-button:hover{background:#3730a3}.v17-ai-button:disabled{opacity:.6;cursor:wait}.v17-ai-note{font-size:.83rem;line-height:1.5;color:var(--muted,#526675);max-width:760px;margin:14px 0 3px}
@media(max-width:640px){.v17-generate-actions{flex-direction:column;align-items:stretch}.v17-generate-actions button{width:100%}}

.v17-ai-status{padding:8px 12px;border-radius:8px;background:#fff7e5;color:#6e5417;font-size:.85rem}.v17-ai-status.enabled{background:#e8f6ef;color:#075937}

/* V17.1 professional teacher planning refinements */
.teacher-planner-hero{background:linear-gradient(135deg,#0c5f63 0%,#15786f 55%,#199b86 100%);box-shadow:0 16px 34px rgba(11,74,73,.12)}
.smart-flow-note-pro{margin-top:14px;margin-bottom:18px}
.smart-flow-note-pro span{background:#eef7f4;color:#175f58;border:1px solid #d7e8e3;padding:10px 15px;box-shadow:0 3px 10px rgba(10,60,60,.04)}
.professional-planner-panel{border-radius:22px;padding:28px;background:linear-gradient(180deg,#ffffff 0%,#fbfdfd 100%);box-shadow:0 15px 35px rgba(8,53,56,.06)}
.professional-planner-panel .planner-head{align-items:flex-start;margin-bottom:18px}
.professional-planner-panel .planner-head p{margin:6px 0 0}
.professional-planner-panel .panel-head .tag{align-self:flex-start}
.professional-planner-panel .form-row{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.professional-planner-panel label{font-size:.93rem;font-weight:700;color:#2b4a50}
.professional-planner-panel input:not([type=checkbox]):not([type=file]),
.professional-planner-panel select,
.professional-planner-panel textarea{border-radius:14px;border:1px solid #cfdddf;min-height:52px;padding:13px 15px;background:#fff}
.professional-planner-panel textarea{min-height:150px}
.professional-planner-panel input:focus,
.professional-planner-panel select:focus,
.professional-planner-panel textarea:focus{box-shadow:0 0 0 3px rgba(19,130,120,.12);border-color:#14827b}
#smart-catalogue-count{display:inline-flex;align-items:center;gap:8px;background:#edf6f3;color:#1c6158;border:1px solid #d4e8e0;border-radius:999px;padding:7px 14px;font-weight:700;margin-top:10px}
.smart-mode-content{padding:20px;border-radius:18px;background:#f8fbfb}
.smart-source-preview{padding:18px;border-radius:18px;background:linear-gradient(180deg,#f6fbf9 0%,#fdfefe 100%)}
.smart-reference-facts>div{border-radius:14px;padding:13px 14px}
.smart-reference-facts dd{font-size:.9rem}
.smart-empty{font-size:.96rem;line-height:1.65;padding:18px 18px}
.smart-reference-extra{border-radius:16px;padding:15px 18px;background:#fbfdfd}
.smart-generate-footer{margin-top:24px;padding-top:18px;border-top:1px solid #e3ece9}
.v17-generate-actions button{min-width:220px}
.v17-ai-button,.smart-generate-footer .primary{min-height:52px;border-radius:14px;font-size:1rem;padding:14px 18px;box-shadow:0 8px 18px rgba(10,68,67,.08)}
.smart-generate-footer .primary{background:#127b78}
.smart-generate-footer .primary:hover{background:#0f6968}
.v17-ai-button{background:linear-gradient(135deg,#4f46e5,#4338ca)}
.v17-ai-button:hover{background:linear-gradient(135deg,#4338ca,#3730a3)}
.v17-ai-button:disabled,.smart-generate-footer .primary:disabled{opacity:.62;filter:grayscale(.08);box-shadow:none}
.v17-ai-status{padding:14px 16px;border-radius:14px;background:#fff7e5;color:#6e5417;font-size:.92rem;border:1px solid #eedba6;margin-top:16px}
.v17-ai-status.enabled{background:#e9f7f0;color:#075937;border-color:#bbdfca}
.v17-ai-note{font-size:.9rem;line-height:1.7;margin-top:14px;max-width:none}
.teacher-wizard-feedback{margin-top:14px;padding:14px 16px;border-radius:14px;background:#edf8f4;border:1px solid #cfe4da;color:#215c4f;font-size:.92rem;line-height:1.6}
.teacher-wizard-feedback.is-error{background:#fff1ee;border-color:#efc2b9;color:#9c3627}
@media(max-width:760px){
 .teacher-planner-hero h2{font-size:28px}
 .professional-planner-panel{padding:20px 18px;border-radius:18px}
 .professional-planner-panel .planner-head{flex-direction:column;align-items:flex-start}
 .professional-planner-panel .form-row{grid-template-columns:1fr}
 .smart-flow-note-pro span{width:100%;text-align:center}
 .smart-mode-tabs button,.smart-type-tabs button{width:100%}
 .smart-mode-content,.smart-source-preview,.smart-reference-extra{padding:16px}
 .v17-generate-actions{flex-direction:column;align-items:stretch}
 .v17-generate-actions button{width:100%;min-width:0}
 .smart-generate-footer{gap:12px}
}

/* V18 — fully indexed PDF curriculum workflow */
.smart-pdf-panel{background:linear-gradient(160deg,#f2f9f6 0%,#fff 100%);border:1px solid #bcdcd1;border-radius:18px;padding:24px}
.smart-pdf-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:10px}
.smart-pdf-title strong{font-size:1.12rem;color:#184d51}
.smart-pdf-availability{background:#fff0ec;color:#a33b28;border-radius:99px;padding:8px 12px;font-weight:700;font-size:.76rem}
.smart-pdf-availability.available{background:#e3f6ea;color:#106841}
.smart-pdf-find{margin-top:16px;border-radius:12px;min-height:50px;padding:12px 24px}
.smart-pdf-find:disabled{opacity:.55;cursor:not-allowed}
.smart-pdf-feedback{font-size:.87rem;line-height:1.6;color:#356a5d;margin:12px 0 0;white-space:pre-wrap}
.smart-mode-tabs button[data-smart-mode="pdf"]{border-color:#8bbcb1;background:#e5f4ef;color:#176558}
.smart-mode-tabs button[data-smart-mode="pdf"].selected{background:linear-gradient(135deg,#117e75,#0b626a);border-color:#0e777b;color:white}
@media(max-width:720px){.smart-pdf-panel{padding:18px}.smart-pdf-title{align-items:flex-start}.smart-pdf-availability{max-width:100%}.smart-pdf-find{width:100%}}

/* ======================================================================
   Teacher Work Assistant v18.2 — professional teacher workspace
   Scoped styling: protects Headmaster and Owner Control Centre layouts.
   ====================================================================== */
body.role-teacher{--teacher-ink:#173842;--teacher-teal:#0f746d;--teacher-muted:#657c82;--teacher-line:#dfebe8;background:#f4f8f7}
body.role-teacher .content{max-width:1380px;padding-top:24px}
body.role-teacher .workspace-role-banner{border:1px solid #d7e8e3;border-left:3px solid #168676;background:#eff7f4;color:#245e57;border-radius:10px;padding:9px 13px;margin-bottom:15px;letter-spacing:.05em;font-size:11px}
body.role-teacher .topbar{background:#fff;border-bottom:1px solid #ddebe7!important}
body.role-teacher .header-title h1{color:#183a44}
body.role-teacher .header-title>span{color:#67817e}
.teacher-mobile-nav{display:none}

/* Dashboard home */
.twa-teacher-console{overflow:hidden;border:1px solid #dce9e5;background:white;border-radius:22px;box-shadow:0 18px 42px rgba(28,68,69,.055);margin-bottom:20px}
.twa-console-hero{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(111deg,#123f4a 2%,#0d6666 72%,#13786d 100%);padding:29px 34px;display:flex;justify-content:space-between;align-items:center;gap:25px;color:white}
.twa-console-hero:before{content:"";position:absolute;right:-100px;top:-155px;width:390px;height:390px;border-radius:50%;border:75px solid rgba(255,255,255,.055);z-index:-1}
.twa-console-hero-copy{min-width:0;max-width:690px}
.twa-console-eyebrow{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:#dbf9ee;font-size:10px;font-weight:800;letter-spacing:.12em}
.twa-console-eyebrow-dot{height:7px;width:7px;background:#8ff1d0;border-radius:50%;box-shadow:0 0 0 4px rgba(143,241,208,.15)}
.twa-hero-term{display:inline-flex;align-items:center;font-size:10px;letter-spacing:normal;font-weight:650;color:#ecfffb;background:rgba(255,255,255,.12);padding:5px 9px;border-radius:999px;margin-left:7px}
.twa-console-hero h2{margin:16px 0 8px;color:#fff;font-size:clamp(22px,2.8vw,33px);font-weight:800;letter-spacing:-.04em;line-height:1.2;overflow-wrap:anywhere}
.twa-console-hero p{color:#d2eeeb;max-width:550px;font-size:13px;line-height:1.7;margin:0 0 14px}
.twa-console-school{display:inline-flex;align-items:center;gap:10px;color:#fff;font-size:13px;font-weight:700;line-height:1.3;max-width:100%}
.twa-console-crest{width:38px;height:38px;border:1px solid rgba(255,255,255,.3);background:#fff;border-radius:10px;display:grid;place-items:center;overflow:hidden;flex-shrink:0;color:#0e716d}
.twa-console-crest img{width:100%;height:100%;object-fit:contain}
.twa-console-crest svg{width:21px;height:21px}
.twa-console-hero-actions{display:flex;flex-direction:column;gap:9px;flex:0 0 215px;align-self:center;z-index:1}
.twa-console-hero-actions button{display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:11px;padding:12px 15px;min-height:45px;line-height:1.2;font-size:13px;font-weight:800;white-space:nowrap}
.twa-console-hero-actions svg{width:17px;height:17px}
.twa-console-primary{background:#fff;color:#105f5f;box-shadow:0 6px 18px rgba(0,0,0,.1)}
.twa-console-primary:hover{background:#eaf9f2}
.twa-console-outline{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.36)}
.twa-console-outline:hover{background:rgba(255,255,255,.17)}
.twa-console-body{padding:27px 31px 30px}
.twa-console-section-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:13px}
.twa-section-eyebrow{font-size:10px!important;letter-spacing:.12em!important;font-weight:850!important;color:#178176!important;margin:0 0 5px!important}
.twa-console-section-heading h3{font-size:19px;color:#1c3c45;font-weight:800;line-height:1.3;margin:0}
.twa-console-date{color:#6c8186;font-weight:650;font-size:12px}
.twa-console-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.twa-console-metric{min-width:0;background:#f8fbfa;border:1px solid #e0eae8;border-radius:15px;padding:16px;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.twa-metric-icon{color:#178277;background:#e7f5f0;width:33px;height:33px;border-radius:9px;display:grid;place-items:center;margin-bottom:3px}
.twa-metric-icon svg{width:17px;height:17px}
.twa-console-metric strong{font-size:23px;line-height:1.05;font-weight:850;letter-spacing:-.04em;color:#1a3e44;overflow-wrap:anywhere}
.twa-console-metric>span:last-child{font-size:11px;color:#607880;font-weight:650}
.twa-shortcut-title{margin-top:27px}
.twa-console-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.twa-quick-action{display:flex;align-items:center;gap:12px;border:1px solid #dae7e4;border-radius:14px;min-width:0;background:#fff;padding:15px 14px;text-align:left;min-height:85px;transition:border-color .16s,transform .16s,box-shadow .16s;color:#193f47}
.twa-quick-action:hover{border-color:#9ecfc5;box-shadow:0 8px 17px rgba(11,84,74,.06);transform:translateY(-1px)}
.twa-quick-icon{width:42px;height:42px;flex-shrink:0;border-radius:11px;display:grid;place-items:center;color:#17776e;background:#edf8f3}
.twa-action-featured .twa-quick-icon{background:#137a71;color:#fff}
.twa-quick-icon svg{width:21px;height:21px}
.twa-quick-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.twa-quick-copy strong{font-size:13px;line-height:1.35;font-weight:800}
.twa-quick-copy small{font-size:11px;color:#71888a;font-weight:450;line-height:1.4}
.twa-quick-chevron{color:#719d94;display:flex;flex:0 0 auto}
.twa-quick-chevron svg{width:16px;height:16px}
.twa-console-bottom-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:15px;margin-top:23px}
.twa-console-panel{background:#fff;border:1px solid #dde9e6;border-radius:15px;padding:18px;min-width:0}
.twa-console-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:13px}
.twa-console-panel-heading h3{font-size:15px;margin:0 0 4px;color:#173c46}
.twa-console-panel-heading p{font-size:11px;color:#72858a;margin:0}
.twa-text-link{background:none;color:#0e756f;font-size:12px;line-height:1.4;display:inline-flex;align-items:center;gap:5px;font-weight:800;padding:6px 0;white-space:nowrap}
.twa-text-link:hover{color:#0a514e;text-decoration:underline}
.twa-text-link svg{width:15px;height:15px}
.twa-console-panel .teacher-home-classes{display:flex;flex-direction:column;gap:8px;margin:0}
.twa-assigned-class{display:flex;gap:10px;align-items:center;background:#f6faf9;border:1px solid #e8efed;border-radius:11px;padding:10px 12px;min-height:56px}
.twa-class-initial{width:34px;height:34px;border-radius:9px;background:#e1efeb;color:#0b756d;font-size:17px;font-weight:850;display:grid;place-items:center;flex-shrink:0}
.twa-assigned-class strong,.twa-recent-lesson strong{color:#1b4047;font-size:12px;display:block;font-weight:800;line-height:1.3}
.twa-assigned-class small,.twa-recent-lesson small{color:#6a8287;font-size:11px;display:block;margin-top:3px;line-height:1.3}
.twa-recent-lessons{display:flex;flex-direction:column;gap:8px}
.twa-recent-lesson{width:100%;display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e7efec;border-radius:11px;background:#f9fcfb;text-align:left;min-width:0}
.twa-recent-lesson:hover{background:#f0faf6;border-color:#b7dcd1}
.twa-recent-lesson>span:nth-child(2){flex:1;min-width:0}
.twa-recent-lesson-icon{display:grid;place-items:center;width:33px;height:33px;flex-shrink:0;border-radius:9px;background:#e5f2f0;color:#18786e;font-size:17px}
.twa-recent-arrow{font-size:16px;color:#527f78}
.twa-console-empty{border:1px dashed #d4e4de;padding:15px;border-radius:10px;color:#697f83;font-size:12px;line-height:1.65;background:#f9fcfa}
.twa-console-photos[hidden]{display:none!important}
.twa-console-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:18px}
.twa-console-photos .teacher-home-photo{border-radius:13px;background-size:cover;background-position:center;height:115px;min-width:0}
.twa-console-photos .teacher-home-photo[hidden]{display:none!important}
/* Teacher dashboard: keep historic admin elements in the DOM, but not duplicated. */
body.role-teacher #view-dashboard>.school-identity-panel,
body.role-teacher #view-dashboard>.hero,
body.role-teacher #view-dashboard>.stats-grid,
body.role-teacher #view-dashboard>.section-heading,
body.role-teacher #view-dashboard>.action-grid,
body.role-teacher #view-dashboard>.two-cols{display:none!important}

/* Lesson studio — compact forms, useful actions and source checks. */
.teacher-lesson-studio{color:#1d4048}
.twa-studio-top{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:23px 27px;border:1px solid #dcebe5;border-radius:18px;background:linear-gradient(112deg,#fff 0%,#f3faf7 100%);margin-bottom:14px}
.twa-studio-top h2{font-size:28px;line-height:1.18;color:#193e45;margin:4px 0 8px;font-weight:850;letter-spacing:-.04em}
.twa-studio-top p:not(.twa-section-eyebrow){font-size:13px;line-height:1.65;color:#688084;max-width:660px;margin:0}
.twa-studio-library{display:inline-flex;justify-content:center;align-items:center;gap:8px;background:white;border:1px solid #cfe0dc;border-radius:11px;min-height:43px;padding:10px 15px;font-size:12px;font-weight:800;color:#1c706a;flex-shrink:0}
.twa-studio-library svg{width:18px;height:18px}
.twa-studio-steps{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:14px 0 19px}
.twa-studio-steps span{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:750;color:#52716e}
.twa-studio-steps b{display:grid;place-items:center;border-radius:50%;background:#d8ede5;color:#0e6f63;height:24px;width:24px;font-size:11px}
.twa-studio-grid{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(315px,.83fr);gap:16px;align-items:start}
.twa-studio-aside{display:flex;flex-direction:column;gap:14px;position:sticky;top:16px;min-width:0}
.twa-studio-card{background:#fff;border:1px solid #dde9e6;border-radius:18px;padding:23px;box-shadow:0 9px 24px rgba(21,70,67,.035);min-width:0;margin:0}
.twa-studio-section-title{display:flex;align-items:flex-start;gap:11px;margin-bottom:17px}
.twa-studio-section-title h3{font-size:18px;color:#183b45;letter-spacing:-.02em;font-weight:850;line-height:1.25;margin:0 0 4px}
.twa-studio-section-title p{font-size:12px;color:#6c8386;line-height:1.5;margin:0}
.twa-studio-number{display:grid;place-items:center;border-radius:11px;color:#0a766d;background:#e5f3ed;font-size:12px;font-weight:850;width:34px;height:34px;flex:0 0 34px}
.twa-topic-heading{margin-top:24px;margin-bottom:11px;padding-top:23px;border-top:1px solid #e4eeeb}
.twa-studio-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.twa-studio-inputs label:last-child{grid-column:1/-1}
.twa-studio-card label{font-size:12px;gap:7px;color:#47636a;font-weight:750;min-width:0}
.twa-studio-card input:not([type=checkbox]):not([type=file]),.twa-studio-card select,.twa-studio-card textarea{width:100%;min-width:0;background:#fff;border:1px solid #d5e3e1;border-radius:11px;padding:11px 12px;min-height:46px;color:#193e46;font-size:13px}
.twa-studio-card input:focus,.twa-studio-card select:focus,.twa-studio-card textarea:focus{box-shadow:0 0 0 3px rgba(22,137,118,.13);border-color:#0d887a}
.twa-studio-assignment{font-size:11px;margin:9px 0 0;color:#748a8b}
.smart-mode-tabs.twa-source-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.twa-source-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:44px;background:#f7faf9;color:#315860;border:1px solid #dce7e5;border-radius:11px;padding:9px 10px;font-size:12px;line-height:1.3;font-weight:800;text-align:center}
.twa-source-tabs button svg{width:17px;height:17px;flex-shrink:0}
.twa-source-tabs button.selected{background:#0c7069!important;color:#fff!important;border-color:#0c7069!important;box-shadow:none}
.twa-source-tabs button[data-smart-mode="pdf"]:not(.selected){background:#eaf7f2;color:#13665b;border-color:#bfddd4}
.twa-catalogue-status{display:inline-flex;align-items:center;max-width:100%;font-size:11px;line-height:1.4;color:#567d74;background:#eff8f4;border:1px solid #dbece4;border-radius:99px;padding:6px 11px;font-weight:700;margin:12px 0 2px;white-space:normal}
.teacher-lesson-studio .smart-mode-content{background:#f9fcfb;border-color:#e1ebe8;border-radius:13px;padding:15px;margin:10px 0}
.teacher-lesson-studio .smart-mode-content[hidden]{display:none!important}
.teacher-lesson-studio .smart-pdf-panel{background:#f3faf7;border:1px solid #cfe5de}
.teacher-lesson-studio .smart-pdf-title{align-items:start;gap:9px}
.teacher-lesson-studio .smart-pdf-title strong{font-size:13px;color:#254f54}
.teacher-lesson-studio .smart-pdf-availability{font-size:10px;white-space:normal}
.teacher-lesson-studio .smart-pdf-find{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:11px;min-height:46px;background:#0d7971;font-size:13px}
.teacher-lesson-studio .smart-pdf-find svg{width:17px;height:17px}
.teacher-lesson-studio .smart-source-preview{margin-top:10px;padding:15px;border-radius:13px;background:#f7fbf9;border:1px solid #dbece4}
.teacher-lesson-studio .smart-reference-facts{grid-template-columns:1fr;gap:7px;margin:10px 0}
.teacher-lesson-studio .smart-reference-facts>div{padding:10px 12px}
.teacher-lesson-studio .smart-reference-facts dd{font-size:12px}
.teacher-lesson-studio .smart-empty{font-size:12px;line-height:1.6;padding:13px}
.smart-type-tabs.twa-output-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0 0 16px}
.twa-output-tabs button{min-width:0;min-height:45px;border-radius:10px;font-size:11px;padding:7px 9px;color:#37585c;font-weight:800;line-height:1.3}
.twa-output-tabs button.selected{background:#0f736b;color:white;border-color:#0f736b}
.twa-studio-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.twa-studio-optional{border:1px solid #dfeae6;background:#f9fcfb;border-radius:12px;padding:0;margin-top:11px}
.twa-studio-optional>summary{display:flex;align-items:center;gap:7px;cursor:pointer;padding:12px;color:#3a6463;font-weight:800;font-size:12px;list-style:none}
.twa-studio-optional>summary::-webkit-details-marker{display:none}
.twa-studio-optional>summary:after{content:'⌄';font-size:17px;margin-left:auto}
.twa-studio-optional[open]>summary:after{content:'⌃'}
.twa-studio-optional>summary svg{width:17px;height:17px}
.twa-studio-optional-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;padding:0 13px 13px}
.twa-studio-optional-body .smart-reference-extra{grid-column:1/-1;margin:0;background:#fff;padding:12px}
.twa-studio-optional-body .smart-reference-extra>summary{font-size:12px;line-height:1.6}
.twa-studio-optional-body .smart-reference-extra>label{margin:10px 0}
.twa-studio-optional-body textarea{min-height:116px}
.twa-studio-generate{border-color:#cbe6dc;background:linear-gradient(180deg,#ffffff 0%,#f9fdfb 100%)}
.twa-ready-icon{background:#e1f4ea;color:#11795a}
.twa-ready-icon svg{width:19px;height:19px}
.twa-selection-summary{background:#f1f7f5;border:1px solid #dfebe7;border-radius:12px;padding:13px;display:flex;flex-direction:column;gap:6px;font-size:12px;color:#617b79;line-height:1.6;margin-bottom:13px}
.twa-selection-summary.is-ready{background:#eaf7f1;border-color:#b8e3cc;color:#1d6858}
.twa-selection-summary strong{font-size:14px;color:#174e43}
.twa-selection-summary small{color:#3c7c6a;font-size:11px}
.twa-selection-mark{font-size:11px;font-weight:800;color:#127a55}
.twa-studio-generate .teacher-wizard-feedback{margin:0 0 12px;border-radius:11px;padding:12px;line-height:1.5;font-size:12px;max-height:220px;overflow:auto}
.twa-studio-actions{display:flex;flex-direction:column;gap:9px;margin:0}
.twa-studio-actions button{width:100%;border-radius:11px;min-width:0;min-height:48px;font-size:13px;font-weight:850;display:flex;align-items:center;justify-content:center;gap:9px;padding:11px 13px;line-height:1.3}
.twa-studio-actions button svg{width:19px;height:19px;flex-shrink:0}
.twa-studio-actions .v17-ai-button{background:#4d45ce;color:white;box-shadow:0 5px 12px rgba(64,61,168,.14)}
.twa-studio-actions .v17-ai-button:hover{background:#3f37b7}
.twa-studio-actions .secondary{background:white;color:#1a6c64;border:1px solid #cadfd7;box-shadow:none}
.twa-studio-actions .secondary:hover{background:#eff8f4}
.twa-studio-actions button:disabled{box-shadow:none;opacity:.5}
.twa-studio-generate .v17-ai-status{padding:8px 10px;border-radius:9px;margin:11px 0 0;font-size:11px;line-height:1.5;border-color:#cae8d6}
.twa-generation-notes{margin-top:13px;border-top:1px solid #e0ebe7;padding-top:10px}
.twa-generation-notes>summary{font-size:11px;color:#50726f;font-weight:750;cursor:pointer;line-height:1.5}
.twa-generation-notes .v17-ai-note{font-size:11px;color:#657d80;line-height:1.65;margin:9px 0 0}
.twa-studio-footer{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-top:17px;font-size:12px;color:#6e8482}
.twa-studio-footer .twa-text-link{margin-left:auto}
.twa-studio-footer .twa-text-link+.twa-text-link{margin-left:0}
.teacher-lesson-studio button:focus-visible,.twa-teacher-console button:focus-visible,.teacher-mobile-nav button:focus-visible{outline:3px solid #f2b95d;outline-offset:3px}

@media(max-width:1180px){
 .twa-console-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .twa-studio-grid{grid-template-columns:minmax(0,1.12fr) minmax(280px,.83fr)}
 .twa-studio-inputs{grid-template-columns:1fr}
 .twa-studio-inputs label:last-child{grid-column:auto}
}
@media(max-width:990px){
 .twa-studio-grid{grid-template-columns:1fr}
 .twa-studio-aside{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .twa-studio-card{padding:20px}
}
@media(max-width:760px){
 body.role-teacher .content{padding:14px 14px calc(96px + env(safe-area-inset-bottom, 0px));}
 body.role-teacher .topbar{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:5px 11px;padding:12px 15px;min-height:66px}
 body.role-teacher .topbar .mobile-menu{grid-column:1;grid-row:1;width:42px;height:42px;border-radius:10px;align-items:center;justify-content:center;font-size:19px}
 body.role-teacher .topbar .header-title{grid-column:2;grid-row:1;min-width:0}
 body.role-teacher .topbar .header-title h1{font-size:17px;line-height:1.3;white-space:normal;overflow-wrap:break-word;margin:0}
 body.role-teacher .topbar .header-title>span{font-size:10px;letter-spacing:.05em;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 body.role-teacher .topbar .brand-thumb{width:29px;height:29px;object-fit:contain}
 body.role-teacher .topbar .top-actions{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:flex-end;min-width:0;gap:7px}
 body.role-teacher .topbar .top-actions:has(#school-picker[hidden]){display:flex}
 body.role-teacher .topbar .top-actions #school-picker{min-width:90px;max-width:42%;flex:1 1 110px;font-size:11px}
 body.role-teacher .topbar .top-actions #account-button{max-width:min(74vw,260px);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:1;font-size:11px;padding:9px 11px}
 body.role-teacher .workspace-role-banner{font-size:10px;letter-spacing:.02em;padding:8px 11px}
 body.role-teacher .teacher-mobile-nav{position:fixed;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;bottom:0;left:0;right:0;padding:8px 8px max(8px,env(safe-area-inset-bottom, 0px));border-top:1px solid #d6e6e0;background:rgba(255,255,255,.975);box-shadow:0 -5px 20px rgba(8,58,61,.065);z-index:35}
 .teacher-mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:transparent;border:0;border-radius:10px;min-width:0;width:100%;min-height:53px;margin:0;padding:5px 2px;color:#748587;font-size:10px;line-height:1.2;font-weight:750;box-shadow:none}
 .teacher-mobile-nav button svg{width:21px;height:21px;flex-shrink:0}
 .teacher-mobile-nav button span{font-size:10px;font-weight:750;line-height:1.2;white-space:nowrap;color:inherit}
 .teacher-mobile-nav button.current{color:#0e776d;background:#e9f7f1;box-shadow:none}
 body.role-teacher .sidebar.open{z-index:60}
 .twa-console-hero{padding:20px;display:block}
 .twa-console-hero h2{font-size:24px;margin:12px 0 8px}
 .twa-console-hero p{font-size:12px;margin-bottom:12px}
 .twa-console-hero-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;margin-top:16px;align-items:stretch}
 .twa-console-hero-actions button{flex:1 1 135px;white-space:normal;min-height:45px;font-size:12px;padding:9px 10px}
 .twa-console-body{padding:19px 15px 21px}
 .twa-console-date{font-size:10px;text-align:right}
 .twa-console-section-heading h3{font-size:16px}
 .twa-console-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .twa-console-metric{padding:12px;gap:4px;border-radius:13px}
 .twa-metric-icon{height:29px;width:29px}
 .twa-console-metric strong{font-size:22px}
 .twa-console-metric>span:last-child{font-size:10px}
 .twa-shortcut-title{margin-top:22px}
 .twa-console-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .twa-quick-action{display:block;min-height:114px;padding:11px;border-radius:12px}
 .twa-quick-icon{height:33px;width:33px;border-radius:9px;margin-bottom:9px}
 .twa-quick-icon svg{width:18px;height:18px}
 .twa-quick-copy strong{font-size:12px}
 .twa-quick-copy small{font-size:10px;line-height:1.35;margin-top:3px}
 .twa-quick-chevron{display:none}
 .twa-console-bottom-grid{grid-template-columns:1fr;gap:10px;margin-top:17px}
 .twa-console-panel{padding:14px}
 .twa-console-panel-heading h3{font-size:13px}
 .twa-console-panel-heading p{font-size:10px}
 .twa-text-link{font-size:11px}
 .twa-studio-top{padding:18px;align-items:start;gap:11px}
 .twa-studio-top h2{font-size:23px}
 .twa-studio-top p:not(.twa-section-eyebrow){font-size:12px;line-height:1.6}
 .twa-studio-library{padding:10px;font-size:0;min-width:42px;min-height:42px}
 .twa-studio-library svg{width:22px;height:22px}
 .twa-studio-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:11px 0 14px}
 .twa-studio-steps span{align-items:center;flex-direction:column;text-align:center;font-size:10px;line-height:1.25;gap:5px}
 .twa-studio-steps b{height:25px;width:25px;font-size:11px}
 .twa-studio-aside{grid-template-columns:1fr}
 .twa-studio-card{padding:17px 15px;border-radius:15px}
 .twa-studio-section-title h3{font-size:16px}
 .twa-studio-section-title p{font-size:11px}
 .twa-studio-number{height:32px;width:32px;flex-basis:32px}
 .twa-topic-heading{margin-top:20px;padding-top:18px}
 .twa-studio-inputs{grid-template-columns:1fr}
 .twa-studio-inputs label:last-child{grid-column:auto}
 .smart-mode-tabs.twa-source-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .twa-source-tabs button{width:100%;min-height:48px!important;font-size:11px!important;padding:8px 7px!important;gap:4px}
 .twa-source-tabs button svg{width:15px;height:15px}
 .smart-type-tabs.twa-output-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .twa-output-tabs button{width:100%!important;min-height:43px;font-size:10px!important;padding:7px 5px!important}
 .twa-studio-numbers{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .twa-studio-optional-body{grid-template-columns:1fr}
 .twa-studio-optional-body .smart-reference-extra{grid-column:auto}
 .twa-studio-footer{gap:7px}
 .twa-studio-footer>span{width:100%}
 .twa-studio-footer .twa-text-link{margin-left:0}
}
@media(max-width:360px){
 .twa-console-hero-actions{flex-direction:column}
 .twa-studio-source .smart-mode-tabs.twa-source-tabs{grid-template-columns:1fr 1fr}
 .twa-source-tabs button{font-size:10px!important}
 .twa-studio-steps span{font-size:9px}
 .twa-studio-card{padding:14px 12px}
 .twa-console-metrics{gap:7px}
 .twa-console-metric{padding:9px}
}
@media(prefers-reduced-motion:reduce){.twa-quick-action{transition:none}.twa-quick-action:hover{transform:none}}

/* V18.3 — Ghana NaCCA/GES-style structured lesson-plan tables. */
.lp-editor{color:#29484a}
.lp-editor-guidance{padding:12px 15px;background:#eef8f4;border:1px solid #cde7dc;border-radius:12px;color:#1d6157;font-size:.92rem;margin:0 0 15px;line-height:1.55}
.twa-lesson-document{font-family:'Times New Roman',Georgia,serif;font-size:13px;line-height:1.48;color:#23383a;background:white}
.lp-doc-title{text-align:center;color:#0c6464;font-size:21px;font-weight:800;letter-spacing:.03em;margin:12px 0 3px}
.lp-doc-subtitle{text-align:center;color:#557177;font-size:13px;margin:0 0 15px}
.lp-doc-heading{font-family:Inter,Segoe UI,Arial,sans-serif;font-size:14px;color:#126865;margin:22px 0 9px;line-height:1.4}
.lp-document-table{width:100%;table-layout:fixed;border-collapse:collapse;border:1px solid #bdd5ce;margin:8px 0 16px;background:white;font-size:13px}
.lp-document-table th,.lp-document-table td{padding:10px 12px;border:1px solid #cbdcd8;vertical-align:top;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.lp-document-table th{background:#def0e8;color:#16544f;font-weight:800;text-transform:none;font-size:12px}
.lp-document-table .lp-field-label{background:#ecf5f1;font-weight:700;color:#325953;width:19%}
.lp-meta td:nth-child(2),.lp-meta td:nth-child(4){width:31%}
.lp-plan td:first-child,.lp-plan th:first-child{width:18%}
.lp-plan td{white-space:pre-line}
.lp-document-paragraph{margin:9px 0 16px;white-space:normal;overflow-wrap:anywhere}
.lp-edit-period{background:#fff;border:1px solid #d4e6df;border-radius:16px;padding:17px;margin:18px 0 24px;box-shadow:0 5px 17px rgba(11,74,73,.05)}
.lp-edit-period>h3{margin:0 0 13px;color:#0f6561;font-size:16px;line-height:1.5}
.lp-period-focus{padding:11px;background:#f0f7f4;border:1px solid #d7e8e2;border-radius:12px;margin-bottom:12px}
.lp-scroll{overflow-x:auto;max-width:100%}
.lp-edit-table{min-width:720px}
.lp-edit-table th{background:#e1f0e8;color:#164d4a;font-size:.82rem}
.lp-edit-table th:first-child{width:125px}
.lp-edit-field{display:block;margin:0 0 12px;font-family:Inter,Segoe UI,Arial,sans-serif}
.lp-edit-field:last-child{margin-bottom:0}
.lp-edit-field label{display:block;color:#456966;font-size:11px;margin-bottom:4px;font-weight:750}
.lp-edit-field textarea{width:100%;min-width:0;min-height:80px;padding:10px 11px;border:1px solid #cfdeda;border-radius:9px;background:#fff;font:13px/1.5 'Times New Roman',serif;resize:vertical;color:#253e40}
.lp-edit-field textarea:focus{outline:2px solid #83c5bb;outline-offset:0}
.lp-page-break{break-before:page;page-break-before:always;height:0}
#editor-panel .editor-meta{margin-bottom:14px}
@media(max-width:740px){
 .lp-edit-period{padding:12px;margin:15px 0}
 .lp-edit-table{min-width:0;table-layout:auto}
 .lp-edit-table thead{display:none}
 .lp-edit-table tr{display:block;border:1px solid #c4dcd4;border-radius:12px;margin-bottom:11px;overflow:hidden}
 .lp-edit-table td,.lp-edit-table th{display:block;width:100%!important;border:0;border-bottom:1px solid #e4eeeb}
 .lp-edit-table th{font-size:.95rem}
 .lp-document-table.lp-meta{font-size:11px}
 .lp-document-table.lp-meta td{padding:8px 6px}
 .lp-editor-guidance{font-size:.83rem}
}
@media print{
 #print-sheet .twa-lesson-document{font:10pt/1.38 'Times New Roman',serif;color:#111}
 #print-sheet .lp-doc-title{font:700 14pt/1.2 'Times New Roman',serif;color:#0a5754}
 #print-sheet .lp-doc-subtitle{font:10pt/1.2 'Times New Roman',serif;color:#4d6460}
 #print-sheet .lp-doc-heading{font:700 11pt/1.2 'Times New Roman',serif;color:#0a5754;break-after:avoid;page-break-after:avoid}
 #print-sheet .lp-document-table{width:100%;margin:7pt 0 12pt;table-layout:fixed;border-collapse:collapse;font-size:9.2pt}
 #print-sheet .lp-document-table th,#print-sheet .lp-document-table td{border:0.6pt solid #9eb7b0;padding:5pt 6pt;vertical-align:top;color:#111;overflow-wrap:anywhere}
 #print-sheet .lp-document-table th{background:#e3f2eb!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 #print-sheet .lp-document-table .lp-field-label{background:#ecf5f1!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 #print-sheet .lp-document-table tr{break-inside:avoid-page}
 #print-sheet .lp-document-paragraph{font-size:10pt;white-space:pre-line;overflow-wrap:anywhere}
 #print-sheet .lp-page-break{break-before:page;page-break-before:always}
}
/* Make the metadata pairs comfortably readable on narrow phone screens.
   The exported DOCX and printed A4 documents remain true four-column tables. */
@media screen and (max-width:740px){
 .lp-editor .lp-meta{display:block;border:none;background:transparent}
 .lp-editor .lp-meta tbody{display:block}
 .lp-editor .lp-meta tr{display:grid;grid-template-columns:minmax(0,38%) minmax(0,62%);margin:0 0 6px;border:1px solid #d3e4de;border-radius:9px;overflow:hidden;background:#fff}
 .lp-editor .lp-meta td{width:auto!important;display:block;min-width:0;margin:0;border:0;border-bottom:1px solid #e0eae7;padding:8px 9px;font-size:12px;overflow-wrap:anywhere}
 .lp-editor .lp-meta td:nth-child(odd){border-right:1px solid #d3e4de}
 .lp-editor .lp-meta td:nth-last-child(-n+2){border-bottom:0}
}
.lp-admin-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:0 0 16px;padding:16px;background:#f4faf7;border:1px solid #cce3d8;border-radius:14px}
.lp-admin-editor label{display:block;font-weight:750;color:#335b55;font-size:12px}
.lp-admin-editor label input,.lp-admin-editor label textarea{display:block;margin-top:5px;width:100%;min-width:0;padding:10px 12px;background:white;border:1px solid #ccdcd6;border-radius:8px}
.lp-admin-editor .lp-admin-wide,.lp-admin-editor p{grid-column:1/-1}
.lp-admin-editor p{margin:0;font-size:11px;color:#5f7a74}
@media(max-width:580px){.lp-admin-editor{grid-template-columns:1fr}.lp-admin-editor .lp-admin-wide,.lp-admin-editor p{grid-column:auto}}

/* Version 19 — concise multi-page lesson wizard with inline AI document & chat. */
.twa-guided-studio{max-width:940px;margin:0 auto}
.twa-guided-studio [hidden]{display:none!important}
.twa-guided-top{background:linear-gradient(118deg,#0d6665,#0e8173);border-radius:18px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px 26px;color:#fff;margin-bottom:14px;box-shadow:0 12px 22px rgba(10,72,69,.08)}
.twa-guided-top .twa-section-eyebrow{color:#c7e9e1;margin:0;font-size:10px;letter-spacing:.14em;font-weight:850}
.twa-guided-top h2{font-size:27px;line-height:1.14;letter-spacing:-.025em;margin:6px 0 5px;color:#fff}
.twa-guided-top p:not(.twa-section-eyebrow){font-size:13px;color:#e0f5f0;margin:0;line-height:1.5}
.twa-guided-top .twa-studio-library{background:#fff;color:#105c59;border:1px solid #cae8df;border-radius:11px;min-height:41px;white-space:nowrap;padding:10px 13px;font-size:12px;font-weight:850;flex-shrink:0}
.twa-guided-progress{background:#fff;border:1px solid #dbe9e6;border-radius:14px;padding:12px 18px;margin-bottom:13px}
.twa-guided-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;color:#26575a;font-size:13px}
.twa-guided-progress-head span{font-size:11px;color:#6c8182}
.twa-guided-progress-rail{height:6px;width:100%;background:#eaf2ef;border-radius:99px;overflow:hidden}
.twa-guided-progress-rail>span{display:block;height:100%;background:#108678;border-radius:99px;transition:width .22s ease}
.twa-guided-alert{padding:12px 16px;margin-bottom:12px;border-radius:12px;background:#fff2ea;border:1px solid #ecc7a7;color:#8b421e;font-size:13px;line-height:1.5}
.twa-guided-page{margin-bottom:12px!important;border:1px solid #d8e8e3!important;box-shadow:0 10px 25px rgba(8,56,57,.055)!important;border-radius:18px!important;padding:25px!important;background:#fff!important}
.twa-guided-section{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.twa-guided-section h3{font-size:21px;margin:0;color:#1a3e48;line-height:1.22;letter-spacing:-.025em}
.twa-guided-section p{color:#6d8589;margin:5px 0 0;font-size:13px;font-weight:450}
.twa-guided-counter{width:43px;height:43px;flex:0 0 43px;border-radius:13px;display:grid;place-items:center;background:#e7f4ee;color:#116c60;font-size:17px;font-weight:850}
.twa-guided-page .twa-studio-inputs{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.twa-guided-page .twa-studio-inputs label:last-child{grid-column:auto}
.twa-guided-page label{font-size:13px;font-weight:750;color:#46666b}
.twa-guided-page .twa-studio-inputs select{font-size:15px;min-height:52px}
.twa-guided-page .twa-studio-assignment{margin:12px 0 0;font-size:12px}
.twa-guided-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:17px;border-top:1px solid #e9f0ed}
.twa-guided-controls>span{font-size:12px;color:#738788;margin-right:auto}
.twa-guided-controls button{min-height:44px;border-radius:10px;font-size:13px;font-weight:800;padding:10px 16px}
.twa-guided-controls .primary{background:#0f756b;min-width:155px}
.twa-guided-controls .primary:hover{background:#0b625a}
.twa-guided-controls .secondary{background:#eef5f2;color:#235c56;border:1px solid #d4e6df}
.twa-guided-page[data-studio-page="2"] .twa-topic-heading{display:none}
.twa-guided-page[data-studio-page="2"] .twa-source-tabs{margin:0 0 12px}
.twa-guided-page[data-studio-page="2"] .smart-mode-content{border-radius:12px;margin:10px 0;padding:13px}
.twa-guided-page[data-studio-page="2"] .smart-source-preview{max-height:220px;overflow:auto;border-radius:12px;padding:12px;margin-top:11px}
.twa-guided-page[data-studio-page="2"] .smart-source-preview .smart-reference-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
.twa-guided-page[data-studio-page="2"] .smart-source-preview .smart-reference-facts>div{min-width:0}
.twa-guided-page[data-studio-page="2"] .twa-catalogue-status{margin:7px 0;padding:8px 12px}
.twa-guided-page .twa-studio-details,.twa-guided-page .twa-studio-generate{margin:0;box-shadow:none!important}
.twa-guided-page[data-studio-page="3"] .twa-studio-details{padding:24px!important}
.twa-guided-page[data-studio-page="3"] .twa-output-tabs button{min-height:53px}
.twa-guided-page[data-studio-page="3"] .twa-studio-numbers{margin-top:16px}
.twa-guided-page[data-studio-page="3"] .twa-studio-optional{margin-top:16px}
.twa-guided-page[data-studio-page="4"]{min-height:240px}
.twa-guided-page[data-studio-page="4"] .twa-studio-generate{padding:22px!important;margin-bottom:14px}
.twa-guided-page[data-studio-page="4"] .twa-studio-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.twa-guided-page[data-studio-page="4"] .twa-studio-actions button{min-height:54px;font-size:14px}
.twa-guided-last-controls{margin-top:4px;margin-bottom:14px;justify-content:space-between}
.twa-guided-last-controls button{min-width:auto}
.twa-ai-generating{display:flex;gap:15px;align-items:center;padding:17px 20px;background:#f0f5ff;border:1px solid #b9c9ef;border-radius:16px;margin:12px 0;color:#243b83}
.twa-ai-generating strong{display:block;font-size:14px;margin-bottom:4px}
.twa-ai-generating p{margin:0;font-size:12px;line-height:1.5}
.twa-ai-spin{width:28px;height:28px;flex:0 0 28px;border:3px solid #d4defa;border-top-color:#6555db;border-radius:50%;animation:twa-ai-spin .85s linear infinite}
@keyframes twa-ai-spin{to{transform:rotate(360deg)}}
.twa-ai-result{border:1px solid #c9e0d8;background:white;border-radius:18px;overflow:hidden;box-shadow:0 15px 27px rgba(7,65,60,.055);margin-top:12px}
.twa-ai-result-top{padding:18px 22px 13px;display:flex;justify-content:space-between;gap:14px;align-items:flex-start;background:#f4faf7}
.twa-ai-result-top .twa-section-eyebrow{font-size:10px;font-weight:850;color:#198273;letter-spacing:.13em;margin:0 0 5px}
.twa-ai-result-top h3{font-size:21px;color:#164844;margin:0 0 5px}
.twa-ai-result-top p:not(.twa-section-eyebrow){font-size:12px;color:#597a78;margin:0;line-height:1.55}
.twa-ai-saved{display:inline-flex;align-items:center;background:#e5f5ea;color:#1a694d;border:1px solid #c7e6d2;border-radius:100px;padding:6px 11px;font-size:11px;font-weight:800;white-space:nowrap}
.twa-ai-export-actions{display:flex;gap:8px;flex-wrap:wrap;padding:12px 18px;border-bottom:1px solid #e2ece9}
.twa-ai-export-actions button{background:#eff6f3;border:1px solid #d0e2da;color:#1d625b;padding:9px 12px;border-radius:9px;font-size:12px;font-weight:800}
.twa-ai-export-actions button:hover{background:#def2e8}
.twa-ai-tabs{display:flex;border-bottom:1px solid #deeae6;padding:0 18px;gap:5px}
.twa-ai-tabs button{font-size:13px;background:transparent;border-bottom:3px solid transparent;border-radius:0;padding:11px 17px;font-weight:800;color:#6a8380}
.twa-ai-tabs button.selected{color:#087769;border-bottom-color:#0e8176}
.twa-ai-result-preview{background:#fff;min-height:130px;max-height:420px;overflow:auto;padding:17px 19px;border-bottom:1px solid #deeae7;overscroll-behavior:contain}
.twa-ai-result-preview .twa-lesson-document{max-width:100%;overflow-x:auto}
.twa-ai-result-preview .lp-document-table.lp-plan{min-width:640px}
.twa-ai-result-preview .lp-document-table th,.twa-ai-result-preview .lp-document-table td{font-size:12px;padding:8px}
.twa-ai-chat{padding:17px 18px 20px;background:linear-gradient(180deg,#fbfefd,#f5fbf8)}
.twa-ai-chat-heading{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
.twa-chat-stars{width:35px;height:35px;background:#e8e8ff;color:#5648ce;display:grid;place-items:center;border-radius:12px;font-weight:850;flex-shrink:0}
.twa-ai-chat-heading h4{font-size:15px;margin:0 0 4px;color:#194747}
.twa-ai-chat-heading p{font-size:11px;color:#647e7f;margin:0}
.twa-ai-messages{display:flex;flex-direction:column;gap:10px;max-height:260px;overflow-y:auto;padding:5px 3px 12px;overscroll-behavior:contain}
.twa-ai-bubble{padding:11px 14px;border-radius:13px;max-width:91%;font-size:13px;line-height:1.55;overflow-wrap:anywhere}
.twa-ai-bubble p{margin:5px 0 0}
.twa-ai-bubble-assistant{align-self:flex-start;background:#e9f2ef;border:1px solid #d8e8e0;color:#234b4e;border-bottom-left-radius:3px}
.twa-ai-bubble-user{align-self:flex-end;background:#0c766c;color:white;border-bottom-right-radius:3px}
.twa-ai-bubble-role{font-size:10px;font-weight:850;opacity:.75;letter-spacing:.025em}
.twa-ai-thinking{opacity:.7}
.twa-ai-suggestions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 12px}
.twa-ai-suggestions button{background:#fff;border:1px solid #ccdcd7;color:#32716a;border-radius:40px;font-size:11px;font-weight:700;padding:8px 10px;max-width:100%}
.twa-ai-suggestions button:hover{background:#edf7f3}
.twa-ai-chat-form{display:block}
.twa-ai-chat-form>label{font-size:11px;display:block;font-weight:800;margin:0 0 7px;color:#355957}
.twa-ai-chat-input-row{display:flex;gap:8px;align-items:stretch;background:#fff;border:1px solid #c7dbd5;border-radius:14px;padding:7px}
.twa-ai-chat-input-row textarea{min-width:0;resize:vertical;max-height:140px;min-height:50px;flex:1;border:0;box-shadow:none!important;padding:9px 11px;border-radius:9px;line-height:1.45;font-size:13px;color:#1d4143}
.twa-ai-chat-input-row button{min-width:83px;align-self:stretch;padding:9px 14px;border-radius:10px;font-size:12px;background:#0c7e72;white-space:nowrap}
.twa-ai-chat-small{font-size:10px;line-height:1.55;color:#67817e;margin:8px 0 0}
.twa-guided-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:3px 2px 20px;font-size:11px;color:#829595}
.twa-guided-bottom button{background:none;color:#0e716a;font-size:11px;font-weight:800}
@media(max-width:740px){
 .twa-guided-top{padding:14px 16px;gap:8px;border-radius:13px;margin-bottom:8px}
 .twa-guided-top .twa-section-eyebrow{font-size:9px}
 .twa-guided-top h2{font-size:21px;margin:4px 0 0}
 .twa-guided-top p:not(.twa-section-eyebrow){display:none}
 .twa-guided-top .twa-studio-library{font-size:10px;white-space:normal;text-align:center;min-width:78px;max-width:95px;padding:8px}
 .twa-guided-progress{padding:9px 13px;margin-bottom:9px}
 .twa-guided-progress-head{margin-bottom:6px;font-size:11px}
 .twa-guided-progress-rail{height:5px}
 .twa-guided-page{padding:16px 14px!important;border-radius:15px!important;margin-bottom:9px!important}
 .twa-guided-section{gap:10px;margin-bottom:15px}
 .twa-guided-section h3{font-size:17px}
 .twa-guided-section p{font-size:11px;margin-top:2px}
 .twa-guided-counter{width:34px;height:34px;flex-basis:34px;font-size:13px;border-radius:10px}
 .twa-guided-page .twa-studio-inputs{grid-template-columns:1fr;gap:12px}
 .twa-guided-page .twa-studio-inputs label{gap:5px;font-size:12px}
 .twa-guided-page .twa-studio-inputs select{min-height:47px;font-size:14px}
 .twa-guided-page .twa-studio-assignment{font-size:10px;margin-top:7px}
 .twa-guided-controls{margin-top:14px;padding-top:13px}
 .twa-guided-controls>span{display:none}
 .twa-guided-controls button{min-height:44px;font-size:12px;flex:1}
 .twa-guided-controls button:only-of-type{margin-left:auto;max-width:180px}
 .twa-guided-page[data-studio-page="2"] .twa-source-tabs button{font-size:10px!important;min-height:43px!important;padding:7px 5px!important}
 .twa-guided-page[data-studio-page="2"] .smart-source-preview{max-height:150px}
 .twa-guided-page[data-studio-page="2"] .smart-source-preview .smart-reference-facts{grid-template-columns:1fr}
 .twa-guided-page[data-studio-page="2"] .smart-mode-content{max-height:245px;overflow:auto}
 .twa-guided-page[data-studio-page="3"] .twa-studio-details{padding:16px!important}
 .twa-guided-page[data-studio-page="3"] .twa-output-tabs button{min-height:47px}
 .twa-guided-page[data-studio-page="4"] .twa-studio-generate{padding:15px!important}
 .twa-guided-page[data-studio-page="4"] .twa-studio-actions{grid-template-columns:1fr}
 .twa-guided-page[data-studio-page="4"] .twa-studio-actions button{min-height:46px}
 .twa-ai-result-top{padding:13px 14px;flex-direction:column;gap:8px}
 .twa-ai-result-top h3{font-size:17px}
 .twa-ai-result-top p:not(.twa-section-eyebrow){font-size:11px}
 .twa-ai-export-actions{padding:10px;gap:6px}
 .twa-ai-export-actions button{font-size:11px;padding:9px}
 .twa-ai-tabs{padding:0 10px}
 .twa-ai-result-preview{max-height:300px;padding:12px 10px}
 .twa-ai-chat{padding:14px 11px 16px}
 .twa-ai-chat-heading h4{font-size:13px}
 .twa-ai-messages{max-height:190px}
 .twa-ai-bubble{font-size:12px}
 .twa-ai-chat-input-row button{min-width:65px;padding:7px}
 .twa-guided-bottom{padding-bottom:12px}
}
@media(prefers-reduced-motion:reduce){.twa-guided-progress-rail>span{transition:none}.twa-ai-spin{animation:none}}
.twa-guided-page[data-studio-page="4"].has-result>.twa-studio-generate{display:none!important}
.twa-guided-page[data-studio-page="2"] .twa-studio-strand-filter{margin-top:11px;border-top:1px solid #e4ede9;padding-top:10px}
.twa-studio-strand-filter>summary{color:#3b6d68;cursor:pointer;font-size:12px;font-weight:750;padding:4px 0}
.twa-studio-strand-filter>.form-row{margin-top:11px}
@media(max-width:740px){.twa-ai-export-actions [data-studio-action="jump-chat"]{background:#e2f7ef;border-color:#aed9c8;color:#095f4e;flex:1 0 100%}.twa-guided-page[data-studio-page="2"] .twa-studio-strand-filter .form-row{grid-template-columns:1fr}}
.twa-guided-source-details{border:1px solid #dbeae4;border-radius:12px;margin-top:12px;background:#f8fcfa;padding:10px 13px}
.twa-guided-source-details summary{cursor:pointer;color:#2e6a61;font-size:12px;font-weight:780}
.twa-guided-source-details[open] #smart-source-preview{margin-top:10px!important}
/* A4/Word preserves full tables; the narrow phone preview scrolls sideways instead of squeezing headings. */
.twa-ai-result-preview .lp-document-table.lp-meta{min-width:580px}
@media(max-width:740px){.twa-ai-result-preview .lp-document-table.lp-plan{min-width:660px}}

/* V20 — Teacher Work Assistant: premium, school-appropriate design system. */
.twa-guided-studio{--studio-navy:#173747;--studio-teal:#08766f;--studio-gold:#e9bd68;--studio-ink:#1a3845;--studio-border:#dae5e6;--studio-mist:#f6f9fa;max-width:1010px}
.twa-guided-studio .twa-guided-top{position:relative;background:linear-gradient(120deg,#122c3c 0%,#174c5a 62%,#156d68 100%);border:1px solid #204a57;box-shadow:0 14px 30px rgba(14,43,54,.14);border-radius:20px;overflow:hidden}
.twa-guided-studio .twa-guided-top:before{position:absolute;content:"";height:4px;left:0;right:0;bottom:0;background:linear-gradient(90deg,#e9bd68,#92cfb6,#e9bd68)}
.twa-guided-studio .twa-guided-top .twa-section-eyebrow{color:#b7dbd8}
.twa-guided-studio .twa-guided-top h2{letter-spacing:-.04em;font-weight:850}
.twa-guided-studio .twa-guided-top .twa-studio-library{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.35);transition:background .2s ease}
.twa-guided-studio .twa-guided-top .twa-studio-library:hover{background:rgba(255,255,255,.2)}
.twa-guided-studio .twa-guided-progress{border:1px solid var(--studio-border);box-shadow:0 4px 13px rgba(20,52,64,.035)}
.twa-guided-studio .twa-guided-progress-head{color:var(--studio-ink)}
.twa-guided-studio .twa-guided-progress-rail{background:#e6eeef}
.twa-guided-studio .twa-guided-progress-rail>span{background:linear-gradient(90deg,#0c7771,#d4aa5d)}
.twa-guided-studio .twa-guided-page{border:1px solid var(--studio-border)!important;border-radius:20px!important;box-shadow:0 12px 27px rgba(26,58,68,.06)!important}
.twa-guided-studio .twa-guided-counter{background:#e5f3f1;color:#0c6d64}
.twa-guided-studio .twa-guided-section h3,.twa-guided-studio .twa-studio-section-title h3{color:var(--studio-ink)}
.twa-guided-studio .twa-guided-controls{border-top-color:#e4eceb}
.twa-guided-studio .twa-guided-controls .primary,.twa-guided-studio .twa-studio-actions .v17-ai-button{background:linear-gradient(120deg,#0b7773,#145b62);color:#fff;box-shadow:0 6px 14px rgba(6,91,88,.16)}
.twa-guided-studio .twa-guided-controls .primary:hover,.twa-guided-studio .twa-studio-actions .v17-ai-button:hover{background:linear-gradient(120deg,#0b6e68,#114c57)}
.twa-guided-studio .twa-guided-controls .secondary{background:#f1f6f5;color:#2d5860;border-color:#d6e2e2}
.twa-guided-studio .twa-studio-actions .secondary{color:#1f5960;background:#fff}
.twa-guided-studio .twa-ai-generating{background:#edf7f5;border-color:#b7ded4;color:#1c5d58}
.twa-guided-studio .twa-ai-spin{border-color:#cae4dd;border-top-color:#0a7973}
.twa-guided-studio .twa-ai-chat{background:linear-gradient(175deg,#fff,#f5faf9)}
.twa-guided-studio .twa-ai-chat-input-row:focus-within{box-shadow:0 0 0 3px rgba(11,112,111,.12);border-color:#238a83}
.twa-guided-studio .twa-ai-chat-input-row button{background:#0c706f}
.twa-guided-studio :is(button,input,textarea,select):focus-visible{outline:3px solid #e6b55a!important;outline-offset:2px}
.twa-preference-studio{padding:25px 26px 23px!important;background:#fff;border:0!important;box-shadow:none!important;margin:0!important}
.twa-pref-heading{margin-bottom:18px!important}
.twa-pref-heading .twa-pref-icon{font-size:22px;color:#fff;background:#143d4b;border-radius:13px}
.twa-pref-kicker{font-size:10px!important;letter-spacing:.13em;color:#1a807b!important;margin:0 0 5px!important;font-weight:850!important}
.twa-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:13px 0 17px}
.twa-preset-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;min-width:0;min-height:104px;padding:15px 14px;background:#fafcfc;border:1px solid #d9e5e5;border-radius:14px;color:#284756;transition:border-color .15s,box-shadow .15s,transform .15s}
.twa-preset-card:hover:not(:disabled){transform:translateY(-1px);border-color:#78ada9;box-shadow:0 6px 14px rgba(28,90,94,.08)}
.twa-preset-card.selected{border:2px solid #147a73;padding:14px 13px;background:#eff9f6;box-shadow:0 2px 8px rgba(9,104,97,.08)}
.twa-preset-card:disabled{opacity:.5;background:#f3f5f5;cursor:not-allowed}
.twa-preset-symbol{display:inline-grid;place-items:center;width:27px;height:27px;border-radius:9px;background:#e8f2f0;color:#10645f;font-size:18px;font-weight:850;margin-bottom:2px}
.twa-preset-card.selected .twa-preset-symbol{background:#d5ede5;color:#075b54}
.twa-preset-card strong{font-size:13px;font-weight:850;line-height:1.3;letter-spacing:-.01em}
.twa-preset-card small{font-size:11px;line-height:1.4;font-weight:450;color:#66818a}
.twa-pref-questions{display:grid;gap:12px}
.twa-pref-group{border:1px solid #e1e9e9;background:#fbfdfd;padding:17px 18px;border-radius:15px;min-width:0;margin:0}
.twa-pref-group legend{float:none;display:flex;align-items:center;gap:9px;color:#1f4250;font-weight:850;font-size:15px;line-height:1.35;padding:0;margin:0}
.twa-pref-group>p{color:#658087;font-size:12px;margin:7px 0 13px;line-height:1.5}
.twa-pref-count{display:inline-grid;place-items:center;flex:0 0 25px;height:25px;background:#dbece8;border-radius:8px;color:#0e7770;font-size:12px;font-weight:900}
.twa-pref-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.twa-pref-chips button{display:flex;justify-content:center;align-items:center;min-height:42px;padding:9px 7px;border:1px solid #d4e2e2;border-radius:10px;background:#fff;color:#345d65;font-size:12px;font-weight:780;line-height:1.25;text-align:center}
.twa-pref-chips button.selected{background:#146e6a;border-color:#146e6a;color:#fff;box-shadow:0 4px 10px rgba(11,100,96,.12)}
.twa-pref-feedback{color:#995124!important;font-weight:700;font-size:11px!important;margin:8px 0 0!important;min-height:0}
.twa-pref-feedback:empty{display:none}
.twa-pref-assess{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.twa-pref-assess button{min-height:67px;display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;padding:11px 13px;background:#fff;border:1px solid #d4e2e2;border-radius:11px;color:#294b58;font-size:12px;font-weight:850}
.twa-pref-assess button small{font-size:11px;font-weight:450;color:#718790;line-height:1.35}
.twa-pref-assess button.selected{border-color:#0c7771;background:#eef8f5;box-shadow:inset 3px 0 #0c7771}
.twa-pref-assess button.selected small{color:#4b7370}
.twa-pref-free>label{display:flex;gap:9px;align-items:center;color:#1f4250;font-size:15px;font-weight:850}
.twa-pref-free textarea{min-height:89px;max-height:200px;resize:vertical;background:#fff;border:1px solid #ccdcdf;padding:13px 14px;border-radius:12px;font-size:13px;line-height:1.55;color:#1a3845}
.twa-pref-under-text{display:flex;justify-content:space-between;gap:10px;align-items:start;margin-top:7px}
.twa-pref-under-text span,.twa-pref-under-text output{font-size:11px;color:#74868a;line-height:1.5}
.twa-pref-under-text output{white-space:nowrap}
.twa-pref-remember{display:flex!important;align-items:flex-start;gap:11px!important;padding:15px;border:1px solid #d2e5df;border-radius:13px;background:#f0f8f5;margin-top:13px;cursor:pointer}
.twa-pref-remember input{width:19px!important;height:19px;min-height:0!important;flex:0 0 19px;margin:2px 0 0;accent-color:#0c7771}
.twa-pref-remember span{display:flex;flex-direction:column;gap:4px}
.twa-pref-remember strong{font-size:12px;line-height:1.35;color:#1e584f}
.twa-pref-remember small{font-weight:450;font-size:11px;line-height:1.45;color:#5b7977}
.twa-pref-summary{margin:12px 0 0;background:#f7fafb;border-radius:11px;border:1px solid #e2eaeb;padding:11px 13px;color:#375b64;font-size:12px;line-height:1.55}
.twa-guided-page[data-studio-page="5"].has-result>.twa-studio-generate{display:none!important}
.twa-guided-page[data-studio-page="5"]{min-height:240px}
.twa-guided-page[data-studio-page="5"] .twa-studio-generate{padding:22px!important;margin-bottom:14px}
.twa-guided-page[data-studio-page="5"] .twa-studio-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.twa-guided-page[data-studio-page="5"] .twa-studio-actions button{min-height:54px;font-size:14px}
body.role-teacher .twa-console-hero{background:linear-gradient(125deg,#122d3c,#14566a 68%,#0e766e)!important}
body.role-teacher .twa-console-hero{border-radius:18px}
body.role-teacher .twa-quick-action.twa-action-featured{border-color:#a7d5ce;background:#f0faf7}
body.role-teacher .twa-console-metric{background:#fafcfd;border-color:#e0e8e9}
body.role-teacher .twa-console-metric strong{color:#1a3c4b}
body.role-teacher .topbar{border-bottom-color:#a9d6c9!important}
@media(max-width:740px){
 .twa-guided-studio .twa-guided-top{padding:15px 17px;border-radius:16px}
 .twa-guided-studio .twa-guided-page{padding:13px!important;border-radius:15px!important}
 .twa-guided-studio .twa-guided-progress{padding:10px 13px}
 .twa-preference-studio{padding:7px 2px 13px!important}
 .twa-pref-heading{gap:10px;margin-bottom:14px!important}
 .twa-pref-heading .twa-pref-icon{width:33px;height:33px;flex:0 0 33px;font-size:17px}
 .twa-pref-heading h3{font-size:19px}
 .twa-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 13px}
 .twa-preset-card{min-height:77px;padding:10px 11px;border-radius:12px;gap:2px}
 .twa-preset-card:first-child{grid-column:1/-1;min-height:64px;display:grid;grid-template-columns:29px minmax(0,1fr);align-items:center;column-gap:8px}
 .twa-preset-card:first-child small{grid-column:2}
 .twa-preset-card.selected{padding:9px 10px}
 .twa-preset-card:first-child.selected{padding:9px 10px}
 .twa-preset-symbol{width:23px;height:23px;font-size:15px;grid-row:span 2}
 .twa-preset-card strong{font-size:12px}
 .twa-preset-card small{font-size:10px}
 .twa-pref-questions{gap:9px}
 .twa-pref-group{padding:13px 12px;border-radius:12px}
 .twa-pref-group legend,.twa-pref-free>label{font-size:13px;gap:7px}
 .twa-pref-group>p{font-size:11px;margin:5px 0 10px}
 .twa-pref-chips{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .twa-pref-chips button{min-height:37px;font-size:11px}
 .twa-pref-assess{gap:7px}
 .twa-pref-assess button{padding:9px 10px;min-height:62px;font-size:11px}
 .twa-pref-assess button small{font-size:10px}
 .twa-pref-free textarea{min-height:74px}
 .twa-pref-remember{padding:10px 11px;margin-top:10px}
 .twa-pref-summary{font-size:11px;padding:9px 11px}
 .twa-guided-page[data-studio-page="5"] .twa-studio-generate{padding:15px!important}
 .twa-guided-page[data-studio-page="5"] .twa-studio-actions{grid-template-columns:1fr}
 .twa-guided-page[data-studio-page="5"] .twa-studio-actions button{min-height:47px}
}
@media(prefers-reduced-motion:reduce){.twa-preset-card{transition:none}}
/* Keep the third question on one clear title line on narrow screens. */
.twa-pref-free>label{flex-direction:row!important;align-items:center!important;justify-content:flex-start!important}
.twa-pref-free>label .twa-pref-count{flex-shrink:0}

/* Version 21 — concise, premium whole-term preparation experience */
.twa-workflow-choice{display:flex;gap:8px;border-radius:18px;background:#eaf2f1;padding:7px;margin:14px 0 18px;max-width:550px;border:1px solid #d3e2e0}
.twa-workflow-choice button{flex:1;padding:13px 16px;min-height:48px;border-radius:13px;color:#385a64;font-weight:800;font-size:14px;background:transparent;transition:background .2s,box-shadow .2s;color-scheme:light}
.twa-workflow-choice button.selected{background:#153d50;color:#fff;box-shadow:0 8px 18px #123c4f22}
.twa-guided-studio.twa-term-mode>:not(.twa-guided-top):not(.twa-workflow-choice):not(#twa-term-studio){display:none!important}
#twa-term-studio[hidden],#twa-term-studio [hidden]{display:none!important}
.twa-term-studio{display:grid;gap:16px;padding-bottom:30px;max-width:1050px}
.twa-term-intro{background:linear-gradient(117deg,#183c52,#176c69);border-radius:20px;color:#fff;padding:28px 30px;box-shadow:0 12px 25px #0d535023}
.twa-term-intro>span{display:block;font-size:11px;font-weight:850;letter-spacing:1.9px;color:#bfe6d9;margin-bottom:10px}
.twa-term-intro h3{font-size:clamp(23px,3vw,31px);line-height:1.2;color:#fff;margin:0 0 10px;font-weight:850}
.twa-term-intro p{color:#e4f5f1;font-size:14px;max-width:690px;line-height:1.65;margin:0}
.twa-term-card{background:#fff;border:1px solid #dae8e6;border-radius:20px;padding:25px;box-shadow:0 10px 22px #1646500d;display:flex;align-items:flex-start;gap:17px}
.twa-term-number{flex:0 0 43px;width:43px;height:43px;display:grid;place-items:center;border-radius:13px;background:#e7f3ef;color:#116c63;font-size:18px;font-weight:900}
.twa-term-card-body{flex:1;min-width:0}
.twa-term-card h4{font-size:19px;color:#183d49;margin:2px 0 16px;letter-spacing:-.25px}
.twa-term-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:13px;margin:14px 0 10px}
.twa-term-row label,.twa-term-file{font-size:12px;font-weight:800;color:#42616b;display:flex;flex-direction:column;gap:7px}
.twa-term-row select,.twa-term-row input,.twa-term-file input{min-height:47px;border:1px solid #d1dfdf;border-radius:11px;padding:10px 12px;background:#fff;min-width:0}
.twa-term-hint{font-size:12px;line-height:1.6;color:#668089;margin:8px 0 14px}
.twa-term-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.twa-term-primary,.twa-term-secondary{border-radius:11px;font-weight:800;font-size:13px;padding:12px 18px;min-height:46px;border:1px solid #b8d6d0}
.twa-term-primary{background:#0b7770;color:#fff;border-color:#0b7770;box-shadow:0 7px 15px #0665591a}
.twa-term-primary:hover{background:#085f5a}
.twa-term-secondary{background:#f1f8f6;color:#21575c}
.twa-term-secondary:hover{background:#e3f1ed}
.twa-term-source-choice{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:16px}
.twa-term-source-choice button{flex:1 1 165px;border:1px solid #d2e2df;background:#f6faf8;border-radius:11px;padding:12px 14px;color:#3e6870;font-size:13px;font-weight:800}
.twa-term-source-choice button.selected{background:#173f51;color:#fff;border-color:#173f51}
.twa-term-file{border:1px dashed #aacbc4;padding:17px;border-radius:13px;margin-top:12px;background:#f8fcfb;font-size:13px}
.twa-term-status{font-size:13px;color:#126a55;line-height:1.6;margin:14px 0 4px;white-space:pre-line}
.twa-term-status.error{color:#9c3627;background:#fff3ef;border:1px solid #f4c9c0;padding:10px 12px;border-radius:10px}
.twa-term-list-summary{display:flex;gap:15px;justify-content:space-between;color:#21565c;margin:14px 0 8px}
.twa-term-list-summary span{font-size:12px;color:#6c828b}
.twa-term-scroll{width:100%;overflow:auto;border:1px solid #d7e6e3;border-radius:12px;max-height:480px}
.twa-term-table{min-width:550px;width:100%;border-collapse:collapse;font-size:13px}
.twa-term-table th{background:#e8f3f0;color:#174f54;padding:12px 9px;position:sticky;top:0;text-align:left}
.twa-term-table td{padding:10px 9px;border-bottom:1px solid #edf3f1;vertical-align:top}
.twa-term-table tr:last-child td{border-bottom:0}
.twa-term-table td:nth-child(1),.twa-term-table td:nth-child(3){width:75px}
.twa-term-table input,.twa-term-table textarea{width:100%;border-radius:8px;border:1px solid #d5e4e0;padding:8px 9px;background:white;display:block;margin-bottom:5px;color:#1c3d49;font-size:13px}
.twa-term-table textarea{resize:vertical;min-height:51px}
.twa-term-remove{font-size:24px;color:#af4947;background:#fff1ef;border-radius:9px;padding:0 10px;line-height:36px}
.twa-term-empty{padding:19px;background:#f6faf8;color:#55767b;border:1px dashed #d0e3dc;border-radius:13px}
.twa-term-check{display:flex;flex-direction:row;align-items:center;gap:9px;font-size:13px;color:#305d5c;margin:15px 0}
.twa-term-check input{width:17px;height:17px}
.twa-term-progress{height:9px;background:#e4eeeb;border-radius:999px;overflow:hidden;margin-top:13px}
.twa-term-progress>span{height:100%;width:0;display:block;background:linear-gradient(90deg,#0a8179,#47c6a9);transition:width .22s ease}
#term-downloads{padding:17px;margin-top:18px;border-radius:14px;background:#f2faf6;border:1px solid #c4e6d6}
#term-downloads h4{margin:0 0 4px;color:#135748}
.twa-term-studio button:disabled{opacity:.52;cursor:not-allowed;box-shadow:none}
@media(max-width:640px){.twa-workflow-choice{margin:13px 0;padding:5px}.twa-workflow-choice button{min-height:45px;font-size:12px;padding:10px 8px}.twa-term-intro{padding:22px 19px;border-radius:16px}.twa-term-card{padding:18px 13px;border-radius:15px;gap:9px}.twa-term-number{flex-basis:34px;width:34px;height:34px;font-size:14px}.twa-term-card h4{font-size:16px;margin-top:7px}.twa-term-row{grid-template-columns:1fr;gap:10px}.twa-term-actions button{flex:1 1 165px}.twa-term-list-summary{flex-direction:column;gap:3px}.twa-term-table{min-width:500px}}
@media print{.twa-term-studio,.twa-workflow-choice{display:none!important}}
.twa-term-steps{display:flex;justify-content:space-between;gap:8px;background:#edf5f3;border:1px solid #d6e7e1;padding:9px 12px;border-radius:13px}
.twa-term-steps span{flex:1;color:#64817f;font-size:12px;font-weight:850;text-align:center;padding:9px 4px;border-radius:10px;white-space:nowrap}
.twa-term-steps span.active{background:#153f52;color:#fff;box-shadow:0 4px 10px #14586b1b}
@media(max-width:640px){.twa-term-steps{padding:5px;gap:3px}.twa-term-steps span{font-size:10px;padding:9px 2px}}

/* Version 22: dedicated, accessible staff sign-in */
#app-shell[hidden],#login-overlay[hidden],[hidden][aria-hidden="true"]{display:none!important}
#app-shell[inert]{pointer-events:none}
#login-overlay{background:linear-gradient(135deg,#0b2339,#0d6266);overflow-y:auto;overscroll-behavior:contain}
#login-overlay .login-card{border-radius:23px;padding:clamp(23px,4vw,36px);box-shadow:0 30px 65px #02182d88}
#login-overlay .login-card h1{color:#143b4d}
.school-password-control{display:flex;position:relative;align-items:center}
.school-password-control input{padding-right:72px!important}
#school-show-password{position:absolute;right:7px;top:50%;transform:translateY(-50%);background:#e9f4f2;color:#0d6662;font-size:12px;font-weight:700;padding:8px 9px;border-radius:7px}
.school-login-link{padding:7px 0;background:none;border:0;text-decoration:underline;font-weight:700;text-align:left;justify-self:start;color:#087575}
.school-signin-help{padding:11px 13px;background:#f1f8f7;border:1px solid #d7e7e2;border-radius:11px;font-size:12px}
.school-signin-help>summary{cursor:pointer;color:#376366;font-weight:700}
.school-signin-help>p{line-height:1.5;margin:9px 0 0}
#login-error:not(:empty){padding:11px;background:#fff2ee;border:1px solid #e7bdb3;border-radius:9px;line-height:1.55}
#school-show-password:focus-visible,#school-reset-password:focus-visible{outline:3px solid #f1b859;outline-offset:3px}
#login-error.is-success{background:#e5f7ec!important;color:#1c624b!important;border-color:#b7e0c6!important}
#page-title:focus{outline:none}

/* V23 — clearer school management and role-focused workspace */
.context-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:6px;border-radius:14px;background:#eaf3f1;border:1px solid #d7e7e2}
.context-tabs button{padding:10px 15px;background:transparent;color:#375d62;border-radius:10px;font-size:12px;font-weight:750;white-space:normal;min-height:42px;flex:0 1 auto}
.context-tabs button.selected{background:#153f51;color:#fff;box-shadow:0 3px 10px #173e4c22}
.context-tabs button:focus-visible{outline:3px solid #f0c879;outline-offset:2px}
.staff-picker{border:1px solid #d4e6e2;background:#f8fbfa;border-radius:15px;padding:15px}
.staff-picker h4{margin:0 0 3px;color:#173d4b;font-size:15px}
.staff-picker>p{margin:6px 0 12px}
.staff-picker-list{display:grid;gap:8px;max-height:245px;overflow:auto;padding:3px 1px;margin-top:10px}
.staff-choice{display:flex;flex-direction:row;align-items:flex-start;gap:12px;background:#fff;border:1px solid #d9e8e5;border-radius:10px;padding:11px 12px;cursor:pointer;font-size:13px}
.staff-choice input{flex:0 0 auto;min-width:17px;height:17px;margin-top:3px;accent-color:#12746c}
.staff-choice strong,.staff-choice small{display:block;line-height:1.4}
.staff-choice strong{color:#1d4950}
.staff-choice small{font-size:11px;color:#637b81;margin-top:4px;overflow-wrap:anywhere}
.staff-choice:has(input:checked){background:#edf8f3;border-color:#88c7ac}
#class-staff-count{color:#186855;font-weight:800;margin:10px 0 0}
.grading-editor-fields{display:grid;gap:18px}
.grade-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:6px}
.grade-editor-head h4{font-size:16px;margin:0 0 4px;color:#173f4b}
.grade-editor-head p{margin:0;line-height:1.6}
.grade-total{flex-shrink:0;white-space:nowrap;border-radius:10px;background:#e5f7ed;color:#16634d;padding:10px 12px}
.grade-total.bad{background:#fff0e9;color:#b7482c}
.grade-component-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:12px}
.grade-component{border:1px solid #d8e8e3;padding:15px;border-radius:13px;min-width:0;background:#fbfdfc}
.grade-component legend{font-weight:800;color:#275a60;padding:0 5px}
.grade-component>small{color:#6a7d86;font-size:11px}
.grade-component .form-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.grade-band-table{min-width:520px;table-layout:auto}
.grade-band-table td{padding:8px 5px}
.grade-band-table input{min-width:0;width:100%}
.grade-band-table th:first-child,.grade-band-table td:first-child{width:110px}
.grade-band-table th:nth-child(2),.grade-band-table td:nth-child(2){width:90px}
.grade-band-table th:last-child,.grade-band-table td:last-child{width:90px}
.grade-band-table .mini{padding:8px 10px;font-weight:750;color:#8d422e}
.grade-count{border-radius:8px;padding:7px 10px;background:#eef8f3;color:#176a50;font-weight:800}
/* Ordinary teachers may use the compact header; an administrator working
   in Teacher Mode must keep the return-to-administration control visible. */
body.role-teacher .workspace-role-banner:not(:has(.twa-mode-switch)){display:none}
body .topbar .header-title{min-width:0;flex:1 1 360px}
body .topbar .header-title h1{white-space:normal;overflow-wrap:normal;line-height:1.15;font-size:clamp(21px,2.2vw,28px);letter-spacing:-.4px}
body .topbar .header-title>span{letter-spacing:.65px;white-space:normal}
body .topbar .top-actions{min-width:0;flex:0 1 440px;justify-content:flex-end}
body .topbar #mode-tag{display:none}
body .topbar #account-button{display:block;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .topbar #school-picker{min-width:95px;max-width:180px}
@media(max-width:760px){
 .context-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;gap:4px;max-width:100%;padding:5px}
 .context-tabs button{flex:0 0 auto;padding:8px 12px;white-space:nowrap;min-height:38px}
 .staff-picker{padding:12px}
 .grade-editor-head{flex-wrap:wrap}
 .grade-component-grid{grid-template-columns:1fr}
 body .topbar .header-title{flex:1 1 auto;max-width:none;min-width:0}
 body .topbar .header-title h1{font-size:19px!important;line-height:1.2}
 body .topbar .top-actions{flex:0 0 auto;min-width:0;max-width:42%}
 body .topbar #school-picker{display:none}
 body .topbar #account-button{max-width:min(38vw,175px);padding:8px;font-size:11px}
}

/* V23 finishing refinements: readable staff choices and full-width grading inputs. */
.form-stack label.staff-choice,
#class-staff-list label.staff-choice{
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:12px!important;
}
#view-settings>.two-cols{grid-template-columns:minmax(0,1fr)}
#view-settings .grade-band-table{width:100%}

/* V23.1: resilient, visible Firebase authentication and session restoration. */
#login-form[hidden],#school-auth-recovery[hidden],#login-error[hidden],#school-auth-status[hidden]{display:none!important}
.school-auth-progress{border:1px solid #cddfdf;background:#edf6f3;border-radius:11px;color:#235e5c!important;font-size:13px;line-height:1.55;padding:12px 14px;margin:16px 0 12px!important}
.school-auth-error{border:1px solid #efc1b9;background:#fff1ed;padding:13px 14px;border-radius:10px;line-height:1.5;font-size:13px;margin:12px 0!important;overflow-wrap:anywhere}
.school-auth-error.is-success{background:#eaf7ed;border-color:#b4dec1;color:#185b3a!important}
.school-auth-recovery{display:flex;flex-direction:column;gap:10px;margin:16px 0}
#school-login-submit:disabled{opacity:.72;cursor:progress}
@media(max-width:520px){#login-overlay{align-items:start}#login-overlay .login-card{margin:0 auto 28px}}

/* ========================================================================
   V24 • TWA premium mobile experience
   Focus: clarity and reliable dismissal, not a copy of any external brand.
   ======================================================================== */
:root{
  --twa-24-navy:#142e44;
  --twa-24-ink:#173448;
  --twa-24-teal:#087d77;
  --twa-24-accent:#e6b963;
  --twa-24-mist:#f5f8fb;
  --twa-24-line:#dce7eb;
}
html{scroll-padding-top:78px}
body.school-edition{background:var(--twa-24-mist);color:var(--twa-24-ink)}
body.school-edition .main-frame{background:var(--twa-24-mist)}
body.school-edition .content{max-width:1330px}
body.school-edition .panel{border-color:var(--twa-24-line)}
body.school-edition :is(button,select,input,textarea):focus-visible{outline:3px solid #e7b75e;outline-offset:2px}
/* The existing navigation label elements inherited a flex:1 rule that stretched
   the icons away from their text on phones. Make each destination one row. */
body.school-edition .sidebar #navigation{display:block;flex:1;min-height:0}
body.school-edition .sidebar #navigation button{
  display:flex;align-items:center;gap:12px;width:100%;margin:3px 0;
  padding:11px 13px;min-height:45px;font-size:13px;font-weight:650;
  line-height:1.35;color:#e0eaf0;border-radius:12px;
}
body.school-edition .sidebar #navigation button>.nav-glyph{
  flex:0 0 25px!important;min-width:25px;margin:0!important;
  font-size:17px;text-align:center;line-height:1.1;color:#bfd5da;
}
body.school-edition .sidebar #navigation button>span:last-child{
  flex:1 1 auto;min-width:0;text-align:left;overflow-wrap:normal;
}
body.school-edition .sidebar #navigation button.current{
  background:#ffffff24;color:#fff;box-shadow:inset 3px 0 var(--twa-24-accent)
}
body.school-edition .sidebar #navigation button.current>.nav-glyph{color:#ffdb92}
body.school-edition .sidebar .nav-label{
  padding:16px 14px 5px;margin-top:6px;font-size:10px;letter-spacing:.10em;color:#a7c1c9
}
body.school-edition .sidebar .workspace-role-card{margin:3px 3px 10px;padding:10px;border-radius:12px}
body.school-edition .sidebar .sidebar-overline{display:none}
body.school-edition .sidebar .brand{margin:0 5px 12px;padding-right:33px;min-width:0}
body.school-edition .sidebar .brand>div{min-width:0}
body.school-edition .sidebar .brand strong{font-size:15px;line-height:1.2;overflow-wrap:anywhere}
body.school-edition .sidebar .brand small{letter-spacing:.06em;font-size:10px}
body.school-edition .sidebar-bottom{padding:10px 10px 12px;border-top:1px solid #ffffff22}
.twa-drawer-close{display:none;background:#ffffff18;border:1px solid #ffffff30;color:#fff;border-radius:11px;width:38px;height:38px;align-items:center;justify-content:center}
.twa-menu-scrim[hidden]{display:none!important}
.twa-menu-scrim{display:none}
.twa-guided-studio{--studio-navy:var(--twa-24-navy);--studio-teal:var(--twa-24-teal);--studio-gold:var(--twa-24-accent)}
.twa-guided-studio .twa-guided-page{background:#fff;border-color:var(--twa-24-line)!important;box-shadow:0 9px 26px rgba(20,46,68,.055)!important}
.twa-guided-studio .twa-guided-progress{box-shadow:none;border:1px solid #e2e9ee}
.twa-guided-studio .twa-guided-progress-rail>span{background:linear-gradient(90deg,#087d77,#27a49a)}
.twa-guided-studio .twa-guided-controls .primary,.twa-guided-studio .twa-studio-actions .v17-ai-button{
  background:#087d77;box-shadow:0 5px 14px #087d771c
}
.twa-guided-studio .twa-guided-controls .primary:hover,.twa-guided-studio .twa-studio-actions .v17-ai-button:hover{background:#086a66}
.twa-guided-studio .twa-guided-top{background:linear-gradient(128deg,#14324a,#174b59);box-shadow:0 8px 24px #163c5220}
.twa-guided-studio .twa-guided-top:before{background:var(--twa-24-accent);height:3px}
.twa-guided-studio .twa-guided-top h2{font-weight:800}
.twa-preset-card,.twa-pref-group,.twa-pref-remember{box-shadow:none}
.twa-preset-card.selected{border-color:#118278;background:#eaf7f4}
.twa-pref-chips button.selected{background:#147b74;border-color:#147b74}
.twa-pref-assess button.selected{background:#f0f9f5;border-color:#118278;box-shadow:inset 3px 0 #118278}
.twa-pref-questions[hidden]{display:none!important}

@media(max-width:930px){
  body.school-edition .sidebar{
    position:fixed;top:0;bottom:0;left:0!important;
    width:min(324px,calc(100vw - 58px));max-width:324px;height:100dvh;
    padding:18px 13px 10px;transform:translateX(-105%);
    transition:transform .24s cubic-bezier(.2,.8,.2,1);
    z-index:101;box-shadow:14px 0 36px #061d3155;
    overscroll-behavior:contain;
    background:linear-gradient(160deg,#102d41,#124a50)!important;
    border-radius:0 19px 19px 0;
  }
  body.school-edition .sidebar.open{transform:translateX(0);left:0!important}
  body.school-edition .sidebar .brand{padding-right:41px}
  body.school-edition .sidebar .workspace-role-card{background:#ffffff11}
  body.school-edition .sidebar .twa-drawer-close{display:flex;position:absolute;right:12px;top:16px;z-index:1}
  .twa-menu-scrim:not([hidden]){display:block;position:fixed;inset:0;background:rgba(8,24,39,.59);z-index:100;border:none;width:100%;height:100dvh;cursor:pointer;-webkit-tap-highlight-color:transparent}
  body.twa-menu-open{overflow:hidden;overscroll-behavior:contain}
  body.school-edition .mobile-menu{display:inline-flex;align-items:center;justify-content:center}
}
@media(max-width:760px){
 body.school-edition .content{padding:13px 12px calc(91px + env(safe-area-inset-bottom,0px));}
 body.school-edition .topbar{
   display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;
   grid-template-rows:1fr!important;align-items:center!important;
   min-height:64px;height:64px!important;gap:8px!important;
   padding:9px 13px!important;border-bottom:1px solid #d9e7e8!important;
   position:sticky;top:0;z-index:40;background:#fff;
 }
 body.school-edition .topbar .mobile-menu{
   grid-column:1!important;grid-row:1!important;width:44px!important;height:44px!important;
   padding:0!important;background:#edf5f5!important;color:#153f49!important;
   border-radius:13px!important;
 }
 body.school-edition .topbar .header-title{grid-column:2!important;grid-row:1!important;min-width:0;display:block!important}
 body.school-edition .topbar .header-title>span{display:block!important;color:#738792;line-height:1.15;font-size:9px!important;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.school-edition .topbar .header-title h1{font-size:17px!important;letter-spacing:-.02em;line-height:1.15!important;margin:3px 0 0!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
 body.school-edition .topbar .brand-thumb{display:none!important}
 body.school-edition .topbar .top-actions{
   grid-column:3!important;grid-row:1!important;display:flex!important;
   padding:0!important;margin:0!important;min-width:0!important;max-width:none!important;
   width:44px!important;flex:0 0 44px!important;justify-content:center!important;align-items:center!important;
 }
 body.school-edition .topbar #school-picker,body.school-edition .topbar #mode-tag{display:none!important}
 body.school-edition .topbar #account-button{
   display:grid!important;place-items:center!important;width:44px!important;height:44px!important;
   min-width:44px!important;min-height:44px!important;max-width:none!important;
   padding:0!important;border-radius:14px!important;font-size:0!important;color:transparent!important;
   background:#e9f4ef!important;border:1px solid #d1e7df;box-shadow:none!important;
 }
 body.school-edition .topbar #account-button::before{
   content:attr(data-initials);display:block!important;color:#155d54;
   font-size:14px!important;font-weight:850;line-height:1;letter-spacing:.02em;
 }
 body.school-edition .teacher-mobile-nav{
   bottom:0;padding:6px 9px max(7px,env(safe-area-inset-bottom,0px));
   background:#fffffffa;box-shadow:0 -8px 24px #102c4c12;border-top:1px solid #dfe9ea;z-index:45;
 }
 body.school-edition .teacher-mobile-nav button{min-height:55px;border-radius:12px;gap:3px}
 body.school-edition .teacher-mobile-nav button.current{background:#e7f5f1;color:#096a63}
 body.school-edition .teacher-mobile-nav button span{font-size:10px}
 body.school-edition .teacher-mobile-nav button svg{width:21px;height:21px}
 .twa-guided-studio .twa-guided-top{
   padding:12px 14px!important;border-radius:16px!important;min-height:63px;
   margin:0 0 10px!important;align-items:center!important;box-shadow:0 5px 16px #163c5217;
 }
 .twa-guided-studio .twa-guided-top .twa-section-eyebrow{font-size:9px!important;line-height:1.3;margin:0 0 3px!important;letter-spacing:.08em}
 .twa-guided-studio .twa-guided-top h2{font-size:20px!important;margin:0!important;line-height:1.2}
 .twa-guided-studio .twa-guided-top p:not(.twa-section-eyebrow){display:none}
 .twa-guided-studio .twa-guided-top .twa-studio-library{font-size:10px!important;min-width:70px;max-width:85px;padding:9px 7px;min-height:40px;background:#ffffff14;border-color:#ffffff4f}
 .twa-guided-studio .twa-guided-progress{border-radius:13px;padding:9px 13px;margin:0 0 10px!important}
 .twa-guided-studio .twa-guided-page{padding:15px 13px!important;border-radius:17px!important;margin-bottom:8px!important}
 .twa-guided-studio .twa-guided-section{margin-bottom:12px}
 .twa-guided-studio .twa-guided-section h3{font-size:18px;line-height:1.23}
 .twa-guided-studio .twa-guided-section p{font-size:12px;line-height:1.5}
 .twa-guided-studio .twa-guided-controls{margin-top:14px;padding-top:14px}
 .twa-guided-studio .twa-guided-controls button{min-height:48px;border-radius:12px;font-size:13px}
 .twa-preference-studio{padding:0!important}
 .twa-pref-heading{margin-bottom:12px!important}
 .twa-pref-heading .twa-pref-kicker{font-size:9px!important}
 .twa-pref-heading h3{font-size:19px!important;letter-spacing:-.02em}
 .twa-preset-grid{gap:8px;margin:12px 0!important}
 .twa-preset-card{min-height:81px;padding:11px!important;background:#fff;border:1px solid #dce7e7;box-shadow:none!important}
 .twa-preset-card:first-child{min-height:62px!important}
 .twa-preset-card.selected{padding:10px!important;border:2px solid #138077}
 .twa-preset-card strong{font-size:12px;line-height:1.25}
 .twa-preset-card small{font-size:10px}
 .twa-pref-summary{padding:12px 13px;border-radius:12px;margin-top:10px;background:#f2f8f9;color:#2e5360}
 .twa-pref-remember{padding:12px;border-radius:12px;margin-top:11px;background:#eff8f4}
 .twa-pref-remember strong{font-size:12px}
 .twa-pref-remember small{font-size:10px}
 .twa-pref-questions{gap:11px}
 .twa-pref-group{padding:14px 12px;border-radius:13px}
 .twa-pref-chips{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .twa-pref-chips button{min-height:43px;font-size:12px}
 .twa-pref-assess{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .twa-pref-assess button{padding:10px;font-size:12px}
 .twa-guided-bottom{margin-top:0;font-size:11px;line-height:1.35}
 body.school-edition .twa-ai-result{border-radius:16px}
}
@media(max-width:375px){
 body.school-edition .topbar .header-title h1{font-size:15px!important}
 .twa-guided-studio .twa-guided-top h2{font-size:19px!important}
 .twa-guided-studio .twa-guided-page{padding:12px!important}
}
@media(prefers-reduced-motion:reduce){
 body.school-edition .sidebar{transition:none!important}
}
/* The modal drawer must paint ABOVE its scrim even with role-specific z-index rules. */
@media(max-width:930px){
 body.school-edition .sidebar.open{z-index:102!important}
}
body.school-edition .twa-guided-studio .twa-guided-top .twa-section-eyebrow{color:#c3e6e0!important}
body.school-edition .sidebar #navigation{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;flex:1 1 auto;min-height:0;padding-right:2px}
body.school-edition .sidebar .sidebar-bottom{flex:0 0 auto;margin-top:7px;position:relative;z-index:1;background:transparent}
body.school-edition .sidebar .twa-nav-disclosure{margin:6px 0;border-top:1px solid #ffffff1f;padding-top:5px}
body.school-edition .sidebar .twa-nav-disclosure>summary{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;color:#a5c6cb;list-style:none;cursor:pointer;font-size:10px;font-weight:800;letter-spacing:.10em;min-height:37px}
body.school-edition .sidebar .twa-nav-disclosure>summary::-webkit-details-marker{display:none}
body.school-edition .sidebar .twa-nav-disclosure>summary span{font-size:17px;line-height:1;transition:transform .15s ease}
body.school-edition .sidebar .twa-nav-disclosure[open]>summary span{transform:rotate(180deg)}
body.school-edition .sidebar .twa-nav-disclosure>summary:focus-visible{outline:2px solid #f4ca7a;outline-offset:-2px;border-radius:9px}
body.school-edition .sidebar #navigation button.current{font-weight:800}
.twa-pref-adjust[hidden]{display:none!important}
.twa-pref-adjust{display:inline-flex;align-items:center;gap:6px;margin-top:5px;padding:7px 2px;border:none;background:transparent;color:#0c7169;font-size:12px;font-weight:800;text-decoration:none}
.twa-pref-adjust:hover{text-decoration:underline}
@media(max-width:740px){.twa-pref-adjust{min-height:37px;font-size:12px}}

/* =====================================================================
   V25 — native-feeling school workspace (mobile-first)
   Design system: compact app navigation, grouped list rows, quiet surfaces.
   ===================================================================== */
:root{--twa-25-ink:#172e3d;--twa-25-navy:#163c4a;--twa-25-teal:#117f77;--twa-25-bg:#f4f7f9;--twa-25-border:#e0e8eb;--twa-25-radius:16px}
body.school-edition{background:var(--twa-25-bg)}
body.school-edition .content{background:var(--twa-25-bg)}
.twa-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.twa-native-library{max-width:1080px;margin:0 auto}
.twa-library-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:6px 0 20px}
.twa-screen-eyebrow{display:block;font-size:11px;font-weight:800;letter-spacing:.095em;color:#6c8791}
.twa-library-header h2,.twa-account-heading h2{font-size:clamp(24px,2.9vw,30px);line-height:1.2;margin:6px 0;color:#162f3f;letter-spacing:-.035em}
.twa-library-header p{font-size:13px;color:#627a85;margin:7px 0 0}
.twa-library-new{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;flex:0 0 auto;border:none;background:#127e76;color:#fff;padding:11px 16px;border-radius:14px;min-height:45px;font-size:13px;font-weight:800;box-shadow:0 5px 16px #087a6f1e}
.twa-library-new>span:first-child{font-size:21px;line-height:1}
.twa-library-tools{display:grid;gap:12px;margin-bottom:21px}
.twa-library-search{display:flex;flex-direction:row;align-items:center;gap:10px;min-width:0;border:1px solid #dbe5e8;border-radius:15px;background:#fff;color:#6a8189;padding:3px 13px;font-size:14px}
.twa-library-search svg{flex:0 0 20px}
.twa-library-search input[type=search]{border:none!important;outline:none!important;box-shadow:none!important;border-radius:12px;min-height:44px;width:100%;min-width:0;flex:1;padding:10px 2px;font-size:14px;background:transparent}
.twa-library-search:focus-within{border-color:#1a9188;box-shadow:0 0 0 3px #127e7617}
.twa-library-filter-bar{display:flex;gap:8px;flex-wrap:wrap}
.twa-library-filter-bar button{background:#fff;border:1px solid #d8e5e7;color:#49636e;border-radius:100px;padding:9px 15px;min-height:39px;font-size:12px;font-weight:750}
.twa-library-filter-bar button.selected{background:#153c4a;color:#fff;border-color:#153c4a}
.twa-library-filter-bar button:focus-visible,.twa-lesson-more>summary:focus-visible,.twa-tile-open:focus-visible,.twa-settings-item:focus-visible{outline:3px solid #d3ab64;outline-offset:3px}
.twa-library-section-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:14px 0 12px}
.twa-library-section-line h3{font-size:15px;line-height:1.25;color:#1d3949;margin:0;font-weight:850}
.twa-library-section-line span{font-size:12px;color:#6d818b}
.twa-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.twa-lesson-tile{border:1px solid #e0e8eb;background:#fff;border-radius:17px;padding:16px 18px 14px;min-width:0;box-shadow:0 3px 12px #173d4e06;display:flex;flex-direction:column;gap:0}
.twa-lesson-primary{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.twa-lesson-type-icon{display:grid;place-items:center;width:32px;height:32px;background:#e7f5f0;color:#0d7771;border-radius:10px;font-size:20px;line-height:1}
.twa-lesson-badge{font-size:10px;font-weight:800;letter-spacing:.015em;color:#3b6870;background:#eff5f6;border-radius:99px;padding:5px 9px}
.twa-lesson-ai{color:#6a55b6;background:#f3f0fd;padding:5px 9px;border-radius:99px;font-size:10px;font-weight:800}
.twa-lesson-tile h4{font-size:15px;line-height:1.37;font-weight:820;letter-spacing:-.01em;color:#173649;margin:0 0 6px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.twa-lesson-context{font-weight:700;font-size:12px;color:#4a6a76;line-height:1.35;margin:0 0 5px;overflow-wrap:anywhere}
.twa-lesson-meta{font-size:11px;color:#84949b;line-height:1.3;margin:0}
.twa-lesson-actions{display:flex;align-items:center;gap:9px;margin-top:auto;padding-top:12px}
.twa-tile-open{background:#e5f4f0;color:#0a6c63;border:none;border-radius:11px;font-weight:850;padding:9px 13px;min-height:41px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px;flex:1;text-align:center}
.twa-tile-open span{font-size:16px}
.twa-lesson-more{position:relative;flex:0 0 auto}
.twa-lesson-more>summary{display:flex;align-items:center;justify-content:space-between;gap:6px;cursor:pointer;list-style:none;min-width:82px;min-height:41px;border:1px solid #e2eaeb;border-radius:11px;padding:9px 10px;font-size:12px;font-weight:750;color:#49646d;background:#fff}
.twa-lesson-more>summary::-webkit-details-marker{display:none}
.twa-lesson-more>summary span{font-size:17px;line-height:.8}
.twa-lesson-more[open]>summary{background:#f5faf8;color:#0d746d}
.twa-more-list{position:absolute;z-index:12;right:0;top:calc(100% + 6px);width:min(260px,calc(100vw - 55px));display:flex;flex-direction:column;gap:1px;padding:6px;border:1px solid #dce7e8;border-radius:13px;background:#fff;box-shadow:0 18px 35px #112a3a25}
.twa-more-list button{font-size:12px;font-weight:650;min-height:39px;border-radius:8px;padding:10px 11px;text-align:left;background:transparent;color:#1d4554}
.twa-more-list button:hover,.twa-more-list button:focus-visible{background:#eff7f4}
.twa-more-list small{padding:8px 11px;color:#986d38}
.twa-load-more{display:block;margin:17px auto;background:#fff;border:1px solid #dbe5e6;color:#176e6b;padding:12px 18px;border-radius:13px;font-size:12px;font-weight:850;min-height:44px}
.twa-load-more[hidden]{display:none}
.twa-library-empty{grid-column:1/-1;padding:36px 19px;text-align:center;background:#fff;border:1px dashed #d6e3e5;border-radius:17px;display:grid;justify-items:center;gap:10px}
.twa-library-empty>span{font-size:35px;color:#55a69d}
.twa-library-empty strong{font-size:16px;color:#1a3c4d}
.twa-library-empty p{font-size:13px;color:#6d8189;margin:0}
.twa-library-empty button{border-radius:11px;padding:11px 15px;background:#137d76;color:#fff;font-size:12px;font-weight:800}

/* Account is a personal settings page — technical Firebase details are secondary. */
.twa-native-account{max-width:770px;margin:0 auto}
.twa-account-shell{display:grid;gap:17px}
.twa-account-heading{margin:3px 0 -2px}
.twa-account-identity{display:flex;align-items:center;gap:14px;min-width:0;background:#fff;border:1px solid #e0e8eb;border-radius:18px;padding:19px;box-shadow:0 5px 16px #14354a0b}
.twa-account-avatar{display:grid;place-items:center;width:62px;height:62px;border-radius:20px;background:linear-gradient(145deg,#177b79,#124957);color:#fff;font-size:19px;letter-spacing:.03em;font-weight:850;flex:0 0 62px}
.twa-account-person{min-width:0;flex:1}
.twa-account-person h3{font-size:18px;letter-spacing:-.02em;line-height:1.2;color:#173747;margin:0 0 7px;font-weight:830}
.twa-account-role{font-size:10px;padding:4px 9px;color:#07726e;background:#e7f6f1;border-radius:99px;font-weight:850;display:inline-block}
.twa-account-person p{font-size:12px;line-height:1.35;color:#546a78;margin:8px 0 2px;overflow-wrap:anywhere}
.twa-account-person small{font-size:11px;color:#82949b}
.twa-account-section-label{font-size:12px;font-weight:850;letter-spacing:.045em;margin:4px 0 -8px;color:#57737d}
.twa-settings-list{background:#fff;border:1px solid #dfe8eb;border-radius:17px;overflow:hidden}
.twa-settings-item,.twa-settings-technical>summary{cursor:pointer;display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;min-height:67px;text-align:left;border:none;border-bottom:1px solid #edf1f2;background:#fff;color:#1f3e4c}
.twa-settings-icon{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;background:#eef6f5;border-radius:11px;font-size:20px;color:#0b756e}
.twa-settings-copy{display:flex;flex:1;flex-direction:column;min-width:0;gap:4px}
.twa-settings-copy strong{font-size:13px;color:#243e4b;font-weight:820}
.twa-settings-copy small{font-size:11px;font-weight:400;color:#778a91;line-height:1.3}
.twa-chevron{font-size:23px;color:#78949d;font-weight:400}
.twa-settings-item[hidden]{display:none}
.twa-settings-technical>summary{list-style:none;border-bottom:none}
.twa-settings-technical>summary::-webkit-details-marker{display:none}
.twa-settings-technical[open]>summary{border-bottom:1px solid #eaf1f1}
.twa-settings-technical #twa-account-technical{background:#f7fbfa;border-top:1px solid #e6eff0;padding:8px 17px 14px;font-size:11px;color:#58717d;overflow-wrap:anywhere}
.twa-settings-technical #twa-account-technical code{font-size:10px;overflow-wrap:anywhere}
.twa-account-grading{padding:20px;background:#fff;border:1px solid #e1e9ea;border-radius:16px}
.twa-account-grading[hidden]{display:none}
.twa-account-grading h3{font-size:16px;margin:0 0 8px}
.twa-account-grading p{font-size:12px;color:#6d808a}
.twa-account-demo-actions[hidden]{display:none}
.twa-account-demo-actions{display:flex;gap:8px;flex-wrap:wrap}
.twa-account-logout{background:#fff;color:#a54540;min-height:57px;padding:13px 16px;border:1px solid #e8e5e5;border-radius:15px;width:100%;display:flex;align-items:center;text-align:left;gap:12px;font-size:13px;font-weight:800}
.twa-account-logout[hidden]{display:none}
.twa-account-logout .twa-chevron{margin-left:auto}
.twa-signout-icon{color:#af514c;font-size:25px;font-weight:750}
.twa-account-footnote{font-size:11px;line-height:1.5;margin:0;color:#7d8f97;padding:0 5px}
.twa-signout-dialog{width:min(calc(100vw - 34px),390px);padding:24px;border:none;border-radius:22px;background:#fff;color:#193747;box-shadow:0 18px 55px #0d293a40;max-height:calc(100dvh - 25px);overflow:auto}
.twa-signout-dialog::backdrop{background:#071d2dc2}
.twa-signout-mark{font-size:30px;color:#a84745;margin-bottom:10px}
.twa-signout-dialog h2{font-size:21px;letter-spacing:-.025em;margin:0 0 10px}
.twa-signout-dialog p{font-size:13px;line-height:1.6;color:#647983;margin:0 0 22px}
.twa-signout-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.twa-signout-actions button{border:0;border-radius:12px;min-height:47px;padding:11px 10px;font-size:12px;font-weight:850}
#twa-signout-cancel{background:#eaf3f1;color:#0d655e}
#twa-signout-confirm{background:#a13d39;color:#fff}
@media(max-width:760px){
 body.school-edition .twa-native-library,body.school-edition .twa-native-account{margin:0 auto;padding:0 2px}
 .twa-library-header{margin:7px 0 15px;gap:10px}
 .twa-library-header h2,.twa-account-heading h2{font-size:23px;margin-top:2px}
 .twa-library-header p{font-size:12px;margin-top:3px}
 .twa-library-new{border-radius:12px;padding:10px 11px;min-height:40px}
 .twa-library-filter-bar{gap:7px}
 .twa-library-filter-bar button{min-height:38px;padding:8px 12px;font-size:11px}
 .twa-library-grid{grid-template-columns:minmax(0,1fr);gap:10px}
 .twa-lesson-tile{padding:14px 15px 13px;border-radius:15px}
 .twa-lesson-primary{margin-bottom:8px}
 .twa-lesson-tile h4{font-size:14px;line-height:1.3}
 .twa-lesson-context{font-size:11px}
 .twa-lesson-meta{font-size:10px}
 .twa-lesson-actions{padding-top:10px}
 .twa-account-identity{padding:16px 14px}
 .twa-account-avatar{width:56px;height:56px;flex-basis:56px;border-radius:17px}
 .twa-account-person h3{font-size:16px}
 .twa-settings-item,.twa-settings-technical>summary{padding:12px 14px;min-height:63px}
 .twa-signout-dialog{padding:22px;}
}

/* V26 — native-style school staff onboarding and class administration */
.twa-staff-management{--twa-admin-ink:#173a46;--twa-admin-teal:#087b78;--twa-admin-muted:#67818a}
.twa-admin-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 4px 23px}
.twa-admin-intro h2{font-size:clamp(22px,2.5vw,30px);line-height:1.2;letter-spacing:-.03em;color:#153f4a;margin:5px 0 7px}
.twa-admin-intro p,.twa-section-heading p{color:#6b8088;margin:0;line-height:1.55;font-size:13px}
.twa-eyebrow{font-size:11px;letter-spacing:.1em;color:#09847e;font-weight:850}
.twa-add-teacher{display:inline-flex;align-items:center;gap:8px;border-radius:13px;white-space:nowrap;padding:13px 18px;font-size:14px;min-height:46px}
.twa-add-teacher span{font-size:23px;font-weight:400;line-height:16px}
.twa-admin-class-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:18px;align-items:start}
.twa-staff-management>.panel,.twa-admin-class-layout>.panel{border:1px solid #dce8e9;box-shadow:0 10px 34px rgba(14,60,70,.055);border-radius:20px}
.twa-staff-management .twa-staff-roster{margin-bottom:18px}
.twa-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:17px}
.twa-section-heading h3,.twa-section-heading h4{font-size:17px;font-weight:800;letter-spacing:-.015em;color:#183d47;margin:0 0 4px}
.twa-section-heading h4{font-size:16px}
.twa-count-pill{border-radius:100px;background:#e9f5f2;color:#15695e;font-weight:800;font-size:12px;padding:7px 12px;white-space:nowrap}
.twa-staff-roster-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:9px}
.twa-roster-member{display:flex;align-items:center;gap:11px;border:1px solid #e1ebec;background:#fdfefe;border-radius:13px;padding:12px;min-width:0}
.twa-staff-avatar{display:grid;place-items:center;flex:0 0 39px;width:39px;height:39px;border-radius:13px;color:#086a64;background:#dcf1ed;font-weight:850;font-size:13px;letter-spacing:.01em}
.twa-roster-member:nth-child(3n+2) .twa-staff-avatar{background:#eaf0fb;color:#416a9a}
.twa-member-info,.twa-teacher-details{display:grid;min-width:0;gap:3px;flex:1}
.twa-member-info strong,.twa-teacher-details strong{color:#183d47;font-size:13px;font-weight:800;overflow-wrap:anywhere}
.twa-member-info small,.twa-teacher-details small{color:#6b8088;line-height:1.4;font-size:11px;overflow-wrap:anywhere}
.twa-role-label{border-radius:90px;background:#f0f5f5;padding:5px 8px;color:#607983;font-size:10px;font-weight:800;white-space:nowrap}
.twa-roster-empty,.twa-classes-empty{border:1px dashed #bed2d5;border-radius:15px;background:#f7fbfa;padding:23px 18px;text-align:center;color:#576f79}
.twa-roster-empty>span,.twa-classes-empty>span{display:grid;place-items:center;margin:0 auto 9px;border-radius:13px;background:#dfeeea;width:45px;height:45px;font-size:22px;color:#176e66}
.twa-roster-empty strong,.twa-classes-empty strong{display:block;color:#244a53;font-size:14px}
.twa-roster-empty p,.twa-classes-empty p{max-width:300px;margin:6px auto 0;font-size:12px;line-height:1.6}
.twa-staff-notice{padding:11px 14px;margin-bottom:14px;background:#eef5f8;color:#45616c;border:1px solid #d1e0e7;border-radius:10px;line-height:1.5;font-size:12px}
.twa-refresh-staff{background:transparent;font-weight:750;color:#137771;padding:12px 4px 0;margin-top:7px;text-decoration:none}
.twa-new-staff-picker{background:#f8fbfb;border:1px solid #dfeaea;border-radius:17px;padding:17px;margin:4px 0 15px}
.twa-search-label{display:flex!important;flex-direction:row!important;align-items:center;gap:0;background:#fff;border:1px solid #ccddde;border-radius:13px;overflow:hidden}
.twa-search-label:focus-within{border-color:#0a807b;box-shadow:0 0 0 3px #d7f0eb}
.twa-search-symbol{color:#6b8b91;font-size:24px;padding:8px 0 8px 13px;line-height:1}
.twa-staff-management .twa-search-label input{border:0!important;box-shadow:none!important;background:transparent!important;padding:10px 13px!important;min-height:43px}
.twa-new-staff-picker .staff-picker-list{display:grid;gap:9px;max-height:285px;overflow:auto;margin-top:12px;padding:0 2px}
.twa-teacher-row{display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;border-radius:13px;background:#fff;border:1px solid #dde9e9;padding:10px!important;cursor:pointer;position:relative;text-align:left}
.twa-teacher-row:has(input:checked){border-color:#168e80;background:#f0faf6}
.twa-teacher-row input[type=checkbox]{width:19px;height:19px;flex:0 0 19px;accent-color:#0b7770}
.twa-teacher-row .twa-staff-avatar{width:35px;height:35px;flex-basis:35px}
.twa-teacher-row .twa-teacher-indicator{display:none;align-items:center;justify-content:center;border-radius:50%;width:24px;height:24px;background:#16836c;color:#fff;font-size:12px}
.twa-teacher-row:has(input:checked) .twa-teacher-indicator{display:flex}
.twa-picker-empty{font-size:12px;color:#587680;background:#f0f8f6;border:1px dashed #b9d4d1;padding:13px;border-radius:12px;line-height:1.6}
.twa-inline-add{display:block;background:transparent;color:#067772;font-weight:800;padding:5px 0;text-align:left}
.twa-staff-management #class-staff-count{color:#166b5c;font-size:12px;margin:9px 0 0}
.twa-pick-heading{display:flex;align-items:baseline;justify-content:space-between;font-size:13px;font-weight:800;color:#254d54}
.twa-pick-heading span{font-size:11px;font-weight:500;color:#7b9093}
.twa-subject-picker{display:grid;gap:9px}
.twa-subject-chips{display:flex;flex-wrap:wrap;gap:7px;max-height:196px;overflow:auto}
.twa-subject-chip{border:1px solid #d7e2e3;background:#f5f8f8;color:#37616a;border-radius:20px;padding:8px 12px;font-weight:700;font-size:12px;min-height:37px}
.twa-subject-chip.chosen{background:#dff5ed;border-color:#62b9a4;color:#0a6b5b}
.twa-subject-chip.chosen::before{content:'✓';margin-right:5px}
.twa-more-subjects{font-size:12px;color:#4b7880;border:1px solid #e5ecec;border-radius:10px;padding:10px 11px}
.twa-more-subjects summary{font-weight:700;cursor:pointer}
.twa-more-subjects label{margin-top:10px}
.twa-save-class{min-height:47px;border-radius:12px;font-size:14px}
.twa-class-item{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:13px;background:#fbfdfd;border:1px solid #e0e9e9;padding:13px;margin-bottom:9px}
.twa-class-item-name{min-width:0;display:grid;gap:4px}
.twa-class-item-name strong{font-size:15px;color:#123f4b}
.twa-class-item-name small{font-size:11px;color:#7a8d93;line-height:1.4}
.twa-class-item-name span{font-size:11px;color:#287768;font-weight:700}
.twa-class-edit{flex-shrink:0;border-radius:9px;background:#e7f4f1;color:#166e68;padding:9px 14px;font-size:12px;font-weight:800}
.twa-student-class-hint{background:#eef7f5;border:1px solid #d2e7df;border-radius:15px;padding:14px;margin-bottom:15px}
.twa-student-class-hint strong{font-size:14px;color:#174e53}
.twa-student-class-hint p{font-size:12px;margin:5px 0 12px;color:#6c8589}
.twa-student-class-hint button{min-height:42px}
.twa-staff-dialog{border:0;border-radius:22px;padding:24px;width:min(460px,calc(100% - 22px));box-shadow:0 22px 80px #102b3f45;color:#173b44;max-height:min(90vh,740px);overflow-y:auto}
.twa-staff-dialog::backdrop{background:#0b273c99;backdrop-filter:blur(2px)}
.twa-staff-dialog-heading{display:flex;justify-content:space-between;gap:14px;align-items:start;margin-bottom:20px}
.twa-staff-dialog-heading h2{font-size:23px;letter-spacing:-.03em;margin:5px 0 4px}
.twa-staff-dialog-heading p{font-size:13px;color:#6f858c;line-height:1.55;margin:0}
.twa-dialog-close{font-size:26px;background:#eef3f4;border-radius:12px;color:#48686d;min-width:38px;min-height:38px}
.twa-staff-mode{display:grid;grid-template-columns:1fr 1fr;background:#f0f6f5;padding:4px;border-radius:12px;gap:3px;margin-bottom:19px}
.twa-staff-mode button{background:transparent;color:#5d7b7e;font-size:12px;font-weight:750;border-radius:9px;padding:11px 6px}
.twa-staff-mode button.selected{background:#fff;color:#0b726b;box-shadow:0 1px 7px #15484918}
.twa-staff-dialog .form-stack label{font-size:13px;color:#2d5359;font-weight:700}
.twa-staff-dialog input,.twa-staff-dialog select{min-height:48px!important;border-radius:12px!important;font-size:14px}
.twa-staff-dialog .twa-staff-invite-info{background:#edf7f3;border:1px solid #d4ece1;border-radius:12px;color:#416a64;padding:13px;font-size:12px;line-height:1.65}
.twa-optional{font-weight:450;color:#89999b}
.twa-form-feedback{padding:12px;border-radius:10px;color:#24624f;background:#e5f5e9;border:1px solid #bee4c7;font-size:12px;line-height:1.5}
.twa-form-feedback.is-error{background:#fff1ed;border-color:#eecec4;color:#ad493c}
.twa-staff-dialog button[type=submit]{min-height:49px;font-size:14px;border-radius:12px}
@media(max-width:900px){.twa-admin-class-layout{grid-template-columns:1fr}}
@media(max-width:600px){.twa-admin-intro{padding:4px 0 19px;align-items:flex-start;flex-direction:column;gap:12px}.twa-admin-intro h2{font-size:24px}.twa-add-teacher{width:100%;justify-content:center}.twa-staff-management>.panel,.twa-admin-class-layout>.panel{padding:17px;border-radius:18px}.twa-staff-roster-list{grid-template-columns:1fr}.twa-roster-member{padding:11px}.twa-staff-dialog{padding:22px 17px;max-height:88dvh;border-radius:19px}.twa-section-heading p{max-width:280px}.twa-staff-management .staff-picker{padding:13px}.twa-staff-mode button{font-size:11px}}

/* V27 — school management and learner hub: mobile-first, compact and role-safe */
#view-classes [hidden],#view-students [hidden]{display:none!important}
.twa-management-hub,.twa-learners-view{max-width:1050px;margin:0 auto}
.twa-management-heading,.twa-learners-heading{margin:0 0 16px;padding:2px 2px 8px}
.twa-management-heading h2,.twa-learners-heading h2{font-size:clamp(22px,3vw,29px);line-height:1.2;letter-spacing:-.025em;margin:5px 0 5px;color:#183c47}
.twa-management-heading p,.twa-learners-heading p{font-size:13px;line-height:1.55;color:#647d82;max-width:630px;margin:0}
.twa-kicker{color:#0b7874;font-size:10px;letter-spacing:.13em;font-weight:800}
.twa-hub-tabs{display:flex;gap:5px;padding:5px;margin:0 0 16px;border-radius:14px;background:#e9f2f0;border:1px solid #d5e5e2}
.twa-hub-tabs button{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;padding:12px 10px;min-height:47px;border:0;border-radius:10px;background:transparent;color:#42636b;font-weight:760;font-size:13px}
.twa-hub-tabs button.selected{color:#fff;background:#0a6768;box-shadow:0 4px 10px rgba(9,69,72,.1)}
.twa-hub-content{min-width:0}
.twa-hub-action{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:2px 0 16px}
.twa-hub-action h3{font-size:17px;color:#213e48;margin:0 0 3px}
.twa-hub-action p{font-size:12px;color:#69828a;margin:0;line-height:1.45}
.twa-hub-action button{white-space:nowrap;min-height:42px;padding:11px 16px}
.twa-management-hub .panel{border:1px solid #d9e6e7;border-radius:18px;box-shadow:0 8px 28px rgba(17,57,69,.05);margin-bottom:14px;padding:20px}
.twa-class-item{display:flex;align-items:center;gap:13px;justify-content:space-between;padding:15px 14px;border:1px solid #e0eaea;border-radius:14px;margin:9px 0;background:#fff;min-width:0}
.twa-class-item-name{min-width:0;flex:1}.twa-class-item-name strong{font-size:15px;color:#183e47;display:block;margin-bottom:3px}.twa-class-item-name small{font-size:12px;color:#637d83;display:block;margin-bottom:5px;white-space:normal}.twa-class-item-name>span{font-size:11px;color:#19706a;font-weight:650}
.twa-class-item-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.twa-class-edit{background:#eaf5f1;border-radius:10px;padding:9px 12px;color:#165f5c;font-size:12px;font-weight:760}
.twa-class-learners{background:#eef3fa;color:#315c75}
.twa-class-editor{max-width:740px;margin-inline:auto}.twa-class-editor label{font-size:13px}.twa-class-editor .twa-subject-picker{border:1px solid #dce9e5;border-radius:14px;padding:14px;background:#fbfdfc}
.twa-class-editor .twa-subject-chip{font-size:12px}
.twa-assignment-details{margin:4px 0 12px;border:1px solid #d9e6e4;border-radius:14px;overflow:hidden;background:#f8fbfa}
.twa-assignment-details>summary{padding:15px 18px;cursor:pointer;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;color:#234950;font-size:13px}
.twa-assignment-details>summary span{font-size:12px;font-weight:500;color:#738a8a}
.twa-assignment-details[open] .staff-picker{margin:0 12px 14px}
.twa-management-hub .twa-staff-roster{max-width:790px;margin-inline:auto}
.twa-management-hub .twa-roster-member{box-shadow:none}
.twa-team-search-label{display:block;font-size:12px;font-weight:700;color:#45646c;margin-bottom:12px}
.twa-team-search-label input{margin-top:8px;border-radius:11px}
.twa-learner-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:17px}
.twa-learner-action{display:flex;align-items:center;text-align:left;gap:14px;width:100%;min-height:106px;padding:20px;border:1px solid #d4e6e4;border-radius:17px;background:#fff;color:#193e47;box-shadow:0 8px 25px rgba(9,59,66,.04)}
.twa-learner-action:hover,.twa-learner-action:focus-visible{border-color:#0e8177;background:#f7fcfb}
.twa-learner-action .twa-choice-icon{font-size:24px;line-height:1;background:#e3f4ef;border-radius:13px;display:grid;place-items:center;width:51px;height:51px;flex:0 0 51px;color:#0c6d67}
.twa-learner-action>span:nth-child(2){display:flex;flex-direction:column;min-width:0;flex:1;gap:6px}
.twa-learner-action strong{font-size:16px;font-weight:800;line-height:1.2}
.twa-learner-action small{font-size:12px;color:#70848a;font-weight:450;line-height:1.45}
.twa-choice-arrow{font-size:27px;color:#7c9894;align-self:center}
.twa-learner-stats{display:flex;align-items:baseline;justify-content:center;gap:8px;background:#edf7f4;border-radius:14px;padding:14px 17px;color:#406b68;font-size:12px}
.twa-learner-stats strong{font-size:21px;color:#116b65;margin-left:15px}.twa-learner-stats strong:first-child{margin-left:0}
.twa-learner-top{margin-bottom:18px;max-width:700px}
.twa-learner-top h3{color:#173e48;font-size:21px;margin:10px 0 4px}
.twa-learner-top p{color:#698088;max-width:580px;font-size:13px;margin:0}
.twa-back{background:#e9f2f0;color:#155d60;padding:9px 12px;border-radius:10px;font-size:12px;font-weight:760}
.twa-learner-class-options{margin-bottom:15px}
.twa-learner-instruction{font-size:12px;font-weight:740;color:#44666c;margin:0 0 10px}
.twa-learner-class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(154px,1fr));gap:11px}
.twa-learner-class-card{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;min-height:120px;border:1px solid #d7e5e5;background:#fff;color:#153e4b;padding:15px;border-radius:14px;cursor:pointer;box-shadow:0 4px 14px rgba(10,49,59,.035)}
.twa-learner-class-card strong{font-size:15px;color:#173e48}
.twa-learner-class-card small{font-size:12px;color:#74898f}
.twa-class-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e8f4f2;color:#0c736b;font-size:17px}
.twa-learner-class-card.selected{border-color:#0d7a72;background:#eef9f5;box-shadow:0 0 0 2px rgba(13,122,114,.12)}
.twa-learner-filter-row{display:grid;grid-template-columns:minmax(160px,.65fr) minmax(220px,1.35fr);gap:12px;padding:17px;margin:12px 0 14px;background:#fff;border:1px solid #e0e9e8;border-radius:16px}
.twa-learner-filter-row label{font-size:12px}
.twa-list-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.twa-list-title h4{font-size:17px;color:#21434c;margin:0}
.twa-learner-results{display:grid;gap:9px}
.twa-learner-item{display:flex;align-items:center;gap:12px;padding:14px;background:#fff;border:1px solid #dfe9e7;border-radius:14px;min-width:0}
.twa-learner-avatar{display:grid;place-items:center;height:42px;width:42px;flex:0 0 42px;border-radius:13px;background:#dcefe9;color:#096d60;font-size:16px;font-weight:850}
.twa-learner-item-detail{min-width:0;flex:1}.twa-learner-item-detail strong,.twa-learner-item-detail small{display:block;overflow-wrap:anywhere}.twa-learner-item-detail strong{color:#21404a;font-size:14px}.twa-learner-item-detail small{color:#70858a;font-size:12px;margin-top:5px}
.twa-edit-learner{background:#edf4f2;border-radius:9px;padding:9px 12px;color:#175b60;font-weight:700}
.twa-learner-form-card{max-width:740px;padding:22px!important;border-radius:17px!important}
.twa-learner-form-card label{font-size:13px}.twa-learner-form-card input,.twa-learner-form-card select{min-height:48px}
.twa-learner-form-card #twa-save-student{min-height:50px;font-size:14px}
.twa-enrol-advanced,.twa-import-details{background:#f8fbfa;border:1px solid #e0eae7;border-radius:13px;padding:14px;margin-top:8px}
.twa-enrol-advanced summary,.twa-import-details summary{cursor:pointer;color:#2c6060;font-weight:740}
.twa-import-details{margin-top:18px}.twa-import-details>input{display:block;margin:10px 0}
.twa-empty-classes{border:1px dashed #bfcfce;border-radius:14px;padding:20px;color:#426167;background:#f8fbfa;margin-top:8px}
.twa-empty-classes strong{color:#1b4950;font-size:15px;display:block}.twa-empty-classes p{font-size:13px;line-height:1.5;color:#75878a;margin:7px 0 11px}.twa-empty-classes button{margin-top:6px}
.twa-learners-view button:focus-visible,.twa-management-hub button:focus-visible{outline:3px solid #d9ac5f;outline-offset:2px}
@media(max-width:760px){
 .twa-management-heading,.twa-learners-heading{margin-bottom:14px;padding:0 2px 5px}
 .twa-hub-action{flex-direction:column;align-items:stretch;gap:12px}
 .twa-hub-action button{width:100%}
 .twa-management-hub .panel{padding:16px}
 .twa-learner-choices{grid-template-columns:1fr;gap:10px}
 .twa-learner-action{min-height:88px;padding:15px}
 .twa-learner-filter-row{grid-template-columns:1fr;padding:13px}
 .twa-learner-class-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .twa-class-item{flex-wrap:wrap;padding:14px}
 .twa-class-item-actions{width:100%;justify-content:flex-start}
 .twa-learner-form-card{padding:16px!important}
}
@media(max-width:390px){.twa-learner-action strong{font-size:15px}.twa-learner-class-card{min-height:104px}}

/* Keep large subject catalogues inside their own compact picker. */
#view-classes .twa-subject-chips{max-height:210px;overflow-y:auto;align-content:start;scrollbar-width:thin;}
#view-classes .twa-subject-picker .twa-pick-heading{margin-bottom:10px;}

/* V28 bottom navigation: Home, AI, Prepare, Library, Reports */
@media(max-width:930px){body.role-teacher .teacher-mobile-nav,body.school-edition.role-teacher .teacher-mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr))}}
.twa-ai-shortcut{border-color:#b9dfd4!important;background:#effaf5!important}
.twa-ai-shortcut .twa-quick-icon{background:#123e4f;color:#fff;font-size:20px;font-weight:800}
/* V30: four primary phone destinations: Home, school AI, Library and Reports. */
@media(max-width:930px){body.role-teacher .teacher-mobile-nav,body.school-edition.role-teacher .teacher-mobile-nav{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* V30.5 School Knowledge Library and connected teacher workflow */
.twa-knowledge-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;background:linear-gradient(125deg,#103b4b,#0e756a);color:white;padding:22px 25px;border-radius:18px}
.twa-knowledge-hero h2{color:#fff;margin:5px 0 6px;font-size:clamp(20px,2.3vw,27px)}
.twa-knowledge-hero p{margin:0;max-width:700px;line-height:1.6;opacity:.92;font-size:13px}
.twa-knowledge-hero .hero-label{color:#b1efe3}
.twa-knowledge-hero button{white-space:nowrap;color:#0a635e;background:#fff;border:0}
.twa-knowledge-list{display:grid;gap:12px}
.twa-knowledge-item{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:16px;background:#f9fcfb;border:1px solid #dfece7;border-radius:13px}
.twa-knowledge-item-main{flex:1;min-width:0}
.twa-knowledge-item h4{font-size:15px;margin:9px 0 5px;color:#123c46}
.twa-knowledge-item p{font-size:12px;color:#52706c;margin:4px 0 9px}
.twa-knowledge-item .twa-kb-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.55}
.twa-knowledge-item a{color:#086c64;font-weight:700;font-size:12px}
.twa-kb-status{display:inline-flex;margin-left:10px;border-radius:20px;padding:4px 8px;font-weight:750;font-size:10px;background:#fff2dd;color:#80611a}
.twa-kb-status.is-ready{background:#e6f5ed;color:#167347}
#knowledge-admin-form{margin-top:16px}
.twa-kb-check{display:flex!important;align-items:center;gap:9px;padding:12px 13px;border:1px solid #d9e9e2;border-radius:12px;background:#f6fbf8}
.twa-kb-check input{width:20px;height:20px;flex:0 0 20px}
#knowledge-pdf-wrap input[type=file]{width:100%;max-width:100%;padding:10px 0}
#knowledge-admin-form [hidden]{display:none!important}
.twa-workflow-cycle{margin:16px 0}
.twa-cycle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.twa-cycle-item{display:grid;gap:4px;padding:14px;background:#f1f9f6;border:1px solid #daebe4;border-radius:12px}
.twa-cycle-item strong{font-size:24px;color:#075e55;font-weight:800}
.twa-cycle-item span{font-size:11px;color:#466b65}
.twa-cycle-report{grid-column:1/-1;padding:11px;background:#f8fbfa;border:1px solid #dfeae5;border-radius:10px;color:#335b55;font-size:12px}
.twa-answer-guide{margin:10px 0;padding:13px;border:1px solid #d5e6e2;background:#f5fbf8;border-radius:12px}
.twa-answer-guide summary{font-weight:700;color:#225d58;cursor:pointer}
.twa-answer-guide textarea{margin-top:10px;width:100%}
@media(max-width:760px){.twa-knowledge-hero{flex-direction:column;align-items:stretch;padding:19px 16px}.twa-knowledge-item{flex-direction:column}.twa-cycle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.twa-cycle-item{padding:11px}.twa-cycle-item strong{font-size:22px}}

/* V30.9 — Staff roster: readable full names and contact, not truncated emails. */
#view-classes .twa-staff-roster-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:12px;}
#view-classes .twa-roster-member{display:flex;align-items:center;gap:13px;min-height:92px;padding:15px;border:1px solid #dae8e6;border-radius:15px;background:#fff;box-shadow:0 4px 14px rgba(14,55,64,.04)}
#view-classes .twa-staff-avatar{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;overflow:hidden;border-radius:14px;background:#e4f3ef;font-size:16px;color:#116b69;}
#view-classes .twa-staff-photo{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block;}
#view-classes .twa-member-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;}
#view-classes .twa-member-info strong{font-size:15px;line-height:1.3;color:#183d47;overflow-wrap:anywhere;}
#view-classes .twa-member-info small{font-size:12px;color:#496e75;}
#view-classes .twa-staff-kind{font-size:11px;font-weight:650;color:#54747d;}
#view-classes .twa-staff-manage{margin-left:auto;flex:0 0 auto;background:#e5f4ef;border:1px solid #d1e8e1;color:#12695f;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:760;}
#view-classes .twa-staff-manage:hover{background:#d2eee5;}
.twa-staff-photo-field{display:flex;gap:13px;align-items:center;}
.twa-staff-photo-frame{height:72px;width:72px;flex:0 0 72px;overflow:hidden;display:grid;place-items:center;background:#e8f3f1;border:1px solid #cfe2df;border-radius:16px;font-size:27px;}
.twa-staff-photo-field label{min-width:0;flex:1;}
.twa-staff-photo-field input[type=file]{max-width:100%;min-height:auto!important;}
.twa-staff-photo-field small{display:block;font-weight:400;margin-top:5px;color:#5a7580;line-height:1.4;}
.twa-staff-photo-remove{font-size:12px;font-weight:550!important;display:flex;align-items:center;gap:8px;}
.twa-staff-photo-remove input{min-height:initial!important;width:auto;}
@media (max-width:600px){#view-classes .twa-staff-roster-list{grid-template-columns:1fr;}#view-classes .twa-roster-member{padding:12px;gap:10px;}#view-classes .twa-staff-avatar{width:45px;height:45px;flex-basis:45px;}#view-classes .twa-staff-manage{padding:8px 10px;}}


/* V30.10 login, admin mode switch and grading simplification */
#login-overlay{background:
 radial-gradient(circle at top right,rgba(243,204,124,.25),transparent 28%),
 linear-gradient(135deg,#07273f,#0d5c61 55%,#117a74 100%);} 
#login-overlay::before{content:'';position:fixed;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,.08));pointer-events:none}
#login-overlay .login-card{max-width:560px;width:min(92vw,560px);position:relative;overflow:hidden;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.4)}
#login-overlay .login-card::before{content:'';position:absolute;inset:0 auto auto 0;height:10px;width:100%;background:linear-gradient(90deg,var(--school-brand,#0c5e62),#f1c979)}
#login-overlay .login-card .logo-mark{width:76px;height:76px;border-radius:20px;margin-bottom:18px;box-shadow:0 10px 25px rgba(12,94,98,.18)}
#login-overlay .login-card h1{font-size:clamp(28px,4vw,36px);line-height:1.08;margin-top:0}
#login-overlay .login-card p{max-width:46ch}
.school-auth-progress{display:flex;align-items:center;gap:10px}
.school-auth-progress::before{content:'';width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:twa-pending-spin .8s linear infinite}
#login-form .primary.full{min-height:46px;font-size:14px}
#login-form label{font-size:13px}
.school-signin-help{background:#f7fbfb;border:1px solid #d9e7e5;border-radius:12px;padding:12px 14px}
.school-signin-help summary{cursor:pointer;font-weight:700;color:#21474c}
.twa-mode-switch{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-left:auto}
.twa-mode-switch-label{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:#557277}
.twa-mode-switch button{border:1px solid #c8dbd8;background:#fff;color:#184d51;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:700}
.twa-mode-switch button.selected{background:#0f7478;color:#fff;border-color:#0f7478;box-shadow:0 8px 18px rgba(15,116,120,.18)}
.workspace-role-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.twa-role-banner-text{display:flex;flex-direction:column;gap:2px}
.twa-role-banner-text strong{font-size:12px;letter-spacing:.9px}
.twa-role-banner-text small{font-size:12px;color:#365f64}
.twa-grade-simple label{font-size:13px}
.twa-range-chip{display:inline-flex;align-items:center;justify-content:center;min-width:86px;padding:7px 10px;border-radius:999px;background:#edf5f4;color:#14575d;font-weight:800}
@media(max-width:930px){.workspace-role-banner{align-items:flex-start}.twa-mode-switch{margin-left:0}}
@media(max-width:620px){#login-overlay .login-card{width:min(94vw,560px)}.twa-mode-switch{width:100%}.twa-mode-switch button{flex:1 1 180px}}

/* Explicit per-teacher subject assignment: compact, legible and responsive. */
.twa-subject-assignment{border:1px solid var(--line,#d7e2e5);border-radius:12px;margin:12px 0;padding:12px}
.twa-subject-assignment legend{font-weight:700;padding:0 6px}
.twa-subject-assignment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:9px}
.twa-subject-assignment-grid label{display:flex;align-items:flex-start;gap:8px;font-weight:500;font-size:.92rem}
.twa-subject-assignment-grid input{flex:0 0 auto;min-width:18px;min-height:18px}
