:root { --lab-navy:#081725; --lab-aqua:#45e6c4; }
body { margin:0; }
.app { max-width:1800px; margin:auto; min-height:100vh; background:var(--paper); }
.topbar,.intro { display:flex; align-items:center; gap:24px; padding:18px 26px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-mark { display:grid; place-items:center; height:42px; border-radius:10px; }
.brand small { display:block; margin-top:3px; font-size:11px; color:var(--muted); font-weight:500; }
.home { margin-left:auto; font-size:12px; text-decoration:none; }
.intro { padding-top:25px; padding-bottom:25px; }
.eyebrow { font-size:10px; font-weight:850; letter-spacing:.12em; }
h1 { margin:5px 0 9px; font-size:clamp(25px,3vw,39px); letter-spacing:-.045em; }
.intro p:not(.eyebrow) { max-width:770px; margin:0; color:#536073; font-size:14px; line-height:1.6; }
.intro-note { margin-left:auto; padding:13px 16px; border-left:3px solid #3b917b; color:#536073; font-size:12px; line-height:1.7; white-space:nowrap; }
.intro-note strong { display:block; color:var(--ink); }
.lab-layout { display:grid; grid-template-columns:265px minmax(0,1fr); }
.library { padding:22px 16px; border-right:1px solid var(--line); background:#f3f6fa; }
.library summary { font-size:14px; font-weight:800; cursor:pointer; }
#total-progress { float:right; color:var(--blue); font:700 12px Consolas,monospace; }
progress { width:100%; height:7px; margin-top:13px; accent-color:#2e8b67; }
.small { color:var(--muted); font-size:11px; line-height:1.5; }
#levels { display:grid; gap:6px; margin:18px 0 24px; }
.level { display:grid; grid-template-columns:25px 1fr; gap:7px; width:100%; padding:10px; text-align:left; border:1px solid transparent; background:transparent; color:#526075; font-size:12px; line-height:1.4; }
.level b { display:grid; place-items:center; align-self:start; width:24px; height:24px; border-radius:6px; background:#e2e8f0; font:700 12px Consolas,monospace; }
.level.active { background:#fff; border-color:#b8cce8; color:var(--blue); box-shadow:0 3px 9px #19396208; }
.level.active b { color:#fff; background:var(--blue); }
.library h2 { margin:0 0 10px; font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
#exercises { display:grid; gap:3px; }
.exercise { width:100%; display:flex; align-items:center; gap:8px; text-align:left; padding:8px 9px; font-size:12px; color:#506076; border:1px solid transparent; background:transparent; }
.exercise.active { border-color:#c5d8ef; background:#e7f0fc; color:#204f93; font-weight:750; }
.exercise .number { flex:0 0 23px; color:#728399; font:11px Consolas,monospace; }
.exercise.done .number { color:#24845d; }
.wide { margin-top:20px; width:100%; }
.workbench { min-width:0; }
.assignment { padding:22px 25px 17px; background:#fffdf9; border-bottom:1px solid var(--line); }
.assignment-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.completion { display:flex; align-items:center; gap:5px; font-size:11px; color:#536073; }
.completion input { accent-color:#2e8b67; }
.assignment h2 { margin:10px 0 8px; font-size:24px; letter-spacing:-.035em; }
.assignment p,.assignment li { font-size:13px; line-height:1.6; }
.assignment p { margin:6px 0; }
.concept { padding:10px 13px; color:#426084; background:#edf3fa; border-radius:6px; }
.assignment ol { padding-left:21px; margin:13px 0; }
.help-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.help-grid details { min-width:0; padding:10px 12px; border:1px solid #d8e1ec; border-radius:8px; background:white; }
.help-grid summary { cursor:pointer; color:var(--blue); font-size:12px; font-weight:750; }
.help-grid pre { max-height:340px; overflow:auto; padding:12px; color:#dceaff; background:var(--lab-navy); border-radius:5px; font:12px/1.6 Consolas,monospace; }
.exercise-navigation { display:flex; justify-content:space-between; align-items:center; margin-top:15px; }
#level-progress { font-size:11px; color:var(--muted); }
button { cursor:pointer; }
.primary,.secondary { padding:8px 11px; border:1px solid #cbd5e1; border-radius:7px; font-size:11px; font-weight:750; }
button:disabled { opacity:.45; cursor:default; transform:none; }
.tools { display:flex; flex-wrap:wrap; gap:6px; padding:13px 20px 9px; background:#f1f5fa; }
.runtime-bar { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:0 20px 12px; border-bottom:1px solid var(--line); color:#596e86; background:#f1f5fa; font-size:11px; }
#status { font-weight:700; }
.workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); background:var(--lab-navy); }
.editor-pane,.preview-pane { min-width:0; }
.editor-pane { border-right:1px solid #294056; }
.panel-title { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 14px; border-bottom:1px solid #294056; background:#102339; }
.panel-title h2 { margin:0; color:#86dacd; font:700 11px Consolas,monospace; letter-spacing:.08em; }
.panel-title span { color:#a4bad0; font-size:10px; }
.editor { display:block; width:100%; height:440px; min-height:360px; padding:18px 15px; border:0; border-radius:0; resize:vertical; background:#081321; color:#e4efff; caret-color:white; font:13px/1.65 Consolas,"Courier New",monospace; tab-size:4; }
.editor:focus-visible { outline:2px solid #65b6ed; outline-offset:-2px; }
.canvas-area { display:grid; place-items:center; min-height:305px; padding:17px; background:radial-gradient(ellipse at top,#173859,#091725); }
canvas { display:block; width:100%; height:auto; object-fit:contain; border:1px solid #355371; border-radius:7px; background:#07111f; touch-action:none; }
.readout { display:flex; flex-wrap:wrap; gap:18px; padding:12px 17px; border-top:1px solid #20354c; color:#acc0d6; font:11px Consolas,monospace; }
.readout b { color:var(--lab-aqua); }
.canvas-tip { margin:0; padding:0 17px 15px; color:#92a9c1; font-size:11px; line-height:1.6; }
.console-wrap { padding:0 20px 18px; background:#102339; }
.console-head { display:flex; align-items:center; justify-content:space-between; padding:9px 0; }
.console-head h2 { margin:0; color:#ffc56c; font:700 10px Consolas,monospace; letter-spacing:.09em; }
.console-head button { padding:4px 8px; }
.console { height:130px; margin:0; overflow:auto; padding:12px; border:1px solid #294056; border-radius:7px; color:#c6d9ee; background:#050e1a; font:12px/1.55 Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.console.error { border-color:#bf6b75; color:#ffb8c2; }
.reference { padding:24px 26px 32px; border-top:1px solid var(--line); }
.reference>h2 { margin:0 0 7px; font-size:22px; letter-spacing:-.03em; }
.reference p { font-size:12px; line-height:1.7; color:#536073; }
.reference-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin-top:22px; }
.reference article { padding-left:15px; border-left:3px solid #c2d4e9; }
.reference h3 { margin:0 0 12px; font-size:14px; }
.reference pre { overflow:auto; font:11px/1.65 Consolas,monospace; }
code { font: .94em Consolas,monospace; }
.reference code { color:#27588e; }
[hidden] { display:none !important; }
@media (min-width:1450px) { .editor { height:505px; } .canvas-area { min-height:400px; } }
@media (max-width:1150px) { .lab-layout { grid-template-columns:230px minmax(0,1fr); } .workspace { grid-template-columns:1fr; } .editor { height:360px; } .editor-pane { border-right:0; } .canvas-area { min-height:0; } canvas { width:auto; max-width:100%; max-height:440px; } .reference-grid { grid-template-columns:1fr 1fr; } .intro-note { display:none; } }
@media (max-width:700px) { .topbar,.intro { padding:16px; } .brand { font-size:13px; } .home { font-size:11px; } .lab-layout { grid-template-columns:1fr; } .library { border-right:0; border-bottom:1px solid var(--line); padding:16px; } #levels { grid-template-columns:1fr 1fr; margin:12px 0; } #exercises { grid-template-columns:1fr 1fr; } .assignment { padding:18px 16px; } .assignment-top { flex-wrap:wrap; } .help-grid,.reference-grid { grid-template-columns:1fr; } .tools,.console-wrap { padding-left:14px; padding-right:14px; } .runtime-bar { padding-left:14px; padding-right:14px; } .reference { padding:22px 16px; } }
