.study-shell{max-width:1200px}.study-overview{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:18px;background:#eaf3e6;border-radius:14px;margin-bottom:24px}.study-overview p{margin:0;flex:1 1 280px;font-weight:600}.study-overview a{text-decoration:none}.study-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px}.study-layout.revision-layout{grid-template-columns:minmax(0,1fr);max-width:820px;margin:auto}#lessonSidebar{align-self:start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}#lessonSidebar ol{list-style:none;padding:0}#lessonSidebar li{margin:9px 0}#lessonSidebar a{display:block;text-decoration:none;padding:12px;border-radius:9px;border:1px solid var(--line)}#lessonSidebar a[aria-current]{background:#edf5df;border-color:#699658}#lessonSidebar small{display:block;margin-top:6px;color:#496442}#lessonSidebar p{font-size:13px;color:#496442}.study-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:clamp(18px,3vw,32px);margin-bottom:22px}.study-card h2{font-size:25px;line-height:1.6;margin:6px 0 14px}.study-card h3{font-size:18px;line-height:1.7}.study-card p{line-height:1.95;font-size:16px}.study-goal{color:#41653c;padding-bottom:18px;border-bottom:1px solid var(--line)}.lesson-section{display:flex;gap:14px;margin:25px 0}.lesson-number{display:grid;place-items:center;align-self:start;flex:0 0 32px;height:32px;background:#edf5df;border-radius:50%;font-weight:bold}.lesson-section p{margin:8px 0}.study-example,.study-mistake{padding:18px;border-radius:12px;margin:20px 0;background:#eef6ec}.study-mistake{background:#fff7df}.study-example p,.study-mistake p{margin-bottom:0}.study-explore{display:block;margin:22px 0;font-weight:600}.study-question{padding:24px 0;border-bottom:1px solid var(--line);margin-bottom:18px}.study-choices{display:grid;gap:10px;margin-top:14px}.study-choices button{text-align:left;min-height:48px;padding:14px;background:white;border:1px solid #b9cabb;border-radius:9px;line-height:1.7}.study-choices button:disabled{opacity:1;cursor:default}.study-choices .correct{background:#e7f4df;border-color:#548246}.study-choices .wrong{background:#fff0e5;border-color:#a15e36}.study-feedback{color:#365939}.lesson-navigation{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:30px}.lesson-navigation a,.revision-empty a{text-decoration:none;display:inline-block;line-height:1.8}.revision-empty a{margin:8px 4px}.study-shell .intro h1{font-size:clamp(28px,4vw,36px)}#studyStorage:empty{display:none}@media(max-width:750px){.study-layout{grid-template-columns:minmax(0,1fr)}#lessonSidebar ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#lessonSidebar li{margin:0}.study-card p{font-size:15px}.lesson-section{gap:9px}.study-card h2{font-size:23px}}@media(max-width:380px){#lessonSidebar ol{grid-template-columns:1fr}.study-card h3{font-size:17px}.study-overview{padding:14px}}
#lessonDirectory{margin-top:16px}#lessonDirectory summary{cursor:pointer;line-height:1.7;font-weight:600}#lessonDirectory summary:focus-visible{outline:3px solid #dcaa3a;outline-offset:4px}.lesson-filter{display:grid;gap:8px;margin:16px 0}.lesson-filter input,.lesson-filter select{width:100%;min-width:0;padding:10px;border:1px solid #b9cabb;border-radius:8px;background:#fff;color:var(--ink)}.lesson-outline{display:grid;gap:10px;padding:18px;background:#f2f7ef;border-radius:12px}.lesson-outline a{line-height:1.7;text-decoration:none}.lesson-outline a:hover{text-decoration:underline}.lesson-section,#lessonQuiz{scroll-margin-top:18px}
@media(min-width:751px){#lessonSidebar{position:sticky;top:84px;max-height:calc(100vh - 100px);overflow-y:auto;overscroll-behavior:contain}}

.lesson-points{margin:10px 0 0;padding-left:22px;line-height:1.85}.lesson-points li{margin:3px 0}.lesson-section .table-scroll{margin-top:12px}.lesson-table{width:100%;border-collapse:collapse;font-size:14px;min-width:420px}.lesson-table th,.lesson-table td{padding:8px 10px;border:1px solid var(--line);text-align:left;vertical-align:top;line-height:1.6}.lesson-table th{background:#eaf3e6;font-weight:650}.lesson-table tbody tr:nth-child(even){background:#fafcf8}
.lesson-section>div{min-width:0;flex:1}
/* ICT reading aids: summary box, section reader and the animation player (ict-anim.js). */
.lesson-summary{background:#eaf3e6;border-left:5px solid var(--green);border-radius:12px;padding:14px 18px;margin:18px 0}.lesson-summary strong{display:block;margin-bottom:6px}.lesson-summary ul{margin:0;padding-left:20px;line-height:1.85;font-size:17px}
.study-card .lesson-section p,.study-card .lesson-section li{font-size:17px;line-height:1.95}
.section-reader{margin:18px 0 26px;padding:14px;border:1px dashed var(--line);border-radius:14px;background:#fafcf8}.reader-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.reader-count{font-weight:600;color:var(--muted)}.reader-dots{display:flex;gap:6px;justify-content:center;margin:10px 0}.reader-dots i,.anim-dots i{width:9px;height:9px;border-radius:50%;background:var(--line)}.reader-dots i.on,.anim-dots i.on{background:var(--green)}.reader-all{display:flex;gap:8px;align-items:center;justify-content:center;font-size:14px;color:var(--muted)}
.anim-player{border:2px solid var(--green);border-radius:16px;padding:14px;margin:20px 0;background:#fbfdf9}.anim-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}.anim-count{color:var(--muted);font-size:14px}
.anim-stage{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px;min-height:180px;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;overflow:hidden}.anim-stage>div{width:100%}.anim-stage:focus-visible{outline:3px solid #dcaa3a;outline-offset:2px}.anim-stage svg{width:100%;height:auto;max-height:340px}
.anim-caption{min-height:3.6em;margin:12px 2px;font-size:17px;line-height:1.8;font-weight:500}.anim-controls{display:flex;flex-wrap:wrap;gap:8px}.anim-controls button{flex:1 1 auto;min-width:80px}.anim-dots{display:flex;gap:6px;justify-content:center;margin-top:10px;flex-wrap:wrap}
.anim-node rect{fill:#f2f7f0;stroke:#9fb8ad;stroke-width:1.5;transition:fill .3s,stroke .3s}.anim-node text{text-anchor:middle;font-size:13px;fill:var(--ink)}.anim-node .anim-icon{font-size:18px}.anim-node.hi rect{fill:#d9f0e2;stroke:var(--green);stroke-width:3}.anim-node.hub rect{fill:#fff4d6;stroke:#c9a13a}.anim-node.broken rect{fill:#fde3e3;stroke:#c0392b;stroke-dasharray:4 3}
.anim-link{stroke:#9fb8ad;stroke-width:2.5}.anim-link.on{stroke:var(--green);stroke-width:4}.anim-link.broken{stroke:#c0392b;stroke-dasharray:6 5}.anim-link.backbone{stroke-width:5}.anim-link.fiber{stroke:#e0a100;stroke-width:16;opacity:.35}.anim-link.ray{stroke:#e0a100;stroke-width:2}
.anim-packet-label{text-anchor:middle;font-size:12px;font-weight:700;fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:3px}.anim-note{text-anchor:middle;font-size:13px;font-weight:600;fill:var(--muted)}.anim-note.ok{fill:var(--green)}.anim-note.fail{fill:#c0392b}
.anim-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;width:100%}.anim-card{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:4px;background:#fff;transition:border-color .3s,background .3s}.anim-card.hi{border:2px solid var(--green);background:#eaf6ee}.anim-card-icon{font-size:26px}.anim-card small{color:var(--muted);line-height:1.6}
.anim-table-wrap{width:100%;overflow-x:auto}.anim-top{font-family:ui-monospace,Consolas,monospace;background:#203c36;color:#e9f5ee;padding:8px 12px;border-radius:8px;margin:0 0 10px;white-space:pre-wrap;word-break:break-word}.anim-table{border-collapse:collapse;width:100%;font-size:15px}.anim-table th,.anim-table td{border:1px solid var(--line);padding:7px 10px;text-align:center;white-space:pre-line}.anim-table th{background:#f2f7f0}.anim-table .hi{background:#fff4c2;font-weight:700}.anim-table tr.hi td{background:#d9f0e2}.anim-table tr.dim td{opacity:.3;text-decoration:line-through}.anim-result{margin:10px 0 0;font-weight:700;color:var(--green);text-align:center;font-size:17px}
.anim-code,.anim-html{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:10px;width:100%}.anim-code pre,.anim-html pre{margin:0;background:#1f2b28;color:#d8e6df;padding:10px;border-radius:8px;font-size:13px;line-height:1.7;overflow-x:auto}.anim-code pre span,.anim-html pre span{display:block;padding:0 4px;border-radius:4px}.anim-code pre .current,.anim-html pre .current{background:#dcaa3a;color:#1f2b28}.anim-state{display:grid;gap:6px;align-content:start;font-size:14px}.anim-state dl{margin:0;display:grid;gap:4px}.anim-state dl div{display:flex;justify-content:space-between;gap:8px;border:1px solid var(--line);border-radius:6px;padding:3px 8px}.anim-state dl div.changed{background:#fff4c2;border-color:#dcaa3a}.anim-state dt{font-family:ui-monospace,Consolas,monospace}.anim-state dd{margin:0;font-weight:700}.anim-state p{margin:0;color:var(--muted)}.anim-out{background:#f2f7f0!important;color:var(--ink)!important;min-height:2.4em;white-space:pre-wrap}.anim-html iframe{width:100%;min-height:220px;border:1px solid var(--line);border-radius:8px;background:#fff}
.anim-stage .new{animation:anim-in .45s ease-out}@keyframes anim-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-width:640px){.anim-code,.anim-html{grid-template-columns:1fr}.anim-controls button{min-width:0;padding-inline:8px}}
@media (prefers-reduced-motion:reduce){.anim-stage .new{animation:none}}
.anim-type-circuit svg{background:#f4faf6;border-radius:10px}.anim-stage .gate-wire{fill:none;stroke-width:4}.anim-stage .gate-wire.signal-low{stroke:#7a8580}.anim-stage .gate-wire.signal-high{stroke:#18765c}.anim-stage .gate-symbol{fill:#fff;stroke:#203c36;stroke-width:3}.anim-stage .gate-extra{fill:none;stroke:#203c36;stroke-width:3}.anim-stage .gate-lamp{stroke:#203c36;stroke-width:2}.anim-stage .gate-lamp.signal-high{fill:#82db9a}.anim-stage .gate-lamp.signal-low{fill:#d7ded9}.anim-type-circuit text{fill:#203c36;font-size:14px}.anim-stage .gate-label{font-weight:bold;font-size:17px}.anim-stage .gate-mini-label{font-size:10px;font-weight:700}.anim-stage .signal-label{font-size:11px;fill:#41653c}.anim-stage .junction{stroke:none}.anim-stage .junction.signal-high{fill:#18765c}.anim-stage .junction.signal-low{fill:#7a8580}
/* scene template */
.sc-ring{stroke-width:1.5;stroke-dasharray:4 4}.sc-line{stroke-width:2;stroke-dasharray:5 5}.sc-path{stroke-width:3}.sc-path.dashed{stroke-dasharray:7 6;stroke-width:2.5}.sc-path.thin{stroke-width:1.5}.sc-arrow{stroke-width:3.5}.sc-rect,.sc-circle{stroke:rgba(0,0,0,.15);stroke-width:1}.sc-circle.hi,.sc-rect.hi,.sc-ring.hi{stroke:#dcaa3a;stroke-width:4}.sc-label{text-anchor:middle;font-weight:600;paint-order:stroke;stroke:rgba(255,255,255,.0)}.sc-text.hi,.anim-stage text.hi{font-weight:800}
.sc-art{transition:filter .3s}.sc-art.hi{filter:drop-shadow(0 0 2px #dcaa3a) drop-shadow(0 0 5px #dcaa3a)}
.sc-move{animation:sc-move .9s ease-in-out both}@keyframes sc-move{from{transform:translate(var(--dx),var(--dy))}to{transform:none}}.sc-fade{animation:anim-in .5s ease-out both}
@media (prefers-reduced-motion:reduce){.sc-move,.sc-fade{animation:none}}
/* A lesson section's own 2D figure (ICT) and its extra detail. */
.section-figure{margin:16px 0 8px}
.section-figure-stage{min-height:0;max-width:560px;margin:0 auto}
.section-figure figcaption{text-align:center;font-size:13px;color:#5d6f69;margin-top:6px;line-height:1.7}
.section-more{background:#f4f8f4;border-left:4px solid #9fcfb3;border-radius:0 10px 10px 0;padding:10px 14px;line-height:1.9}
/* Kids lessons: bigger type, rounder cards, warmer accents */
.kids-mode .study-card{border-radius:24px;border-color:#f1c9a6}.kids-mode .study-card h2{font-size:28px}.kids-mode .study-card p,.kids-mode .lesson-section p{font-size:18px;line-height:2}.kids-mode .lesson-number{background:#ffe2c6}.kids-mode .study-goal{color:#9a4a1c}.kids-mode .study-example{background:#fff4e0}.kids-mode .study-choices button{min-height:56px;font-size:17px;border-radius:16px}.kids-mode .study-choices .correct{background:#e3f6d8}.kids-mode #lessonSidebar a[aria-current]{background:#fff1e3;border-color:#c2602a}
/* Worked solutions (higher math): steps open one at a time */
.study-solution{padding:18px;border-radius:12px;margin:20px 0;background:#eef3fb;border-left:4px solid #2d6fb3}.study-solution .solution-problem{font-weight:600}.solution-steps{padding-left:1.4em;margin:12px 0}.solution-steps li{margin:8px 0;line-height:1.9;font-size:16px}.solution-hint{font-size:14px;color:#41566b}.solution-controls{display:flex;flex-wrap:wrap;gap:10px}

@media (min-width:1200px){.study-shell{max-width:1360px}}
/* Model test (/exam) */
.exam-form{display:grid;gap:18px;margin-top:14px}
.exam-field{display:grid;gap:6px;font-weight:600;max-width:520px}.exam-field select{padding:10px;font-size:15px;border-radius:10px}
.exam-sizes{border:0;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.exam-sizes legend{font-weight:600;margin-bottom:8px}
.exam-sizes label{position:relative;cursor:pointer}.exam-sizes input{position:absolute;opacity:0;inset:0}
.exam-sizes label>span{display:grid;gap:2px;padding:12px 14px;border:2px solid var(--line);border-radius:12px;background:#fff}
.exam-sizes b{font-size:16px}.exam-sizes small{color:#5d6f69;font-size:13px}
.exam-sizes input:checked+span{border-color:var(--green);background:#eaf3e6}.exam-sizes input:focus-visible+span{outline:3px solid #dcaa3a;outline-offset:2px}
.exam-rules{margin:0;padding-left:20px;color:#4d5f58;line-height:1.9}.exam-form .primary{justify-self:start;font-size:15px;padding:12px 20px}
.exam-note:empty{display:none}.exam-note{color:#a4452c;font-weight:600}
.exam-bar{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 14px;margin-bottom:14px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 14px #18765c14}
.exam-clock{font-size:20px;font-weight:700;color:var(--green);font-variant-numeric:tabular-nums}.exam-clock-low{color:#b5442a;animation:exam-pulse 1s infinite}
@keyframes exam-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.exam-clock-low{animation:none}}
.exam-answered{color:#4d5f58;font-size:14px}.exam-bar .primary{margin-left:auto}
.exam-list{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:14px}
.exam-q{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fcfdfa}
.exam-q h3{font-size:16px;line-height:1.7;margin:0 0 10px;font-weight:600}.exam-qno{color:var(--green)}
.exam-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:8px}
.exam-choice{display:flex;align-items:flex-start;gap:10px;text-align:left;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;background:#fff;font-size:15px;line-height:1.6}
.exam-choice b{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1.5px solid #9fb8ad;font-size:13px}
.exam-choice:hover{border-color:#8bb390}
.exam-choice[aria-checked="true"]{border-color:var(--green);background:#eaf3e6}.exam-choice[aria-checked="true"] b{background:var(--green);border-color:var(--green);color:#fff}
.exam-submit-end{margin-top:18px;font-size:15px;padding:12px 22px}
.exam-score{display:flex;align-items:center;gap:18px;margin:10px 0 6px}.exam-score h2{font-size:30px;margin:0}.exam-score p{margin:4px 0 0;color:#4d5f58}
.exam-grade{flex:none;display:grid;place-items:center;width:84px;height:84px;border-radius:50%;background:var(--green);color:#fff;font:700 28px "Segoe UI",sans-serif}
.exam-grade[data-grade="B"],.exam-grade[data-grade="C"]{background:#c28a1c}.exam-grade[data-grade="D"],.exam-grade[data-grade="F"]{background:#b5442a}
.exam-tally{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.exam-tally li{display:grid;gap:2px;padding:10px;border-radius:10px;background:#f3f6f1;text-align:center;font-size:13px;color:#4d5f58}.exam-tally b{font-size:20px;color:var(--ink)}
.exam-tally .is-right b{color:var(--green)}.exam-tally .is-wrong b{color:#b5442a}
.exam-actions{display:flex;flex-wrap:wrap;gap:10px}.exam-actions a{text-decoration:none}
.exam-review-title{margin:26px 0 10px;font-size:18px}
.exam-review{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.exam-review li{padding:14px 16px;border-radius:12px;border:1px solid var(--line);border-left:5px solid #9fb8ad;background:#fff}
.exam-review li.is-right{border-left-color:var(--green)}.exam-review li.is-wrong{border-left-color:#b5442a}
.exam-review h4{margin:0 0 6px;font-size:15px;line-height:1.7}.exam-review p{margin:4px 0;font-size:14px;line-height:1.7}
.exam-review .is-wrong .exam-yours{color:#a4452c}.exam-correct{color:var(--green);font-weight:600}.exam-explain{color:#4d5f58}
@media(max-width:600px){.exam-tally{grid-template-columns:repeat(2,minmax(0,1fr))}.exam-score{gap:12px}.exam-grade{width:64px;height:64px;font-size:22px}.exam-bar{gap:8px}.exam-clock{font-size:18px}}
.exam-form .exam-actions{margin-top:4px}
.note-print{margin-top:12px}
/* Formula & flashcards (/cards) */
.cards-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin:12px 0}
.cards-source{display:inline-flex;border:1px solid #b9cbc3;border-radius:999px;overflow:hidden}
.cards-source button{border:0;background:#fff;padding:8px 14px;font:inherit;cursor:pointer;color:inherit}
.cards-source button[aria-pressed="true"]{background:#18765c;color:#fff}
.cards-boxes{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 12px;padding:0}
.cards-boxes li{display:grid;text-align:center;padding:8px;border-radius:12px;background:#f1f7f4;font-size:.85rem;color:#5d6f69}
.cards-boxes b{font-size:1.3rem;color:#173b33}
.cards-count{margin:0 0 6px;color:#5d6f69;font-size:.9rem}
.flashcard{display:grid;place-items:center;width:100%;min-height:220px;padding:24px;border:2px solid #cfe0d8;border-radius:20px;background:linear-gradient(160deg,#fff,#f3faf6);font:inherit;color:inherit;cursor:pointer;text-align:center;box-shadow:0 8px 22px rgba(23,59,51,.08);transition:transform .2s,border-color .2s}
.flashcard:hover{transform:translateY(-2px)}.flashcard.is-flipped{border-color:#dcaa3a;background:linear-gradient(160deg,#fffdf3,#fff7dc)}
.flash-front,.flash-back{display:grid;gap:10px;justify-items:center}
.flash-front b,.flash-back b{font-size:1.35rem;line-height:1.5}
.flashcard small{color:#5d6f69}.flashcard em{font-style:normal;font-size:.9rem;color:#5d6f69}
.cards-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 8px}
.cards-lesson{font-size:.9rem}
.cards-done{padding:18px;border-radius:14px;background:#f1f7f4;text-align:center}
.formula-list{display:grid;gap:8px;margin:12px 0 0}
.formula-list>div{display:grid;grid-template-columns:minmax(120px,1fr) 2fr;gap:10px;padding:10px 12px;border:1px solid #d9e5df;border-radius:12px;background:#fff}
.formula-list dt{font-weight:600}.formula-list dd{margin:0;display:grid;gap:3px}.formula-list small{color:#5d6f69}.formula-list a{font-size:.85rem}
@media (max-width:560px){.formula-list>div{grid-template-columns:1fr}.flashcard{min-height:180px}}
/* Creative questions (/cq) */
.cq-list{list-style:none;display:grid;gap:8px;margin:14px 0;padding:0}
.cq-list a{display:grid;gap:2px;padding:12px 14px;border:1px solid #d9e5df;border-radius:12px;background:#fff;text-decoration:none;color:inherit}
.cq-list a:hover{border-color:#18765c}.cq-list span,.cq-list small{color:#5d6f69;font-size:.9rem}
.cq-stem{margin:12px 0;padding:14px 16px;border-left:4px solid #18765c;border-radius:10px;background:#f1f7f4;line-height:1.7}
.cq-parts{list-style:none;display:grid;gap:12px;margin:0 0 12px;padding:0}
.cq-parts>li{padding:12px 14px;border:1px solid #d9e5df;border-radius:12px;background:#fff}
.cq-parts h3{margin:0 0 8px;font-size:1rem;line-height:1.6}.cq-parts h3 small{color:#5d6f69;font-weight:400}
.cq-letter{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:4px;border-radius:50%;background:#18765c;color:#fff;font-size:.9rem}
.cq-parts summary{cursor:pointer;color:#18765c;font-weight:600}.cq-parts details p{white-space:pre-line;line-height:1.7}
.cq-mark{display:flex;flex-wrap:wrap;gap:12px;border:1px dashed #b9cbc3;border-radius:10px;padding:8px 12px}.cq-mark legend{font-size:.9rem;color:#5d6f69}
.cq-score{font-weight:600;color:#18765c}.cq-others{font-size:.9rem;color:#5d6f69}
/* Progress (/progress) */
.progress-totals{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:0 0 16px;padding:0}
.progress-totals li{display:grid;text-align:center;padding:10px;border-radius:12px;background:#f1f7f4;font-size:.85rem;color:#5d6f69}
.progress-totals b{font-size:1.25rem;color:#173b33}
.progress-weak{list-style:none;display:grid;gap:10px;padding:0;margin:0 0 16px}
.progress-weak li{display:grid;gap:4px;padding:12px 14px;border:1px solid #f0c3a8;border-left:4px solid #c0532a;border-radius:12px;background:#fff7f2}
.progress-weak span{color:#5d6f69;font-size:.9rem}.progress-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.progress-links a{text-decoration:none}
.progress-actions{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 14px}.progress-actions a{text-decoration:none}
.progress-good{padding:12px 14px;border-radius:12px;background:#eef6ec}
.progress-list{list-style:none;display:grid;gap:8px;padding:0;margin:0 0 12px}
.progress-list li{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(90px,1fr);gap:4px 12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.progress-list a{text-decoration:none;font-weight:600}.progress-list small{grid-column:1/-1;color:#5d6f69}
.progress-bar{height:10px;border-radius:99px;background:#e6ece9;overflow:hidden}.progress-bar i{display:block;height:100%;border-radius:99px}
.progress-list .is-good i{background:#2f8a4e}.progress-list .is-fair i{background:#d6a12c}.progress-list .is-weak i{background:#c0532a}.progress-list .is-none i{background:#c7d0cc}
/* Bookmarks and notes */
.lesson-title-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.lesson-title-row h2{margin-bottom:6px}.lesson-save{white-space:nowrap}.lesson-save[aria-pressed="true"]{background:#fff6d8;border-color:#dcaa3a}
.lesson-note{display:grid;gap:6px;margin:18px 0 0;padding:14px;border-radius:12px;background:#fffdf3;border:1px dashed #dcc98a}
.lesson-note small{color:#5d6f69;font-weight:400}
.lesson-note textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid #c9d6c4;border-radius:10px;font:inherit;line-height:1.7;resize:vertical}
.question-save{margin-top:8px;padding:5px 12px;border:1px solid #d9cfa6;border-radius:999px;background:#fff;font:inherit;font-size:.9rem;cursor:pointer}
.question-save[aria-pressed="true"]{background:#fff6d8;border-color:#dcaa3a}
.saved-list{list-style:none;display:grid;gap:10px;padding:0;margin:0 0 18px}
.saved-list li{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.saved-list li>a{display:grid;text-decoration:none}.saved-list small{color:#5d6f69}.saved-list p{margin:0;font-size:15px}
.saved-note{white-space:pre-line;padding:8px 10px;border-radius:8px;background:#fffdf3}
.saved-list button{justify-self:start;padding:4px 12px}
@media (max-width:560px){.progress-list li{grid-template-columns:1fr}}
/* Kids: robot coding game (kids-robot.js) and the sticker card after a finished lesson */
.robot-game{margin:18px 0;padding:20px;border:2px solid #f1c9a6;border-radius:24px;background:#fffaf3}
.robot-game:focus{outline:none}.robot-game:focus-visible{outline:3px solid #c2602a;outline-offset:3px}
.robot-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.robot-head h3{margin:0;font-size:22px;color:#9a4a1c}
.robot-level{padding:4px 12px;border-radius:999px;background:#ffe2c6;font-weight:700}
.robot-hint{font-size:17px}
.robot-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;max-width:320px;margin:0 auto 14px}
.robot-cell{aspect-ratio:1;display:grid;place-items:center;border-radius:12px;background:#e3ece8;font-size:clamp(22px,7vw,34px);transition:background .2s}
.robot-cell.trail{background:#d8ecd0}.robot-cell.wall{background:#d9c7b5}
.robot-label{margin:6px 0;font-weight:700}.robot-label small{font-weight:400;color:var(--muted)}
.robot-program{list-style:none;margin:0 0 12px;padding:10px;min-height:52px;display:flex;flex-wrap:wrap;gap:6px;border:1px dashed #c9b49c;border-radius:14px;background:#fff}
.robot-program li{display:flex;align-items:center;gap:4px;padding:4px 8px;border-radius:10px;background:#f6e7d3;font-size:22px}
.robot-program .robot-empty{background:none;font-size:15px;color:var(--muted)}
.robot-program .robot-block{background:#dbe8f3;border:2px solid #2f6f9f}.robot-program .robot-block.open{border-style:dashed}
.robot-block button{border:0;border-radius:8px;padding:4px 8px;background:#2f6f9f;color:#fff;font-size:14px}
.robot-pad{display:flex;flex-wrap:wrap;gap:8px}
.robot-pad button{min-width:56px;min-height:52px;border:1px solid #e0c3a3;border-radius:14px;background:#fff;font-size:22px}
.robot-pad .robot-loop{font-size:16px}.robot-pad .robot-loop[aria-pressed="true"]{background:#dbe8f3;border-color:#2f6f9f}
.robot-pad .robot-run{font-size:17px;margin-left:auto}
.robot-msg{min-height:1.6em;font-size:17px;font-weight:700}.robot-msg[data-result="goal"]{color:#18765c}.robot-msg[data-result="wall"],.robot-msg[data-result="edge"]{color:#c0392b}
.robot-msg button{margin-left:6px}
.robot-levels{display:flex;flex-wrap:wrap;gap:6px}.robot-levels button{min-width:40px;min-height:40px;border:1px solid var(--line);border-radius:50%;background:#fff}
.robot-levels button[aria-current="true"]{border:2px solid #c2602a;background:#ffe2c6}.robot-levels button:disabled{opacity:.4;cursor:not-allowed}
.sticker-won{display:flex;align-items:center;gap:16px;margin:16px 0;padding:16px 18px;border:2px solid #dcaa3a;border-radius:20px;background:#fff6d8}
.sticker-won-emoji{font-size:54px;animation:sticker-pop .6s ease-out}.sticker-won p{margin:4px 0}
@keyframes sticker-pop{0%{transform:scale(.2) rotate(-20deg)}70%{transform:scale(1.2) rotate(6deg)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.sticker-won-emoji{animation:none}.robot-cell{transition:none}}
@media(max-width:520px){.robot-pad .robot-run{margin-left:0;flex-basis:100%}}
/* Learn page polish: the sticky sidebar and section jumps clear the sticky header (--header-h from study.js),
   the streak card sits beside the progress line, and the section reader stays on one row on phones. */
@media(min-width:751px){#lessonSidebar{top:calc(var(--header-h,113px) + 14px);max-height:calc(100vh - var(--header-h,113px) - 28px)}}
.lesson-section,#lessonQuiz,#lessonAnim,.lesson-outline{scroll-margin-top:calc(var(--header-h,72px) + 16px)}
.study-overview{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:stretch}
.study-overview>.streak-card{background:#fff}
.study-overview-main{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px}
.study-overview-main p{flex:1 1 100%}
@media(min-width:900px){.study-overview{grid-template-columns:minmax(260px,330px) minmax(0,1fr)}}
#lessonSidebar h2{margin-top:0}
.study-card .lesson-title-row h2{line-height:1.35}
@media(max-width:600px){
 .study-overview{padding:14px}
 .lesson-section{position:relative;display:block;margin:20px 0}
 .lesson-number{position:absolute;top:0;left:0;width:32px}
 .lesson-section>div>h3{margin-top:0;min-height:32px;padding-left:42px;display:flex;align-items:center}
 .reader-row{flex-wrap:nowrap}.reader-row button{padding:8px 12px;font-size:14px;white-space:nowrap}
 .reader-count{font-size:13px;text-align:center}
 .lesson-title-row{flex-wrap:wrap}
}
/* Kids: the match game (kids-match.js) and the worksheet button */
.match-game{margin:18px 0;padding:20px;border:2px solid #f1c9a6;border-radius:24px;background:#fffaf3}
.match-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.match-head h3{margin:0;font-size:22px;color:#9a4a1c}
.match-help{font-size:16px;color:var(--muted)}
.match-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.match-col{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.match-col button{width:100%;min-height:56px;padding:10px 12px;border:2px solid #e0c3a3;border-radius:16px;background:#fff;font-size:17px;line-height:1.4;text-align:center;color:var(--ink)}
.match-col button[aria-pressed="true"]{border-color:#2f6f9f;background:#dbe8f3;box-shadow:0 0 0 3px #2f6f9f33}
.match-col button.matched{border-color:#18765c;background:#e3f6d8;color:#18765c;cursor:default}
.match-col button.wrong{border-color:#c0392b;background:#fbe4e1;animation:match-shake .4s}
.match-msg{min-height:1.6em;margin:12px 0 0;font-size:17px;font-weight:700}.match-game.is-done .match-msg{color:#18765c}
@keyframes match-shake{25%{transform:translateX(-5px)}50%{transform:translateX(5px)}75%{transform:translateX(-3px)}}
@media(prefers-reduced-motion:reduce){.match-col button.wrong{animation:none}}
@media(max-width:520px){.match-col button{font-size:15px;min-height:52px;padding:8px}}
/* /cards: today's due count and the switch to every card */
.cards-due{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:0 0 12px;padding:10px 14px;border-radius:12px;background:#fff6d8}
.cards-due .link-button{border:0;background:none;padding:0;color:var(--green);text-decoration:underline;font:inherit;cursor:pointer}
