:root{--ink:#17352f;--green:#176b53;--muted:#75827c;--line:#e1e8e1;--cream:#f5f7f2}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:Tahoma,Arial,sans-serif;font-size:14px}button,input,select{font:inherit}button,a,label.primary{touch-action:manipulation}button{cursor:pointer}aside{position:fixed;right:0;top:0;bottom:0;width:230px;background:#fff;border-left:1px solid var(--line);padding:38px 23px;display:flex;flex-direction:column}.brand{color:var(--green);text-decoration:none;font-size:28px;display:block}.brand small{display:block;font-size:12px;color:var(--muted);margin:9px 35px}nav{display:grid;gap:10px;margin-top:65px}nav button{background:none;text-align:right;padding:15px;border:0;border-radius:8px;color:#596b63}nav button.active{background:#eaf2e9;color:var(--green);font-weight:bold}nav span{float:left}.aside-note{margin-top:auto;padding:17px 10px;border-top:1px solid var(--line);line-height:1.9}.aside-note small{color:var(--muted)}main{margin-right:230px;padding:45px 44px;max-width:1600px}header{display:flex;justify-content:space-between;align-items:center;gap:20px}.eyebrow{font-size:12px;color:var(--green);letter-spacing:.3px}h1{font-size:30px;margin:14px 0}h2{font-size:18px;margin:0}h3{font-size:19px}p{line-height:1.8;color:#6f7e75}.outline,.primary{padding:12px 17px;border-radius:7px;text-decoration:none;display:inline-block;border:1px solid #ced9ce;background:white;color:var(--ink)}.primary{background:var(--green);border-color:var(--green);color:white;font-weight:bold}button:disabled{opacity:.4;cursor:default}.notice{margin:28px 0 24px;background:#edf1e5;border:1px solid #dce5cf;border-radius:7px;padding:13px 17px;color:#647344;font-size:12px;line-height:1.8}.steps{display:flex;gap:36px;color:#7a877e;margin:0 0 23px}.steps b{display:inline-grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#e0ebdd;color:var(--green);margin-left:7px}.workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr);gap:22px;align-items:start}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px;box-shadow:0 4px 15px #17352f03}.card-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:23px}.pill{background:#f1f5ed;color:#72836b;font-size:10px;padding:6px 9px;border-radius:20px;white-space:nowrap}.drop{border:1.5px dashed #c6d6c5;background:#fafcf8;text-align:center;border-radius:10px;padding:53px 15px;min-height:370px}.upload-icon{font-size:40px;color:var(--green);margin:auto;border-radius:14px;background:#e8f0e4;width:65px;height:65px;display:grid;place-items:center}.drop p{font-size:12px}.drop small{display:block;margin-top:20px;color:#839080;font-size:10px}input[type=file]{display:none}.text{display:block;margin:15px auto;background:none;border:0;color:var(--green);cursor:pointer;font-size:12px}.student{display:grid;grid-template-columns:1.6fr 1fr;gap:12px}label{font-size:12px;color:#66766c}input:not([type=file]){width:100%;padding:12px;border:1px solid var(--line);border-radius:6px;margin-top:8px;background:#fcfdfb;color:var(--ink)}.empty{text-align:center;color:#8b978b;line-height:2.3;padding:65px 0}.empty small,.muted{font-size:11px;color:#849084}.wide{width:100%}.toolbar{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.toolbar button{font-size:11px;padding:10px}canvas{width:100%;max-height:700px;object-fit:contain;background:#edf0ea;border-radius:6px;cursor:crosshair}#imageStatus{font-size:12px}.answer-row,.key-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line)}.key-row .question{flex:1;line-height:1.9}.key-row{padding:15px 0}.choices{display:flex;gap:5px;direction:rtl}.choices button{background:#fff;border:1px solid #dce3da;border-radius:5px;min-width:33px;padding:7px;color:#5d7063}.choices button.selected{background:var(--green);color:#fff;border-color:var(--green)}.answer-row.warning{background:#fff8e8}.answer-row small{font-size:10px;color:#a97e25}.grade{background:#eaf3e9;border-radius:8px;padding:16px;text-align:center;margin:18px 0;font-size:18px}#answers{max-height:480px;overflow:auto;margin-top:15px}table{border-collapse:collapse;width:100%;text-align:right}td,th{padding:15px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-size:12px;color:#7c8a7e}.table-wrap{overflow:auto}footer{display:flex;justify-content:space-between;margin-top:35px;color:#6e836e;font-size:12px}footer span{color:#99a398}#toast{position:fixed;bottom:25px;left:25px;background:var(--ink);color:white;border-radius:8px;padding:15px;display:none;z-index:9}[hidden]{display:none!important}@media(max-width:1000px){aside{width:185px;padding:30px 15px}main{margin-right:185px;padding:28px 20px}.workspace{grid-template-columns:1fr}h1{font-size:25px}}@media(max-width:650px){aside{position:static;width:auto;border-left:0;padding:18px}.brand{font-size:23px}.brand small,.aside-note{display:none}nav{display:flex;margin-top:20px;gap:4px}nav button{padding:10px;font-size:12px}main{margin:0;padding:23px 15px}header{display:block}header a{margin-top:8px}.steps{gap:12px;font-size:11px}.card{padding:17px}.key-row{flex-wrap:wrap}.key-row .question{flex-basis:85%}.choices{flex-wrap:wrap}}
select,textarea{width:100%;padding:11px;border:1px solid var(--line);border-radius:6px;margin-top:8px;background:#fcfdfb;color:var(--ink);font:inherit}textarea{resize:vertical;line-height:1.9}.roster-hint{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;font-size:11px;color:var(--muted)}.roster-hint .text{margin:0;font-size:10px}.roster-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.import-card{margin-top:20px}.card>label{display:block;margin-top:16px}.card>button.wide{margin-top:15px}#importPreview{background:#f1f6ed;padding:12px;border-radius:8px;margin-top:12px}#importNames{max-height:220px;overflow:auto;font-size:12px;line-height:2}#classStats{margin:15px 0}#rosterTable button{margin:0}#classroom{min-width:0}.roster-header h2{font-size:22px}

/* Keep visible canvas coordinates identical to click coordinates on phones. */
#paper{height:auto;max-height:none;object-fit:fill;display:block}

#storageStatus{margin-top:22px;font-size:12px;padding:12px;border:1px solid #cdddce;background:#edf5eb;border-radius:8px;color:#286146}#storageStatus.storage-error{background:#fff2e5;color:#9b4d0a;border-color:#edc594}.storage-shield{position:fixed;inset:0;background:#f5f7f2ed;z-index:20;display:grid;place-items:center;padding:25px;text-align:center}.storage-shield>div{background:white;border:1px solid var(--line);border-radius:12px;padding:30px;max-width:480px}#savingShield{background:#f5f7f288;z-index:25}

.student-picker{position:relative;min-width:0}.student-control{display:flex;align-items:stretch;position:relative;margin-top:8px}.student-control #student{margin:0;padding-left:42px}.student-control #toggleStudents{position:absolute;left:1px;top:1px;bottom:1px;width:39px;border:0;border-right:1px solid var(--line);border-radius:6px 0 0 6px;background:#eef4e9;color:var(--green);font-size:24px}.student-menu{position:absolute;top:100%;right:0;width:100%;min-width:240px;z-index:12;margin-top:6px;border:1px solid #bad0bc;border-radius:9px;background:#fff;box-shadow:0 10px 30px #17352f24;max-height:280px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.student-search-count{padding:10px 12px;background:#f2f7ed;font-size:11px;color:#64795f;border-bottom:1px solid var(--line)}#studentList button{width:100%;min-height:50px;border:0;border-bottom:1px solid var(--line);background:white;padding:11px 13px;text-align:right;display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--ink);font-size:13px;line-height:1.6}#studentList button:hover,#studentList button.keyboard-active{background:#eaf3e5}#studentList small{font-size:10px;color:#7a8a70;white-space:nowrap}.student-no-match{padding:16px;line-height:1.9;font-size:12px;color:#77856e}.student-picker #student:focus{outline:2px solid #b3d3b3;outline-offset:1px}@media(max-width:650px){.review .student{position:relative;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}.student-picker{position:static}.student-menu{min-width:0;max-height:220px}.student-control #student{font-size:16px}#studentList button{min-height:52px;font-size:15px}}

.auth-page{min-height:100vh;display:grid;place-items:center;padding:22px}.auth-page main.auth-card{margin:0;width:100%;max-width:580px;padding:30px;border:1px solid var(--line);background:white;border-radius:12px}.auth-card h1{font-size:24px}.auth-card label{display:block;margin:16px 0}.auth-card .wide{margin-top:16px;text-align:center}.auth-card input[type=password]{direction:ltr;text-align:left}.form-error{padding:12px;background:#fff0e8;border:1px solid #eac0a9;color:#9b4214;border-radius:6px}.form-success{padding:12px;background:#edf7eb;border:1px solid #b9d6b0;color:#286146;border-radius:6px}.checkbox-label{display:flex!important;gap:8px;align-items:flex-start;line-height:1.8}.checkbox-label input{width:auto!important}.hosting-links{font-size:11px;line-height:1.8;flex-basis:100%;margin-bottom:12px}header{flex-wrap:wrap}hr{border:0;border-top:1px solid var(--line);margin:25px 0}

/* Rasid: coordinated header actions and equally sized student controls. */
.hosting-links{font-size:0;line-height:1.5;margin:0 0 22px;flex-basis:100%;display:block}
.hosting-links a,.hosting-links a:visited{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;padding:10px 15px;margin:0 0 8px 8px;border:1px solid #cdded3;border-radius:11px;background:#fff;color:#21654f;font-family:inherit;font-size:12px;font-weight:600;line-height:1.5;text-decoration:none;box-shadow:0 2px 5px #17352f04;transition:background .15s,border-color .15s,box-shadow .15s}
.hosting-links a:first-child:before{content:'⇅';font-size:17px;font-weight:700;color:#287c5d}
.hosting-links a:last-child,.hosting-links a:last-child:visited{color:#8a5350;border-color:#e5d8d5;background:#fffaf8}
.hosting-links a:last-child:before{content:'↪';font-size:17px;color:#9a6059}
.hosting-links a:hover{background:#edf5ed;border-color:#aac9b5;box-shadow:0 3px 9px #17352f0b}
.hosting-links a:last-child:hover{background:#f9efeb;border-color:#d9bcb5}
.hosting-links a:focus-visible{outline:3px solid #bad8c4;outline-offset:3px}
.review .student{align-items:start;gap:14px;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.review .student>label,.review .student-picker>label{display:block;min-width:0;margin:0;color:#62756b;font-size:12px;font-weight:500;line-height:20px}
.review .student-control{height:48px;margin-top:8px}
.review #student{display:block;height:48px;min-height:48px;border:1px solid #d5e1d7;border-radius:11px;background:#fbfdf9;padding:12px 14px 12px 47px;color:#214d3d;font:inherit;font-size:14px;line-height:normal;box-shadow:0 1px 2px #17352f03}
.review #toggleStudents{width:40px;top:1px;bottom:1px;left:1px;border-color:#dfE9df;border-radius:10px 0 0 10px;background:#edf4e9;color:#247255;font-size:23px}
.review select#classroom{-webkit-appearance:none;appearance:none;display:block;box-sizing:border-box;width:100%;height:48px;min-height:48px;margin:8px 0 0;padding:12px 14px 12px 42px;border:1px solid #d5e1d7;border-radius:11px;background-color:#fbfdf9;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23247255' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 14px center;background-size:16px;color:#214d3d;font-family:inherit;font-size:14px;font-weight:500;line-height:normal;box-shadow:0 1px 2px #17352f03;cursor:pointer;text-align:right}
.review #student:focus,.review select#classroom:focus{outline:2px solid #a7cdb6;outline-offset:2px;border-color:#7eb298;box-shadow:0 0 0 4px #edf5ed}
.review .student-menu{border-radius:11px;border-color:#c5dcca}
@media(max-width:650px){.hosting-links{margin-bottom:16px}.hosting-links a{font-size:11px;padding:10px 12px;min-height:42px;margin-left:7px}.review .student{gap:10px}.review .student-control,.review #student,.review select#classroom{height:50px;min-height:50px}.review #student,.review select#classroom{font-size:16px}.review select#classroom{padding-right:10px;padding-left:30px;background-position:left 9px center;background-size:14px}}

/* Teacher accounts and manager dashboard. */
.auth-foot{text-align:center;margin:24px 0 0;font-size:13px}.auth-foot a{color:#176b53;font-weight:bold}.form-info{padding:13px;background:#f0f6ed;border-radius:9px;font-size:12px;line-height:1.9}.auth-card input[type=email]{direction:ltr;text-align:left}.auth-card input{min-height:46px}.auth-card form>small{display:block;color:#768573;line-height:1.8;margin-top:8px}.account-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;justify-content:flex-start}.account-bar a{margin:0;font-size:12px}.account-identity{display:flex;flex-direction:column;gap:4px;margin-left:auto;color:#234f3d;font-size:13px;line-height:1.7}.account-identity small{font-size:10px;color:#7a8b77}.account-bar .dashboard-action{background:#176b53!important;color:white!important;border-color:#176b53}.account-bar .dashboard-action:before{content:'▦';color:inherit}.auth-card:has(.dashboard-wrap){max-width:1200px!important}.dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:25px 0}.admin-stats>div{padding:22px;border-radius:12px;background:#f0f6ed;border:1px solid #dfE8d8;display:flex;flex-direction:column;gap:9px}.admin-stats strong{font-size:30px;color:#176b53}.admin-stats span{color:#6e7f68;font-size:12px}.admin-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:20px 0}.admin-search{display:flex;gap:8px;flex:1;max-width:500px}.admin-search input{margin:0}.admin-search button{white-space:nowrap}.user-email{display:block;color:#81907b;font-size:11px;margin-top:6px;direction:ltr;text-align:right}.account-status{display:inline-block;padding:7px 12px;border-radius:20px;font-size:11px}.account-status.active{background:#eaf5e7;color:#226b45}.account-status.disabled{background:#f9eee7;color:#9a6146}.inline-form{display:inline-flex}.inline-form button{padding:8px 12px;font-size:11px}.danger-button{color:#9b4a43;border-color:#e1c4be;background:#fff7f4}.rename-account{margin-top:10px;font-size:11px;color:#557462}.rename-account form{min-width:180px}.rename-account button{padding:7px 10px;font-size:11px}.pagination{display:flex;gap:12px;align-items:center;justify-content:center;margin:22px 0}.pagination a{font-size:12px}body.auth-page .auth-card table{font-size:13px}@media(max-width:650px){.account-identity{flex-basis:100%;margin-bottom:8px}.account-bar a{font-size:11px;padding:9px 10px}.auth-page main.auth-card{padding:22px 16px}.dashboard-heading,.admin-actions{align-items:stretch;flex-direction:column}.admin-stats{gap:8px}.admin-stats>div{padding:14px 10px}.admin-stats strong{font-size:24px}.admin-stats span{font-size:10px}.admin-search{max-width:none}}

nav a.nav-dashboard{display:block;text-align:right;padding:15px;border:1px solid #d6e4d1;border-radius:8px;background:#f0f6e9;color:#316547;text-decoration:none;font-weight:600;margin-bottom:5px}nav a.nav-dashboard:hover{background:#e3eedc}@media(max-width:650px){nav{flex-wrap:wrap}nav a.nav-dashboard{padding:10px;font-size:12px;margin:0}}
/* Independent exams and school identity. */
.exam-selector{display:flex;align-items:center;gap:18px;margin:12px 0 22px;padding:18px 22px}.exam-selector label{flex:1;margin:0}.exam-selector select{width:100%;min-height:48px}.exam-filters,.exam-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.exam-filters label,.exam-meta label{min-width:0}.exam-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:22px}.exam-item{padding:20px;border:1px solid #dce5df;border-radius:16px;background:#fff}.exam-item h3{margin:0 0 10px}.exam-item p{font-size:14px;color:#64776f;line-height:1.8}.exam-item small{color:#64776f}.exam-item .toolbar{margin-top:18px;flex-wrap:wrap}.question-edit{border:1px solid #dce5df;border-radius:16px;padding:20px;margin:18px 0;background:#fff}.question-edit .card-top{gap:10px;justify-content:flex-start;flex-wrap:wrap}.question-edit h3{margin-inline-end:auto}.question-edit textarea{width:100%;box-sizing:border-box;resize:vertical;font:inherit;line-height:1.8}.option-edit{display:flex;align-items:center;gap:10px}.option-edit input[type=radio]{width:20px;height:20px;margin:0;accent-color:#196c55;flex:none}.option-edit input:not([type=radio]){flex:1;min-width:0}.question-options{margin-top:16px}.question-options label{margin-bottom:10px}#examEditor{margin-top:24px}#examEditor .toolbar{flex-wrap:wrap}#examEditor :disabled{opacity:1;background:#f6f8f5;color:#294d40}.code-confirm{padding:16px;background:#f3f7f1;border-radius:12px;margin-top:14px}.code-confirm input{direction:ltr;text-align:left}.code-confirm p{font-size:13px}#logoPreview{object-fit:contain;margin:15px}button:disabled{cursor:not-allowed}.exam-selector .outline{white-space:nowrap}
@media(max-width:800px){.exam-meta,.exam-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.exam-list{grid-template-columns:1fr}.exam-selector{align-items:stretch;flex-direction:column;gap:8px}.question-edit{padding:14px}.option-edit{gap:7px}}
@media(max-width:480px){.exam-meta,.exam-filters{grid-template-columns:1fr}.question-edit .card-top button{padding:8px 12px}.exam-item{padding:16px}}
#pdfPreview{border:0;border-radius:18px;padding:20px;width:min(1000px,94vw);max-width:94vw;height:90vh;box-sizing:border-box;color:#193d32}#pdfPreview::backdrop{background:#153d32aa}#pdfPreview .card-top{gap:12px;flex-wrap:wrap;margin-bottom:12px}#pdfFrame{width:100%;height:calc(100% - 90px);border:1px solid #dce5df;border-radius:10px}

.exam-meta select,.exam-filters select{display:block;box-sizing:border-box;width:100%;min-height:48px;border:1px solid #dce5df;border-radius:8px;background-color:#fafcf9;padding:10px 14px 10px 38px;font:inherit;color:#244c3f;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23196c55' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 12px center}
