:root{--ink:#163b43;--teal:#087e80;--dark:#103e44;--yellow:#f5c84c;--bg:#f2f6f8;--line:#d9e5e8;--muted:#566e77}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Arial,Helvetica,sans-serif;color:var(--ink);font-size:16px;line-height:1.5}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);background:#fff;color:var(--ink);padding:10px 16px;border-radius:10px;font-weight:600;min-height:44px}button:hover{border-color:var(--teal);background:#edf9f8}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #f0b524;outline-offset:3px}input,select,textarea{border:1px solid #a8bec4;border-radius:8px;padding:10px;background:white;color:var(--ink)}.top{height:82px;display:flex;justify-content:space-between;align-items:center;padding:12px 32px;background:white;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--dark);font-size:21px;font-weight:800;letter-spacing:.4px}.brand small{display:block;font-size:14px;letter-spacing:0;font-weight:400}.brandmark{display:grid;place-items:center;font-size:29px;background:var(--yellow);width:48px;height:48px;border-radius:14px 14px 14px 3px}.topright{display:flex;align-items:center;gap:20px}.save{font-size:14px;color:var(--muted)}#menuToggle{display:none}.layout{display:grid;grid-template-columns:280px minmax(0,1fr)}aside{background:var(--dark);color:white;padding:27px 16px;position:sticky;top:82px;height:calc(100dvh - 82px);overflow:auto}.sidehead{display:flex;justify-content:space-between;padding:0 12px 20px;font-size:14px;font-weight:700;letter-spacing:1px}.sidehead span:last-child{color:#bee0df;font-weight:400;letter-spacing:0}.topiclabel{color:#acd4d6;font-size:13px;letter-spacing:.5px;margin:22px 12px 8px;text-transform:uppercase}.tocbtn{width:100%;background:transparent;border:0;color:#e7f2f3;text-align:left;font-weight:400;padding:12px;display:flex;gap:12px;align-items:flex-start;font-size:15px;border-radius:9px}.tocbtn:hover{background:#24565c;color:white;border:0}.tocbtn.active{background:var(--yellow);color:#183f46;font-weight:700}.tocbtn b{width:30px;flex-shrink:0;opacity:.85}.sidenote{margin:30px 12px 0;border-top:1px solid #487075;padding-top:20px;color:#c2dadc;font-size:14px}.sidenote strong{font-weight:400;color:white}main{padding:24px 38px 32px;max-width:1550px;width:100%;margin:auto}.studybar{display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap}.profiles{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.profiles label{font-size:14px;font-weight:600}.profiles input{width:150px}.profiles button{font-size:14px}.timer{display:flex;gap:5px}.timer button{background:#e4eef0;border-color:transparent}.lessonhead{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:26px 0 18px}.eyebrow{font-size:13px;letter-spacing:1.3px;color:var(--teal);font-weight:700;margin:0 0 7px;text-transform:uppercase}h1{font-size:clamp(24px,2.6vw,36px);line-height:1.22;max-width:800px;margin:0 0 10px;font-weight:750}.muted{color:var(--muted);font-size:14px;margin:0}.scorebox{flex-shrink:0;background:#fff4c9;border:1px solid #e9cd6a;padding:12px 23px;border-radius:16px;text-align:center;min-width:94px}.scorebox span{font-size:34px;line-height:1.1;font-weight:800;display:block}.scorebox small{font-size:13px;display:block;margin-top:4px}.progress{height:6px;background:#dce8eb;border-radius:10px;overflow:hidden}.progress>div{height:100%;background:var(--teal);transition:width .2s}.lessonactions{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:12px 0}.lessonactions p{font-size:14px;color:var(--muted);margin:0}.lessonactions button{font-size:14px;padding:7px 12px}#questionNav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px}#questionNav button{width:43px;padding:5px;position:relative}#questionNav button.current{background:var(--teal);color:white;border-color:var(--teal)}#questionNav button.correct::after{content:'✓';position:absolute;top:-6px;right:-4px;background:#0b7859;border:2px solid var(--bg);color:white;font-size:11px;line-height:17px;width:20px;border-radius:100%}#questionNav button.pending{border-bottom:4px solid var(--yellow)}.question{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 5px 22px #183f4606}.questionhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;border-bottom:1px solid var(--line)}h2{margin:0;font-size:21px}.badge{font-size:13px;background:#e8f5f4;color:#126769;border-radius:20px;padding:5px 12px}.questiongrid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(285px,1fr)}.source{padding:20px;min-width:0}.answerpanel{padding:24px;background:#f8fbfc;border-left:1px solid var(--line);min-width:0}.answerpanel h3{margin:0 0 6px;font-size:19px}.hint{font-size:14px;color:var(--muted);margin:0 0 18px}.sheet{position:relative;width:100%;margin:0 0 12px;line-height:0}.sheet img{display:block;width:100%;height:auto}.sheet svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.sheet.drawing svg{pointer-events:auto;touch-action:none;cursor:crosshair}.annotationbar{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:12px;padding:8px;background:#eef4f6;border-radius:9px}.annotationbar button{font-size:13px;padding:7px 9px;min-height:37px}.annotationbar button.selected{background:var(--dark);color:white}.annotationbar input{width:100%;font-size:14px}.source details{font-size:14px;margin:12px 0}.source summary{cursor:pointer;color:var(--teal);font-weight:600;padding:8px 0}.plain{text-wrap:pretty;white-space:pre-wrap;font-size:16px;line-height:1.6}.options{display:grid;gap:10px;margin:16px 0}.choice{display:flex;gap:10px;align-items:flex-start;background:white;border:1px solid #cbdce1;padding:12px;border-radius:10px;cursor:pointer;font-size:16px}.choice:has(input:checked){border-color:var(--teal);background:#e7f6f4}.choice input{width:19px;height:19px;accent-color:var(--teal);flex-shrink:0;margin:3px 0}.answerrow{margin:12px 0}.answerrow>label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}.answerrow input,.answerrow select{width:100%}.tfr{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.tfr>span{flex:1}.tfr label{border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:white;cursor:pointer}.tfr input{accent-color:var(--teal)}.bank{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.bank button{font-size:14px;background:#fff6d8;border-color:#eed487;padding:7px 10px}.answerpanel textarea{width:100%;min-height:160px;resize:vertical;line-height:1.5}.primary{background:var(--teal);color:white;border-color:var(--teal)}.primary:hover{background:#086568;color:white}.check{width:100%;margin-top:18px}.feedback{border-radius:10px;padding:13px;margin-top:12px;font-size:15px;background:#eaf1f3}.feedback.good{background:#e1f4e9;color:#116043}.feedback.bad{background:#fff0e8;color:#904216}.feedback.wait{background:#fff7d8;color:#665219}.answeractions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:12px 0}.answeractions button{font-size:14px}.uploaded{max-width:100%;max-height:240px;object-fit:contain;border-radius:10px;margin:10px 0}.uploadlabel{display:block;font-size:14px;margin:16px 0 8px}.uploadinput{font-size:13px;width:100%;padding:8px}.reviewnote{font-size:14px;background:#fff5d4;padding:12px;border-radius:8px;margin:0 0 15px}.grading{font-size:14px;margin-top:15px}.grading summary{cursor:pointer}.grading button{font-size:14px;margin:8px 4px 0 0}.bottomnav{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:20px 0}.bottomnav span{font-size:14px;color:var(--muted)}footer{font-size:13px;color:var(--muted);max-width:830px;padding:12px 0}.refimages img{width:100%;margin:8px 0}.orderrow{display:flex;align-items:center;justify-content:space-between;background:white;border:1px solid var(--line);padding:8px 12px;margin:8px 0;border-radius:8px}.orderrow button{min-height:36px;padding:5px 10px}.orderrow[draggable]{cursor:grab}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#153e45;color:white;border-radius:10px;padding:12px 22px;max-width:90%;z-index:99;display:none}.toolhelp{font-size:13px;color:var(--muted);line-height:1.4;margin:0 0 12px}.statusline{font-size:13px;color:var(--muted)}
@media(min-width:1500px){main{padding:28px 48px}.source{padding:28px}.answerpanel{padding:28px}}
@media(max-width:1150px){.layout{grid-template-columns:235px minmax(0,1fr)}main{padding:20px}.questiongrid{grid-template-columns:1fr}.answerpanel{border-left:0;border-top:1px solid var(--line)}.source{max-width:840px;width:100%;margin:auto}.top{padding:12px 20px}}
@media(max-width:760px){.top{height:72px;padding:10px 14px}.brand{font-size:18px}.brandmark{width:40px;height:43px;font-size:25px}.brand small{font-size:12px}.save{display:none}#menuToggle{display:block;padding:8px 10px;font-size:14px}.layout{display:block}aside{display:none;position:fixed;top:72px;left:0;width:min(330px,90vw);height:calc(100dvh - 72px);z-index:19;box-shadow:10px 0 40px #0004}aside.open{display:block}main{padding:17px 12px}.studybar{gap:10px}.profiles{gap:6px}.profiles input{width:120px}.profiles select{max-width:93px}.profiles button{padding:8px}.timer button{min-height:37px;padding:6px 10px}.lessonhead{margin-top:20px;gap:10px}h1{font-size:25px}.eyebrow{font-size:12px}.scorebox{padding:10px 12px;min-width:67px}.scorebox span{font-size:27px}.lessonactions{align-items:flex-start}.lessonactions p{font-size:13px}.lessonactions button{white-space:nowrap}.questionhead{padding:15px}.badge{font-size:12px}.source,.answerpanel{padding:14px}.question{border-radius:12px}#questionNav{gap:6px}#questionNav button{width:39px}.bottomnav button{font-size:14px}.annotationbar{gap:4px}.questionhead h2{font-size:19px}}
.zoomlink{display:inline-block;font-size:13px;color:#087475;margin:0 0 16px}.question{scroll-margin-top:96px}

/* Student identity and encouraging feedback */
.teacher{font-size:13px;font-weight:800;color:#103e44}.topright{flex-wrap:wrap}.profiles{flex-wrap:wrap}.profiles label{font-size:13px;font-weight:700}.profiles #studentClass{width:100px}.lessonbuttons{display:flex;gap:8px;flex-wrap:wrap}.resetall{border-color:#c78865;color:#934020}.feedback.good{font-size:18px}.feedback.bad{background:#fff5dc;color:#755313;border-color:#ebcf82}
#celebration{position:fixed;inset:0;overflow:hidden;z-index:1000;pointer-events:none}.flyinglike{position:absolute;left:var(--x);bottom:-65px;font-size:var(--size);animation:like-rise 2.7s var(--delay) ease-out both;filter:drop-shadow(0 3px 3px #0002)}
@keyframes like-rise{0%{opacity:0;transform:translate(0,0) rotate(0)}12%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(var(--drift),-105vh) rotate(var(--turn))}}
@media(prefers-reduced-motion:reduce){.flyinglike{bottom:20%;animation:like-gentle 2s both}@keyframes like-gentle{0%,100%{opacity:0}20%,80%{opacity:1}}}
@media(max-width:640px){.teacher{font-size:11px}.lessonactions{flex-wrap:wrap}.lessonbuttons{width:100%}.profiles #studentName{max-width:100%;width:190px}.studybar{align-items:flex-start}}
