.app-header{position:fixed;top:0;left:0;right:0;height:var(--header-height);display:flex;align-items:center;justify-content:space-between;padding:0 2rem;background:linear-gradient(135deg,var(--color-primary) 0%,var(--color-primary-dark) 100%);color:#fff;box-shadow:var(--shadow-md);z-index:100}.header-left{display:flex;align-items:center;gap:1rem}.sidebar-toggle{width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:8px;color:#fff;font-size:.875rem;transition:all var(--transition-fast)}.sidebar-toggle:hover{background:#fff3}.header-title h1{font-size:1.375rem;font-weight:600;margin:0;line-height:1.3}.header-subtitle{font-size:.875rem;opacity:.85;margin:0}.header-right{display:flex;align-items:center;gap:2rem}.header-meta{display:flex;gap:1.5rem}.meta-item{display:flex;align-items:center;gap:.5rem;font-size:.875rem;opacity:.9}.meta-icon{font-size:1rem}.progress-container{display:flex;flex-direction:column;align-items:flex-end;gap:.375rem}.progress-bar{width:180px;height:6px;background:#fff3;border-radius:3px;overflow:hidden}.progress-fill{height:100%;background:var(--color-accent);border-radius:3px;transition:width var(--transition-normal)}.progress-text{font-size:.75rem;opacity:.85}@media (max-width: 1024px){.header-meta{display:none}}@media (max-width: 768px){.app-header{padding:0 1rem}.header-title h1{font-size:1.125rem}.header-subtitle{display:none}.progress-bar{width:120px}}.sidebar{position:fixed;top:var(--header-height);left:0;bottom:0;width:var(--sidebar-width);background:var(--color-bg-white);border-right:1px solid var(--color-border);overflow-y:auto;transition:transform var(--transition-normal);z-index:40}.sidebar.closed{transform:translate(-100%)}.sidebar-nav{padding:1rem 0}.nav-list{list-style:none}.nav-item{margin:0}.nav-item.depth-0>.nav-link,.nav-item.depth-0>.nav-group{padding-left:1rem}.nav-item.depth-1>.nav-link,.nav-item.depth-1>.nav-group{padding-left:2rem}.nav-item.depth-2>.nav-link,.nav-item.depth-2>.nav-group{padding-left:3rem}.nav-item.depth-3>.nav-link,.nav-item.depth-3>.nav-group{padding-left:4rem}.nav-link{display:flex;align-items:center;gap:.75rem;width:100%;padding:.625rem 1rem;border:none;background:none;font-size:.9375rem;color:var(--color-text);text-align:left;cursor:pointer;transition:all var(--transition-fast)}.nav-link:hover{background:var(--color-bg-secondary)}.nav-link.active{background:linear-gradient(90deg,rgba(59,130,246,.1) 0%,transparent 100%);color:var(--color-primary-light);font-weight:500}.nav-link.completed,.nav-link.completed .nav-status{color:var(--color-accent)}.nav-status{flex-shrink:0;width:1.25rem;font-size:.75rem;color:var(--color-text-muted)}.nav-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-group{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;font-size:.8125rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.025em}.nav-group-icon{font-size:.875rem}.nav-children{border-left:2px solid var(--color-border);margin-left:1.5rem}@media (max-width: 1024px){.sidebar{box-shadow:var(--shadow-lg)}}.mermaid-container{margin:1.5rem 0;padding:1.5rem;background:var(--color-bg-white);border:1px solid var(--color-border);border-radius:8px;overflow-x:auto;display:flex;justify-content:center}.mermaid-container svg{max-width:100%;height:auto}.mermaid-error{margin:1.5rem 0;padding:1rem 1.25rem;background:#fef2f2;border:1px solid #fecaca;border-left:4px solid #ef4444;border-radius:0 8px 8px 0;color:#991b1b}.mermaid-error .error-icon{margin-right:.5rem}.mermaid-error .mermaid-source{margin-top:1rem;padding:.75rem;background:#0000000d;border-radius:4px;font-family:var(--font-mono);font-size:.8125rem;overflow-x:auto;white-space:pre-wrap;color:#7f1d1d}@media (max-width: 768px){.mermaid-container{padding:1rem}}.code-block-wrapper{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid var(--color-border);background:#282c34}.code-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background:#21252b;border-bottom:1px solid #181a1f}.code-language{font-family:var(--font-mono);font-size:.75rem;font-weight:500;color:#abb2bf;text-transform:uppercase;letter-spacing:.05em}.copy-button{padding:.25rem .75rem;background:transparent;border:1px solid #3e4451;border-radius:4px;font-family:var(--font-sans);font-size:.75rem;color:#abb2bf;cursor:pointer;transition:all var(--transition-fast)}.copy-button:hover{background:#3e4451;color:#e5e5e5}.copy-button:active{transform:scale(.98)}.code-content{margin:0!important;padding:1rem!important;font-size:.875rem!important;line-height:1.6!important;background:#282c34!important}.code-content code{font-family:var(--font-mono)!important}.code-content .linenumber{min-width:2.5em!important;padding-right:1em!important;color:#5c6370!important;text-align:right!important;-webkit-user-select:none;user-select:none}.code-content::-webkit-scrollbar{height:8px}.code-content::-webkit-scrollbar-track{background:#21252b}.code-content::-webkit-scrollbar-thumb{background:#3e4451;border-radius:4px}.code-content::-webkit-scrollbar-thumb:hover{background:#4b5263}@media (max-width: 768px){.code-header{padding:.375rem .75rem}.code-content{padding:.75rem!important;font-size:.8125rem!important}}.editor-block{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid #3e4451;background:#282c34}.editor-block-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background:#21252b;border-bottom:1px solid #3e4451}.editor-block-language{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#61afef}.editor-block-id{font-size:.6875rem;color:#5c6370}.editor-block-container{min-height:300px}.tutor-block{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid #065f46;background:#1e1e1e}.tutor-block-header{display:flex;justify-content:space-between;align-items:center;padding:.625rem 1rem;background:#065f46;color:#fff}.tutor-block-title{font-size:.875rem;font-weight:600}.tutor-block-ref{font-size:.6875rem;opacity:.8}.tutor-response{min-height:100px;max-height:300px;overflow-y:auto;padding:1rem;background:#252526;border-bottom:1px solid #333}.tutor-response pre{margin:0;font-family:system-ui,sans-serif;font-size:.875rem;line-height:1.6;white-space:pre-wrap;color:#d4d4d4}.tutor-placeholder{color:#5c6370;font-style:italic}.tutor-input-area{padding:.75rem 1rem;display:flex;flex-direction:column;gap:.75rem}.tutor-context-toggle{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:#888;cursor:pointer}.tutor-code-lines{color:#5c6370;margin-left:.25rem}.tutor-prompt-input{width:100%;padding:.75rem;font-size:.875rem;border:1px solid #444;border-radius:6px;background:#333;color:#fff;resize:vertical}.tutor-prompt-input:focus{outline:none;border-color:#10b981}.tutor-send-button{align-self:flex-end;padding:.625rem 1.25rem;font-size:.875rem;font-weight:600;background:#10b981;color:#fff;border:none;border-radius:6px;cursor:pointer}.tutor-send-button:hover:not(:disabled){background:#059669}.tutor-send-button:disabled{background:#4b5563;cursor:not-allowed}.output-block{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid #444;background:#1e1e1e}.output-block--error{border-color:#ef4444}.output-block-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background:#2d2d2d;font-size:.75rem;font-weight:600;text-transform:uppercase;color:#888}.output-block-ref{font-size:.6875rem;color:#5c6370}.output-block-content{padding:1rem;min-height:60px;max-height:250px;overflow-y:auto}.output-block-stdout{margin:0;font-family:Consolas,monospace;font-size:.8125rem;line-height:1.5;white-space:pre-wrap;color:#d4d4d4}.output-block-stderr{margin:.5rem 0 0;padding-top:.5rem;border-top:1px solid #3e4451;font-family:Consolas,monospace;font-size:.8125rem;line-height:1.5;white-space:pre-wrap;color:#fca5a5}.output-block-empty,.output-block-loading{color:#5c6370;font-style:italic}.run-button-block{display:inline-flex;align-items:center;gap:.5rem;margin:1rem 0;padding:.75rem 1.5rem;font-size:.9375rem;font-weight:600;background:#2563eb;color:#fff;border:none;border-radius:8px;cursor:pointer}.run-button-block:hover:not(:disabled){background:#1d4ed8}.run-button-block:disabled{cursor:not-allowed;opacity:.7}.run-button-block--running{background:#6b7280}/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.terminal-block{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid #3e4451;background:#1e1e1e}.terminal-block-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;background:#21252b;border-bottom:1px solid #3e4451}.terminal-block-shell{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#e5c07b}.terminal-block-id{font-size:.6875rem;color:#5c6370}.terminal-block-container{height:300px;padding:.5rem}.terminal-block-container .xterm{height:100%}.terminal-block-container .xterm-viewport{overflow-y:auto}.vscode-block{margin:1.5rem 0;border-radius:8px;overflow:hidden;border:1px solid #007acc;background:#1e1e1e}.vscode-block-header{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:#007acc;color:#fff}.vscode-block-instance{font-size:.875rem;font-weight:600}.vscode-block-logical{font-size:.75rem;opacity:.8}.vscode-block-link{margin-left:auto;font-size:.75rem;color:#fff;text-decoration:none;opacity:.8}.vscode-block-link:hover{opacity:1}.vscode-block-frame{width:100%;height:600px;border:none;background:#1e1e1e}.chapter{max-width:900px;margin:0 auto}.chapter-header{margin-bottom:2.5rem;padding-bottom:1.5rem;border-bottom:1px solid var(--color-border)}.chapter-position{font-size:.8125rem;font-weight:500;color:var(--color-primary-light);margin-bottom:.5rem}.chapter-title{font-size:2.25rem;font-weight:700;line-height:1.2;color:var(--color-text);margin-bottom:1rem}.chapter-tags{display:flex;flex-wrap:wrap;gap:.5rem}.chapter-content{font-size:1.0625rem;line-height:1.75}.chapter-content h1,.chapter-content h2,.chapter-content h3,.chapter-content h4{font-weight:600;line-height:1.3;color:var(--color-text);margin-top:2rem;margin-bottom:1rem}.chapter-content h1{font-size:1.875rem}.chapter-content h2{font-size:1.5rem}.chapter-content h3{font-size:1.25rem}.chapter-content h4{font-size:1.125rem}.chapter-content p{margin-bottom:1.25rem}.chapter-content ul,.chapter-content ol{margin-bottom:1.25rem;padding-left:1.5rem}.chapter-content li{margin-bottom:.5rem}.chapter-content li::marker{color:var(--color-primary-light)}.chapter-content .inline-code{padding:.125rem .375rem;font-size:.9em;background:var(--color-bg-secondary);border-radius:4px;color:var(--color-primary)}.table-wrapper{overflow-x:auto;margin:1.5rem 0}.chapter-content table{width:100%;border-collapse:collapse;font-size:.9375rem}.chapter-content th,.chapter-content td{padding:.75rem 1rem;border:1px solid var(--color-border);text-align:left}.chapter-content th{background:var(--color-bg-secondary);font-weight:600}.chapter-content tr:hover td{background:var(--color-bg)}.chapter-content .callout{margin:1.5rem 0;padding:1rem 1.25rem;background:linear-gradient(90deg,#3b82f614,#3b82f605);border-left:4px solid var(--color-primary-light);border-radius:0 8px 8px 0;color:var(--color-text)}.chapter-content .callout p{margin:0}.chapter-content a{color:var(--color-primary-light);text-decoration:underline;text-underline-offset:2px}.chapter-content a:hover{color:var(--color-primary)}.external-icon{font-size:.75em;margin-left:.25rem;opacity:.7}.chapter-content img{max-width:100%;height:auto;border-radius:8px;margin:1.5rem 0}.chapter-content hr{border:none;border-top:1px solid var(--color-border);margin:2rem 0}.chapter-nav{display:flex;align-items:center;justify-content:space-between;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--color-border)}.nav-btn{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.25rem;background:var(--color-bg-white);border:1px solid var(--color-border);border-radius:8px;font-size:.9375rem;font-weight:500;color:var(--color-text);transition:all var(--transition-fast)}.nav-btn:hover:not(:disabled){background:var(--color-bg-secondary);border-color:var(--color-border-dark)}.nav-btn-next:not(:disabled){background:var(--color-primary);border-color:var(--color-primary);color:#fff}.nav-btn-next:hover:not(:disabled){background:var(--color-primary-dark)}.nav-btn-arrow{font-size:1.125rem}.nav-shortcuts{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--color-text-muted)}@media (max-width: 768px){.chapter-title{font-size:1.75rem}.chapter-content{font-size:1rem}.nav-shortcuts,.nav-btn-text{display:none}}.screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--color-bg) 0%,var(--color-bg-secondary) 100%)}.screen-content{text-align:center;padding:2rem}.loading-screen .loader{width:48px;height:48px;margin:0 auto 1.5rem;border:4px solid var(--color-border);border-top-color:var(--color-primary-light);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.loading-screen p{font-size:1.125rem;color:var(--color-text-secondary)}.error-screen .error-icon{font-size:4rem;margin-bottom:1rem}.error-screen h1{font-size:1.5rem;font-weight:600;margin-bottom:.75rem;color:var(--color-text)}.error-screen p{font-size:1rem;color:var(--color-text-secondary);margin-bottom:1.5rem;max-width:400px}.retry-btn{padding:.75rem 1.5rem;background:var(--color-primary);border:none;border-radius:8px;font-size:.9375rem;font-weight:500;color:#fff;transition:background var(--transition-fast)}.retry-btn:hover{background:var(--color-primary-dark)}.app{min-height:100vh;display:flex;flex-direction:column}.app-body{display:flex;flex:1;margin-top:var(--header-height)}.app-main{flex:1;min-width:0;padding:2rem 3rem;transition:margin-left var(--transition-normal)}.app.sidebar-open .app-main{margin-left:var(--sidebar-width)}.app.sidebar-closed .app-main{margin-left:0}@media (max-width: 1024px){.app.sidebar-open .app-main{margin-left:0}.app.sidebar-open .sidebar{position:fixed;z-index:50;box-shadow:var(--shadow-lg)}}@media (max-width: 768px){.app-main{padding:1.5rem}}*{margin:0;padding:0;box-sizing:border-box}:root{--color-primary: #1e3a8a;--color-primary-light: #3b82f6;--color-primary-dark: #1e40af;--color-accent: #10b981;--color-accent-light: #34d399;--color-bg: #f8fafc;--color-bg-secondary: #f1f5f9;--color-bg-white: #ffffff;--color-text: #1e293b;--color-text-secondary: #64748b;--color-text-muted: #94a3b8;--color-border: #e2e8f0;--color-border-dark: #cbd5e1;--font-sans: "Inter", system-ui, -apple-system, sans-serif;--font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;--header-height: 80px;--sidebar-width: 320px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1);--transition-fast: .15s ease;--transition-normal: .25s ease}html{font-size:16px;scroll-behavior:smooth}body{font-family:var(--font-sans);color:var(--color-text);background:var(--color-bg);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--color-bg-secondary)}::-webkit-scrollbar-thumb{background:var(--color-border-dark);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}::selection{background:var(--color-primary-light);color:#fff}a{color:var(--color-primary-light);text-decoration:none;transition:color var(--transition-fast)}a:hover{color:var(--color-primary);text-decoration:underline}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}code{font-family:var(--font-mono)}kbd{display:inline-block;padding:2px 6px;font-family:var(--font-mono);font-size:.75rem;background:var(--color-bg-secondary);border:1px solid var(--color-border);border-radius:4px;box-shadow:0 1px 1px #0000001a}.tag{display:inline-block;padding:2px 10px;font-size:.75rem;font-weight:500;background:var(--color-bg-secondary);border-radius:9999px;color:var(--color-text-secondary)}
