.math-app{font-size:19px;line-height:1.6}.math-top{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:16px 32px;border-bottom:1px solid var(--surface)}.math-top nav{display:flex;align-items:center;gap:24px;font-size:16px}.math-top a{text-decoration:none}.math-top [aria-current]{text-decoration:underline}.math-shell{display:grid;grid-template-columns:248px minmax(0,1fr);max-width:1600px;margin:auto}.math-sidebar{padding:28px 20px 40px 28px;min-width:0}.course-name{display:flex;gap:12px;align-items:center;font-size:22px;line-height:1.25;margin-bottom:28px}.course-name>span{font-size:46px}.course-name small{display:block;font-size:13px;color:var(--muted);margin-top:8px}.math-sidebar nav{display:flex;flex-direction:column;gap:2px}.math-sidebar nav a{font-size:15px;text-decoration:none;padding:7px 10px;line-height:1.3;border-radius:6px}.math-sidebar nav a[aria-current=page]{background:var(--surface)}.nav-group{font-size:13px;color:var(--muted);margin:25px 10px 8px}.sidebar-bottom{margin:30px 10px;font-size:13px;color:var(--muted)}.sidebar-bottom a{display:block;margin-top:18px}.sidebar-bottom progress{width:100%;height:7px;accent-color:var(--ink)}.mobile-menu,#math-menu{display:none}#math-content{padding:32px clamp(24px,4vw,64px) 80px;min-width:0;border-left:1px solid var(--surface);outline:none;max-width:1240px}#math-content h1{font-size:32px;line-height:1.12;max-width:25ch;margin:0 0 18px}#math-content h2{font-size:26px;line-height:1.2;margin:36px 0 18px}#math-content h3{font-size:22px;line-height:1.3;margin:0 0 12px}#math-content p{margin:12px 0;max-width:72ch}#math-content .intro{display:block;padding:0;font-size:23px;line-height:1.5;max-width:65ch}.meta{font-size:14px;color:var(--muted)}.math-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:24px 0}.math-actions a,.math-actions button{font-size:16px;min-height:44px;padding:10px 18px;background:var(--surface);color:var(--ink);text-decoration:none;border-radius:6px}.math-actions .primary{background:var(--ink);color:var(--bg)}.overview-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,1fr);gap:24px;align-items:start;margin:28px 0}.study-panel{padding:24px;background:var(--surface);border-radius:8px;min-width:0}.study-panel h2,.study-panel h3{margin-top:0!important}.study-panel p{font-size:17px}.study-panel ul{padding-left:22px;margin:12px 0}.study-panel li{margin:8px 0;font-size:17px}.day-row{display:grid;grid-template-columns:140px 1fr;gap:18px;padding:22px 0;border-bottom:1px solid var(--surface)}.day-row h3{font-size:20px!important}.day-row p{margin-top:0!important}.day-row ol{padding-left:22px;margin:0}.day-row li{margin:8px 0}.day-row small{display:block;font-size:14px;color:var(--muted)}.lesson-list{list-style:none;padding:0}.lesson-list li{display:grid;grid-template-columns:1fr auto;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid var(--surface)}.lesson-list a{text-decoration:none}.lesson-list small{color:var(--muted);font-size:14px}.lesson-list span{font-size:14px;color:var(--muted)}.lesson-section{margin-top:34px}.lesson-section h2{margin-top:0!important}.math-note{border-left:3px solid var(--muted);padding:4px 20px;margin:28px 0}.math-note p{font-size:17px}.worked{margin:32px 0;background:var(--surface);padding:24px;border-radius:8px}.worked ol,.solution ol{padding-left:25px}.worked li,.solution li{margin:14px 0}.worked>p{font-size:20px}.math-task{padding:24px 0;border-bottom:1px solid var(--surface)}.math-task:first-of-type{padding-top:14px}.task-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:13px;color:var(--muted);margin-bottom:9px}.math-task details{margin:10px 0}.math-task summary{font-size:16px;min-height:44px;padding:8px 0}.math-task details p{font-size:18px}.math-task>p{font-size:20px}.task-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px;font-size:16px}.task-actions input[type=text]{width:min(100%,260px);border:1px solid var(--muted);padding:9px 12px;background:var(--bg);color:var(--ink);border-radius:6px;font-size:16px}.task-actions button{font-size:16px;border-radius:6px;padding:8px 16px}.task-actions label{display:flex;gap:9px;align-items:center}.task-actions input[type=checkbox]{width:18px;height:18px;accent-color:var(--ink)}.check-result{font-size:16px!important}.filters{display:flex;flex-wrap:wrap;gap:16px;margin:24px 0}.filters label{font-size:14px;display:grid;gap:5px}.filters select,.filters input{font:inherit;font-size:16px;padding:10px 12px;min-height:44px;color:var(--ink);background:var(--bg);border:1px solid var(--muted);border-radius:6px;max-width:100%}.filters input{min-width:220px}.file-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;padding:20px 0;border-bottom:1px solid var(--surface)}.file-row h3{font-size:20px!important;overflow-wrap:anywhere}.file-row p{font-size:16px;margin:5px 0!important}.file-row>a{font-size:16px;white-space:nowrap;padding:4px 0}.file-row small{color:var(--muted);font-size:13px}.lab{padding:24px;background:var(--surface);border-radius:8px;margin:26px 0}.lab h3{margin:0!important}.lab>p{font-size:17px}.lab svg{width:100%;height:auto;max-height:330px;display:block;margin:18px 0}.lab svg text{fill:var(--ink);font:13px Georgia,serif}.lab .axis{stroke:var(--muted);stroke-width:1}.lab .grid{stroke:var(--muted);opacity:.15;stroke-width:.8}.lab .curve{stroke:var(--accent);fill:none;stroke-width:2.5}.lab .ref{stroke:var(--muted);stroke-width:1.5;fill:none;stroke-dasharray:6 4}.lab-controls{display:grid;grid-template-columns:1fr 1fr;gap:24px;font-size:16px}.lab-controls label{display:block}.lab-controls input{display:block;width:100%}.lab-controls output{font-variant-numeric:tabular-nums}.lab-readout{font-size:17px;min-height:60px;margin-top:16px}.lab button{font-size:16px;min-height:44px;padding:10px 16px;border:1px solid var(--muted);border-radius:6px}.katex{font-size:1.06em!important}.katex-display{overflow-x:auto;overflow-y:hidden;padding:8px 2px;max-width:100%;margin:16px 0!important}.katex-error{color:var(--accent)}.topic-complete{padding:20px;background:var(--surface);border-radius:8px;margin:32px 0}.topic-complete label{display:flex;gap:14px;align-items:start;font-size:17px}.topic-complete input{width:20px;height:20px;margin-top:4px;accent-color:var(--ink)}.topic-links{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-top:30px;font-size:16px}.source-list li{margin:16px 0}.source-list p{font-size:16px}.math-footer{border-top:1px solid var(--surface);padding:24px 32px;color:var(--muted);font-size:14px}.diagnostic{margin-top:28px}.diagnostic fieldset{border:0;border-bottom:1px solid var(--surface);padding:20px 0;margin:0}.diagnostic legend{font-size:20px;padding-top:16px}.diagnostic label{display:block;padding:9px 0;min-height:44px}.diagnostic button{background:var(--ink);color:var(--bg);margin:24px 0;border-radius:6px}.exam-status{display:flex;flex-wrap:wrap;gap:20px;align-items:center;padding:20px;background:var(--surface);border-radius:8px;margin:24px 0}.exam-status button{font-size:16px;padding:8px 16px;border-radius:6px;background:var(--ink);color:var(--bg)}.exam-status output{font-size:24px;font-variant-numeric:tabular-nums}.exam-active .math-task details,.exam-active .task-actions{display:none}.exam-active .math-task textarea{display:block}.math-task textarea{display:none;width:100%;min-height:95px;margin:12px 0;padding:12px;font:16px/1.5 Georgia,serif;border:1px solid var(--muted);background:var(--bg);color:var(--ink);border-radius:6px}.exam-instruction{font-size:16px!important}.empty{padding:30px 0;color:var(--muted)}
@media(min-width:1101px){.math-sidebar{position:sticky;top:0;height:100vh;overflow-y:auto}.math-sidebar nav a{padding-top:6px;padding-bottom:6px}}
@media(max-width:1100px){.math-shell{display:block}.math-sidebar{padding:18px 24px;border-bottom:1px solid var(--surface);display:flex;align-items:center;gap:18px;flex-wrap:wrap}.course-name{margin:0;font-size:20px}.course-name>span{font-size:32px}.course-name small,.math-sidebar nav,.sidebar-bottom{display:none}.mobile-menu{display:block;font-size:14px;margin-left:auto}#math-menu{display:block;font:16px Erode,Georgia,serif;min-height:44px;background:var(--bg);color:var(--ink);padding:8px;border:1px solid var(--muted);max-width:100%;border-radius:6px}#math-content{border:0;padding:28px 32px 60px}.math-top{padding:16px 24px}.math-top nav{gap:16px}}
@media(max-width:650px){.math-top{padding:16px;display:block}.math-top .brand{font-size:23px}.math-top nav{justify-content:space-between;gap:8px;font-size:14px;margin-top:12px}.math-top .theme-toggle{font-size:14px;padding:8px 10px}.math-sidebar{padding:14px 16px;gap:10px}.course-name{width:100%}.mobile-menu{margin-left:0}#math-menu{width:100%}#math-content{padding:24px 16px 48px}#math-content h1{font-size:30px}#math-content h2{font-size:25px}#math-content .intro{font-size:21px}.overview-grid{display:block}.overview-grid>*{margin:20px 0}.study-panel,.lab,.worked{padding:18px}.day-row{display:block}.day-row h3{margin-bottom:16px!important}.lesson-list li{gap:10px}.lesson-list small{display:block}.math-app{font-size:18px}.lab-controls{grid-template-columns:1fr;gap:12px}.lab svg{margin-left:-4px;width:calc(100% + 8px)}.file-row{display:block}.file-row>a{display:inline-block;margin-top:8px;min-height:44px}.filters{display:grid;grid-template-columns:1fr}.filters input{min-width:0;width:100%}.filters select{width:100%}.math-footer{padding:24px 16px}.katex{font-size:1em!important}.math-actions{gap:10px}.math-actions a,.math-actions button{font-size:15px;padding:10px 14px}.task-actions{display:grid;grid-template-columns:1fr}.task-actions input[type=text]{width:100%}.math-task>p{font-size:19px}}
@media print{.math-top,.math-sidebar,.math-footer,.math-actions,.filters,.topic-complete,.topic-links{display:none}.math-shell{display:block}#math-content{border:0;padding:0}.math-app{font-size:11pt;color:#000;background:#fff}.lab{break-inside:avoid}.math-task{break-inside:avoid}.katex-display{overflow:visible}#math-content h1{font-size:24pt}#math-content h2{font-size:18pt}}

.formula-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:30px 0}.formula-preview a{background:var(--surface);padding:10px}.formula-preview img{width:100%;height:auto}@media(max-width:650px){.formula-preview{grid-template-columns:1fr}}
.math-app{font-variant-numeric:tabular-nums}.overview-grid{align-items:stretch}@media(max-width:650px){#math-content h1{font-size:24px}#math-content h2{font-size:22px}}
