@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Source+Code+Pro:wght@400;500&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#233b40;background:#f3f6f7;font-synthesis:none;--teal:#0c5356;--lime:#dbf27c;--border:#dfe6e8}*{box-sizing:border-box}body{margin:0}button,a,summary,textarea{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:wait;opacity:.5}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #80bfc1;outline-offset:3px}[hidden]{display:none!important}.sidebar{width:254px;background:#fff;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;border-right:1px solid var(--border);padding:32px 19px;overflow-y:auto}.brand{display:flex;align-items:center;gap:10px;font-family:Manrope,sans-serif;font-size:21px;font-weight:800;letter-spacing:-.8px}.brand-icon{display:grid;place-items:center;background:#103e45;color:var(--lime);border-radius:11px;width:39px;height:43px;font-family:monospace;letter-spacing:-3px;padding-right:3px}.brand-light{font-weight:500}.brand small{display:block;font-family:'DM Sans',sans-serif;font-size:8px;letter-spacing:1px;margin-top:6px;color:#75858a}.course-label{font-size:11px;letter-spacing:1.2px;color:#87969a;font-weight:700;margin:45px 9px 21px}.course-label span{display:block;letter-spacing:0;font-weight:400;margin-top:7px;font-size:13px}.chapter{margin:6px 0}.chapter-btn{display:flex;gap:12px;align-items:center;text-align:left;width:100%;border:0;background:none;border-radius:9px;padding:13px 9px;color:#697d82;font-size:14px;line-height:1.45}.chapter-btn .num{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;background:#f3f6f7;border-radius:7px;font-size:12px;color:#657d82}.chapter.active .chapter-btn{color:#164c50;background:#eaf4f2;font-weight:700}.chapter.active .num{background:#125459;color:#fff}.chapter-btn:hover{background:#f3f6f7}.chapter-titles{flex:1}.chapter-status{font-size:12px;color:#0f7871}.chapter-sub{margin:8px 0 16px 32px;padding-left:20px;border-left:1px solid #d6e8e5}.chapter-sub button{display:block;border:0;background:none;text-align:left;color:#6f8388;width:100%;padding:7px 0;font-size:13px}.chapter-sub button.current{color:#125459;font-weight:700}.sidebar-bottom{margin-top:auto;padding:28px 8px 0}.progress-head{display:flex;justify-content:space-between;font-size:13px}.progress-head strong{font-size:12px}progress{width:100%;height:6px;margin-top:12px;border:0;border-radius:8px;background:#e9eff0}progress::-webkit-progress-bar{background:#e9eff0;border-radius:8px}progress::-webkit-progress-value{background:#24847e;border-radius:8px}.sidebar-bottom p{font-size:12px;color:#87969a;margin:8px 0 25px}.sidebar-bottom a{font-size:12px;line-height:1.7;color:#4d777b}.sidebar-bottom small{display:block;font-size:11px;color:#91a0a3;line-height:1.6;margin-top:10px}.page{margin-left:254px}.topbar{height:75px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 38px;font-size:14px;font-weight:500;color:#667c82}.header-right{display:flex;gap:20px;align-items:center}.semester{font-size:12px;color:#839195}.avatar{display:grid;place-items:center;width:33px;height:33px;background:#e3eeee;color:#15545b;border-radius:50%;font-weight:700}main{max-width:1550px;margin:auto;padding:28px 38px 0}.breadcrumb{font-size:12px;color:#829297;display:flex;align-items:center;gap:12px}.breadcrumb span:last-child{color:#4f686e}.page-heading{display:flex;justify-content:space-between;align-items:center;margin:26px 0 24px;gap:20px}.eyebrow{font-size:11px;letter-spacing:1.7px;font-weight:700;color:#2c8b83;margin:0 0 10px}h1,h2,h3{font-family:Manrope,sans-serif}h1{font-size:30px;line-height:1.25;letter-spacing:-1px;margin:0 0 9px}.page-heading p:not(.eyebrow){font-size:14px;color:#72878d;margin:0}.unit-counter{display:flex;flex-direction:column;align-items:flex-end;gap:6px;font-size:12px;color:#7d9196}.unit-counter strong{font-size:17px;color:#2c5359;font-weight:600}.unit-tabs{border-bottom:1px solid #d6e1e3;display:flex;gap:30px}.unit-tabs button{border:0;background:none;padding:0 1px 16px;font-size:14px;color:#7e9095}.unit-tabs button.selected{color:#16575b;font-weight:700;border-bottom:3px solid #16615f}.unit-tabs span{font-size:11px;background:#e0eae9;margin-left:7px;padding:2px 6px;border-radius:4px}.exercise-strip{display:flex;gap:10px;margin:22px 0 20px;flex-wrap:wrap}.exercise-chip{border:1px solid #dce5e7;background:#fff;color:#789095;padding:9px 13px;border-radius:7px;font-size:12px;display:flex;gap:8px;align-items:center}.exercise-chip.active{border-color:#398e87;color:#165e5c;background:#eaf5f1}.exercise-chip .chip-num{font-family:monospace;font-size:11px}.exercise-chip.solved .chip-num{color:#13765b}.workspace{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(370px,1.35fr);gap:20px;align-items:stretch}.problem-panel{background:#fff;border:1px solid var(--border);border-radius:12px;padding:25px 25px 19px;display:flex;flex-direction:column}.problem-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;letter-spacing:.5px;color:#8b9a9d}.difficulty{background:#eaf5ee;padding:5px 9px;border-radius:4px;color:#33785a;font-size:11px;letter-spacing:0}h2{font-size:24px;letter-spacing:-.7px;margin:23px 0 15px}.problem-panel>p{font-size:16px;line-height:1.7;color:#597077;margin:0 0 18px}.rule{font-size:13px;line-height:1.7;background:#f5f8f9;border-left:3px solid #c6d9db;padding:12px 14px;color:#5e757c;white-space:pre-wrap}.rule code{color:#184f57}h3{font-size:14px;margin:26px 0 12px}.example-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid #e2e9eb;border-radius:7px;overflow:hidden}.example-grid>div{padding:13px 12px;background:#fcfdfd;min-width:0}.example-grid>div+div{border-left:1px solid #e2e9eb}.example-grid span{font-size:9px;letter-spacing:.8px;color:#819397;font-weight:600}pre{font-family:'Source Code Pro',monospace;font-size:13px;line-height:1.65;margin:10px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.tip{display:flex;gap:12px;background:#f1f7ec;margin:24px 0 18px;border-radius:8px;padding:14px}.tip-icon{color:#4d815a;font-size:21px}.tip strong{font-size:12px;color:#437154}.tip p{font-size:12px;line-height:1.6;color:#6c816d;margin:5px 0 0}details{border:1px solid #e0e8e9;border-radius:7px;padding:12px 13px;color:#537277;font-size:13px;margin-bottom:20px}summary{cursor:pointer}details p{line-height:1.7;color:#687d83}.problem-footer{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;font-size:10px;color:#8b9ca0;margin-top:auto;padding-top:15px;border-top:1px solid #edf1f2}.coding-panel{border:1px solid #203740;border-radius:12px;overflow:hidden;background:#fff;min-width:0;display:flex;flex-direction:column}.editor-head{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#182d36;color:#9aafb8;height:47px;font-size:11px;padding-right:16px}.file-tab{background:#10232b;align-self:stretch;display:flex;align-items:center;gap:8px;padding:0 19px;color:#d2e0e2;border-top:2px solid #a8d857}.python-dot{width:7px;height:7px;border-radius:50%;background:#e4c65f}.editor-head>div{display:flex;align-items:center;gap:15px}.editor-head button{font-size:10px;background:none;border:0;color:#93aab3;padding:4px}.editor-wrap{display:flex;background:#10232b;height:282px;padding:22px 0;overflow:hidden}.editor-wrap>div{font-family:'Source Code Pro',monospace;white-space:pre;font-size:14px;line-height:24px;width:47px;flex-shrink:0;text-align:right;color:#526d78;overflow:hidden;padding-right:13px}#code-editor{font-family:'Source Code Pro',monospace;font-size:14px;line-height:24px;tab-size:4;background:transparent;border:0;color:#dae9de;resize:none;outline:none;white-space:pre;overflow-wrap:normal;width:100%;padding:0 16px 0 0;min-height:100%;caret-color:#d6f47b}#code-editor:focus{box-shadow:inset -2px 0 #80bfc1}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px;background:#172f38;color:#708e99;border-top:1px solid #29414b}.editor-actions>span{font-size:9px}.editor-actions>div{display:flex;gap:8px}.editor-actions button{border-radius:6px;font-size:12px;font-weight:600;padding:10px 13px;white-space:nowrap}.button-secondary,#stop{border:1px solid #49616b;background:#203b45;color:#d7e6e8}.button-primary{border:1px solid var(--lime);background:var(--lime);color:#274132}.button-primary:hover{background:#c5e866}.button-secondary:hover{background:#31515d}.console{flex:1;padding:0 18px 17px;min-height:218px}.console-tabs{display:flex;justify-content:space-between;gap:12px;padding:15px 0 13px;border-bottom:1px solid #e4eaeb;font-size:11px}.console-tabs strong{color:#456269;font-weight:600}.console-tabs span{color:#8b9b9f;font-size:10px}.custom-input{display:flex;gap:12px;align-items:center;padding-top:13px}.custom-input label{font-size:11px;color:#6e868c;line-height:1.5;max-width:140px}.custom-input label span{color:#a0adb1;font-size:10px}.custom-input textarea{font-family:monospace;width:100%;border:1px solid #dfe7e9;background:#fafcfc;border-radius:5px;padding:7px;font-size:12px;color:#48626b;resize:vertical;min-height:42px}.console-empty{text-align:center;color:#8da0a6;padding:18px 0 8px}.terminal-icon{font-family:monospace;color:#9cb6ba;font-size:23px}.console-empty p{font-size:12px;margin:6px 0}.console-empty small{font-size:10px;color:#9babb0}.result-heading{font-size:14px;font-weight:700;margin:15px 0 8px;color:#155d51}.result-heading.error{color:#aa4a45}.result-sub{font-size:12px;color:#70858d}.test-row{padding:10px 0;border-bottom:1px solid #e6eded;font-size:12px;color:#516a71}.test-row details{margin:7px 0 0;border:0;padding:0;font-size:11px}.test-row pre{font-size:11px}.test-result-pass{color:#218169}.test-result-fail{color:#a34f46}.output{padding:12px;background:#f6f9fa;border-radius:6px;margin:12px 0 0;max-height:230px;overflow:auto}.bottom-nav{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:21px 0 32px}.bottom-nav>span{font-size:11px;color:#84989e}.bottom-nav button{background:#fff;border:1px solid #d7e1e4;border-radius:6px;padding:10px 15px;color:#3f6970;font-size:12px}footer{border-top:1px solid #dce5e7;color:#90a1a6;font-size:10px;padding:19px 0;display:flex;justify-content:space-between;gap:16px}.theory-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:30px;max-width:950px;margin:24px 0}.theory-card h2{margin-top:0}.theory-card p{font-size:16px;line-height:1.8;color:#567179}.theory-card pre{background:#10232b;color:#dcedd4;padding:22px;border-radius:9px;font-size:14px}.theory-card button{margin-top:25px;background:#155c60;color:#fff;border:0;border-radius:7px;padding:12px 20px}.theory-card .concept-note{font-size:13px;color:#7a8d92}.busy{font-size:13px;color:#617b85;line-height:1.8;padding:17px 0}.storage-warning{color:#9d5c32!important}@media(min-width:1500px){.workspace{grid-template-columns:minmax(320px,.8fr) minmax(500px,1.3fr)}.editor-wrap{height:320px}}@media(max-width:1150px){.sidebar{width:224px;padding:28px 14px}.page{margin-left:224px}main{padding:25px 24px 0}.topbar{padding:0 24px}.workspace{grid-template-columns:minmax(255px,.9fr) minmax(320px,1.2fr);gap:14px}.problem-panel{padding:21px 18px}.editor-actions>span{display:none}.editor-actions{justify-content:flex-end}h1{font-size:27px}}@media(max-width:900px){.sidebar{position:static;width:auto;padding:18px 22px;border-right:0;border-bottom:1px solid var(--border)}.brand{font-size:20px}.course-label,.sidebar-bottom,.chapter-sub{display:none}.sidebar nav{display:flex;gap:8px;overflow-x:auto;margin-top:18px}.chapter{flex-shrink:0;margin:0}.chapter-btn{font-size:12px;padding:8px;gap:7px}.chapter-btn .num{height:23px;width:25px}.chapter-titles{max-width:135px}.page{margin:0}.topbar{height:55px}.workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}.semester{display:none}.unit-counter{flex-shrink:0}h2{font-size:22px}.editor-actions button{font-size:11px;padding:9px}.example-grid{grid-template-columns:1fr}.example-grid>div+div{border-left:0;border-top:1px solid #e2e9eb}}@media(max-width:680px){main{padding:23px 18px 0}.topbar{padding:0 18px}.page-heading{align-items:flex-start}.page-heading p:not(.eyebrow){line-height:1.6}.unit-counter{font-size:10px;margin-top:10px}.unit-counter strong{font-size:14px}h1{font-size:25px}.breadcrumb{font-size:10px;gap:8px}.workspace{grid-template-columns:1fr}.example-grid{grid-template-columns:1fr 1fr}.example-grid>div+div{border-top:0;border-left:1px solid #e2e9eb}.problem-panel{padding:22px}.editor-wrap{height:280px}.editor-actions button{font-size:12px;padding:10px 13px}.bottom-nav{align-items:flex-start}.bottom-nav>span{line-height:1.6}.bottom-nav button{flex-shrink:0}footer{line-height:1.6}footer span{display:none}.unit-tabs button{font-size:14px}.exercise-chip{font-size:11px;padding:8px 10px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s,color .15s,border-color .15s}}
.chapter-sub button,.exercise-chip,.rule,details,.bottom-nav button,.editor-actions button,.custom-input label,.test-row,.result-sub{font-size:14px}.problem-meta,.difficulty,.eyebrow,.course-label,.breadcrumb,.unit-counter,.editor-head,.editor-head button,.console-tabs,.console-tabs span,.example-grid span,.custom-input label span,.console-empty p,.console-empty small,.tip strong,.tip p,.problem-footer,.sidebar-bottom p,.sidebar-bottom a,.sidebar-bottom small,.bottom-nav>span,footer{font-size:12px}.editor-actions>span{font-size:12px}.example-grid pre,.output{font-size:14px}.test-row details,.test-row pre{font-size:13px}@media(max-width:1150px){.editor-actions>span{display:none}}@media(max-width:900px){.chapter-btn{font-size:14px}}@media(max-width:680px){.tip{display:none}.editor-actions button{font-size:14px}.problem-panel>p{font-size:16px}.unit-counter{font-size:12px}.exercise-chip{font-size:14px}}

/* Expanded learning notes, consistent with the existing campus palette. */
.theory-card{width:100%;min-width:0}.theory-card h3{font-size:18px;line-height:1.5;margin:28px 0 12px}.lesson-goal{border-left:3px solid var(--teal);padding:8px 18px;background:#f1f7f6}.lesson-section h3 span{font-size:14px;color:#527477;margin-right:6px}.theory-card pre{max-width:100%;overflow-x:auto;white-space:pre;font-size:14px;line-height:1.65}.lesson-output{margin-top:14px}.lesson-output strong,.lesson-warning strong{font-size:14px}.lesson-output pre{background:#edf5f3;color:#23494c;margin-top:9px}.lesson-warning{padding:18px 20px;border-left:3px solid #b99139;background:#fff9ec;border-radius:4px;margin:24px 0}.lesson-warning p{margin:6px 0 0}.lesson-check{font-size:16px;padding:18px;background:#f7faf9;margin:24px 0}.lesson-check summary{line-height:1.6;font-weight:600}.lesson-references{border-top:1px solid var(--border);margin-top:28px}.lesson-references a,.learning-source a{display:block;text-decoration:underline;text-underline-offset:3px;font-size:14px;line-height:1.6;overflow-wrap:anywhere;color:#155c60}.theory-card .lesson-references p{font-size:14px}.learning-source p{font-size:14px;line-height:1.65}.learning-source strong{font-size:14px}@media(max-width:680px){.theory-card{padding:20px}.theory-card pre{padding:16px}.lesson-warning{padding:14px}}
