:root {
  --bg: #07090d;
  --bg-elev: #0e131a;
  --panel: #121821;
  --panel-2: #18212d;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9eef6;
  --muted: #8b97a8;
  --faint: #5c6b7e;
  --accent: #3ee0b2;
  --accent-dim: rgba(62, 224, 178, 0.14);
  --accent-2: #6ea8fe;
  --warn: #f2c230;
  --danger: #ff6b7a;
  --ok: #3ee0b2;
  --term-bg: #06080c;
  --term-fg: #c8f7e4;
  --term-prompt: #3ee0b2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 64px -28px rgba(0, 0, 0, 0.7);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(62, 224, 178, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(110, 168, 254, 0.07), transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #1aa882);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  color: #041510;
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(62, 224, 178, 0.35), 0 8px 24px -8px rgba(62, 224, 178, 0.55);
}
.brand h1 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand h1 span { color: var(--accent); font-style: italic; }
.brand p {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.stat .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Screens */
.screen { display: none; flex: 1; }
.screen.active { display: flex; flex-direction: column; }

/* Landing / map */
.map-wrap {
  flex: 1;
  padding: 36px 22px 48px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.map-hero {
  margin-bottom: 28px;
  max-width: 640px;
}
.map-hero .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.map-hero h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.map-hero h2 em { color: var(--accent); font-style: italic; }
.map-hero p { color: var(--muted); font-size: 16px; max-width: 520px; }

.notice {
  margin: 18px 0 28px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(242, 194, 48, 0.08);
  border: 1px solid rgba(242, 194, 48, 0.25);
  color: #e8d59a;
  font-size: 13px;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.world-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.world-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.world-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--wc, var(--accent));
}
.world-card .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 18px;
}
.world-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 6px;
}
.world-card .tagline { color: var(--muted); font-size: 14px; margin-bottom: 18px; min-height: 40px; }
.world-card .progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--wc, var(--accent));
  border-radius: 99px;
  transition: width 0.35s ease;
}
.world-card .go {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wc, var(--accent));
}

/* Play layout */
.play {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  min-height: 0;
  height: calc(100vh - 63px);
}

.cheat-panel {
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cheat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cheat-head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.toggle {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.toggle.on {
  background: var(--accent-dim);
  border-color: rgba(62, 224, 178, 0.45);
  color: var(--accent);
}
.cheat-body {
  flex: 1;
  overflow: auto;
  padding: 18px 16px 28px;
  position: relative;
}
.cheat-hidden {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  opacity: 0.55;
}
.cheat-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(7,9,13,0.55) 40%, rgba(7,9,13,0.85));
}
.cheat-veil.hidden { display: none; }
.cheat-veil p {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
  max-width: 240px;
  box-shadow: var(--shadow);
}
.cheat-content h4 {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 12px;
}
.cheat-content ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cheat-content li {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #c5d0dc;
  white-space: pre-wrap;
}

.main-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.quest-bar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(14, 19, 26, 0.9);
}
.back-btn, .nav-btn, .check-btn, .primary-btn {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}
.back-btn:hover, .nav-btn:hover { border-color: var(--muted); }
.check-btn, .primary-btn {
  background: var(--accent);
  color: #041510;
  border-color: transparent;
}
.check-btn:hover, .primary-btn:hover { filter: brightness(1.05); }
.check-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}
.quest-meta {
  flex: 1;
  min-width: 160px;
}
.quest-meta .world-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quest-meta .q-title {
  font-weight: 600;
  font-size: 14px;
}

.task-card {
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.task-card .pts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.task-card h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.task-card .prompt {
  color: #c2cad6;
  font-size: 15px;
  white-space: pre-wrap;
  max-width: 820px;
}
.task-card .type-pill {
  margin-left: 8px;
  font-size: 11px;
  color: var(--faint);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-area {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}
.choice {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--line-strong); }
.choice.selected {
  border-color: rgba(62, 224, 178, 0.55);
  background: var(--accent-dim);
}
.choice.correct {
  border-color: rgba(62, 224, 178, 0.8);
  background: rgba(62, 224, 178, 0.18);
}
.choice.wrong {
  border-color: rgba(255, 107, 122, 0.7);
  background: rgba(255, 107, 122, 0.12);
}
.short-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.short-row input {
  flex: 1;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  outline: none;
}
.short-row input:focus {
  border-color: rgba(62, 224, 178, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.feedback {
  margin-top: 12px;
  font-size: 14px;
  min-height: 1.2em;
}
.feedback.ok { color: var(--ok); }
.feedback.bad { color: var(--danger); }
.feedback.info { color: var(--warn); }

.server-note-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(242, 194, 48, 0.4);
  background: rgba(242, 194, 48, 0.06);
  color: #e8d59a;
  font-size: 13px;
}

/* Terminal */
.term-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background: var(--term-bg);
  border-top: 1px solid var(--line);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #0a0d12;
}
.term-chrome .traffic { display: flex; gap: 6px; }
.term-chrome .traffic i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #3a414d;
}
.term-chrome .traffic i:nth-child(1) { background: #ff5f57; }
.term-chrome .traffic i:nth-child(2) { background: #febc2e; }
.term-chrome .traffic i:nth-child(3) { background: #28c840; }
.term-chrome .title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-left: 6px;
}
.term-chrome .hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
}
#terminal {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 8px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--term-fg);
}
#terminal .line { white-space: pre-wrap; word-break: break-word; }
#terminal .line.err { color: #ff8f9a; }
#terminal .line.cmd { color: #9ad7ff; }
#terminal .line.sys { color: var(--faint); }
.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.term-input-row .ps1 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--term-prompt);
  white-space: nowrap;
}
#term-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  caret-color: var(--accent);
}

.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Complete overlay */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  z-index: 50;
  display: none;
}
.toast.show { display: block; animation: slideUp 0.25s ease; }
@keyframes slideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 960px) {
  .worlds { grid-template-columns: 1fr; }
  .play { grid-template-columns: 1fr; height: auto; }
  .cheat-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 240px;
  }
  .term-wrap { min-height: 280px; }
  .term-chrome .hint { display: none; }
}

/* Teach-first lesson blocks */
.lesson-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 4px;
  max-width: 820px;
}
.lesson-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.lesson-block .lb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.lesson-block p {
  color: #c2cad6;
  font-size: 14px;
  line-height: 1.5;
}
.lesson-block pre {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #d5e4f5;
  white-space: pre-wrap;
  line-height: 1.5;
  margin: 0;
}
.lesson-block.example { border-color: rgba(110, 168, 254, 0.28); }
.lesson-block.example .lb-label { color: var(--accent-2); }
.lesson-block.try {
  border-color: rgba(62, 224, 178, 0.35);
  background: rgba(62, 224, 178, 0.06);
}
.worlds {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.lesson-collapsed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(242, 194, 48, 0.4);
  background: rgba(242, 194, 48, 0.06);
  color: #e8d59a;
  font-size: 13px;
  margin-bottom: 10px;
}
.peek-hidden { display: none !important; }
#peek-panel {
  margin-top: 8px;
  opacity: 0.92;
}
#task-prompt {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(62, 224, 178, 0.08);
  border: 1px solid rgba(62, 224, 178, 0.28);
  color: #d7fff0;
  font-size: 15px;
  white-space: pre-wrap;
}

/* ===== Stack diagram ===== */
.stack-diagram {
  margin: 14px 0 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 200px at 10% 0%, rgba(62,224,178,.08), transparent 55%),
    radial-gradient(600px 220px at 90% 100%, rgba(110,168,254,.07), transparent 50%),
    linear-gradient(180deg, #10161f, #0c1118);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stack-diagram.is-big { padding: 22px; max-width: 720px; margin: 0 auto; }
.stack-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.stack-eyebrow {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  width: 100%;
}
.stack-head h3 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -.02em;
  margin: 0;
}
.stack-play {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #041510;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
}
.stack-play code {
  font-family: var(--mono);
  font-weight: 700;
}
.stack-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stack-layer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
}
.stack-layer.is-focus {
  border-color: rgba(62,224,178,.55);
  background: rgba(62,224,178,.1);
  box-shadow: 0 0 0 1px rgba(62,224,178,.15), 0 10px 30px -18px rgba(62,224,178,.55);
}
.stack-layer.is-travel {
  transform: translateX(4px);
  border-color: rgba(110,168,254,.7);
  background: rgba(110,168,254,.12);
}
.stack-layer-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.stack-layer-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.stack-layer-bits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 220px;
}
.stack-layer-bits span {
  font-family: var(--mono);
  font-size: 10px;
  color: #9fb0c3;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
}
.stack-layer.is-focus .stack-layer-bits span {
  color: #d7fff0;
  border-color: rgba(62,224,178,.3);
}
.stack-arrow {
  text-align: center;
  color: var(--faint);
  font-size: 11px;
  line-height: 1;
  padding: 2px 0;
  opacity: .55;
}
.stack-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.4em;
}
.stack-caption code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 11px;
}

.stack-pulse {
  position: absolute;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 12px currentColor;
}
.stack-pulse.down {
  background: #6ea8fe;
  color: #6ea8fe;
  top: 8px;
}
.stack-pulse.up {
  background: var(--accent);
  color: var(--accent);
  bottom: 8px;
}
.stack-pulse.down.run {
  animation: stackDown 2.6s ease-in-out forwards;
}
.stack-pulse.up.run {
  animation: stackUp 2.2s ease-in-out forwards;
}
@keyframes stackDown {
  0% { top: 4%; opacity: 0; }
  10% { opacity: 1; }
  100% { top: 92%; opacity: .2; }
}
@keyframes stackUp {
  0% { bottom: 4%; opacity: 0; }
  10% { opacity: 1; }
  100% { bottom: 92%; opacity: .2; }
}

.stack-slot { margin: 12px 0 4px; }
.stack-slot:empty { display: none; }

.big-picture-card {
  background: linear-gradient(145deg, #122018, #10161f 55%, #121a28);
  border: 1px solid rgba(62,224,178,.28);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  color: inherit;
  box-shadow: var(--shadow);
  cursor: pointer;
  width: 100%;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.big-picture-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #6ea8fe);
}
.big-picture-card:hover { border-color: rgba(62,224,178,.5); transform: translateY(-2px); transition: .15s; }
.big-picture-card .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}
.big-picture-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 6px;
}
.big-picture-card p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.big-picture-card .go { color: var(--accent); font-weight: 700; font-size: 13px; }

.stack-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3,6,10,.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.stack-modal.open { display: flex; }
.stack-modal-panel {
  width: min(760px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: #0b1017;
  padding: 18px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
}
.stack-modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.stack-modal-bar h2 {
  font-family: var(--serif);
  font-size: 22px;
}
code { font-family: var(--mono); color: var(--accent); }

/* Shell scene (W1 lesson 3 mockup) */
.shell-scene {
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #0f161f, #0b1017);
  overflow: hidden;
}
.shell-scene.is-skipped .shell-scene-stage svg { opacity: .35; filter: grayscale(.4); }
.shell-scene-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.shell-scene-eyebrow {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 2px;
}
.shell-scene-actions { display: flex; gap: 8px; }
.shell-scene-stage { padding: 10px 12px 14px; }
.shell-scene-stage svg { width: 100%; height: auto; display: block; }
.sc-lane rect {
  fill: rgba(255,255,255,.03);
  stroke: rgba(255,255,255,.1);
}
.sc-lane text { fill: #e9eef6; font-size: 13px; font-family: Fraunces, Georgia, serif; font-weight: 600; }
.sc-lane .sc-sub { fill: #8b97a8; font-size: 10px; font-family: IBM Plex Mono, monospace; font-weight: 400; }
.sc-out { fill: #3ee0b2; font-family: IBM Plex Mono, monospace; font-size: 14px; font-weight: 600; }
.sc-wire { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
.sc-packet-wrap { opacity: 0; transform-box: fill-box; transform-origin: center; }
.sc-packet { fill: url(#sg); }
.sc-packet-label { fill: #9ad7ff; font-size: 10px; font-family: IBM Plex Mono, monospace; }
.shell-scene-caption { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 1.3em; }

.shell-scene.anim .sc-packet-wrap { animation: scPacket 15s ease-in-out forwards; }
.shell-scene.anim .sc-lane[data-lane="you"] { animation: scFocus 15s ease-in-out forwards; }
.shell-scene.anim .sc-lane[data-lane="term"] { animation: scFocus 15s ease-in-out 1.8s forwards; }
.shell-scene.anim .sc-lane[data-lane="shell"] { animation: scFocus 15s ease-in-out 3.6s forwards; }
.shell-scene.anim .sc-lane[data-lane="kernel"] { animation: scFocus 15s ease-in-out 5.6s forwards; }
.shell-scene.anim .sc-lane[data-lane="disk"] { animation: scFocus 15s ease-in-out 7.8s forwards; }
.shell-scene.anim .sc-lane[data-lane="out"] { animation: scFocus 15s ease-in-out 12.2s forwards; }
.shell-scene.anim .sc-out { animation: scReveal 15s ease-in-out forwards; }

@keyframes scPacket {
  0% { opacity: 0; transform: translate(89px, 45px); }
  5% { opacity: 1; transform: translate(89px, 45px); }
  12% { transform: translate(251px, 45px); }
  24% { transform: translate(428px, 45px); }
  38% { transform: translate(613px, 45px); }
  52% { transform: translate(613px, 147px); }
  68% { transform: translate(251px, 147px); }
  80% { transform: translate(251px, 232px); opacity: 1; }
  92% { opacity: 1; transform: translate(337px, 232px); }
  100% { opacity: 0; transform: translate(337px, 232px); }
}
@keyframes scFocus {
  0% { filter: none; }
  2% { filter: drop-shadow(0 0 10px rgba(62,224,178,.35)); }
  12% { filter: drop-shadow(0 0 10px rgba(62,224,178,.35)); }
  18%, 100% { filter: none; }
}
@keyframes scReveal {
  0%, 78% { opacity: .25; }
  82%, 100% { opacity: 1; }
}
