/* SPDX-License-Identifier: 0BSD */
:root { color-scheme: dark; font-family: Inter, 'Segoe UI', system-ui, sans-serif; font-size: 16px; color: #e5eeec; background: #101c23; --mint: #8ae0b8; --line: #34464d; --muted: #aec0c6; --panel: #17262e; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); color: inherit; background: #253740; border-radius: 6px; padding: 8px 12px; min-height: 36px; font-size: .875rem; }
button:hover { background: #354c55; border-color: #6e8e91; }
button:disabled { opacity: .5; cursor: default; }
button.primary, button.play { background: var(--mint); color: #133a2b; border-color: var(--mint); font-weight: 650; }
button.primary:hover, button.play:hover { background: #aff2cf; }
button.danger { background: #813e3c; border-color: #c78079; }
button.active { border-color: #8ae0b8; color: #a7f0c9; }
button.text-button { background: none; border: 0; color: #315f4b; }
button.icon-button { width: 36px; padding: 4px; font-size: 1.25rem; }
a { color: inherit; }
:focus-visible { outline: 3px solid #56b58e; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 20; top: 6px; left: 6px; background: #fff; color: #123e2a; padding: 12px; }
.topbar { display: flex; align-items: center; min-height: 74px; padding: 12px 24px; gap: 28px; background: #1b302d; border-bottom: 1px solid #40594f; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { border: 1px solid #739c88; border-radius: 9px; padding: 8px 6px; color: #b1ebcc; font: 700 18px ui-monospace, monospace; }
.brand strong { font-size: 1.65rem; letter-spacing: -.055em; color: #f1f6f2; }
.brand-period { color: #90e5b5; }
.workspace-label { letter-spacing: .14em; color: #b3cbbf; font-size: .75rem; }
.topbar nav { display: flex; margin-left: auto; gap: 8px; }
.topbar nav button { background: #2b443b; border-color: #4a6759; }
.count { margin-left: 10px; color: #ace7c8; font-variant-numeric: tabular-nums; }
.workspace { display: grid; grid-template-columns: 322px minmax(0, 1fr); height: calc(100dvh - 106px); min-height: 630px; }
.lesson-panel { background: #f4f7f3; color: #213c32; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #cad8ce; }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 22px; border-bottom: 1px solid #d6e1d9; }
.eyebrow { font-size: .75rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.duration { font-size: .75rem; color: #526d5d; white-space: nowrap; }
.lesson-scroll { padding: 28px 24px 18px; overflow-y: auto; flex: 1; }
.lesson-number { display: flex; align-items: center; gap: 13px; font: 500 2.6rem ui-monospace, monospace; color: #52876b; margin-bottom: 18px; }
.lesson-number span { font: 650 .65rem/1.6 system-ui; letter-spacing: .09em; max-width: 95px; color: #5b7566; }
h1 { font-size: 1.9rem; line-height: 1.12; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 720; }
p { line-height: 1.65; }
.concept { font-size: .94rem; color: #50665a; margin-bottom: 24px; }
.assignment { background: #e5eee6; border: 1px solid #d0dfd2; border-left: 3px solid #54876b; padding: 15px; border-radius: 0 8px 8px 0; }
.assignment .eyebrow { color: #406d53; }
.assignment p { font-size: .94rem; margin: 8px 0 0; }
details { border-top: 1px solid #d4dfd7; margin-top: 20px; padding-top: 16px; font-size: .875rem; }
summary { cursor: pointer; line-height: 1.5; font-weight: 600; }
details p { overflow-wrap: anywhere; }
.notes label { display: block; line-height: 1.5; margin: 12px 0 8px; color: #50685a; }
.notes textarea { color-scheme: light; background: #fff; color: #223d31; width: 100%; min-height: 160px; resize: vertical; border: 1px solid #99b2a1; border-radius: 5px; padding: 10px; font-size: .9rem; }
.sources a { display: block; margin-top: 12px; color: #226244; line-height: 1.5; }
.lesson-footer { display: grid; gap: 5px; padding: 16px 24px; border-top: 1px solid #d6e1d9; }
.lesson-footer .primary { background: #245d43; color: white; border-color: #245d43; padding: 12px; }
.lesson-footer .reset-button { color: #627868; font-size: .75rem; background: none; border: 0; min-height: 25px; padding: 2px; }
.rail-builder { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; border: 1px solid #4d7261; border-radius: 8px; padding: 18px; margin-bottom: 32px; }
.rail-builder label { font-size: .875rem; }.rail-builder select { display: block; margin-top: 8px; padding: 8px; background: #203c36; border: 1px solid #7bb190; border-radius: 5px; color: #e6f2ea; }
.rail-builder output { background: #274a3d; color: #d4f5e1; padding: 10px; border-radius: 5px; font: .875rem ui-monospace, monospace; overflow-wrap: anywhere; }
.workbench { display: grid; grid-template-columns: minmax(380px, 1.08fr) minmax(290px, 1fr); grid-template-rows: minmax(350px, 1fr) 238px; min-width: 0; min-height: 0; }
.panel-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; min-height: 56px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #1a2a32; }
.panel-heading strong { font-size: .9rem; font-weight: 650; }
.panel-heading > span { font-size: .8rem; color: var(--muted); }
.panel-actions { display: flex; align-items: center; gap: 7px; }
.panel-actions button { padding: 6px 10px; min-height: 34px; font-size: .8rem; }
.coding { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.code-body { display: flex; flex: 1; min-height: 0; }
.files { width: 155px; min-width: 120px; background: #18272f; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.file-heading { display: flex; align-items: center; padding: 11px 10px; justify-content: space-between; color: #adc3c8; font-size: .7rem; letter-spacing: .08em; }
.file-heading .icon-button { min-height: 24px; height: 24px; width: 24px; border: 0; background: none; }
#file-tree { flex: 1; overflow: auto; }
.file-entry { width: 100%; border: 0; border-radius: 0; background: none; text-align: left; font: .78rem ui-monospace, monospace; padding: 11px 6px; display: flex; gap: 7px; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-entry.selected { background: #2b423e; border-left: 2px solid var(--mint); color: #bdf0d6; }
.file-type { width: 17px; flex-shrink: 0; color: #91adba; font-size: .7rem; }
.file-type.html { color: #f3bb90; font-size: 1rem; }
.file-type.css { color: #85bddc; font-size: 1rem; }
.file-type.js { color: #e6d893; }
.directory { padding: 10px; font-size: .8rem; color: #adc2c4; }
.file-tools { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-top: 1px solid var(--line); }
.file-tools button { font-size: .75rem; min-height: 29px; padding: 5px; }
.file-empty { padding: 12px; font-size: .8rem; }
.editor-panel { display: flex; flex-direction: column; min-width: 0; flex: 1; background: #101d25; }
#file-tabs { min-height: 44px; display: flex; overflow-x: auto; background: #15252e; flex-shrink: 0; }
#file-tabs button { background: none; border: 0; border-right: 1px solid #2c3f46; border-radius: 0; font: .78rem ui-monospace, monospace; padding: 12px 16px; white-space: nowrap; }
#file-tabs button.selected { border-top: 2px solid #8de0b5; background: #101d25; color: #bcf3d4; padding-top: 10px; }
.editor-wrap { display: flex; flex: 1; min-height: 0; padding-top: 17px; position: relative; }
#highlight { position: absolute; inset: 17px 0 0 42px; pointer-events: none; font: .875rem/1.8 'Cascadia Code', Consolas, ui-monospace, monospace; letter-spacing: 0; tab-size: 2; padding: 0 16px 20px 0; margin: 0; white-space: pre; overflow: hidden; color: #d0e8e0; }
.syntax-tag { color: #84cfba; }.syntax-keyword { color: #c0b9f3; }.syntax-string { color: #e6ca99; }.syntax-number { color: #a4cfef; }.syntax-comment { color: #829b98; }
#line-numbers, #editor { font: .875rem/1.8 'Cascadia Code', Consolas, ui-monospace, monospace; letter-spacing: 0; tab-size: 2; margin: 0; border: 0; padding: 0; }
#line-numbers { width: 42px; flex-shrink: 0; text-align: right; padding-right: 12px; color: #6b838c; overflow: hidden; user-select: none; }
#editor { position: relative; flex: 1; min-width: 0; background: transparent; color: transparent; caret-color: #e3f7ec; resize: none; white-space: pre; overflow: auto; outline-offset: -3px; padding-right: 16px; padding-bottom: 20px; }
#editor::selection { background: #4c8e6a80; color: transparent; }
.editor-status, .browser-status { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #2c4047; min-height: 30px; padding: 7px 12px; font-size: .7rem; color: #a9bfc4; }
.editor-status > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #1a2b32; }
.addressbar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #23363e; color: #a7bfc4; }
.addressbar input { min-width: 0; flex: 1; background: #15252d; color: #d6e5e5; border: 1px solid #3a5158; border-radius: 5px; padding: 8px 10px; font: .75rem ui-monospace, monospace; }
.addressbar button { min-height: 30px; height: 32px; padding: 3px 9px; }
.preview-host { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; background: #e2e8e3; }
.preview-host iframe { border: 0; width: 100%; height: 100%; background: #fff; color-scheme: light; }
.preview-host.mobile iframe { width: 375px; flex-shrink: 0; box-shadow: 0 0 0 1px #9dadab; }
.browser-empty { align-self: center; text-align: center; color: #526c5e; padding: 32px 18px; }
.empty-symbol { display: inline-flex; justify-content: center; align-items: center; width: 66px; height: 60px; border: 1px solid #acc5b4; border-radius: 14px; font: 24px ui-monospace, monospace; color: #518469; background: #eaf2e9; }
.browser-empty h2 { font-size: 1.2rem; letter-spacing: -.03em; color: #365a45; margin-top: 24px; }
.browser-empty p { font-size: .9rem; }
.key-cap { display: inline-block; border: 1px solid #b2c5b6; border-radius: 6px; padding: 7px 12px; font-size: .75rem; margin-top: 10px; color: #41624d; }
.console-panel { grid-column: 1 / -1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: #101c23; }
.console-tabs { display: flex; flex-shrink: 0; gap: 12px; border-bottom: 1px solid var(--line); padding: 0 15px; min-height: 43px; }
.console-tabs button { border: 0; background: none; border-radius: 0; color: #a4bac2; font-size: .8rem; padding: 10px 5px; }
.console-tabs button.selected { border-bottom: 2px solid var(--mint); color: #aff0cd; }
.console-tabs button.command-help { margin-left: auto; color: #b2d9c7; }
#console-content { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 12px 18px; overflow: auto; }
#terminal-output { flex: 1; overflow: auto; font: .8rem/1.75 ui-monospace, Consolas, monospace; color: #b4cbc8; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-line.error { color: #ffaca3; }
.warning { color: #f6cb96; }
.success { color: #a8ebc4; }
.muted { color: #a5b9bf; }
#command-form { display: flex; align-items: center; gap: 10px; padding-top: 7px; font: .82rem ui-monospace, monospace; }
#command-form label { color: #99d7b4; white-space: nowrap; }
#command-form input { flex: 1; width: 0; border: 0; background: none; color: #e3f1ec; outline-offset: 0; padding: 5px; }
#command-form button { border: 0; background: none; min-height: 24px; padding: 0 6px; }
.network-row { display: grid; grid-template-columns: 125px 1fr; gap: 12px; border-bottom: 1px solid #263e47; padding: 7px; font-size: .8rem; }
.network-row code { overflow-wrap: anywhere; }
#selector-form { display: flex; gap: 10px; align-items: center; font-size: .875rem; }
#selector-form input { background: #1c3039; color: white; border: 1px solid #53727a; border-radius: 4px; padding: 7px; min-width: 80px; }
#analysis-output { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; padding-top: 14px; font-size: .8rem; }
#analysis-output pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
#analysis-output small { color: #a8c1c4; }
.statusbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #163d30; min-height: 32px; padding: 7px 20px; font-size: .7rem; color: #c1dece; }
.status-light { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8addaf; margin-right: 7px; }
.status-separator { margin: 0 10px; opacity: .6; }
.feedback-item { display: flex; gap: 9px; padding: 11px; border-radius: 6px; margin-top: 9px; font-size: .875rem; line-height: 1.5; }
.feedback-item.passed { background: #dceede; color: #255535; }
.feedback-item.needs-work { background: #f4e7d5; color: #795022; }
.concept-main { min-width: 0; overflow: auto; background: #12262b; }
.concept-content { max-width: 1050px; margin: 0 auto; padding: 42px; }
.activity-intro h2 { font-size: 2rem; margin: 14px 0 8px; letter-spacing: -.035em; }
.activity-intro p { color: #aec7c7; }
.activity-intro .eyebrow { color: #a3dbbf; }
.quiz { display: grid; gap: 22px; margin: 26px 0; }
.quiz fieldset { border: 1px solid #466359; border-radius: 12px; padding: 24px; background: #1b3433; min-width: 0; }
.quiz legend { padding: 0 8px; font-weight: 650; line-height: 1.5; max-width: 100%; }
.question-number { color: #a5e0bd; margin-right: 12px; font: .9rem ui-monospace, monospace; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid #48665c; border-radius: 7px; margin-top: 10px; cursor: pointer; line-height: 1.5; background: #203d37; }
.option:has(input:checked) { border-color: #a1e5bf; background: #315447; }
.option input { accent-color: #9be4b6; margin-top: 5px; }
.railroad { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; background: #eaf3e9; color: #183d2e; padding: 26px; border-radius: 12px; margin-bottom: 16px; }
.railroad code { display: block; padding: 10px 14px; border: 1px solid #608571; background: #fff; border-radius: 20px; }
.rail-choice { display: grid; gap: 10px; border-left: 2px solid #70937c; border-right: 2px solid #70937c; padding: 7px 10px; text-align: center; font-size: .875rem; }
.rail-dot { width: 8px; height: 8px; border-radius: 50%; background: #27593d; }
.reflection-card { padding: 40px; border: 1px solid #4b7763; background: #214537; border-radius: 16px; }
.reflection-card h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.04em; line-height: 1.1; }
.reflection-card p { max-width: 650px; color: #c2dace; }
.reflection-steps { display: flex; gap: 35px; line-height: 2; color: #b9e2c9; margin: 30px 0; }
.reflection-card button { margin: 6px; }
dialog { color-scheme: light; background: #f4f7f3; color: #243f32; border: 1px solid #a5b9aa; border-radius: 14px; width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; box-shadow: 0 24px 100px #0008; }
dialog::backdrop { background: #081820b8; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid #d1dfd4; position: sticky; top: 0; background: #f4f7f3; z-index: 1; }
.dialog-heading h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.025em; }
#dialog-body { padding: 0 28px 28px; }
dialog button { color: #234a35; background: #e5eee4; border-color: #a4bba9; }
dialog button:hover { background: #cfdfce; }
dialog .muted { color: #576f60; }
dialog input:not([type=radio]):not([type=file]) { display: block; width: 100%; margin-top: 10px; padding: 12px; color: #213f31; background: #fff; border: 1px solid #8ca892; border-radius: 5px; }
.dialog-intro { max-width: 800px; color: #506959; }
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.track-card { border: 1px solid #c4d6c8; border-radius: 10px; padding: 20px; background: #fff; }
.track-title { display: flex; gap: 14px; align-items: center; }
.track-title > span { display: grid; place-items: center; border-radius: 10px; background: #e1eee1; color: #416e4e; width: 43px; height: 43px; flex-shrink: 0; font: 1rem ui-monospace, monospace; }
.track-title h3 { margin: 0; font-size: 1.05rem; }
.track-title p { font-size: .8rem; margin: 4px 0; color: #657b6a; }
.prerequisite { font-size: .75rem; color: #567562; border-bottom: 1px solid #d8e3d9; padding-bottom: 10px; }
.path-lesson { width: 100%; display: flex; align-items: center; text-align: left; gap: 11px; border: 0; background: none; padding: 11px 5px; border-radius: 6px; line-height: 1.5; }
.path-lesson > span:last-child { margin-left: auto; }
.path-lesson small { display: block; color: #5f7867; font-size: .75rem; }
.path-lesson.current { background: #e2efe1; box-shadow: inset 3px 0 #5d9670; }
.completion { color: #3e7952; font-size: 1.1rem; }
.help-steps { padding-left: 22px; line-height: 1.7; }
.help-steps li { padding: 10px 0; }
.command-list { display: grid; grid-template-columns: 160px 1fr; gap: 18px; line-height: 1.5; }
.command-list dd { margin: 0; }
.snippet { border-bottom: 1px solid #c5d6c8; padding: 10px 0 20px; }
.snippet pre { padding: 16px; background: #e6ede5; border-radius: 7px; overflow: auto; line-height: 1.7; }
.transfer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.import-label { display: block; margin: 20px 0; }
.import-label input { display: block; padding: 15px 0; }
#file-form { padding-top: 20px; }
#file-error, #import-feedback { color: #9c3630; line-height: 1.6; }
.toast { position: fixed; bottom: 48px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 30px); padding: 12px 20px; border-radius: 8px; border: 1px solid #76ba91; background: #244b38; color: #e1f8e9; box-shadow: 0 4px 25px #0004; z-index: 20; font-size: .875rem; }
dialog .quiz fieldset { color: #243f32; background: #e4eee3; border-color: #aac4ac; }
dialog .option { background: white; border-color: #a6bca9; }
dialog .option:has(input:checked) { background: #d1e8d2; }
dialog .activity-intro .eyebrow, dialog .activity-intro p { color: #4c7157; }
[hidden] { display: none !important; }
@media (min-width: 1650px) { .workspace { grid-template-columns: 360px minmax(0, 1fr); }.files { width: 190px; }.lesson-scroll { padding: 32px; }.workbench { grid-template-rows: minmax(350px, 1fr) 260px; } }
@media (max-width: 1180px) { .workspace { grid-template-columns: 285px minmax(0, 1fr); height: auto; min-height: calc(100dvh - 106px); }.workbench { grid-template-columns: minmax(0, 1fr); grid-template-rows: 470px 400px 260px; }.console-panel { grid-column: 1; }.lesson-scroll { overflow: visible; }.lesson-panel { min-height: 700px; }.lesson-footer { position: sticky; bottom: 0; background: #f4f7f3; }.files { width: 175px; }.workspace-label { display: none; }.concept-main { min-height: 700px; }.concept-content { padding: 26px; } }
@media (max-width: 700px) { .topbar { padding: 12px; gap: 10px; flex-wrap: wrap; }.brand strong { font-size: 1.4rem; }.topbar nav { gap: 5px; }.topbar nav button { padding: 7px; }.count { margin-left: 5px; }.workspace { grid-template-columns: minmax(0, 1fr); }.lesson-panel { min-height: 0; }.lesson-scroll { padding: 20px; }.lesson-number { display: none; }.lesson-top { padding: 14px 20px; }.lesson-panel h1 { font-size: 1.6rem; }.concept { margin-bottom: 18px; }.lesson-footer { position: static; }.workbench { grid-template-rows: 440px 430px 260px; }.files { width: 130px; min-width: 105px; }.panel-heading { padding: 9px 12px; }.editor-status span:last-child { display: none; }.statusbar { flex-wrap: wrap; padding: 10px 14px; }.path-grid, .transfer-grid { grid-template-columns: 1fr; }.concept-content { padding: 20px; }.quiz fieldset { padding: 15px; }.reflection-card { padding: 22px; }.reflection-steps { gap: 20px; font-size: .85rem; }.console-tabs { gap: 8px; padding: 0 8px; }.console-tabs button { font-size: .75rem; }.console-tabs .command-help { display: none; }#selector-form { flex-wrap: wrap; }#analysis-output { grid-template-columns: 1fr; }.dialog-heading { padding: 20px; }#dialog-body { padding: 0 20px 22px; }.command-list { grid-template-columns: 1fr; gap: 8px; }.command-list dd { margin-bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Compact workspace shared with Objektwerk's task-dialog model. */
.workspace { display:flex; flex-direction:column; height:calc(100dvh - 106px); min-height:550px; }
.task-strip { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 22px; color:#203e30; background:#f3f7f1; border-bottom:1px solid #b9ccbc; }
.task-strip h1 { margin:4px 0 0; font-size:1.15rem; line-height:1.3; }
.task-strip .eyebrow { color:#526e57; font-size:.65rem; }
.task-actions { display:flex; flex-wrap:wrap; gap:8px; }
.task-actions button { color:#285139; border:1px solid #b4cbb8; background:#e7efe4; }
.task-actions .primary { background:#216044; color:white; }
#feedback:empty { display:none; }
#feedback { flex:none; max-height:140px; overflow:auto; background:#edf4e9; padding:0 20px; color:#244934; }
#feedback .feedback-item { margin:5px 0; padding:6px 10px; }
.workbench { flex:1; min-height:0; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); grid-template-rows:minmax(220px,1fr) 200px; }
.files { width:200px; flex-shrink:0; }
.file-heading { flex-wrap:wrap; gap:4px; padding:10px; }
.file-heading>span { width:100%; }
.file-heading button { font-size:.7rem; padding:6px; }
.file-folder summary { padding:8px 10px; cursor:pointer; font-size:.8rem; overflow-wrap:anywhere; }
.file-folder summary.selected { color:#b5e5c0; }
.file-entry { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#file-tabs { display:flex; overflow-x:auto; min-height:40px; flex-shrink:0; }
.file-tab { display:flex; border-right:1px solid #304737; border-bottom:2px solid transparent; flex-shrink:0; }
.file-tab.selected { background:#243b2c; border-bottom-color:#a5d18e; }
#file-tabs .file-tab button { border:0; background:none; padding:8px 10px; }
#file-tabs .close-tab { padding:4px 8px; min-width:32px; font-size:18px; }
#asset-viewer { flex:1; min-height:0; overflow:auto; background:#e8eee7; color:#25472f; }
#asset-viewer img { display:block; max-width:100%; max-height:calc(100% - 50px); object-fit:contain; margin:auto; }
#asset-viewer.actual-size img { max-width:none; max-height:none; }
#asset-viewer object { width:100%; height:calc(100% - 60px); min-height:220px; }
.viewer-tools { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px; font-size:.8rem; }
.viewer-tools a { color:#215d3e; }
.viewer-tools button { color:#215d3e; border-color:#91aa93; }
.task-document { line-height:1.75; }
.task-document .concept { font-size:1rem; color:#47624e; margin:0 0 20px; }
.task-document h3 { margin-bottom:6px; }
.task-document details { border-top:1px solid #cedbcc; padding:12px 0; }
.task-document summary { cursor:pointer; font-weight:650; }
.task-document code { padding:2px 5px; background:#e2ecdc; border-radius:4px; color:#205635; overflow-wrap:anywhere; }
.task-document textarea { display:block; width:100%; min-height:120px; margin:8px 0 16px; padding:12px; }
.task-dialog-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
dialog:has(.task-document),dialog:has(.tutorial-step) { width:min(690px,calc(100vw - 24px)); max-height:min(760px,calc(100dvh - 24px)); }
dialog select { display:block; width:100%; padding:10px; margin:8px 0 18px; border:1px solid #98af99; border-radius:5px; }
.language-select { border:1px solid #5f8065; border-radius:6px; padding:6px; background:transparent; color:inherit; }
.mobile-panes { display:none; }
.syntax-property { color:#94d9ee; }.syntax-selector { color:#d8b5f5; }.syntax-function { color:#f1d795; }.syntax-plain { color:inherit; }
.concept-main { min-height:0; flex:1; overflow:auto; }
.tutorial-progress { color:#59765d; font-size:.8rem; }
.tutorial-step p { line-height:1.8; }
.tutorial-step .task-dialog-actions { justify-content:space-between; }
@media (max-width:1180px) and (min-width:701px) {
 .workspace { height:calc(100dvh - 106px); min-height:650px; }
 .workbench { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); grid-template-rows:minmax(260px,1fr) 200px; }
 .files { width:155px; }.editor-status span:last-child { display:none; }
}
@media (max-width:700px) {
 #app { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
 .topbar { flex:none; padding:8px 10px; gap:6px; }
 .brand-icon,.workspace-label,.brand-period { display:none; }
 .brand strong { font-size:1.15rem; }.topbar nav { margin-left:auto; }
 .topbar nav button { min-height:40px; font-size:.72rem; padding:6px; }
 .count { display:none; }.language-select { min-height:40px; }
 .workspace { flex:1; height:auto; min-height:0; overflow:hidden; }
 .task-strip { padding:9px 12px; display:block; }.task-strip .eyebrow { display:none; }
 .task-strip h1 { font-size:.95rem; margin:0 0 7px; }
 .task-actions { gap:6px; flex-wrap:nowrap; }.task-actions button { min-height:40px; padding:6px 9px; font-size:.72rem; }
 .task-actions button:last-child { margin-left:auto; }
 .mobile-panes { display:flex; flex:none; background:#203828; border-bottom:1px solid #496048; padding:3px 8px; gap:6px; }
 .mobile-panes button { flex:1; border:0; min-height:44px; padding:7px 4px; font-size:.8rem; border-radius:5px; }
 .mobile-panes [aria-pressed=true] { background:#385942; color:#fff; }
 .workbench { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
 .coding,.browser-panel,.console-panel { flex:1; min-height:0; }
 .code-body { min-height:0; }.files { width:100%; min-width:0; }
 .workspace[data-pane=editor] .files,.workspace[data-pane=files] .editor-panel,
 .workspace:not([data-pane=browser]) .browser-panel,.workspace:not([data-pane=console]) .console-panel,
 .workspace:is([data-pane=browser],[data-pane=console]) .coding { display:none; }
 .workspace[data-pane=files] .coding>.panel-heading { display:none; }
 .file-heading>span { width:auto; margin-right:auto; }.file-heading button { min-height:44px; padding:8px 12px; }
 .file-entry,.file-folder summary { min-height:44px; font-size:.9rem; }.file-tools { flex-direction:row; flex-wrap:wrap; }
 .file-tools button { min-height:40px; flex:1; }
 #file-tabs .close-tab { min-width:44px; min-height:44px; }
 .statusbar { flex:none; min-height:26px; padding:5px 10px; font-size:.6rem; }.statusbar>span:first-child { display:none; }
 .panel-heading { flex:none; }.console-tabs { overflow:auto; flex:none; }.console-tabs button { min-height:44px; white-space:nowrap; }
 #feedback { max-height:110px; padding:0 10px; font-size:.75rem; }
 dialog { max-height:calc(100dvh - 18px); }dialog button,dialog summary { min-height:44px; }
 .dialog-heading { padding:14px 16px; }.dialog-heading h2 { font-size:1.1rem; }
 #dialog-body { padding:0 16px 18px; }.concept-main { min-height:0; }
 #editor { font-size:16px; }#highlight,#line-numbers { font-size:16px; }
}

.tour-target { outline:3px solid #a1ebbd; outline-offset:-4px; }
.tutorial-dialog { position:fixed; margin:0; left:auto; top:auto; bottom:45px; right:20px; width:min(440px,calc(100vw - 24px)) !important; max-height:55dvh !important; box-shadow:0 16px 70px #0007; z-index:30; }
.tutorial-menu { display:flex; flex-wrap:wrap; gap:12px; }

.dialog-heading { align-items:center; gap:12px; }
.dialog-heading h2 { flex:1; min-width:0; }
.dialog-heading .language-select { width:auto; flex:none; margin:0; padding:8px; min-width:68px; }
.dialog-heading .icon-button { flex:none; height:40px; }

/* One scroll origin keeps the gutter aligned even at the final line. */
.number-gutter { width:42px; flex:none; overflow:hidden; position:relative; }
#line-numbers { height:auto; min-height:0; overflow:visible; padding-bottom:0; will-change:transform; }
.header-primary { display:flex; gap:7px; flex:none; }
.topbar { gap:20px; }.topbar .brand { margin-right:auto; }
.task-strip { padding:8px 20px; }.task-strip h1 { font-size:1rem; }.task-strip .eyebrow{font-size:.6rem;}
.file-heading { display:flex; flex-wrap:nowrap; padding:7px 8px; gap:3px; }.file-heading>span { width:auto; margin-right:auto; }
.file-heading button.file-icon { min-height:30px; padding:3px; min-width:29px; font-size:16px; border:0; background:transparent; }
.file-tools { display:flex; flex-direction:row; flex-wrap:nowrap; padding:6px; gap:3px; }
.file-tools .file-icon { flex:1; min-width:0; padding:4px; font-size:17px; min-height:32px; background:transparent; border:0; }
.file-icon:hover { color:#9be6bd; background:#29463b !important; }
.console-controls { display:flex; align-items:center; gap:8px; margin-left:auto; }.console-controls select { background:#213b35; color:#d9eae3; border:1px solid #476359; border-radius:6px; padding:5px; font-size:.75rem; }
.console-tabs .command-help { display:block; margin-left:0; background:#284b3f; border:1px solid #567568; padding:5px 10px; border-radius:6px; }
.command-palette { display:grid; gap:8px; }.command-palette button { text-align:left; display:flex; flex-direction:column; gap:6px; background:#e6eee3; color:#284a34; border-color:#bed0bf; padding:12px; }.command-palette code { color:#205937; }.command-palette span { font-size:.8rem; }
@media(max-width:700px){
 .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; padding:8px; gap:6px; }.header-primary{grid-column:1;grid-row:1;}.topbar .brand{grid-column:2;grid-row:1;}.topbar nav{grid-column:1/-1;width:100%;justify-content:flex-start;margin:0;}.topbar nav .language-select{margin-left:auto;}
 .task-strip {display:flex;padding:8px 12px;gap:5px;}.task-strip h1 {margin:0;font-size:.86rem;}.task-actions button{min-height:32px;}
 .file-heading button.file-icon,.file-tools .file-icon{min-height:44px;min-width:40px;}.file-tools{flex-wrap:nowrap;}.console-tabs{flex-wrap:wrap;}.console-controls{margin:0 0 4px auto;}.console-controls select{min-height:36px;}.console-tabs .command-help{min-height:36px;}
}

/* Four accessible journeys: connected stations, earned progress, no locks or timers. */
.journey-intro {display:flex;align-items:center;gap:24px;justify-content:space-between}.journey-intro p{max-width:65ch}.journey-legend{display:flex;gap:8px 20px;flex-wrap:wrap;font-size:.78rem;color:#506358}.world-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.world-card{--world:#2a7557;border-radius:18px;overflow:hidden;padding:20px}.world-html{--world:#b74623}.world-css{--world:#235ec0}.world-js{--world:#897000}.world-web{--world:#6550a4}.world-heading{display:flex;align-items:center;gap:12px}.world-heading h3{margin:0;font-size:1.25rem}.world-heading p{margin:4px 0;font-size:.78rem}.world-badge{width:40px;height:48px;flex:none;color:var(--world);display:grid;place-items:center}.world-badge svg{width:36px;height:44px}.world-badge>span{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:var(--world);color:white;font-weight:800}.world-js .world-badge>span{background:#f0d34c;color:#302b10}.world-score{margin-left:auto;font-size:.8rem;color:var(--world)}.world-card progress{accent-color:var(--world);height:6px;border:0;width:100%;margin:15px 0 4px}.path-category h4{display:flex;justify-content:space-between;margin:22px 0 10px;font-size:.85rem}.category-earned{color:var(--world)}.path-stations{position:relative}.path-stations:before{content:"";position:absolute;left:17px;top:22px;bottom:22px;width:2px;background:#dce4df}.world-card .path-lesson{position:relative;display:flex;align-items:center;gap:10px;border:1px solid transparent;background:transparent;width:100%;padding:9px 2px;text-align:left;border-radius:10px;font-size:.8rem}.world-card .path-lesson>span:nth-child(2){flex:1;min-width:0}.world-card .path-lesson small{display:block;font-size:.65rem;color:#617068;margin-bottom:3px}.world-card .completion{display:grid;place-items:center;flex:none;background:#f7faf8;border:2px solid #dce4df;border-radius:50%;width:32px;height:32px;font-weight:700;color:#67776e}.world-card .completed .completion{background:var(--world);border-color:var(--world);color:white}.world-card .path-lesson.current{background:#f2f7f4;border-color:var(--world)}.world-card .path-lesson.current .completion{border-color:var(--world);color:var(--world)}.world-card .path-lesson.current.completed .completion{color:white}.world-card .path-lesson:hover{background:#eef3f0}.station-reward{font-size:.65rem;color:#6a766f;white-space:nowrap}.world-card .path-lesson:focus-visible{outline:3px solid var(--world);outline-offset:2px}
@media(max-width:680px){.world-grid{grid-template-columns:1fr}.world-card{padding:16px}.journey-intro{gap:12px;align-items:flex-start}.world-card .path-lesson{min-height:58px}.journey-legend{gap:8px;font-size:.7rem}}

.world-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.world-nav button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;border:1px solid #d2ddd6;border-top:3px solid var(--world);border-radius:10px;background:white;color:var(--world)}.world-nav span{font-size:.7rem}.world-card{scroll-margin-top:12px}.world-card progress{appearance:none;background:#e7ede9;border-radius:8px;overflow:hidden}.world-card progress::-webkit-progress-bar{background:#e7ede9}.world-card progress::-webkit-progress-value{background:var(--world);border-radius:8px}.world-card progress::-moz-progress-bar{background:var(--world)}@media(max-width:680px){.world-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.world-nav button{min-height:48px}}

.export-task-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 0;border-bottom:1px solid #d9e3dc}.export-task-row strong{flex:1;min-width:180px;font-size:.85rem}.export-task-row label,.export-world-controls label,.export-check{display:flex!important;align-items:center;gap:7px!important}.export-task-row input,.export-world-controls input,.export-check input{width:auto!important;margin:0!important}.export-world-controls{display:flex;flex-wrap:wrap;gap:12px}.export-world{margin:14px 0;border:1px solid #d5e1da;border-radius:10px;padding:12px}.export-world summary{font-weight:700;cursor:pointer}.path-lesson:disabled{opacity:.62;cursor:not-allowed}.world-card .path-lesson:disabled:hover{background:transparent}#course-export-form>label{display:grid;gap:5px;margin:14px 0}#course-export-form input,#course-export-form select{padding:8px}#course-export-form{max-width:850px;margin:auto}

@media(max-width:680px){.export-task-row{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.export-task-row>strong{grid-column:1/-1;min-width:0}.export-task-row>label{min-height:40px;margin:0}}

/* Focused import and formative feedback dialogs. */
dialog:has(.upload-panel), dialog:has(.check-result) { width:min(640px,calc(100vw - 24px)); }
.upload-dropzone { display:flex; flex-direction:column; align-items:center; gap:10px; border:2px dashed #94ae9b; border-radius:12px; padding:24px 16px; background:#eaf1e8; text-align:center; transition:background .15s,border-color .15s; }
.upload-dropzone.drag-over { background:#cfe8d2; border-color:#28623e; }
.upload-symbol { font-size:2rem; line-height:1; color:#367048; }
.upload-picker { position:relative; display:inline-flex; padding:12px 18px; border-radius:7px; background:#28623e; color:white; cursor:pointer; font-weight:600; }
.upload-picker input { position:absolute; width:1px; height:1px; opacity:0; }
.upload-picker:focus-within { outline:3px solid #5485c5; outline-offset:4px; }
.upload-picker:has(input:disabled) { opacity:.6; cursor:wait; }
#upload-limits { font-size:.85rem; line-height:1.8; }
.upload-formats { font-size:.875rem; }
.upload-formats p { line-height:1.7; }
#upload-status { color:#365d43; }
.result-summary { margin-top:22px; font-size:1.05rem; }
.criteria-count { display:flex; gap:10px; align-items:baseline; color:#365d43; }
.criteria-count strong { font-size:1.5rem; font-variant-numeric:tabular-nums; }
.check-result #feedback { max-height:none; overflow:visible; padding:0; background:transparent; }
.check-result #feedback .feedback-item { margin:8px 0; padding:12px; }
.feedback-item.discussion { background:#e8edf3; color:#344f68; }
.feedback-hint { margin-top:18px; padding:12px; border:1px solid #a7bca8; border-radius:7px; }
.feedback-hint p,.check-result .muted { line-height:1.6; }
.next-preview { border-top:1px solid #c9d8c9; padding-top:14px; font-size:.875rem; }
@media (max-width: 500px) { .check-result .task-dialog-actions { display:grid; grid-template-columns:1fr; } .check-result .task-dialog-actions button { min-height:44px; } .upload-dropzone { padding:20px 12px; } }

/* Typed learning text and task-specific discovery tours. */
.instruction-token { overflow-wrap:anywhere; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
code.instruction-token { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.9em; padding:.12em .35em; border-radius:4px; background:#e2ebe4; color:#204b39; }
code.token-path { background:#e3ebf3; color:#244864; border-bottom:1px solid #afc3d4; }
.token-key { display:inline-block; padding:0 .35em; border:1px solid #aab9b0; border-bottom-width:2px; border-radius:4px; background:#fff; font:inherit; font-size:.85em; }
.token-ui { font-weight:650; color:#235438; }
.token-literal { font-weight:550; color:#405b4d; }
.mission-hook { margin:22px 0; padding:16px 18px; border-left:4px solid #368360; border-radius:0 9px 9px 0; background:#e6efe5; }
.mission-hook p { margin:6px 0 0; line-height:1.7; }
.mission-hook .eyebrow { color:#456b51; font-size:.7rem; }
.task-document>p { line-height:1.8; }
.concept-explanation { margin-top:20px; }
.tutorial-step h3:focus { outline:none; }
.tutorial-step h3:focus-visible { border-left:3px solid #347c56; padding-left:10px; }
.tutorial-keys { color:#536d5b; font-size:.78rem; }
.tutorial-step .tutorial-progress { line-height:1.5; }
@media (max-width:700px) { .mission-hook { padding:12px; margin:16px 0; } }

/* Ligatures must never replace source character sequences, including <!-- and -->. */
#editor, #highlight, #highlight *, #line-numbers, code, pre { font-variant-ligatures:none; font-feature-settings:"liga" 0,"calt" 0; }

.learning-goal { border-left:3px solid #42815e; padding:10px 14px; background:#e7f0e6; line-height:1.65; }
.introduction-page p { line-height:1.75; }
.introduction-page figure { margin:20px 0; }
.introduction-page figcaption { font-size:.8rem; color:#456851; margin-bottom:8px; }
.intro-code { background:#102830; color:#d0e8e0; padding:16px; border-radius:8px; max-height:320px; overflow:auto; font: .85rem/1.7 Consolas,monospace; tab-size:2; }
.intro-code code { background:transparent; color:inherit; white-space:pre; }
dialog:has(.introduction-page) { width:min(760px,calc(100vw - 24px)); }
.introduction-page .task-dialog-actions { justify-content:space-between; }

/* Keep the caret unobstructed; other controls retain their focus indicators. */
#editor:focus, #editor:focus-visible { outline:none; box-shadow:none; }
.example-frame { width:100%; height:230px; border:1px solid #d5e1da; border-radius:8px; background:white; margin-top:12px; }
.example-output { max-height:100px; overflow:auto; white-space:pre-wrap; font-size:.8rem; }
.quiz select { width:100%; padding:10px; margin-top:10px; }
.browser-titlebar { padding-bottom: 0; gap: 8px; }
.browser-tab { display: flex; align-items: center; gap: 9px; align-self: stretch; min-width: 0; flex: 1; max-width: 32rem; padding: 10px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #23363e; }
.browser-tab svg { width: 16px; height: 18px; flex: none; fill: none; stroke: #9dc9bc; stroke-width: 1.6; stroke-linecap: round; }
#browser-page-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 550; }
.browser-titlebar .panel-actions { flex: none; padding-bottom: 8px; }
.language-control { display:flex; align-items:center; gap:4px; flex:none; }
.language-control svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5; }
.language-control .language-select { min-width:94px; }
.topbar nav { flex-wrap:wrap; align-items:center; }
.brand img.brand-icon { padding:0; border:0; width:32px; height:32px; }
:fullscreen { background:#101c23; }
@media(max-width:700px) { .topbar nav .language-control { margin-left:auto; }.dialog-heading { flex-wrap:wrap; }.brand img.brand-icon { display:block; width:24px; height:24px; } }
