:root{font-family:system-ui,"Noto Sans Sinhala","Iskoola Pota",sans-serif;color:#16332e;background:#f2f7f3;line-height:1.65;font-size:16px}*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;background:#155d4c;color:white;padding:16px max(16px,calc((100vw - 960px)/2));gap:12px}.brand{display:flex;align-items:center;gap:12px}.brand b{font-size:1.25rem}.brand small{display:block;color:#d9f3e8}.logo{background:#f8d77a;color:#155d4c;border-radius:15px;padding:5px 12px;font-size:1.5rem}main{max-width:960px;margin:24px auto;padding:0 15px;min-height:75vh}footer{text-align:center;color:#4e6c62;font-size:.85rem;padding:16px}h1,h2,h3{line-height:1.45;margin:0 0 12px}h1{font-size:1.65rem}h2{font-size:1.25rem}p{margin:6px 0 15px}.card{background:white;border:1px solid #dae7de;border-radius:18px;padding:20px;margin-bottom:14px;box-shadow:0 3px 12px #174e3b08}.narrow{max-width:480px;margin:30px auto}label{display:block;font-weight:600;margin:10px 0 4px}input,select,textarea,button{font:inherit}input,select,textarea{width:100%;padding:10px 12px;border:1px solid #afc8be;border-radius:9px;background:white;color:#16332e}textarea{min-height:190px;resize:vertical}button{border:0;border-radius:10px;background:#176850;color:white;font-weight:650;padding:11px 17px;cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:#e5f1eb;color:#155d4c}button.danger{background:#a43c3c}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #db9b25;outline-offset:2px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.spread{justify-content:space-between}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.grid .card{margin:0}.muted{color:#526c63;font-size:.9rem}.error{background:#fbe8e6;color:#8b2424;padding:10px;border-radius:8px;white-space:pre-wrap}.ok{background:#e1f4e7;color:#155d4c;padding:10px;border-radius:8px;white-space:pre-wrap}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.tabs .active{background:#155d4c;color:white}.timer{font-size:1.5rem;font-weight:800;font-variant-numeric:tabular-nums;background:#e5f1eb;padding:8px 14px;border-radius:12px}.timer.urgent{color:#a43c3c;background:#fbe8e6}.choices{display:grid;gap:10px;margin:16px 0}.choice{text-align:left;background:#f6f9f7;color:#16332e;border:2px solid #dce7df;min-height:50px;overflow-wrap:anywhere}.choice.selected{border-color:#176850;background:#d8f1e4}.numbers{display:grid;grid-template-columns:repeat(auto-fit,minmax(38px,1fr));gap:5px;margin:15px 0}.numbers button{padding:7px 4px;background:#edf2ef;color:#24473c;font-size:.9rem}.numbers .answered{background:#c9ead5}.numbers .current{background:#245eab;color:white}.score{font-size:3rem;color:#176850;font-weight:800}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:9px;border-bottom:1px solid #e0e9e3;white-space:nowrap}small{font-size:.85rem}.credential{font-family:monospace;user-select:all;font-size:1.15rem}pre{white-space:pre-wrap;overflow-wrap:anywhere} [hidden]{display:none!important}@media(max-width:480px){.card{padding:15px}main{margin:15px auto}header{padding:12px}h1{font-size:1.4rem}.grid{grid-template-columns:1fr}.timer{font-size:1.2rem}}
/* V1.1 design system — responsive, self-contained, no external assets */
:root{background:#f4f7f6;color:#12352f;--green:#075a4b;--gold:#f6ce67}header{background:linear-gradient(110deg,#075346,#08715c);padding:15px 28px;min-height:76px}.logo{background:var(--gold);border-radius:13px}.brand b{font-size:1.35rem}.eyebrow{font-size:.75rem;font-weight:750;letter-spacing:.08em}.card{border-radius:15px;border-color:#dbe8e3;box-shadow:0 4px 15px #173c3210}button{min-height:44px}button.secondary{background:#e7f3ee}button.active{background:var(--green);color:white}form button{margin-top:12px}body[data-mode=teacher] main{max-width:1700px;margin:0 auto;padding:0}body[data-mode=teacher] header{position:sticky;top:0;z-index:20}.teacher-layout{display:grid;grid-template-columns:205px minmax(0,1fr);min-height:82vh}.sidebar{background:#075a4b;color:white;padding:22px 12px;display:flex;flex-direction:column;gap:8px}.sidebar .eyebrow{padding:10px;color:#c2e9dc}.sidebar .navbtn{background:transparent;text-align:left;border-radius:9px;color:white}.sidebar .navbtn.active{background:#f6ce67;color:#12352f}.sidebar-note{margin-top:auto;color:#d0ebe2;font-size:.85rem;padding:10px}.workspace{min-width:0;padding:24px}.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:0 0 16px}.metric{background:#fff;border:1px solid #e0e9e5;border-radius:13px;padding:14px;display:flex;flex-direction:column;gap:3px;min-width:0}.metric strong{font-size:1.8rem;line-height:1.35;font-variant-numeric:tabular-nums}.metric.mint{background:#e3f4e9}.metric.gold{background:#fff4d9}.metric.blue{background:#e7f1fc}.metric.violet{background:#f2eafb}.student-layout{display:grid;grid-template-columns:minmax(235px,300px) minmax(0,1fr);gap:15px;align-items:start}.roster{min-width:0;padding:15px}.roster-list{display:grid;gap:6px;max-height:65vh;overflow:auto;margin-top:14px}.roster-item{display:grid;grid-template-columns:minmax(0,1fr) auto;text-align:left;background:#f3f8f5;color:#12352f;gap:1px 8px;padding:10px;border:1px solid transparent}.roster-name{overflow-wrap:anywhere;grid-column:1}.roster-item small{grid-column:1;color:#526c63}.roster-score{grid-column:2;grid-row:1/3;align-self:center;font-variant-numeric:tabular-nums}.roster-item.chosen{background:#ccefdc;border-color:#16866b}.report{min-width:0}.profile{display:flex;gap:15px;align-items:center;margin-bottom:10px}.profile h2,.profile p{margin:0}.avatar{background:#f8de93;color:#075a4b;width:56px;height:56px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:1.45rem;font-weight:800}.subject-tabs{gap:6px}.subject-tabs button{font-size:.87rem;padding:8px 11px}.filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px}.filters>div{flex:1;min-width:130px}.filters label{margin-top:0}.subject-average{display:grid;grid-template-columns:minmax(110px,1.3fr) minmax(60px,2fr) 66px 90px;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #eef3f0;font-size:.87rem}.subject-average progress{width:100%;height:12px;accent-color:#16866b}.trend-chart svg{width:100%;height:auto;max-height:220px;display:block}.pill{background:#edf4f0;border-radius:7px;padding:4px 8px;font-size:.8rem;display:inline-block;font-weight:650}.pill.finished{background:#d8f2e2;color:#115d38}.pill.missed{background:#f9e6e3;color:#8b2424}.pill.in_progress{background:#fff0cb;color:#765319}.tablewrap{border-radius:9px}thead{background:#e8f3ed}td,th{font-size:.86rem}td button{font-size:.8rem;padding:7px 10px;min-height:36px}.empty{padding:18px;background:#f5f8f6;border-radius:9px;color:#526c63}.welcome{background:linear-gradient(120deg,#e2f4e8,#fff4d9);border:1px solid #dce8de;padding:24px;border-radius:18px;margin-bottom:16px}.welcome h1{margin-top:6px}.welcome p{margin:0}.subject-panel{border-left:5px solid #16866b}.subject-mother{border-left-color:#df9a74}.subject-math{border-left-color:#558dcb}.subject-english{border-left-color:#9670c6}.subject-tamil{border-left-color:#d78096}.subject-buddhist,.subject-weekly{border-left-color:#e6b43d}.subject-catholic{border-left-color:#9571c3}.subject-weekly{background:#fffaf0}.paper-line{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e4ece7;padding:12px 0}.paper-info{min-width:0;overflow-wrap:anywhere}.paper-info p{margin:3px 0}.paper-line button{flex:none}.exam-top{position:sticky;top:0;z-index:10;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #e2ede7}.exam-top h2{margin:0}.exam-card .choice{font-size:1.05rem;min-height:58px}.exam-card .numbers button{min-height:36px}.timer{background:#fff1cb;color:#12352f}.numbers .answered{background:#c9ead5}.numbers .current{background:#075a4b}.narrow form{display:grid;gap:8px}.narrow>button{margin-top:8px}
@media(max-width:1000px){.teacher-layout{grid-template-columns:165px minmax(0,1fr)}.workspace{padding:16px}.student-layout{grid-template-columns:210px minmax(0,1fr)}.subject-average{grid-template-columns:1.3fr 1fr 55px}.subject-average small{grid-column:1/-1}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:740px){header{padding:12px 15px}.teacher-layout{display:block}.sidebar{flex-direction:row;overflow-x:auto;padding:8px;gap:4px}.sidebar .eyebrow,.sidebar-note{display:none}.sidebar .navbtn{white-space:nowrap;flex:none;font-size:.85rem;padding:9px}.student-layout{display:block}.roster-list{max-height:240px}.workspace{padding:13px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:11px}.metric strong{font-size:1.45rem}.paper-line{align-items:stretch;flex-direction:column}.paper-line button{width:100%}.subject-average{grid-template-columns:1.3fr 1fr 55px}.subject-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px}.subject-tabs button{white-space:nowrap;flex:none}.exam-top h2{font-size:1rem}.welcome{padding:17px}.brand b{font-size:1.1rem}.brand small{font-size:.72rem}.card{padding:13px}}
.editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 15px;margin-bottom:12px}@media(max-width:740px){.editor-fields{grid-template-columns:1fr}}
/* V1.2: child-friendly dashboard, isolated from teacher layout */
.student-hero{display:flex;align-items:center;justify-content:space-between;gap:12px;overflow:hidden;background:linear-gradient(115deg,#e3f5e6,#fcf5dd);padding:22px}.student-hero>div{flex:1;min-width:0}.welcome-art{width:38%;max-width:300px;height:auto;object-fit:cover;border-radius:14px;flex:none}.student-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 18px}.student-nav button{padding:10px 5px;font-size:.9rem;min-height:48px}.student-paper-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.student-paper{border:1px solid #dce8df;border-radius:16px;padding:16px;background:#e7f5ec;display:flex;flex-direction:column;gap:10px;justify-content:space-between}.student-paper.subject-mother{background:#fff0e9}.student-paper.subject-math{background:#e7f2ff}.student-paper.subject-english{background:#f0e9fc}.student-paper.subject-env{background:#e2f4e7}.student-paper.subject-tamil{background:#fce8ee}.student-paper.subject-buddhist,.student-paper.subject-weekly{background:#fff3ce}.student-paper.subject-catholic{background:#f2e9fc}.student-paper .paper-info{display:grid;gap:3px}.student-paper .subject-heading{font-size:1.15rem;font-weight:800}.student-paper button{min-height:48px}.student-section h2{font-size:1.18rem}.review-option{padding:12px;border:1px solid #e0eae4;border-radius:10px;background:#f6f9f7;margin:7px 0;overflow-wrap:anywhere}.review-option.correct{background:#dcf5e3;color:#145b36;border-color:#8ccea2}.review-option.wrong{background:#fce4e4;color:#912f2f;border-color:#eab1b1}.editor-split{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px;align-items:start}.question-list{max-height:650px;overflow:auto}.question-list .paper-line p{overflow-wrap:anywhere;min-width:0}.question-list .paper-line button{font-size:.85rem;padding:8px 10px}.exam-card h2{font-size:1.35rem}.exam-card .choice{font-size:1.15rem;min-height:60px}.exam-top .timer{font-size:1.6rem}.numbers .current{background:#f5cf69;color:#133c31;border:2px solid #ca9e28}.numbers .answered:not(.current){background:#158759;color:white}body[data-mode=exam] .exam-top{top:0}.score{font-variant-numeric:tabular-nums}.student-section .empty{margin:0}body[data-mode=student] main,body[data-mode=exam] main{max-width:1020px}.subject-tabs button{font-size:.95rem}.subject-average{font-size:.95rem}
@media(max-width:740px){.editor-split{grid-template-columns:1fr}.student-hero{padding:14px;gap:7px}.student-hero h1{font-size:1.2rem}.student-hero p{font-size:.85rem}.welcome-art{width:36%}.student-paper-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.student-paper{padding:11px}.student-paper .subject-heading{font-size:1rem}.student-paper button{font-size:.88rem;padding:8px}.student-nav{position:sticky;bottom:0;z-index:15;background:#f4f7f6;padding:8px 0;grid-template-columns:repeat(2,minmax(0,1fr))}.student-nav button{font-size:.9rem}.exam-card h2{font-size:1.2rem}.exam-top .timer{font-size:1.3rem}}
@media(max-width:380px){.student-paper-grid{grid-template-columns:1fr}.welcome-art{width:33%}}

/* V1.2.1: global signed-in navigation */
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.header-actions button{white-space:nowrap}.header-actions #home{background:#f6ce67;color:#12352f}@media(max-width:480px){header{gap:6px;flex-wrap:wrap}.header-actions{gap:6px}.header-actions button{font-size:.8rem;padding:8px 10px;min-height:44px}.brand{gap:6px}.brand b{font-size:1rem}.brand .logo{padding:4px 8px}}
/* V1.2.2 — parent demonstration */
body[data-mode=login]{background:radial-gradient(ellipse at 8% 15%,#dcefe4 0,transparent 48%),#f6f9f5}body[data-mode=login] main{max-width:1120px;display:grid;align-content:center;min-height:calc(100vh - 150px);margin:0 auto;padding:30px 20px}.login-layout{display:grid;grid-template-columns:1.05fr 1fr;gap:24px;align-items:stretch}.login-promo{background:linear-gradient(145deg,#e0f3e6,#fff1c7);border-radius:26px;padding:30px;overflow:hidden;display:flex;flex-direction:column;justify-content:center;border:1px solid #d6e7d9}.login-promo .eyebrow{color:#176850}.login-promo h1{font-size:clamp(1.8rem,3.5vw,2.7rem);margin-top:10px}.login-art{width:100%;max-height:260px;object-fit:contain;border-radius:20px;display:block;margin:5px auto 18px}.login-perks{display:flex;flex-wrap:wrap;gap:8px}.login-perks span{background:#ffffffb8;padding:8px 12px;border-radius:12px;font-weight:650;font-size:.87rem}.free-label{margin:17px 0 0;font-weight:750;color:#176850}.login-form{margin:0;padding:clamp(22px,4vw,44px);border-radius:26px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 12px 40px #174e3b12}.login-form h1{margin:12px 0 8px;font-size:2rem}.login-form form{display:grid;gap:9px}.login-form input{min-height:55px;font-size:1.05rem}.login-form button[type=submit]{min-height:55px;font-size:1.12rem;background:linear-gradient(115deg,#075a4b,#12856b);margin:6px 0 12px}.login-form .reveal-pass{justify-self:start;font-size:.82rem;min-height:44px;padding:6px 12px;margin:0}.login-form>button{align-self:start}.student-hero{min-height:174px;border-radius:24px;background:linear-gradient(115deg,#e1f5e7,#fff4d5);box-shadow:0 5px 18px #12352f0b}.student-hero h1{font-size:clamp(1.5rem,3.3vw,2.2rem);overflow-wrap:anywhere}.student-hero p{font-size:1.02rem}.welcome-art{width:43%;max-width:350px;border-radius:18px}.student-nav button{font-size:1rem;min-height:54px;border-radius:13px}.student-section{border-radius:22px;padding:20px}.student-section h2{font-size:1.3rem}.student-paper-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.student-paper{border-radius:18px;padding:18px;box-shadow:0 3px 8px #12352f09}.student-paper .subject-heading{font-size:1.3rem;line-height:1.4}.student-paper .paper-info strong{font-size:1.04rem}.student-paper button{border-radius:12px;font-size:1rem}.student-empty{padding:15px;border-radius:12px;background:#f3f8f5;color:#526c63;margin:0}.paper-review-state{font-size:.82rem;font-weight:650;color:#355a4d}.student-paper.paper-done{background:#f1f8f3}.student-paper.paper-missed{background:#fff4e1}.student-paper.paper-second{background:#e9efff}.student-paper.paper-upcoming{background:#f3f5f6}.exam-card{border-radius:22px}.exam-card .choice{border-radius:13px}.exam-card .choice.selected{border-color:#087459;background:#d9f5e5}.exam-card .numbers button{min-height:44px}.review-option{font-size:1.05rem}
@media(max-width:740px){body[data-mode=login] main{display:block;min-height:0;padding:14px 12px}.login-layout{grid-template-columns:1fr;gap:12px}.login-promo{padding:18px;display:grid;grid-template-columns:1fr 105px;gap:4px;align-items:center}.login-promo .eyebrow,.login-promo h1,.login-promo p{grid-column:1}.login-promo h1{font-size:1.4rem;margin:5px 0}.login-promo p{font-size:.9rem;margin:3px 0}.login-promo .login-art{grid-column:2;grid-row:1/4;margin:0;max-height:110px}.login-perks{grid-column:1/-1;gap:4px}.login-perks span{font-size:.73rem;padding:5px 7px}.login-promo .free-label{grid-column:1/-1;margin:6px 0 0;font-size:.8rem}.login-form{padding:21px;border-radius:20px}.login-form h1{font-size:1.65rem}.student-hero{min-height:136px;padding:16px}.student-hero h1{font-size:1.25rem}.student-hero p{font-size:.87rem}.student-nav{position:static;grid-template-columns:repeat(2,minmax(0,1fr));padding:0}.student-nav button{font-size:.94rem;min-height:48px}.student-section{padding:13px}.student-section h2{font-size:1.13rem}.student-paper-grid{grid-template-columns:1fr}.student-paper{padding:13px;display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.student-paper .subject-heading{font-size:1.12rem}.student-paper button{width:100%}.exam-card .numbers{grid-template-columns:repeat(5,minmax(0,1fr))}.exam-card .choice{min-height:62px}.exam-top .timer{font-size:1.25rem}}
