    :root {
      --bg: #091018;
      --panel: #0f1723;
      --panel-2: #121d2c;
      --line: #223044;
      --text: #d7f4e0;
      --muted: #9cc5ab;
      --accent: #56f29f;
      --accent-2: #7dc4ff;
      --warn: #ffd166;
      --danger: #ff7b72;
      --term-bg: #08101a;
      --btn-text: #04210f;
      --ui: "Avenir Next", "Segoe UI", sans-serif;
      --mono: "DM Mono", "SFMono-Regular", Consolas, Menlo, monospace;
      --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    }

    [data-theme="light"] {
      --bg: #f4f0fa;
      --panel: #ffffff;
      --panel-2: #f8f5ff;
      --line: #e0d6f0;
      --text: #2d2045;
      --muted: #6b5e80;
      --accent: #7c3aed;
      --accent-2: #a855f7;
      --warn: #d97706;
      --danger: #dc2626;
      --term-bg: #faf8ff;
      --btn-text: #ffffff;
      --shadow: 0 22px 60px rgba(100, 60, 180, 0.1);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--text);
      font-family: var(--ui);
      font-size: 13px;
      background: var(--bg);
    }

    :root body {
      background:
        radial-gradient(circle at top left, rgba(86, 242, 159, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(125, 196, 255, 0.16), transparent 24%),
        linear-gradient(180deg, #060b12 0%, var(--bg) 100%);
    }

    [data-theme="light"] body {
      background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.06), transparent 24%),
        linear-gradient(180deg, #faf5ff 0%, var(--bg) 100%);
    }

    .app {
      width: min(1280px, calc(100vw - 28px));
      margin: 0 auto;
      padding: 18px 0 28px;
    }

    .hero,
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 18px;
      box-shadow: var(--shadow);
    }

    .hero {
      padding: 18px 20px;
      margin-bottom: 14px;
      transition: padding 0.25s ease;
    }

    .hero.collapsed p {
      display: none;
    }

    .hero.collapsed {
      position: relative;
      padding: 10px 20px;
    }

    .hero.collapsed .eyebrow {
      display: none;
    }

    .hero.collapsed .hero-top {
      position: static;
    }

    .hero.collapsed .theme-toggle {
      position: absolute;
      top: 10px;
      right: 16px;
    }

    .hero.collapsed .ascii-title {
      font-size: clamp(6px, 0.9vw, 10px);
      margin-bottom: 14px;
      cursor: pointer;
      transition: opacity 0.15s;
    }

    .hero.collapsed .ascii-title:hover {
      opacity: 0.6;
    }

    .hero.collapsed .hero-picker {
      margin-top: 0;
      padding-top: 0;
      border-top: 0;
    }

    .hero.collapsed .picker-copy {
      display: none;
    }


    .eyebrow {
      display: inline-block;
      padding: 6px 10px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--accent) 12%, transparent);
      color: var(--accent);
      font-size: 12px;
      margin-bottom: 10px;
      font-family: var(--mono);
    }

    h1 {
      margin: 0 0 8px;
      font-size: clamp(28px, 4vw, 42px);
      line-height: 1.02;
      font-family: var(--mono);
    }

    .ascii-title {
      margin: 0 0 22px;
      font-family: "Courier New", Courier, monospace;
      font-size: clamp(12px, 1.6vw, 19px);
      font-weight: 400;
      line-height: 1.35;
      color: var(--accent);
      white-space: pre;
      overflow: hidden;
      font-variant-ligatures: none;
      -webkit-font-smoothing: antialiased;
    }

    .hero p {
      margin: 0 0 10px;
      max-width: 74ch;
      color: var(--muted);
      line-height: 1.55;
      font-size: 13px;
    }

    .hero p:last-of-type {
      margin-bottom: 0;
    }

    .hero-picker {
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .picker-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 10px;
    }

    .path-button {
      padding: 5px 10px;
      background: transparent;
      color: var(--muted);
      border: 1px solid var(--line);
    }

    .path-button.active {
      background: color-mix(in srgb, var(--accent) 12%, transparent);
      color: var(--accent);
      border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    }

    .picker-copy {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
      font-size: 13px;
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
      gap: 14px;
      align-items: start;
    }

    @media (max-width: 900px) {
      .layout {
        grid-template-columns: 1fr;
      }
    }

    .panel {
      padding: 14px;
    }

    .sidebar-panel {
      display: grid;
      gap: 14px;
    }

    .panel-title {
      margin: 0 0 12px;
      font-size: 14px;
      color: var(--accent);
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-family: var(--mono);
    }

    .panel-intro {
      margin: -2px 0 14px;
      color: var(--muted);
      line-height: 1.5;
      font-size: 13px;
    }

    #terminal {
      min-height: 52vh;
      max-height: 62vh;
      overflow-y: auto;
      padding: 14px;
      border-radius: 12px;
      background: var(--term-bg);
      font-size: 13px;
    }

    .line {
      margin: 2px 0;
      white-space: pre-wrap;
      word-break: break-word;
      line-height: 1.45;
    }

    .prompt {
      color: var(--accent);
    }

    .input-text {
      color: var(--text);
    }

    .system {
      color: var(--muted);
    }

    .info {
      color: var(--accent-2);
    }

    .warn {
      color: var(--warn);
    }

    .error {
      color: var(--danger);
    }

    form {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }

    input[type="text"] {
      flex: 1;
      padding: 7px 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--term-bg);
      color: var(--text);
      font-family: var(--mono);
      font-size: 13px;
      outline: none;
    }

    input[type="text"]:focus,
    textarea:focus {
      border-color: color-mix(in srgb, var(--accent) 45%, transparent);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
    }

    button {
      padding: 7px 12px;
      border-radius: 10px;
      border: 0;
      background: var(--accent);
      color: var(--btn-text);
      font-family: var(--mono);
      font-weight: 700;
      cursor: pointer;
    }

    button:disabled,
    input:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    .ghost {
      background: transparent;
      color: var(--muted);
      border: 1px solid var(--line);
    }

    .editor {
      margin-top: 12px;
      padding: 12px;
      border-radius: 14px;
      border: 1px solid var(--line);
      background: var(--term-bg);
      display: none;
    }

    .editor.active {
      display: block;
    }

    .editor-head {
      margin-bottom: 10px;
      color: var(--accent-2);
      font-size: 13px;
    }

    textarea {
      width: 100%;
      min-height: 140px;
      resize: vertical;
      padding: 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--text);
      font-family: var(--mono);
      font-size: 13px;
      outline: none;
    }

    .editor-actions {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }

    .quest-list,
    .tip-list {
      display: grid;
      gap: 10px;
    }

    .quest-part-header {
      padding: 10px 0 6px;
      margin-top: 6px;
      border-top: 1px solid color-mix(in srgb, var(--accent-2) 18%, transparent);
      color: var(--accent-2);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-family: var(--mono);
    }

    .quest-part-header:first-child {
      border-top: 0;
      margin-top: 0;
    }

    .quest {
      padding: 10px 0;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      background: transparent;
    }

    .quest:first-child,
    .quest-part-header + .quest {
      border-top: 0;
      padding-top: 0;
    }

    .quest.current {
      margin-top: 4px;
      padding: 14px;
      border: 1px solid color-mix(in srgb, var(--accent-2) 32%, transparent);
      border-radius: 16px;
      background: color-mix(in srgb, var(--accent-2) 7%, transparent);
    }

    .quest.collapsed {
      padding-bottom: 10px;
    }

    .quest.done {
      border-color: color-mix(in srgb, var(--accent) 18%, transparent);
    }

    .quest-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .quest-title {
      margin: 0 0 6px;
      font-size: 14px;
      font-family: var(--mono);
    }

    .quest-state {
      flex-shrink: 0;
      padding: 5px 8px;
      border-radius: 999px;
      border: 1px solid var(--line);
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      font-family: var(--mono);
    }

    .quest.done .quest-state {
      color: var(--accent);
      border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    }

    .quest.current .quest-state {
      color: var(--accent-2);
      border-color: color-mix(in srgb, var(--accent-2) 30%, transparent);
    }

    .quest-copy,
    .quest-helper,
    .tip {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
      font-size: 13px;
    }

    .quest-helper {
      margin-bottom: 10px;
    }

    .quest-helper-done {
      display: none;
    }

    .quest.done.expanded .quest-helper-done {
      display: block;
    }

    .quest-summary {
      margin-top: 2px;
      color: var(--muted);
      line-height: 1.4;
      font-size: 12px;
    }

    .quest-command-label,
    .tip-title {
      display: block;
      margin-bottom: 6px;
      color: var(--accent-2);
      font-size: 11px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      font-family: var(--mono);
    }

    .quest-command {
      display: grid;
      gap: 6px;
      padding: 10px;
      border-radius: 12px;
      border: 1px solid color-mix(in srgb, var(--accent-2) 20%, transparent);
      background: var(--term-bg);
      margin-top: 10px;
    }

    .quest-command code {
      display: block;
      color: var(--text);
      font-size: 13px;
      font-family: var(--mono);
    }

    .sidebar-section {
      padding: 0;
    }

    .library-list {
      display: grid;
      gap: 10px;
    }

    .glossary-shell {
      margin-top: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      overflow: hidden;
    }

    .glossary-shell summary {
      cursor: pointer;
      padding: 12px 14px;
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
      list-style: none;
      font-family: var(--mono);
    }

    .glossary-shell summary::-webkit-details-marker {
      display: none;
    }

    .glossary-shell-body {
      padding: 0 12px 12px;
    }

    .library-item {
      border: 1px dashed var(--line);
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.02);
      overflow: hidden;
    }

    .library-item[open] {
      border-style: solid;
      border-color: color-mix(in srgb, var(--accent-2) 24%, transparent);
      background: color-mix(in srgb, var(--accent-2) 5%, transparent);
    }

    .library-item summary {
      list-style: none;
      cursor: pointer;
      padding: 12px 14px;
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
      font-family: var(--mono);
    }

    .library-item summary::-webkit-details-marker {
      display: none;
    }

    .library-item-body {
      padding: 0 14px 14px;
      color: var(--muted);
      line-height: 1.5;
      font-size: 13px;
    }

    .lesson-note {
      padding: 12px;
      border-radius: 14px;
      border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
      background: color-mix(in srgb, var(--accent) 6%, transparent);
      color: var(--muted);
      line-height: 1.5;
      font-size: 13px;
    }

    .lesson-note strong {
      color: var(--accent);
    }

    .lesson-note a {
      color: var(--accent-2);
    }

    .next-steps {
      margin: 8px 0 0;
      padding-left: 20px;
    }

    .next-steps li {
      margin-bottom: 6px;
    }

    .next-steps code {
      font-family: var(--mono);
      font-size: 12px;
    }

    .tip {
      padding: 12px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.03);
    }

    .tip.ready {
      border-color: color-mix(in srgb, var(--accent) 30%, transparent);
      background: color-mix(in srgb, var(--accent) 6%, transparent);
    }

    @media (min-width: 901px) {
      .sidebar-panel {
        position: sticky;
        top: 18px;
        max-height: calc(100vh - 36px);
        overflow-y: auto;
        padding-right: 12px;
      }
    }

    .prompt-path {
      color: var(--muted);
      opacity: 0.55;
    }

    .quest-command code {
      cursor: pointer;
      transition: color 0.15s;
    }

    .quest-command code:hover {
      color: var(--accent);
    }

    @keyframes quest-done-glow {
      0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
      50% { box-shadow: 0 0 12px 4px color-mix(in srgb, var(--accent) 25%, transparent); }
      100% { box-shadow: 0 0 0 0 transparent; }
    }

    .quest.just-done {
      animation: quest-done-glow 0.6s ease-out;
    }

    .quest-chevron {
      flex-shrink: 0;
      font-size: 12px;
      color: var(--muted);
      opacity: 0.5;
      transition: transform 0.2s;
      margin-left: 4px;
    }

    .quest.done.expanded .quest-chevron {
      transform: rotate(90deg);
    }

    .hero-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .theme-toggle {
      background: transparent;
      border: 1px solid var(--line);
      padding: 6px 10px;
      font-size: 14px;
      cursor: pointer;
      border-radius: 999px;
      line-height: 1;
    }

    .sidebar-divider {
      border: none;
      border-top: 1px solid var(--line);
      margin: 0;
    }

    .site-footer {
      margin-top: 24px;
      padding: 16px 0;
      text-align: center;
      color: var(--muted);
      font-size: 12px;
    }

    .site-footer a {
      color: var(--accent-2);
    }

    .footer-sep {
      margin: 0 4px;
      opacity: 0.4;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }
