@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{--blue:#224de3;--ink:#202d43;--muted:#687387;--line:#e6eaf0;--soft:#f4f7fc;--green:#24765c;--sidebar:280px;font-family:'DM Sans',system-ui,sans-serif;color:var(--ink);background:#fff;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}a{color:var(--blue)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #758ff7;outline-offset:4px}button:disabled{cursor:not-allowed;opacity:.45}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand{font-family:'Manrope',system-ui,sans-serif}h1{font-size:clamp(1.8rem,3vw,2.65rem);line-height:1.18;letter-spacing:-1.2px;font-weight:800;margin:16px 0}h2{font-size:1.25rem;line-height:1.45;letter-spacing:-.4px}h3{font-size:1.05rem}p{line-height:1.8;margin-bottom:18px}button{border:0;background:none}code,pre,.math{font-family:'SFMono-Regular',Consolas,'Liberation Mono',monospace}code{font-size:.88em;background:#f0f3f8;padding:3px 6px;border-radius:4px;overflow-wrap:anywhere}pre{padding:22px;border-radius:12px;background:#17263d;color:#f2f6ff;font-size:15px;line-height:1.8;overflow:auto}pre code{padding:0;background:none;color:inherit;white-space:pre;overflow-wrap:normal}svg{max-width:100%}.topbar{height:84px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;background:#fff;position:relative;z-index:3}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);font-size:1.45rem;font-weight:800;letter-spacing:-.6px}.brandmark{width:37px;height:37px;border-radius:11px;display:block;object-fit:contain;flex-shrink:0}.brandlabel{font-family:'DM Sans',sans-serif;font-size:10px;font-weight:600;letter-spacing:1.4px;color:#7c8596;margin-left:20px;border-left:1px solid var(--line);padding-left:24px}.top-actions{display:flex;align-items:center;gap:28px}.text-button{font-size:.875rem;font-weight:600;padding:10px 0}.text-button span{margin-left:10px}.avatar{border:1px solid #dde4ef;border-radius:50%;height:38px;width:38px;font-size:12px;display:grid;place-items:center;background:#f7f9fc}.shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:calc(100vh - 84px)}.sidebar{background:#f9faff;border-right:1px solid var(--line);padding:24px 20px;display:flex;flex-direction:column}.course-label{font-size:11px;font-weight:700;letter-spacing:1.65px;color:var(--muted);margin:0 8px 13px}.sidebar h2{font-size:1.1rem;margin:0 8px 4px}.sidebar>p{font-size:12px;margin:0 8px 20px}.small{font-size:.875rem}.muted{color:var(--muted)}.progress-label{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin:0 0 8px;font-variant-numeric:tabular-nums}.progress-track{height:5px;background:#e5eaf3;border-radius:6px;overflow:hidden}.progress-fill{height:100%;background:var(--blue);border-radius:6px;transition:width .3s}#course-progress{padding:0 8px 16px;margin-bottom:12px;border-bottom:1px solid var(--line)}.unit-nav{margin-bottom:4px}.unit-toggle{width:100%;display:flex;align-items:center;text-align:left;gap:10px;padding:10px 8px;border-radius:8px;font-size:13px;line-height:1.45;font-weight:600;min-height:44px}@media(hover:hover) and (pointer:fine){.unit-toggle:hover{background:#eef2fb}}.unit-icon{font-size:20px;min-width:24px;text-align:center}.unit-toggle .chevron{margin-left:auto;font-size:12px;color:#7c879a}.unit-lessons{margin:2px 0 8px 20px;border-left:1px solid #dfe5f1;padding-left:8px}.lesson-link{display:flex;align-items:center;text-decoration:none;color:#667187;padding:8px 10px;font-size:13px;font-weight:500;line-height:1.45;gap:8px;border-radius:6px;min-height:44px}.lesson-link.active{background:#e8eefd;color:var(--blue)}.lesson-dot{width:14px;height:14px;flex-shrink:0;border-radius:50%;border:1px solid #c9d2e4;display:grid;place-items:center;font-size:10px}.active .lesson-dot{border:4px solid var(--blue)}.lesson-dot.done{background:#e0f0e9;color:var(--green);border:0}.sidebar-footer{margin-top:auto;padding:24px 8px 0;display:flex;gap:12px;font-size:12px;line-height:1.7}.sun{font-size:29px;color:#e2a647}#main{padding:34px clamp(24px,4vw,70px) 60px;max-width:1450px;width:100%;outline:none}.breadcrumb{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin-bottom:28px}.breadcrumb span:last-child{color:#34435b}.lesson-heading{max-width:850px}.eyebrow{display:flex;align-items:center;gap:14px;font-size:11px;letter-spacing:1px;font-weight:700;color:var(--blue);text-transform:uppercase}.time{font-weight:400;letter-spacing:0;color:var(--muted);text-transform:none;display:flex;align-items:center;gap:5px}.lesson-intro{font-size:16px;color:var(--muted);max-width:640px;line-height:1.75;margin-bottom:24px}.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin:8px 0 32px}.tab{padding:13px 1px 16px;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;display:flex;align-items:center;gap:8px}.tab.active{border-color:var(--blue);color:var(--blue);font-weight:700}.tab-count{font-size:11px;background:#edf1f8;padding:2px 6px;border-radius:5px}.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:40px}.lesson-body{max-width:770px;min-width:0}.lesson-body h2{margin:32px 0 13px}.lesson-body h2:first-child{margin-top:0}.lesson-body p{font-size:15px;color:#4d5b70}.type-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0 30px}.type-grid>div{background:#f7f9fc;border:1px solid var(--line);border-radius:10px;padding:16px 10px;text-align:center}.type-grid code{font-size:17px;color:var(--blue);background:none;padding:0}.type-grid span{display:block;font-size:11px;color:var(--muted);margin-top:9px}.lesson-rail{border-left:1px solid var(--line);padding-left:25px}.rail-title{font-size:11px;letter-spacing:1px;font-weight:700;color:var(--muted);margin-bottom:18px}.rail-list{padding:0;margin:0 0 28px;list-style:none}.rail-list li{font-size:13px;margin:14px 0;display:flex;gap:10px;color:var(--muted)}.rail-list span{font-size:11px;color:#a1aabd}.takeaway{background:#f3f6ff;padding:20px 16px;border-radius:12px}.takeaway .bulb{display:block;font-size:23px;color:var(--blue);margin-bottom:13px}.takeaway h3{font-size:14px;margin-bottom:9px}.takeaway p{font-size:13px;color:#63718b;line-height:1.8;margin:0}.source-ref{font-size:11px;line-height:1.7;color:#7a8494;margin-top:22px}.source-ref a{color:inherit}.visual{margin:26px 0;background:#f6f8ff;border:1px solid #e5eafa;border-radius:14px;padding:22px}.visual-label{font-size:10px;letter-spacing:1.5px;color:#7180a4;font-weight:700;margin-bottom:17px}.visual small{display:block;font-size:12px;line-height:1.65;color:var(--muted)}.trace-labels{display:flex;justify-content:center;gap:24px;align-items:center;padding:9px 0 25px}.variable{background:white;border:1px solid #d5def5;border-radius:8px;padding:12px 20px;color:#385da6;font-family:monospace}.value-object{font-size:27px;background:#e5ecff;color:var(--blue);border-radius:50%;width:68px;height:68px;display:grid;place-items:center}.trace-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #e0e7f7;padding-top:17px}.trace-bottom p{font-size:13px;margin:0}.secondary{border:1px solid #d7dfee;border-radius:7px;background:#fff;padding:9px 14px;font-size:13px;font-weight:600;white-space:nowrap}.primary{background:var(--blue);color:white;border-radius:8px;padding:13px 21px;font-size:14px;font-weight:600;min-height:45px}.primary:hover{background:#1639b7}.secondary:hover{background:#f1f5ff}.worked{border:1px solid var(--line);border-radius:12px;padding:24px;margin:30px 0}.worked-header{font-size:11px;text-transform:uppercase;letter-spacing:1.2px;color:var(--green);font-weight:700;margin-bottom:10px}.worked h3{font-size:18px;margin:0 0 13px}.worked ol{padding:0;list-style:none;counter-reset:steps}.worked>ol>li{counter-increment:steps;display:block;position:relative;padding-inline-start:36px;font-size:14px;line-height:1.95;margin:12px 0;color:#58657a}.worked>ol>li::before{content:counter(steps);position:absolute;inset-inline-start:0;top:2px;display:grid;place-items:center;background:#edf6f2;color:var(--green);border-radius:50%;width:24px;height:24px;font-size:12px;line-height:1}.note{border-left:3px solid #e1b057;padding:5px 0 5px 17px;margin:30px 0}.note strong{font-size:13px;display:block;margin-bottom:5px}.note p{font-size:13px;margin:0}.formula{background:#f3f6fc;border-radius:8px;padding:19px;text-align:center;font-family:Georgia,serif;font-size:21px;line-height:1.65;margin:22px 0;overflow-wrap:anywhere}.lesson-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-top:25px;margin-top:30px;border-top:1px solid var(--line)}.lesson-footer p{margin:0;font-size:13px}.practice-panel{max-width:750px}.practice-head{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:13px}.question-progress{display:flex;gap:6px;margin-bottom:28px}.question-progress span{height:5px;flex:1;background:#e8edf7;border-radius:5px}.question-progress .done{background:#369472}.question-progress .current{background:var(--blue)}.question-card{border:1px solid #dde4f0;border-radius:15px;padding:30px}.question-card h2{font-size:20px;line-height:1.6;margin:10px 0 22px}.question-tag{color:var(--blue);font-size:10px;font-weight:700;letter-spacing:1.4px}.choices{display:grid;gap:10px;margin:22px 0}.choice{padding:16px;text-align:left;border:1px solid #dfe5ee;border-radius:9px;font-size:15px;display:flex;gap:13px;align-items:center;min-height:54px}.choice:hover{background:#f7f9ff;border-color:#afbee8}.choice.selected{background:#eef3ff;border-color:var(--blue);color:var(--blue)}.choice-letter{border:1px solid #d4dce9;border-radius:6px;width:27px;height:27px;display:grid;place-items:center;flex-shrink:0;font-size:12px}.answer-label{font-size:14px;display:block;margin:10px 0}.answer-input{border:1px solid #becbe2;border-radius:8px;padding:14px;width:100%;max-width:330px;background:#fff;font-size:18px}.practice-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:27px;flex-wrap:wrap}.hint-button{font-size:14px;color:#6e5b28;text-decoration:underline;text-underline-offset:3px}.feedback{border-radius:10px;padding:19px;margin-top:20px;font-size:14px;line-height:1.75}.feedback.success{background:#edf8f1;color:#23624b}.feedback.retry{background:#fff7e7;color:#785623}.feedback strong{display:block;font-size:15px;margin-bottom:4px}.hint{background:#fff9ed;padding:15px 18px;border-left:3px solid #e6c168;margin-top:13px;font-size:14px;line-height:1.8}.solution{margin-top:18px;font-size:13px}.practice-note{font-size:12px;color:var(--muted);margin-top:18px;line-height:1.7}.summary{text-align:center;padding:45px 30px;border:1px solid var(--line);border-radius:15px}.summary-icon{font-size:32px;color:var(--green);background:#e9f5ed;border-radius:50%;width:70px;height:70px;display:grid;place-items:center;margin:0 auto 20px}.summary p{color:var(--muted)}.summary-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.range-row{display:flex;gap:16px;align-items:center;margin:16px 0;font-size:13px}.range-row label{min-width:45px}.range-row input{flex:1;min-width:40px;accent-color:var(--blue)}.chart-readout{font-size:14px;color:#325396;text-align:center;margin-bottom:12px}.chart{width:100%;height:auto;max-height:260px;display:block}.data-table{width:100%;border-collapse:collapse;font-size:14px;margin:18px 0}.data-table th,.data-table td{text-align:left;border-bottom:1px solid var(--line);padding:12px}.data-table th{font-weight:600;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:16px;padding:30px;width:min(540px,calc(100vw - 30px));color:var(--ink);max-height:90vh}dialog::backdrop{background:#19294177;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between}.dialog-heading h2{margin:0}.icon-button{font-size:28px;padding:0 8px}dialog>p{font-size:14px;margin-top:18px}.material-link{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line);font-size:14px;text-decoration:none}.menu-button{display:none}.skip{position:absolute;top:-100px;left:20px;background:var(--blue);color:white;z-index:10;padding:15px}.skip:focus{top:10px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(min-width:1550px){.lesson-layout{gap:65px;grid-template-columns:minmax(0,770px) 250px}#main{padding-top:42px}}@media(max-width:1180px){:root{--sidebar:240px}.topbar{padding:0 24px}.brandlabel{display:none}.lesson-layout{grid-template-columns:minmax(0,1fr)}.lesson-rail{display:none}#main{padding:30px 35px}.sidebar{padding:24px 16px}.lesson-body p{font-size:16px}}@media(max-width:720px){.topbar{height:70px;padding:0 18px}.brand{font-size:1.2rem}.brandmark{width:33px;height:33px}.top-actions{gap:16px}.avatar{display:none}.text-button{font-size:12px}.menu-button{display:block;font-size:20px;padding:5px}.shell{display:block}.sidebar{display:none;border-right:0;border-bottom:1px solid var(--line);max-height:75vh;overflow:auto}.sidebar.open{display:block}.sidebar-footer{display:none}.sidebar>p{font-size:14px}.unit-toggle,.lesson-link{font-size:14px}.unit-toggle{padding:10px 8px}#main{padding:25px 20px 45px}.breadcrumb{margin-bottom:22px;font-size:11px}.eyebrow{font-size:10px;gap:12px}h1{font-size:30px;letter-spacing:-.7px}.lesson-intro{font-size:15px}.tabs{margin-bottom:28px}.type-grid{grid-template-columns:repeat(2,1fr)}.type-grid span{font-size:12px}.lesson-footer{align-items:flex-start;flex-direction:column}.lesson-footer .primary{width:100%}.worked{padding:20px}.visual{padding:18px}.question-card{padding:21px}.question-card h2{font-size:19px}.question-card .primary{padding:12px 18px}.trace-bottom{gap:12px;align-items:flex-start}.trace-labels{gap:15px}.source-ref{display:block}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.lesson-body p{font-size:1rem}.lesson-link,.unit-toggle{font-size:.875rem}.type-grid span{font-size:.75rem}.edit-table{border-collapse:separate;border-spacing:5px;max-width:420px;width:100%;margin:auto;font-size:14px;text-align:center}.edit-table caption{font-size:12px;color:var(--muted);margin-bottom:15px;text-align:left}.edit-table td{border:1px solid #dfe5f3;border-radius:6px;min-width:38px;height:38px;background:#fff}.edit-table th{font-weight:500;padding:5px;color:#61708b}.formula small{font-size:14px;font-family:'DM Sans',sans-serif}
/* A tensor is two position-by-feature grids; labels also convey the axes without color. */
.tensor-shape-diagram{margin:24px 0 30px;padding:clamp(12px,3vw,24px);border:1px solid #dfe6f1;border-radius:12px;background:#f8faff;font-family:'DM Sans',system-ui,sans-serif;min-width:0}
.tensor-shape-axes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));text-align:center;gap:8px}
.tensor-shape-axes strong{display:block;font:600 2rem/1.4 'SFMono-Regular',Consolas,monospace;color:#224de3}
.tensor-shape-axes span{display:block;font-size:.875rem;font-weight:600;color:#344b70}
.tensor-shape-axes small{display:block;font-size:.75rem;line-height:1.6;color:#53627b;margin-top:4px}
.tensor-shape-direction{display:flex;align-items:center;justify-content:center;gap:10px;margin:14px 0 20px;color:#53627b;font-size:.8125rem}
.tensor-shape-direction span{font-size:1.75rem;line-height:1}
.tensor-shape-sequences{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px}
.tensor-shape-sequence{min-width:0;padding:12px 8px;border:1px solid #c9d6ec;border-radius:8px;background:#fff}
.tensor-shape-sequence table{width:100%;border-collapse:separate;border-spacing:4px;margin:0;table-layout:fixed;font-size:.75rem;line-height:1.6}
.tensor-shape-sequence caption{text-align:left;font-size:.875rem;font-weight:600;color:#344b70;padding:0 4px 12px}
.tensor-shape-sequence caption code{margin-left:6px;font-weight:400}
.tensor-shape-sequence th{font-weight:500;padding:4px 0;color:#53627b;text-align:center}
.tensor-shape-sequence th[scope="row"]{text-align:left}
.tensor-shape-sequence td{padding:6px 0;text-align:center;border-radius:4px;background:#eaf0ff;color:#274584;font:500 .875rem/1.6 'SFMono-Regular',Consolas,monospace}
.tensor-shape-sequence thead td{background:none}
.tensor-shape-example td{background:#dbe7ff;box-shadow:0 0 0 1.5px #466bd0}
.tensor-shape-diagram figcaption{margin-top:18px;font-size:.875rem;line-height:1.8;color:#344b70}
.tensor-shape-diagram .tensor-shape-example-note{margin:12px 0 0;font-family:inherit;font-size:.8125rem;line-height:1.8;color:#53627b}
.tensor-broadcast-title{font-size:.9375rem;font-weight:600;line-height:1.6;color:#344b70;margin-bottom:16px}
.tensor-broadcast-vector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:360px;margin:auto;text-align:center}
.tensor-broadcast-vector>div{padding:10px 4px;border-radius:6px}
.tensor-broadcast-vector span{display:block;font-size:.75rem;line-height:1.6}
.tensor-broadcast-vector strong{display:block;font:600 1.5rem/1.6 'SFMono-Regular',Consolas,monospace}
.tensor-broadcast-arrow{text-align:center;font-size:.8125rem;line-height:1.7;color:#53627b;margin:12px 0 18px}
.tensor-broadcast-arrow>span{display:block;font-size:1.5rem;line-height:1.3;margin-bottom:6px}
.tensor-broadcast-diagram th[scope="col"] span{display:block;font-family:'SFMono-Regular',Consolas,monospace;font-weight:600}
.tensor-shape-diagram .tensor-feature-0{background:#eaf0ff;color:#274584}
.tensor-shape-diagram .tensor-feature-1{background:#e8f4ef;color:#235e4b}
.tensor-shape-diagram .tensor-feature-2{background:#fff1db;color:#775014}
.tensor-broadcast-example{margin-top:18px;padding-top:16px;border-top:1px solid #dfe6f1;font-size:.8125rem;line-height:1.7;color:#53627b}
.tensor-broadcast-example>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.tensor-broadcast-example code{font-size:.8125rem;padding:6px 8px}
/* Always-visible, contextual labels keep notation usable on touchscreens as well as desktop. */
.symbol-key{margin:18px 0 25px;padding:17px 20px;border:1px solid #dfe6f5;border-radius:10px;background:#f8faff;text-align:left;font-family:'DM Sans',system-ui,sans-serif}.symbol-key-heading{font-size:.875rem;font-weight:700;color:#385786;line-height:1.5;margin-bottom:8px}.symbol-key dl{margin:0}.symbol-entry{display:grid;grid-template-columns:minmax(90px,.85fr) minmax(0,1.65fr);gap:18px;padding:10px 0;border-bottom:1px solid #e5ebf6;align-items:start}.symbol-entry:last-child{border-bottom:0;padding-bottom:0}.symbol-entry dt{font-family:'SFMono-Regular',Consolas,monospace;font-size:.875rem;line-height:1.8;color:#274584;overflow-wrap:anywhere}.symbol-entry dd{font-size:.875rem;line-height:1.8;color:#53627b;margin:0;overflow-wrap:anywhere}.notation-reference{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:25px}.notation-reference summary{font-size:.875rem;line-height:1.6;color:var(--blue);cursor:pointer;padding:6px 0}.notation-reference .symbol-key{margin-bottom:0}.lesson-body p.formula-reading{font-size:.9375rem;line-height:1.8;color:#485d7e;border-left:3px solid #aebfea;padding:3px 0 3px 15px;margin:-8px 0 23px}.formula-reading strong{color:#274584}.worked .symbol-key{background:#fafcff}.question-card .symbol-key{margin-top:20px}.range-row label{min-width:115px;font-size:.875rem}.visual .symbol-key{background:#fff}.formula{line-height:1.9}@media(max-width:720px){.symbol-key{padding:15px}.symbol-entry{grid-template-columns:1fr;gap:3px;padding:12px 0}.symbol-entry dt{font-weight:600}.range-row{flex-wrap:wrap;gap:10px}.range-row label{width:100%}.range-row input{width:100%;min-height:30px}.symbol-key-heading{font-size:.875rem}}
/* Reading companions distinguish the author's words from guided course explanations. */
.reading-companion{border:1px solid #dfe6f5;background:#f8faff;border-radius:12px;padding:22px;margin:0 0 25px}.reading-eyebrow{font-size:10px;font-weight:700;letter-spacing:1.25px;color:var(--blue);margin-bottom:9px}.reading-companion>strong{display:block;font-family:'Manrope',system-ui,sans-serif;font-size:1rem}.lesson-body .reading-companion p{font-size:.875rem;line-height:1.75;margin:9px 0}.lesson-body .reading-companion .reading-section{color:#385786;font-weight:600}.reading-links{display:flex;flex-wrap:wrap;column-gap:20px;row-gap:8px;margin-top:14px}.reading-links a{font-size:.8125rem;line-height:1.65;text-underline-offset:3px}.lesson-body .reading-companion .reading-note{font-size:.8125rem;margin:15px 0 0;color:var(--muted)}.book-quote{margin:28px 0;padding:3px 0 3px 20px;border-left:3px solid #b4c2e9}.lesson-body .book-quote p{font-family:Georgia,serif;font-size:1.125rem;line-height:1.8;color:#344b70;margin-bottom:12px}.book-quote cite{font-size:.8125rem;font-style:normal;color:var(--muted);line-height:1.7}.book-quote cite a{color:inherit;text-underline-offset:3px}.materials-heading{font-size:.875rem;margin:26px 0 5px}.data-table td{overflow-wrap:anywhere}.data-table th{font-size:.8125rem}@media(max-width:720px){.reading-companion{padding:18px}.reading-links{flex-direction:column;gap:10px}.book-quote{margin-left:0;padding-left:15px}.data-table th,.data-table td{padding:10px 6px;font-size:.8125rem}}
/* Keep desktop navigation stationary; long lesson lists scroll independently. */
@media (min-width:721px){
 .topbar{position:sticky;top:0}
 .sidebar{position:sticky;top:84px;align-self:start;height:calc(100vh - 84px);height:calc(100dvh - 84px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
 .sidebar>*{flex-shrink:0}
}
/* Typeset math keeps its own font and line metrics inside prose and notation keys. */
.math-inline{font-family:initial;letter-spacing:normal;white-space:normal}.katex{font-size:1.08em;line-height:1.2;text-indent:0}.katex .katex-html{white-space:normal}.math-display{max-width:100%;overflow-x:auto;overflow-y:hidden;padding:6px 0}.math-display .katex-display{margin:.35em 0}.formula{font-family:inherit;font-size:1.125rem;text-align:left;overflow-wrap:normal;min-width:0}.symbol-entry dt .katex{font-size:1.04em}.symbol-entry dt{min-width:0}.symbol-key .math-inline{white-space:normal}.choice>span:last-child{min-width:0;overflow-wrap:anywhere}.lesson-body p,.worked li,.hint,.feedback,.question-card h2{line-height:1.95}.chart-readout .katex{font-size:1.05em}@media(max-width:720px){.formula{font-size:1rem;padding:14px}.question-card h2{line-height:1.8}}
.svg-math{font-size:14px;line-height:1.6;color:#315cde}.symbol-entry dt .math-inline{overflow-wrap:normal}.lesson-body .book-editorial-note{font-size:.8125rem;color:var(--muted);line-height:1.8}
/* Geometry uses equal-axis diagrams, labeled colors and controls that work on touchscreens. */
.math-lab{margin:30px 0 40px;padding:22px;border:1px solid #dfe6f1;border-radius:14px;background:#f9fbff;min-width:0}
.math-lab h2{font-size:1.3rem;margin-bottom:14px}.math-lab h3{margin:26px 0 12px}
.math-lab p{font-size:1rem;line-height:1.85}.math-lab .math-lab-caption{font-size:.9375rem;color:#53627b;margin:18px 0 0}
.angle-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0}
.angle-example{margin:0;border:1px solid #dce4f0;border-radius:10px;padding:14px 10px;background:white;min-width:0}
.angle-example figcaption{display:flex;flex-direction:column;gap:6px;align-items:center;font-size:.9375rem;line-height:1.5;text-align:center}
.angle-example svg{width:100%;height:auto;display:block}.angle-example .geometry-label{font-size:28px}
.angle-example-value{text-align:center;font-size:1.05rem;color:#253c63;padding:6px 0}
.dot-plane{width:100%;max-width:560px;height:auto;display:block;margin:4px auto 16px;overflow:visible}
.geometry-label{font-size:21px;text-align:left;color:#34435c}.geometry-label .katex{font-size:1em}
.vector-legend,.matrix-legend{display:flex;flex-wrap:wrap;gap:9px 18px;font-size:.875rem;line-height:1.8;margin:18px 0}
.legend-a{color:#254bb9}.legend-b{color:#12614f}.legend-p{color:#8b5300}
.angle-presets,.transpose-steps,.transpose-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.angle-presets .secondary,.transpose-steps .secondary,.transpose-actions .secondary{font-size:.875rem;min-height:44px;white-space:normal}
.angle-presets [aria-pressed=true],.transpose-steps [aria-pressed=true]{background:#eaf0ff;border-color:#315cde;color:#17378f}
.math-lab-slider{margin:22px 0}.math-lab-slider label{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;font-size:.9375rem;line-height:1.8}.math-lab-slider output{margin-left:auto;color:#24457f;font-weight:700}
.math-lab-slider input{display:block;width:100%;min-height:44px;margin:6px 0;accent-color:var(--blue)}
.dot-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dot-metrics>div{padding:16px 10px;border:1px solid #dbe3f0;border-radius:10px;background:#fff;min-width:0}
.dot-metrics span,.entry-products span{display:block;font-size:.8125rem;color:#586781;line-height:1.6;margin-bottom:8px}
.dot-metrics strong{font-size:1.15rem;font-weight:600;display:block}.dot-story{margin:18px 0}
.dot-length-experiment{border-top:1px solid #dbe3f0;border-bottom:1px solid #dbe3f0;padding:16px 0;margin:24px 0}
.dot-length-experiment summary{font-size:.9375rem;color:#274fba;cursor:pointer;line-height:1.7}.dot-length-experiment[open] summary{margin-bottom:14px}
.math-lab-equation{overflow-x:auto;overflow-y:hidden;max-width:100%;margin:18px 0;font-size:1.05rem;padding:4px 0}
.math-lab-equation .katex-display{margin:.5em 0}.math-lab-equation .math-display{padding:0}
.math-lab-key{display:grid;grid-template-columns:1fr;gap:12px;margin:26px 0 0;padding:18px 0 0;border-top:1px solid #dbe3f0}
.math-lab-key>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px;font-size:.875rem;line-height:1.8}.math-lab-key dt{color:#294a85}.math-lab-key dd{margin:0;color:#53627b}
.matrix-shape{text-align:center;font-size:1rem;line-height:1.8;margin-top:22px}
.transpose-board{position:relative;width:282px;max-width:100%;height:231px;margin:6px auto 16px}.vector-transpose-board{position:relative;width:248px;max-width:100%;height:193px;margin:0 auto 16px}
.moving-matrix-brackets{position:absolute;border-left:2px solid #6d7d98;border-right:2px solid #6d7d98;border-top:0;border-bottom:0;background:linear-gradient(#6d7d98,#6d7d98) top left/9px 2px no-repeat,linear-gradient(#6d7d98,#6d7d98) bottom left/9px 2px no-repeat,linear-gradient(#6d7d98,#6d7d98) top right/9px 2px no-repeat,linear-gradient(#6d7d98,#6d7d98) bottom right/9px 2px no-repeat;transition:width .35s ease,height .35s ease,left .35s ease,top .35s ease;pointer-events:none}
.moving-entry{position:absolute;left:0;top:0;width:56px;height:56px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;font-size:1.15rem;transition:transform .35s ease;background:#fff}
.matrix-row-one{color:#21479b;background:#eaf0ff}.matrix-row-two{color:#125e4e;background:#e4f4ef}.matrix-legend>span{padding:5px 10px;border-radius:6px}
.moving-entry[aria-pressed=true]{outline:2px solid #9c6511;outline-offset:1px;border-color:#fff}.moving-entry:focus-visible{outline:3px solid var(--blue);outline-offset:4px}
.matrix-mapping{border:1px solid #dbe3f0;border-radius:10px;padding:16px;background:#fff;min-height:160px}.matrix-mapping>strong{font-size:.9375rem}.matrix-mapping p{font-size:.9375rem;margin:8px 0 0}
.entry-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.entry-products>div{padding:14px;border-radius:8px;background:#eef2fa;font-size:1rem;min-width:0}
.math-lab-recap{background:#fff}.math-lab .visual-source{font-size:.875rem;color:#667187;margin-bottom:0}
@media(max-width:720px){.math-lab{padding:18px 14px}.angle-examples{gap:10px}.dot-metrics>div{padding:14px 8px}.dot-metrics strong{font-size:1rem}.math-lab-equation{font-size:.9375rem}.math-lab-key>div{grid-template-columns:1fr;gap:3px}.entry-products{grid-template-columns:1fr}.transpose-steps button{flex:1 1 130px}.transpose-actions button{flex:1 1 140px}}
@media(max-width:370px){.angle-examples{grid-template-columns:1fr}.angle-example svg{max-width:240px;margin:auto}.dot-metrics{grid-template-columns:1fr}.transpose-board{width:250px;transform:translateX(-10px)}}
@media(prefers-reduced-motion:reduce){.moving-entry,.moving-matrix-brackets{transition:none}}

/* Book passages lead the reading; course explanations and quiz assistance have explicit labels. */
.reading-quiz-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.reading-quiz-status{font-family:'DM Sans',system-ui,sans-serif;font-size:.875rem;color:var(--green);font-weight:600}
.reading-quiz-form{margin-top:18px;font-family:'DM Sans',system-ui,sans-serif}
.reading-quiz-form fieldset{border:0;padding:0;margin:0;min-width:0}
.reading-quiz-instructions{font-size:.875rem;line-height:1.7;color:#53627b;margin-bottom:12px}
.reading-quiz-options{display:grid;gap:10px;min-width:0}
.reading-quiz-choice{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #d6deeb;border-radius:8px;background:#fff;cursor:pointer;min-height:48px;min-width:0}
.reading-quiz-choice:focus-within{outline:3px solid #758ff7;outline-offset:3px}
.reading-quiz-choice.is-selected{border-color:var(--blue);background:#f0f4ff}
.reading-quiz-choice.is-correct{border-color:var(--green);background:#edf7f2}
.reading-quiz-choice input{flex:0 0 18px;width:18px;height:18px;accent-color:var(--blue);margin:5px 0 0}
.reading-quiz-option-label{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;min-width:0;flex:1;font-size:1rem;line-height:1.8}
.reading-quiz-option-text{min-width:0;overflow-wrap:anywhere}
.reading-quiz-actions{display:flex;gap:12px 18px;align-items:center;flex-wrap:wrap;margin-top:20px}
.reading-quiz-actions button{min-height:44px;font-size:.875rem;white-space:normal}
.reading-quiz-actions [hidden]{display:none}
.reading-quiz-feedback:empty,.reading-quiz-hints:empty{display:none}
.reading-quiz-feedback .feedback,.reading-quiz-hints .hint{font-size:.9375rem;line-height:1.85;overflow-wrap:anywhere}
.reading-quiz-feedback .reading-answer{background:#eef2fa;border:1px solid #d6deeb}
.reading-quiz-feedback{scroll-margin-top:130px}
@media(max-width:420px){.reading-quiz-choice{padding:12px;gap:10px}.reading-quiz-actions .primary{width:100%}}
.book-reading{min-width:0}.book-reading>h2{font-size:1.45rem;margin-bottom:12px}.book-intro{color:#53627b}.book-section{margin:32px 0 42px;min-width:0}.book-section>h3{font-size:1.12rem;line-height:1.6;margin-bottom:16px}.book-passage{margin:20px 0 14px;padding:0 0 0 22px;border-left:3px solid #b4c2e9;min-width:0}.book-passage p,.book-passage li{font-family:Georgia,serif;font-size:1.08rem;line-height:1.95;color:#34435b}.book-passage p:last-child{margin-bottom:0}.book-passage ol{padding-left:24px}.book-passage li{padding-left:5px;margin-bottom:12px}.book-passage strong{font-weight:700}.book-passage .excerpt-break{font-family:'DM Sans',system-ui,sans-serif;font-size:.8125rem;color:var(--muted)}.lesson-body .book-citation,.lesson-body .book-note{font-size:.8125rem;line-height:1.8}.book-citation{color:var(--muted);margin:14px 0}.book-citation cite{font-style:normal}.book-note{padding:14px 17px;border-radius:8px;background:#f5f7fb;color:#53627b}.book-symbols{margin:15px 0}.book-formula{min-width:0;max-width:100%}.study-notes-heading{border-top:1px solid var(--line);padding-top:26px;margin:26px 0 20px}.study-notes-heading p{color:var(--muted);font-size:.875rem;margin-bottom:0}.book-question-source{font-size:.8125rem;line-height:1.7;margin-top:12px}.book-question-source span{display:block;color:var(--muted);margin-top:5px}.question-card .data-table caption{text-align:left;font-size:.875rem;color:var(--muted);margin-bottom:10px}@media(max-width:720px){.book-passage{padding-left:15px}.book-passage p,.book-passage li{font-size:1rem}.book-section{margin-bottom:32px}}

/* Keep the save indicator visible on both phone and desktop. */
.save-status{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:230px;font-size:12px;line-height:1.4}.save-label{color:var(--muted)}.save-label.is-saved{color:var(--green)}.save-label.is-saved:before{content:'✓ ';font-weight:700}.save-status a,.save-status button{font-size:12px;line-height:1.4;color:var(--blue);text-underline-offset:3px}.save-status button{text-decoration:underline;padding:0}.question-total{font-size:11px;color:var(--muted);line-height:1.6;margin:8px 0 0;font-variant-numeric:tabular-nums}@media(max-width:720px){.topbar{height:auto;min-height:86px;padding:14px 18px;flex-wrap:wrap;gap:10px}.top-actions{margin-left:auto;gap:10px}.save-status{max-width:170px;font-size:11px}.save-status a,.save-status button{font-size:11px}#sources-button{display:none}.brand{font-size:1.1rem;gap:7px}.brandmark{width:29px;height:29px;font-size:1.45rem}}@media(max-width:400px){.topbar{padding:12px}.top-actions{gap:5px}.save-status{max-width:155px}.brand{font-size:1rem}.brandmark{width:25px;height:25px}.menu-button{padding:4px}}

.mobile-materials{display:none}@media(max-width:720px){.mobile-materials{display:block;text-align:left;margin:0 8px 14px;font-size:14px;color:var(--blue)}}
/* Continuous book readings: prose first, optional help within reach. */
.continuous-reading{--reader-top:84px}.continuous-reading .book-passage{border:0;padding:0;margin:0}.continuous-reading .book-passage p,.continuous-reading .book-passage li{font-family:Georgia,'Times New Roman',serif;font-size:1.0625rem;line-height:1.85;color:#2e3d53}.continuous-reading .book-section{margin:36px 0 42px}.continuous-reading h3{font-size:1.35rem;line-height:1.5}.continuous-reading h4{font-family:Georgia,'Times New Roman',serif;font-size:1.18rem;line-height:1.55;margin:32px 0 16px}.continuous-reading h5{font-size:1rem;line-height:1.6;margin:20px 0 12px}.continuous-reading h3,.continuous-reading h4{scroll-margin-top:155px}.continuous-reading .book-definition{padding:18px 22px;margin:24px 0;border:1px solid #dae1ec;border-radius:6px;background:#fcfdff}.continuous-reading .book-definition h5:first-child{margin-top:0}.continuous-reading .book-definition p:last-child{margin-bottom:0}.continuous-reading .book-quiz{padding:18px 22px;margin:26px 0;border-left:2px solid #8097b9;background:#fafbfe}.continuous-reading .book-quiz h5{margin-top:0}.book-quiz-prompt{font-family:Georgia,'Times New Roman',serif;line-height:1.85}.continuous-reading .book-quiz li{margin:5px 0}.continuous-reading .book-quiz ol{margin-bottom:0}.continuous-reading .book-passage .nested-quote{border-left:2px solid #becadb;margin:24px 0;padding:0 0 0 22px}.continuous-reading .book-figure{margin:28px auto;max-width:620px}.book-figure img{display:block;max-width:100%;width:auto;height:auto;margin:auto}.continuous-reading .book-figure img[src*="knapsack"]{max-width:340px;width:100%}.book-figure figcaption{font-size:.875rem;color:#63718b;line-height:1.7;margin-top:12px}.continuous-reading pre{font-size:.875rem;line-height:1.65;max-width:100%}.continuous-reading .book-solutions,.continuous-reading .book-footnotes,.reading-study-notes{padding:16px 0;border-top:1px solid #e2e7f0;margin-top:24px}.continuous-reading details>summary{cursor:pointer;font-family:system-ui,sans-serif;font-size:.875rem;line-height:1.6;color:#325396;font-weight:600}.continuous-reading .book-solutions[open]>summary,.continuous-reading .book-footnotes[open]>summary{margin-bottom:20px}.reading-study-notes p{font-size:.875rem!important;line-height:1.8!important}.continuous-reading .book-footnotes p,.continuous-reading .book-footnotes li{font-size:.9375rem}.qed{white-space:nowrap;font-size:.875em}.reading-toolbar{position:sticky;top:var(--reader-top);z-index:2;display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;background:#fff;border-top:1px solid #e2e7f0;border-bottom:1px solid #e2e7f0;margin:24px 0 30px}.reading-symbols-button{color:var(--blue);font-size:.875rem;padding:7px 10px;white-space:nowrap;border:1px solid #d9e1ef;border-radius:6px}.reading-contents{position:relative;min-width:0}.reading-contents nav{position:absolute;top:calc(100% + 18px);left:0;width:min(510px,calc(100vw - 42px));max-height:60vh;overflow:auto;border:1px solid #d9e1ef;border-radius:8px;padding:12px;background:#fff;box-shadow:0 10px 28px #23395718}.reading-contents button{display:block;text-align:left;width:100%;padding:9px 12px;font-size:.875rem;line-height:1.55;border-radius:5px}.reading-contents button:hover{background:#f0f4fd}.reading-contents .reading-subsection{padding-left:25px;color:#52647f}.reading-symbol-guide .symbol-key{border:0;background:none;padding:0}.reading-symbol-guide .symbol-entry{grid-template-columns:1fr;gap:3px}#reading-symbol-dialog{width:min(720px,calc(100vw - 30px));max-height:85dvh}#reading-symbol-dialog .symbol-entry{grid-template-columns:minmax(130px,.8fr) minmax(0,1.6fr)}.book-citation{margin:24px 0 0}.continuous-reading .book-editorial-note{font-size:.875rem;line-height:1.7}.continuous-reading .math-display{font-size:1.06rem}
@media(max-width:720px){.continuous-reading{--reader-top:0px}.continuous-reading .book-passage p,.continuous-reading .book-passage li{font-size:1.0625rem;line-height:1.85}.continuous-reading h3,.continuous-reading h4{scroll-margin-top:95px}.continuous-reading .book-definition,.continuous-reading .book-quiz{padding:16px}.reading-toolbar{gap:8px}.reading-contents>summary,.reading-symbols-button{font-size:.875rem}.reading-symbols-button{padding:8px}#reading-symbol-dialog .symbol-entry{grid-template-columns:1fr}.continuous-reading .math-display{font-size:1rem}}

/* Code from the Python review leads these lessons; explanations follow its output. */
.python-topic{margin:34px 0 40px;min-width:0}.python-topic:first-child{margin-top:0}.lesson-body .python-topic h2{font-size:1.2rem;line-height:1.5;margin:0 0 14px}.lesson-body .python-topic p{font-size:1rem;line-height:1.85}.python-example{margin:22px 0;min-width:0}.python-example figcaption,.example-output-label{font-size:.875rem;font-weight:600;line-height:1.5;color:#52647b;margin:0 0 8px}.python-example pre{margin:0 0 16px;max-width:100%;font-size:.9375rem;line-height:1.8}.python-output,.python-example .python-output{background:#f3f6fa;color:#273950;border:1px solid #e1e7ef;border-radius:8px;font-size:.9375rem;line-height:1.75;padding:16px 20px;margin:0 0 22px;max-width:100%;overflow:auto}.python-output code{color:inherit;background:none;white-space:pre}.lesson-body .python-source-note{font-size:.875rem;line-height:1.75;color:#627189}.python-topic code{overflow-wrap:anywhere}.python-topic pre code{overflow-wrap:normal}@media(max-width:720px){.python-example pre,.python-output{padding:16px}.python-topic{margin-bottom:34px}}

.python-topic .python-output code,.worked .python-output code{white-space:pre-wrap;overflow-wrap:anywhere}

/* WIS book figures stay readable within the lesson and quiz columns. */
.wis-figure svg{display:block;width:100%;max-width:460px;height:auto;margin:0 auto;color:#2e3d53;font-family:system-ui,sans-serif;font-size:16px;overflow:visible}.wis-figure svg[viewBox="0 0 200 160"]{max-width:200px}.book-quiz-prompt .wis-figure{margin:14px auto 22px}.wis-figure svg text{fill:currentColor}.wis-figure figcaption{font-family:system-ui,sans-serif}

.angle-example-work{border-top:1px solid #dce4f0;margin:10px 4px 0;padding-top:12px;display:grid;gap:12px;font-size:1rem;color:#253c63;overflow-x:auto}
.angle-work-label{font-size:.875rem;font-weight:600;color:#58657a}
@media(max-width:600px){.angle-examples{grid-template-columns:1fr}.angle-example svg{max-width:280px;margin:auto}}
.pseudocode-runner{margin:1rem 0 1.6rem}.pseudocode-runner>summary{font-size:.9rem;line-height:1.6;color:var(--blue);cursor:pointer;padding:.5rem 0}.pseudocode-runner textarea{width:100%}

/* Independent practice sits beside the topic it develops. */
.bridge-practice{margin:36px 0;min-width:0}.bridge-challenge{margin:24px 0;padding:24px;border:1px solid #d7e1eb;border-radius:12px;min-width:0;background:#fcfdff}.bridge-challenge :is(h3,h4,h5,h6){margin:10px 0 14px;line-height:1.5}.bridge-challenge p,.bridge-challenge li{font-size:.9375rem;line-height:1.8}.bridge-challenge pre{max-width:100%;font-size:.875rem}.bridge-challenge textarea{width:100%;display:block;resize:vertical;max-width:100%}.reasoning-editor{min-height:180px;font:inherit;line-height:1.8;padding:16px;border:1px solid #bac9db;border-radius:8px;color:var(--ink);background:white}.bridge-challenge textarea:focus-visible{outline:3px solid #758ff7;outline-offset:3px}.challenge-help-actions{display:flex;flex-wrap:wrap;gap:8px 20px;margin:12px 0}.challenge-status{margin:12px 0;color:#53627b}.challenge-solution,.challenge-review{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.challenge-solution[hidden],.challenge-review[hidden],.bridge-challenge [hidden]{display:none}.challenge-checks{margin-top:20px}.challenge-checks summary{font-size:.875rem;cursor:pointer;line-height:1.7;color:var(--blue)}.bridge-challenge .code-actions{flex-wrap:wrap}.bridge-challenge .hint{line-height:1.8}.bridge-practice .eyebrow{color:#28685b}.source-ref ul{padding-left:20px}.source-ref li{margin:7px 0;line-height:1.6}
@media(max-width:720px){.bridge-challenge{padding:18px 14px}.bridge-challenge .code-actions{gap:8px 16px}.bridge-challenge .code-actions button{min-height:44px}.bridge-challenge .primary{width:100%}.bridge-challenge pre{padding:14px}}

.lesson-extension{margin:36px 0;padding-top:24px;border-top:1px solid var(--line);min-width:0}.lesson-extension> :is(h2,h4){font-size:1.3rem;line-height:1.5;margin:0 0 18px}.lesson-extension .explanation :is(h3,h5){font-size:1.12rem;line-height:1.6;margin:26px 0 12px}.lesson-extension .explanation> :is(h3,h5):first-child{margin-top:18px}.lesson-extension .bridge-practice> :is(h3,h5){font-size:1.2rem;line-height:1.6}.lesson-extension .bridge-challenge> :is(h4,h6){font-size:1.05rem}.lesson-extension .worked :is(h3,h5){font-size:1.12rem;line-height:1.6}.lesson-extension .source-ref{font-size:.8125rem;line-height:1.6}.lesson-extension .source-ref li{font-size:inherit}.lesson-extension .data-table{display:block;overflow-x:auto;max-width:100%}

.lesson-extension .code-lab,.lesson-extension .bridge-practice,.lesson-extension .note,.lesson-extension .source-ref{font-family:"DM Sans",system-ui,sans-serif}.topic-connection{margin:24px 0;padding:16px 20px;border-left:2px solid #9eb5cb;background:#f8fafe}.lesson-extension .code-actions button{font-family:inherit}.lesson-extension .bridge-challenge .challenge-status{line-height:1.7}
