/* Line At A Time: dark, friendly theme */

:root {
  --bg: #0a1929;
  --panel: #102a43;
  --panel-2: #0d2137;
  --border: #1e3a5f;
  --text: #e8f0fe;
  --muted: #8ca6c0;
  --accent: #4dabf7;
  --green: #43c465;
  --red: #ff6b6b;

  /* syntax colours */
  --c-kw: #c792ea;
  --c-type: #56ccf2;
  --c-class: #82aaff;
  --c-fn: #e879f9;
  --c-str: #a5e075;
  --c-num: #ffd76d;
  --c-bool: #ff9e64;
  --c-op: #89ddff;
  --c-pun: #d6deeb;
  --c-var: #e8f0fe;

  --mono: "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Nunito", system-ui, sans-serif;
}

/* Never merge characters like != into ≠; learners must see every real
 * character they need to type. */
.editor, .bubble-code, .terminal-body, .explain-code, kbd {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

/* Code shown on screen can't be selected: learners should type it out
 * themselves, not copy-paste it (paste is also blocked on the input). */
.editor, .bubble-code, .explain-code {
  user-select: none;
  -webkit-user-select: none;
}
/* ...but kids can still select their own typing to edit it */
#editor-line {
  user-select: text;
  -webkit-user-select: text;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

kbd {
  font-family: var(--mono);
  background: #16324e;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 0.95em;
}

/* ---------- syntax token colours ---------- */
.tok-kw   { color: var(--c-kw); }
.tok-type { color: var(--c-type); }
.tok-class{ color: var(--c-class); }
.tok-fn   { color: var(--c-fn); }
.tok-str  { color: var(--c-str); }
.tok-num  { color: var(--c-num); }
.tok-bool { color: var(--c-bool); }
.tok-op   { color: var(--c-op); }
.tok-pun  { color: var(--c-pun); }
.tok-var  { color: var(--c-var); }
.tok-text { color: var(--c-var); }  /* prose between tags: plain, never code-coloured */
.tok-ws   { }
.tok-comment { color: #64809c; font-style: italic; }
.tok-ghost { opacity: 0.32; }
.tok-err {
  color: #fff;
  background: rgba(255, 90, 90, 0.4);
  border-radius: 3px;
  text-decoration: underline wavy var(--red) 1.5px;
  text-underline-offset: 3px;
}
.tok-mark {
  outline: 2px solid var(--c-num);
  outline-offset: 1px;
  border-radius: 3px;
}

/* ---------- top / bottom bars ---------- */
.top-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 26px;
  background: #071322;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 800; font-size: 21px; color: var(--text);
  text-decoration: none; letter-spacing: 0.3px;
}
.top-nav { margin-left: auto; display: flex; gap: 10px; }
/* the menu button: only shown on narrow screens (see the media query below) */
.top-bar .nav-toggle {
  display: none; margin-left: auto; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; font-size: 20px; line-height: 1;
}
.top-lesson + .nav-toggle { margin-left: 0; }
.btn-active { border-color: var(--accent); color: var(--accent); }
.top-lesson { font-weight: 700; color: var(--muted); flex: 1; }

.bottom-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 26px;
  background: #071322;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.progress-label { font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; text-decoration: none; }
a.progress-label:hover { color: var(--accent); text-decoration: underline; }
.progress-label + .progress-label { margin-left: -10px; }
.bottom-actions { display: flex; gap: 10px; margin-left: auto; }

.bar {
  background: #16324e; border-radius: 99px; height: 12px; overflow: hidden;
}
.bar.mini { width: 180px; }
.bar .fill {
  background: linear-gradient(90deg, var(--accent), var(--green));
  height: 100%; border-radius: 99px; transition: width 0.6s ease;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); color: var(--text);
  padding: 9px 18px; cursor: pointer; text-decoration: none;
  display: inline-block; transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: #16324e; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--green); border-color: var(--green); color: #04240d;
}
.btn-primary:hover { background: #55d477; }
.btn-ghost { background: transparent; }
.btn-big { font-size: 18px; padding: 13px 30px; }

/* ---------- home ---------- */
.home { max-width: 1060px; margin: 0 auto; padding: 40px 26px 70px; width: 100%; }
.hero { text-align: center; margin-bottom: 44px; }
.hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto 22px; font-size: 17px; }
.hero-progress {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin-bottom: 26px; color: var(--muted); font-weight: 700; font-size: 14px;
}
.hero-progress .bar { width: 260px; }

.section-title { font-size: 22px; font-weight: 800; margin: 8px 0 16px; }

.text-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
  margin-bottom: 40px;
}
.course-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; text-decoration: none; color: var(--text);
  transition: transform 0.12s, border-color 0.12s;
}
a.course-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.course-icon {
  flex: none; width: 58px; height: 58px; border-radius: 16px;
  background: #16324e; display: grid; place-items: center; font-size: 30px;
}
.course-logo { width: 36px; height: 36px; display: block; }
.hero-logo { display: flex; justify-content: center; margin-bottom: 14px; font-size: 44px; }
.hero-logo .course-logo { width: 64px; height: 64px; }
.course-card-body { flex: 1; }
.course-card .lesson-card-title { font-size: 18px; }
.course-progress {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  color: var(--muted); font-weight: 700; font-size: 13px;
}
.course-progress .bar { flex: 1; max-width: 170px; }

/* ---------- language pages ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0 6px; align-items: center; }
.badge-row-center { justify-content: center; margin-bottom: 16px; }
.badge {
  font-size: 11.5px; font-weight: 800; color: var(--accent);
  border: 1px solid #2a4a6e; background: #12304e; border-radius: 99px;
  padding: 2px 10px; letter-spacing: 0.3px; text-decoration: none;
}
a.badge:hover { border-color: var(--accent); }
.level-chip {
  display: inline-block; font-size: 12px; font-weight: 800; color: var(--green);
  border: 1px solid var(--green); border-radius: 99px; padding: 2px 11px;
  letter-spacing: 0.4px;
}
.level-chip.level-intermediate { color: var(--c-bool); border-color: var(--c-bool); }
.course-card .level-chip { margin-bottom: 7px; }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px; max-width: 800px; margin: 0 auto 34px;
}
.fact {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
}
.fact-label {
  font-size: 11.5px; color: var(--muted); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.fact-value { font-weight: 700; margin-top: 4px; font-size: 14.5px; line-height: 1.45; }

.uses { margin-bottom: 34px; }
.use-chip {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  border: 1px solid var(--border); background: var(--panel);
  border-radius: 99px; padding: 5px 14px;
}

.glossary { margin-top: 34px; }
.glossary-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.glossary-list { display: grid; gap: 12px; }
.glossary-item { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.glossary-item dt { flex: none; }
.glossary-item dd { color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; min-width: 260px; }

.lesson-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.lesson-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  transition: transform 0.12s, border-color 0.12s;
}
.lesson-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.lesson-card-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #16324e; display: grid; place-items: center;
  font-weight: 800; font-size: 17px;
}
.lesson-card.done .lesson-card-num { background: var(--green); color: #04240d; }
.lesson-card-title { font-weight: 800; }
.lesson-card-goal { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- lesson layout ---------- */
.lesson {
  display: grid; grid-template-columns: minmax(430px, 5fr) minmax(380px, 5fr);
  gap: 22px; padding: 24px 26px; width: 100%; max-width: 1360px; margin: 0 auto;
  align-items: start; flex: 1;
}
@media (max-width: 940px) {
  .lesson { grid-template-columns: 1fr; padding: 16px 12px; }
  .editor { font-size: 13.5px; }
  .top-bar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  /* narrow screens: the nav hides behind a ☰ button and drops down as a column */
  .top-bar .nav-toggle { display: inline-flex; }
  .top-nav { display: none; flex-basis: 100%; margin-left: 0; flex-direction: column; gap: 8px; padding-top: 6px; }
  .top-nav.open { display: flex; }
  .top-nav .btn { text-align: left; }
  .bottom-bar { flex-wrap: wrap; row-gap: 8px; }
  .bottom-actions { flex-wrap: wrap; margin-left: 0; }
}
@media (max-width: 640px) {
  .home { padding: 26px 14px 50px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .section-title { font-size: 20px; }
  .btn-big { font-size: 16px; padding: 11px 22px; }
}
.editor { overflow-x: auto; }
.bubble-code, .explain-code { overflow-x: auto; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.panel-title {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 22px; font-weight: 800; margin-bottom: 14px;
}
.panel-title .goal { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- editor ---------- */
.editor {
  font-family: var(--mono); font-size: 15.5px; line-height: 32px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 0; cursor: text;
}
.code-row { display: flex; align-items: center; padding: 0 14px 0 0; min-height: 32px; }
.code-row .ln {
  flex: none; width: 44px; text-align: right; padding-right: 16px;
  color: #3f5a78; font-size: 13px; user-select: none;
}
.code-row .code { white-space: pre; flex: 1; }
.code-row.future .code { border-bottom: 1px dashed #1e3a5f; opacity: 0.5; min-height: 20px; }
.code-row.active { background: #12304e; }

.input-wrap { position: relative; display: block; }
.input-wrap .overlay {
  position: absolute; inset: 0; pointer-events: none; white-space: pre;
  line-height: 32px;
}
#editor-line {
  font: inherit; letter-spacing: inherit; line-height: 32px;
  display: block; width: 100%; height: 32px; padding: 0; margin: 0;
  background: transparent; border: none; outline: none;
  color: transparent; caret-color: var(--accent);
  white-space: pre; resize: none; overflow: hidden;
}

/* ---------- instruction bubble ---------- */
.bubble {
  margin-top: 16px; background: #0b2038; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; position: relative;
}
.bubble::before {
  content: ""; position: absolute; top: -8px; left: 34px;
  width: 14px; height: 14px; background: #0b2038;
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.bubble-label { font-weight: 700; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.bubble-code {
  font-family: var(--mono); font-size: 16.5px; background: var(--panel-2);
  padding: 10px 14px; border-radius: 8px; white-space: pre-wrap; word-break: break-all;
}
.bubble-hint { min-height: 24px; margin-top: 9px; font-size: 14.5px; font-weight: 600; }
.hint-ok { color: var(--green); }
.hint-err { color: var(--red); }
.hint-neutral { color: var(--muted); }
.char-name { color: var(--muted); }

.shake { animation: shake 0.35s; }
@keyframes shake {
  20% { transform: translateX(-5px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(3px); }
}

.complete-bubble {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-color: var(--green);
}
.complete-bubble::before { border-color: var(--green); }
.complete-msg { font-size: 20px; font-weight: 800; }

/* ---------- terminal ---------- */
.terminal {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  margin-bottom: 22px;
}
.terminal-bar {
  background: #1b2b3d; padding: 8px 14px; font-weight: 700; font-size: 14px;
  color: var(--muted); display: flex; align-items: center; gap: 7px;
}
.terminal-bar .dot, .browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-replay {
  margin-left: auto; width: 24px; height: 24px; padding: 0;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--border); border-radius: 50%;
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.term-replay:hover { color: var(--text); border-color: var(--muted); }
.term-replay[hidden] { display: none; }
.terminal-body {
  background: #04080d; font-family: var(--mono); font-size: 14.5px;
  padding: 14px 16px; min-height: 210px; max-height: 320px; overflow-y: auto;
  line-height: 1.75;
}
/* overflow-wrap rather than word-break: a long listing still wraps, but
 * prose in the banner breaks between words instead of mid-word */
.term-line { white-space: pre-wrap; overflow-wrap: anywhere; }
/* blank output lines are real output (an MS-DOS DIR listing is full of them),
   so give an empty line its height back instead of letting it collapse */
.term-line:empty::after { content: '\200b'; }
.term-dim { color: #5d7d9e; }   /* 4.7:1 on the terminal background (WCAG AA) */
.term-cmd { color: #8ca6c0; }
.term-out { color: #d8f3dc; }

/* ---------- mock browser (framework course previews) ---------- */
.browser {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  margin-bottom: 22px;
}
.browser-bar {
  background: #1b2b3d; padding: 8px 14px; font-weight: 700; font-size: 14px;
  color: var(--muted); display: flex; align-items: center; gap: 7px;
}
.browser-url {
  flex: 1; margin-left: 6px; background: #0d2137; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 14px; font-family: var(--mono);
  font-size: 12.5px; font-weight: 400; color: var(--muted);
}
.browser-body {
  background: #ffffff; color: #1b2733; padding: 20px 22px;
  min-height: 140px; font-family: var(--sans);
}
.browser-body h1 { font-size: 25px; margin: 0 0 10px; color: #102a43; }
.browser-body h2 { font-size: 20px; margin: 12px 0 6px; color: #102a43; }
.browser-body p { margin: 6px 0; font-size: 16px; }
.browser-body ul, .browser-body ol { margin: 6px 0; padding-left: 26px; }
.browser-body li { margin: 3px 0; }
.browser-body a { color: #1a63c8; text-decoration: underline; cursor: pointer; }
.browser-body button {
  font: inherit; font-size: 15px; padding: 7px 16px; margin: 6px 8px 6px 0;
  background: #f0f2f5; color: #1b2733; border: 1px solid #b9c2cc;
  border-radius: 6px; cursor: pointer;
}
.browser-body button:hover { background: #e3e7ec; }
.browser-body button:active { background: #d5dbe2; }
.browser-body input {
  font: inherit; font-size: 15px; padding: 7px 10px; margin: 6px 0;
  border: 1px solid #b9c2cc; border-radius: 6px; display: block; width: 220px;
}
.preview-placeholder {
  color: #9aa8b5; font-style: italic; font-size: 15px;
  display: grid; place-items: center; min-height: 100px;
}
/* the app "loading" into the window */
.preview-live { animation: preview-in 0.35s ease-out; }
@keyframes preview-in { from { opacity: 0; } to { opacity: 1; } }

/* the sandbox iframe fills the browser window edge to edge */
.browser-body.sandbox { padding: 0; }
.sandbox-frame {
  display: block; width: 100%; height: 320px; border: 0; background: #fff;
  animation: preview-in 0.35s ease-out;
}

/* ---------- file tabs (multi-file lessons) ---------- */
.file-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.file-tab {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 8px 8px 0 0; cursor: pointer;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); border-bottom: none;
}
.file-tab:hover { color: var(--text); }
.file-tab-active { background: #0b1c2e; color: var(--text); border-color: var(--accent); }
.tab-dot { color: var(--accent); font-size: 9px; vertical-align: middle; }
.chip-file {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  margin-left: 6px;
}

/* ---------- explanation panel ---------- */
.chip-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.chip-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.chip {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); background: transparent; color: var(--text);
  font-family: var(--sans); font-weight: 800; font-size: 14px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip:disabled { opacity: 0.3; cursor: default; }
.chip-active { background: var(--accent); border-color: var(--accent); color: #04121f; }

.explain-head {
  font-size: 17px; font-weight: 800; color: #ff8787; margin-bottom: 10px;
  line-height: 1.7;
}
.explain-code {
  font-family: var(--mono); font-size: 15.5px; font-weight: 400;
  background: var(--panel-2); padding: 3px 9px; border-radius: 6px;
  white-space: pre-wrap; word-break: break-all;
}
.explain-text { color: #cddcee; line-height: 1.75; font-size: 15.5px; }
.explain-text + .explain-text { margin-top: 12px; }

/* ---------- git lessons (interactive simulator) ---------- */

.git-graph {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; overflow: auto; max-height: 540px;
}
.git-graph svg { display: block; max-width: 100%; height: auto; }
.goal-panel { margin-top: 22px; }
.goal-graph { max-height: 320px; }
.goal-status { margin-top: 12px; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.goal-panel.goal-matched { border-color: var(--green); }
.goal-panel.goal-matched .goal-status { color: var(--green); }

/* graph marks: lane colours cycle through the theme palette; stroke is
 * inherited in SVG, so colouring the <g> colours its circle and edges */
.gg text {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  fill: var(--text); stroke: none; user-select: none; -webkit-user-select: none;
}
.gg-lane-0 { stroke: var(--accent); }
.gg-lane-1 { stroke: var(--c-kw); }
.gg-lane-2 { stroke: var(--c-num); }
.gg-lane-3 { stroke: var(--c-bool); }
.gg-lane-4 { stroke: var(--green); }
.gg-node circle { fill: var(--panel-2); stroke-width: 2.5; }
.gg-edge { stroke-width: 2.5; fill: none; opacity: 0; transition: opacity 0.35s ease; }
.gg-edge.gg-in { opacity: 1; }
.gg-node, .gg-pill { transition: transform 0.45s ease; }
/* new commits pop in (scaled on the children so the <g>'s translate is untouched) */
.gg-pop circle, .gg-pop text { animation: gg-pop 0.4s ease backwards; }
@keyframes gg-pop {
  0% { opacity: 0; transform: scale(0.3); }
  70% { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.gg-pill { animation: gg-fade 0.3s ease backwards; }
@keyframes gg-fade { from { opacity: 0; } to { opacity: 1; } }
/* branch pills: same look as .badge; the checked-out branch is filled */
.gg-pill rect { fill: #12304e; stroke: #2a4a6e; stroke-width: 1; }
.gg-pill text { font-size: 11.5px; font-weight: 700; fill: var(--accent); }
.gg-pill-head rect { fill: var(--accent); stroke: var(--accent); }
.gg-pill-head text { fill: #04121f; }
/* the goal picture renders still */
.gg-static .gg-node, .gg-static .gg-pill { transition: none; animation: none; }

/* live terminal input */
.git-input-row {
  display: flex; align-items: center; gap: 10px;
  background: #04080d; border-top: 1px solid var(--border);
  padding: 10px 16px;
}
.git-prompt { font-family: var(--mono); color: var(--green); font-weight: 700; }
#git-input, #shell-input {
  font-family: var(--mono); font-size: 14.5px; flex: 1;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  background: transparent; border: none; outline: none; color: var(--text);
  caret-color: var(--accent); white-space: pre; resize: none; overflow: hidden;
  height: 22px; line-height: 22px; padding: 0;
}
.term-err { color: var(--red); }

/* command reference + hints in the explanation panel */
.cmd-cards { display: grid; gap: 10px; margin: 16px 0 4px; }
.cmd-card { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cmd-card .explain-code { flex: none; }
.cmd-ex { color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; min-width: 220px; }
.hint-area { margin-top: 14px; }
.git-hint {
  background: #0b2038; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 10px;
  font-size: 14.5px; line-height: 1.6; color: #cddcee;
}
.git-solution {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-bottom: 12px;
}
.win-msg { color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------- shell lessons (interactive terminal) ----------
 * Shares the git lesson's furniture (terminal, input row, cmd cards,
 * hints); what is new is the file tree and the task checklist. */

.file-tree {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 8px; overflow: auto; max-height: 460px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.9;
}
.tree-row {
  display: flex; align-items: baseline; gap: 8px;
  border-radius: 6px; padding-right: 8px; white-space: nowrap;
}
/* the folder the prompt is standing in, so "cd" is something you can see */
.tree-row.tree-here { background: #12304e; }
.tree-row.tree-here .tree-name { color: var(--accent); font-weight: 700; }
.tree-icon { flex: none; font-size: 12.5px; }
.tree-name { color: var(--text); }
.tree-size { color: var(--muted); font-size: 12px; margin-left: auto; padding-left: 16px; }

.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
}
.task-tick { flex: none; font-weight: 700; color: var(--border); }
.task-done { color: var(--text); }
.task-done .task-tick { color: var(--green); }
/* a finished task stays ticked even if a later command undoes it */
.task-done span:last-child { text-decoration: line-through; text-decoration-color: var(--border); }

/* ---------- pre-rendered lesson pages (tools/build-pages.js) ----------
 * What a crawler, a link preview, or a browser with JavaScript off sees;
 * app.js swaps in the live editor on load. */
.static-code { padding: 8px 0; }
.static-code .code-row { padding-left: 0; }
.static-explain-list { margin: 0; display: grid; gap: 14px; }
.static-explain dt { margin-bottom: 6px; }
.static-explain dd { margin: 0; }
.static-note { margin-top: 16px; color: var(--muted); font-size: 14px; }
