/* ─── RESET & BASE ──────────────────────────────────────────────────────── */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --dark: #1a1a1d;
      --light: #F9F9F9;
      --fg-muted: rgba(249, 249, 249, 0.7);
      --purple: #AE99FF;
      --purple-bright: #CDBEFF;
      --purple-dim: rgba(174, 153, 255, 0.15);
      --purple-border: rgba(174, 153, 255, 0.25);
      --purple-glow: rgba(174, 153, 255, 0.2);
      --ease-brand: cubic-bezier(0.2, 0.8, 0.2, 1);
      --dur-fast: 140ms;
      --dur-med: 240ms;
      --dur-slow: 480ms;
    }

    html, body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: var(--dark);
      color: var(--light);
      font-family: 'DM Sans', sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    /* ─── ACCESSIBILITY ────────────────────────────────────────────────────── */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .sr-only-focusable:focus {
      position: fixed;
      top: 8px;
      left: 50%;
      transform: translateX(-50%);
      width: auto;
      height: auto;
      padding: 10px 20px;
      margin: 0;
      overflow: visible;
      clip: auto;
      white-space: nowrap;
      background: #AE99FF;
      color: #1a1a1d;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      border-radius: 100px;
      z-index: 9999;
      text-decoration: none;
    }

    :focus-visible {
      outline: 2px solid #AE99FF;
      outline-offset: 2px;
    }

    /* Remove outline on mouse click, keep for keyboard */
    :focus:not(:focus-visible) {
      outline: none;
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* ─── TOP CHROME ──────────────────────────────────────────────────────────── */
    #top-chrome {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      background: transparent;
    }

    #chrome-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 24px;
      gap: 12px;
    }

    .chrome-label {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
    }

    .chrome-label--left {
      color: rgba(249, 249, 249, 0.75);
    }

    .chrome-label--right {
      color: var(--purple);
    }

    /* ─── SEGMENTED PROGRESS BAR ─────────────────────────────────────────────── */
    #course-progress {
      position: relative;
      padding: 0 24px 0;
    }

    #progress-label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
      padding: 0 1px;
    }

    #progress-label-text {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: rgba(249, 249, 249, 0.75);
    }

    #progress-label-pct {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--purple);
      transition: opacity 400ms;
    }

    #progress-bar-track {
      width: 100%;
      height: 2px;
      display: flex;
      gap: 3px;
      position: relative;
    }

    .prog-seg {
      flex: 1;
      height: 2px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 2px;
      position: relative;
      overflow: hidden;
    }

    .prog-seg-fill {
      position: absolute;
      inset: 0;
      background: var(--purple);
      transform: scaleX(0);
      transform-origin: left;
      border-radius: 2px;
      transition: transform 900ms var(--ease-brand);
    }

    .prog-seg-fill.complete {
      transform: scaleX(1);
    }

    .prog-seg-fill.partial {
      /* width set inline */
      transform: scaleX(1);
    }

    .prog-seg-fill.active-seg::after {
      content: '';
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 20px;
      background: linear-gradient(to right, transparent, rgba(205, 190, 255, 0.7));
      animation: shimmer 2s ease-in-out infinite;
    }

    @keyframes shimmer {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }

    /* ─── MAIN LAYOUT ─────────────────────────────────────────────────────────── */
    #layout {
      position: fixed;
      inset: 0;
    }

    /* ─── CHAPTER INFO (typographic, no card — floats over brain right side) ─── */
    #left-panel {
      position: fixed;
      top: 50%;
      left: 52%;
      transform: translateY(-50%) translateX(20px);
      width: min(480px, 38vw);
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: none;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0;
      background: none;
      border: none;
      z-index: 50;
      opacity: 0;
      pointer-events: none;
      transition:
        opacity 500ms var(--ease-brand),
        transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
      will-change: transform, opacity;
    }

    #left-panel.open {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(-50%) translateX(0);
    }

    @media (min-width: 1400px) {
      #left-panel { left: 54%; }
    }

    #left-panel::-webkit-scrollbar {
      display: none;
    }

    /* Close button — top right of card */
    #drawer-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 1px solid var(--purple-border);
      background: transparent;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--fg-muted);
      transition: border-color var(--dur-med) var(--ease-brand), color var(--dur-med) var(--ease-brand);
      flex-shrink: 0;
    }

    #drawer-close:hover {
      border-color: var(--purple);
      color: var(--light);
    }

    /* ─── PANEL HEADER ────────────────────────────────────────────────────────── */
    #panel-header {
      margin-bottom: 24px;
      opacity: 1;
      transform: none;
    }

    #panel-header.visible {
      opacity: 1;
      transform: none;
    }

    .programme-label {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--purple);
      margin-bottom: 16px;
      display: block;
    }

    .panel-title {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: clamp(28px, 3vw, 36px);
      line-height: 1.05;
      color: var(--light);
      margin-bottom: 10px;
      letter-spacing: -0.02em;
    }

    .panel-subtitle {
      font-family: 'DM Sans', sans-serif;
      font-size: 15px;
      color: var(--fg-muted);
      font-weight: 300;
      line-height: 1.5;
    }

    .panel-rule {
      width: 100%;
      height: 1px;
      background: var(--purple-border);
      margin: 28px 0;
    }

    /* ─── CHAPTER CARDS ───────────────────────────────────────────────────────── */
    #chapters-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      flex: 1;
    }

    .chapter-card {
      background: rgba(255, 255, 255, 0.025);
      border: 1px solid rgba(174, 153, 255, 0.18);
      border-radius: 16px;
      padding: 24px;
      cursor: default;
      transition:
        border-color var(--dur-med) var(--ease-brand),
        box-shadow var(--dur-med) var(--ease-brand),
        transform var(--dur-med) var(--ease-brand),
        opacity var(--dur-med) var(--ease-brand),
        background var(--dur-med) var(--ease-brand);
      opacity: 0;
      transform: translateY(20px);
      position: relative;
      overflow: hidden;
    }

    .chapter-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(to right, transparent, var(--purple-border), transparent);
      opacity: 0;
      transition: opacity var(--dur-med) var(--ease-brand);
    }

    .chapter-card.visible {
      opacity: 1;
      transform: translateY(0);
    }

    .chapter-card.active {
      border-color: rgba(174, 153, 255, 0.55);
      box-shadow: 0 0 32px rgba(174, 153, 255, 0.18), 0 0 0 1px rgba(174, 153, 255, 0.1) inset;
      background: rgba(174, 153, 255, 0.05);
      transform: scale(1.01);
    }

    .chapter-card.active::before {
      opacity: 1;
    }

    .chapter-card.dimmed {
      opacity: 0.45;
      transform: scale(0.99);
    }

    .chapter-card.locked {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .chapter-card.very-locked {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .chapter-number {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--fg-muted);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .chapter-number .lock-icon {
      display: inline-flex;
      opacity: 0.6;
    }

    .chapter-title {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: clamp(22px, 2.2vw, 28px);
      color: var(--light);
      margin-bottom: 10px;
      line-height: 1.1;
      letter-spacing: -0.01em;
    }

    .chapter-desc {
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      color: var(--fg-muted);
      line-height: 1.55;
      margin-bottom: 18px;
    }

    /* ─── SESSION LIST ────────────────────────────────────────────────────────── */
    .session-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 20px;
    }

    .session-item {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      color: rgba(249, 249, 249, 0.7);
      line-height: 1.4;
    }

    .session-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
      background: var(--purple-border);
      transition: background var(--dur-med) var(--ease-brand);
    }

    .session-dot.done {
      background: var(--purple);
      box-shadow: 0 0 6px rgba(174, 153, 255, 0.5);
    }

    .session-item.done-session {
      color: rgba(249, 249, 249, 0.9);
    }

    /* ─── CARD FOOTER ─────────────────────────────────────────────────────────── */
    .card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .chapter-status {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--fg-muted);
    }

    .chapter-status.active-status {
      color: var(--purple);
    }

    /* ─── PROGRESS TRACK ──────────────────────────────────────────────────────── */
    .progress-track {
      flex: 1;
      height: 3px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 2px;
      overflow: hidden;
      max-width: 100px;
    }

    .progress-fill {
      height: 100%;
      border-radius: 2px;
      background: var(--purple);
      transition: width 1s var(--ease-brand);
    }

    /* ─── CTA BUTTON ──────────────────────────────────────────────────────────── */
    .btn-continue {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--dark);
      background: var(--purple);
      border: none;
      border-radius: 999px;
      padding: 10px 20px;
      cursor: pointer;
      text-decoration: none;
      position: relative;
      overflow: hidden;
      transition: box-shadow var(--dur-med) var(--ease-brand), transform var(--dur-fast) var(--ease-brand);
      white-space: nowrap;
    }

    .btn-continue::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--purple-bright);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform var(--dur-med) var(--ease-brand);
    }

    .btn-continue:hover::before {
      transform: scaleX(1);
    }

    .btn-continue:hover {
      box-shadow: 0 0 20px rgba(174, 153, 255, 0.4);
      transform: translateY(-1px);
    }

    .btn-continue:active {
      transform: translateY(0);
    }

    .btn-continue span,
    .btn-continue svg {
      position: relative;
      z-index: 1;
    }

    .btn-arrow {
      width: 14px;
      height: 14px;
    }

    /* ─── PANEL FOOTER ────────────────────────────────────────────────────────── */
    #panel-footer {
      margin-top: 32px;
      padding-top: 20px;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      text-align: center;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: rgba(249, 249, 249, 0.75);
    }

    /* ─── RIGHT PANEL — BRAIN CANVAS (FULLSCREEN) ────────────────────────────── */
    #right-panel {
      position: fixed;
      inset: 0;
      overflow: hidden;
    }

    /* Radial purple glow behind the brain */
    #right-panel::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 55%;
      height: 55%;
      background: radial-gradient(ellipse at center,
        rgba(174, 153, 255, 0.14) 0%,
        rgba(174, 153, 255, 0.05) 45%,
        transparent 70%
      );
      pointer-events: none;
      z-index: 1;
      border-radius: 50%;
      opacity: 0;
      transition: opacity 2s cubic-bezier(0.2,0.8,0.2,1);
    }
    #right-panel.revealed::after {
      opacity: 1;
    }

    /* Hub prompt label — fades in on load, hides when chapter selected */
    #hub-hero {
      position: fixed;
      bottom: 52px;
      left: 0;
      right: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0;
      z-index: 30;
      pointer-events: none;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 700ms cubic-bezier(0.2,0.8,0.2,1), transform 700ms cubic-bezier(0.2,0.8,0.2,1);
    }
    #hub-hero.visible {
      opacity: 1;
      transform: translateY(0);
    }
    #hub-hero.hidden {
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 300ms ease, transform 300ms ease;
    }
    #hub-hero .loading-label {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: rgba(174, 153, 255, 0.8);
      animation: loadPulse 1.6s ease-in-out infinite;
      pointer-events: none;
    }
    @keyframes loadPulse {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }
    #hub-hero-sub {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: rgba(249,249,249,0.75);
    }

    #byb-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 14px 32px;
      border-radius: 999px;
      background: #AE99FF;
      border: none;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: #1a1a1d;
      cursor: pointer;
      pointer-events: auto;
      font-weight: 500;
      transition: box-shadow 200ms ease, opacity 200ms ease;
      box-shadow: 0 0 32px rgba(174,153,255,0.35);
    }
    #byb-btn:hover {
      box-shadow: 0 0 48px rgba(174,153,255,0.55);
      opacity: 0.92;
    }

    #brain-canvas {
      width: 100%;
      height: 100%;
      display: block;
      opacity: 0; /* JS drives opacity via canvasOpacityCurrent — no CSS transition needed */
      position: relative;
      z-index: 2;
    }

    /* (drawer-overlay removed — hub card is persistent, no dismiss overlay needed) */

    /* ─── CHAPTER HINT LABELS (floating over brain, always visible) ────────────── */
    .chapter-hint {
      appearance: none;
      font: inherit;
      position: fixed;
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--purple);
      background: rgba(18, 16, 26, 0.65);
      border: 1px solid var(--purple-border);
      border-radius: 20px;
      padding: 7px 14px 7px 10px;
      display: flex;
      align-items: center;
      gap: 8px;
      pointer-events: auto;
      cursor: pointer;
      opacity: 0;
      transform: translateY(8px);
      transition:
        opacity 400ms var(--ease-brand),
        transform 400ms var(--ease-brand),
        border-color var(--dur-med) var(--ease-brand),
        background var(--dur-med) var(--ease-brand),
        color var(--dur-med) var(--ease-brand);
      z-index: 30;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      white-space: nowrap;
      user-select: none;
    }

    .chapter-hint.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* (card-open class removed — hints stay visible in two-column layout) */

    .chapter-hint:hover {
      border-color: var(--purple);
      background: rgba(174, 153, 255, 0.14);
    }

    .chapter-hint.dimmed-hint {
      opacity: 0.45;
      background: rgba(12, 10, 20, 0.75);
    }

    .chapter-hint.active-hint {
      border-color: rgba(174, 153, 255, 0.7);
      background: rgba(174, 153, 255, 0.16);
      box-shadow: 0 0 20px rgba(174, 153, 255, 0.3), 0 0 0 1px rgba(174, 153, 255, 0.2) inset;
      color: var(--purple-bright);
      align-items: flex-start;
      white-space: normal;
    }

    .chapter-hint.active-hint .hint-dot {
      margin-top: 4px;
    }

    .chapter-hint .hint-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #AE99FF;
      flex-shrink: 0;
      animation: nodepulse 2.4s ease-in-out infinite;
    }
    .chapter-hint.locked-hint .hint-dot {
      background: rgba(255,255,255,0.28);
      animation: none;
    }
    .chapter-hint.locked-hint {
      color: rgba(249,249,249,0.75);
      border-color: rgba(255,255,255,0.18);
      cursor: default;
    }

    /* ─── BRAIN LOADING ───────────────────────────────────────────────────────── */
    #brain-loader {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 16px;
      pointer-events: none;
    }

    .loader-ring {
      width: 40px;
      height: 40px;
      border: 2px solid rgba(174, 153, 255, 0.15);
      border-top-color: var(--purple);
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .loader-text {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: rgba(174, 153, 255, 0.8);
    }

    #brain-loader.hidden {
      opacity: 0;
      transition: opacity var(--dur-slow) var(--ease-brand);
      pointer-events: none;
    }

    /* ─── HOVER TOOLTIP ───────────────────────────────────────────────────────── */
    #brain-tooltip {
      position: fixed;
      pointer-events: none;
      z-index: 200;
      background: rgba(26, 26, 29, 0.95);
      border: 1px solid var(--purple-border);
      border-radius: 8px;
      padding: 10px 14px;
      opacity: 0;
      transition: opacity var(--dur-fast) var(--ease-brand);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    #brain-tooltip.visible {
      opacity: 1;
    }

    .tooltip-chapter-num {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--purple);
      margin-bottom: 3px;
    }

    .tooltip-chapter-name {
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      color: var(--light);
      white-space: nowrap;
    }

    /* ─── FLOATING ATTRIBUTION ────────────────────────────────────────────────── */
    #attribution {
      position: fixed;
      bottom: 16px;
      right: 20px;
      z-index: 50;
      font-family: 'DM Mono', monospace;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: rgba(249, 249, 249, 0.35);
      pointer-events: none;
    }

    /* ─── LOAD WARNING ────────────────────────────────────────────────────────── */
    #load-warning {
      position: fixed;
      bottom: 16px;
      left: 20px;
      z-index: 50;
      font-family: 'DM Mono', monospace;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: rgba(174, 153, 255, 0.8);
      pointer-events: none;
      display: none;
    }

    #load-warning.visible {
      display: block;
    }

    /* ─── BACKGROUND PARTICLES LAYER ──────────────────────────────────────────── */
    #right-panel::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(174, 153, 255, 0.04) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    /* ─── CHAPTER ACTIVE INDICATOR (left panel region highlight) ─────────────── */
    .chapter-card .chapter-region-indicator {
      position: absolute;
      top: 0;
      right: 0;
      width: 3px;
      height: 0;
      background: var(--purple);
      border-radius: 0 16px 16px 0;
      transition: height var(--dur-med) var(--ease-brand);
    }

    .chapter-card.active .chapter-region-indicator {
      height: 100%;
    }

    /* ─── HUB CARD (persistent right column — always visible after entrance) ─── */
    /* Mirrors the old #left-panel positioning: left:52%, translateX(20px) → translateX(0) */
    #hub-card {
      position: fixed;
      top: 50%;
      left: 52%;
      transform: translateY(-50%) translateX(20px);
      width: min(480px, 38vw);
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: none;
      z-index: 50;
      opacity: 0;
      pointer-events: none;
      transition:
        opacity 500ms var(--ease-brand),
        transform 600ms var(--ease-brand);
    }

    #hub-card::-webkit-scrollbar { display: none; }

    #hub-card.visible {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(-50%) translateX(0);
    }

    @media (min-width: 1400px) {
      #hub-card { left: 54%; }
    }

    #hub-card-inner {
      width: 100%;
      transition: opacity 300ms var(--ease-brand), transform 300ms var(--ease-brand);
    }

    /* ─── INTRO OVERLAY ──────────────────────────────────────────────── */
    #intro-overlay {
      position: fixed;
      inset: 0;
      z-index: 300;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: #1a1a1d;
      pointer-events: none;
    }

    #intro-stars {
      position: absolute;
      inset: 0;
      pointer-events: none;
      transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    #intro-title {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: clamp(48px, 7vw, 96px);
      letter-spacing: -0.03em;
      line-height: 1;
      color: #F9F9F9;
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 0.7s cubic-bezier(0.2,0.8,0.2,1), transform 0.7s cubic-bezier(0.2,0.8,0.2,1);
    }

    #intro-sub {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.22em;
      color: var(--purple);
      margin-top: 18px;
      opacity: 0;
      transition: opacity 0.6s cubic-bezier(0.2,0.8,0.2,1) 0.4s;
    }

    #intro-overlay.fade-out {
      opacity: 0;
      transition: opacity 1.6s cubic-bezier(0.2,0.8,0.2,1) 0s;
    }

    /* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
    @media (max-width: 768px) {
      #left-panel {
        width: 100vw;
        padding: 20px 20px 32px;
      }

      .chapter-card {
        padding: 18px;
      }

      .panel-title {
        font-size: 28px;
      }

      #chrome-bar {
        padding: 12px 20px;
      }
    }

    /* ─── DROP PANEL ──────────────────────────────────────────────────────────── */
    #drop-panel {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: grid;
      grid-template-columns: 48px 70% 1fr;
      grid-template-rows: 100%;  /* single row fills full panel height */
      align-items: stretch;      /* columns stretch to fill that height */
      background: transparent;
      transform: translateY(100%);
      transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
      will-change: transform;
      pointer-events: none;
    }

    #drop-panel.open {
      transform: translateY(0);
      pointer-events: auto;
    }

    /* Left dot-nav strip */
    #drop-nav {
      width: 48px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      padding: 80px 0;
    }

    .drop-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgba(174, 153, 255, 0.25);
      cursor: pointer;
      transition: background 240ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
      flex-shrink: 0;
    }

    .drop-dot.active {
      background: #AE99FF;
      transform: scale(1.5);
      animation: dotpulse 2.4s ease-in-out infinite;
    }

    @keyframes dotpulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(174, 153, 255, 0); }
      50%       { box-shadow: 0 0 0 4px rgba(174, 153, 255, 0.28); }
    }

    /* Scrollable content area */
    #drop-content {
      overflow-y: auto;
      overflow-x: hidden;
      scroll-behavior: smooth;
      scrollbar-width: none;
      padding-top: 44px; /* clear the fixed chrome */
      height: 100%;      /* must fill the grid row so background covers the panel */
      /* Fade top edge so content scrolling under chrome dissolves rather than hard-clips */
      -webkit-mask-image: linear-gradient(to bottom, transparent 0px, rgba(0,0,0,0.1) 40px, black 120px, black calc(100% - 0px));
      mask-image: linear-gradient(to bottom, transparent 0px, rgba(0,0,0,0.1) 40px, black 120px, black calc(100% - 0px));
    }

    #drop-content::-webkit-scrollbar {
      display: none;
    }

    /* ─── DROP VISUAL PANEL (right 1fr column — sticky visual per section) ─── */
    #drop-visual {
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .drop-visual-slot {
      position: absolute;
      inset: 0;
      display: none;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      padding: 32px 16px 32px 0; /* tight right — content sits close to content column edge */
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 500ms cubic-bezier(0.2,0.8,0.2,1), transform 500ms cubic-bezier(0.2,0.8,0.2,1);
      pointer-events: none;
    }

    .drop-visual-slot.active {
      display: flex;
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    /* Placeholder styling is inline in visualPlaceholderHTML() */

    /* ─── CHROME BACK BUTTON (drop mode only) ───────────────────────────────── */
    #chrome-back {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: rgba(174, 153, 255, 0.75);
      background: rgba(174, 153, 255, 0.06);
      border: 1px solid rgba(174, 153, 255, 0.18);
      border-radius: 100px;
      cursor: pointer;
      padding: 7px 14px 7px 11px;
      transition: color 240ms ease, background 240ms ease, border-color 240ms ease, box-shadow 240ms ease, opacity 300ms ease;
      flex-shrink: 0;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    #chrome-back svg {
      transition: transform 240ms cubic-bezier(0.2,0.8,0.2,1);
    }

    #chrome-back:hover {
      color: #F9F9F9;
      background: rgba(174, 153, 255, 0.14);
      border-color: rgba(174, 153, 255, 0.35);
      box-shadow: 0 0 12px rgba(174, 153, 255, 0.15);
    }

    #chrome-back:hover svg {
      transform: translateX(-2px);
    }

    #chrome-back.visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    /* Drop sections — each is a screen */
    .drop-screen {
      min-height: 100dvh;
      padding: 80px 48px 80px 52px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .drop-screen > * {
      max-width: 740px;
    }

    @media (max-width: 768px) {
      .drop-screen > * {
        max-width: 100%;
      }
    }

    .drop-screen:first-of-type {
      padding-top: 100px;
    }

    .drop-label {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: #AE99FF;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .drop-label::before {
      content: '';
      display: inline-block;
      width: 28px;
      height: 1px;
      background: #AE99FF;
    }

    .drop-h1 {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: clamp(48px, 5.5vw, 72px);
      line-height: 1.02;
      letter-spacing: -0.02em;
      margin: 0 0 20px;
      color: #F9F9F9;
    }

    .drop-h2 {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: clamp(32px, 3.5vw, 48px);
      line-height: 1.04;
      letter-spacing: -0.02em;
      margin: 0 0 16px;
      color: #F9F9F9;
    }

    .drop-body {
      font-family: 'DM Sans', sans-serif;
      font-weight: 400;
      font-size: 18px;
      line-height: 1.55;
      color: rgba(249, 249, 249, 0.7);
      max-width: 480px;
    }

    .drop-accent {
      color: #AE99FF;
    }

    /* Programme cards (3-column) */
    .prog-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-top: 28px;
    }

    .prog-card {
      padding: 20px;
      border-radius: 12px;
      background: rgba(20, 18, 30, 0.9);
      border: 1px solid rgba(174, 153, 255, 0.2);
    }

    .prog-card.locked {
      opacity: 0.45;
    }

    .prog-card-num {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: #AE99FF;
      margin-bottom: 10px;
    }

    .prog-card-title {
      font-family: 'Bricolage Grotesque', sans-serif;
      font-weight: 800;
      font-size: 15px;
      letter-spacing: -0.01em;
      color: #F9F9F9;
      margin-bottom: 8px;
    }

    .prog-card-desc {
      font-family: 'DM Sans', sans-serif;
      font-weight: 300;
      font-size: 13px;
      line-height: 1.5;
      color: rgba(249, 249, 249, 0.75);
    }

    .prog-card-badge {
      display: inline-block;
      margin-top: 10px;
      font-family: 'DM Mono', monospace;
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      padding: 3px 8px;
      border-radius: 999px;
      border: 1px solid rgba(174, 153, 255, 0.3);
      color: #AE99FF;
    }

    .prog-card-badge.locked-badge {
      border-color: rgba(249, 249, 249, 0.12);
      color: rgba(249, 249, 249, 0.75);
    }

    /* Survey pills */
    .survey-q {
      margin-bottom: 32px;
    }

    .survey-q-label {
      font-family: 'DM Sans', sans-serif;
      font-weight: 300;
      font-size: 16px;
      color: #F9F9F9;
      margin-bottom: 14px;
    }

    .pill-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .survey-pill {
      padding: 9px 18px;
      border-radius: 999px;
      border: 1px solid rgba(174, 153, 255, 0.3);
      background: transparent;
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      color: rgba(249, 249, 249, 0.7);
      cursor: pointer;
      transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .survey-pill:hover {
      border-color: rgba(174, 153, 255, 0.6);
      color: #F9F9F9;
    }

    .survey-pill.selected {
      background: #AE99FF;
      border-color: #AE99FF;
      color: #1a1a1d;
      font-weight: 500;
    }

    #drop-q2-wrap {
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 400ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
      pointer-events: none;
    }

    #drop-q2-wrap.visible {
      opacity: 1;
      transform: none;
      pointer-events: auto;
    }

    /* Commitment textarea */
    .drop-textarea {
      width: 100%;
      max-width: 440px;
      min-height: 80px;
      background: rgba(20, 18, 30, 0.8);
      border: 1px solid rgba(174, 153, 255, 0.25);
      border-radius: 10px;
      padding: 14px 16px;
      font-family: 'DM Sans', sans-serif;
      font-size: 15px;
      color: #F9F9F9;
      resize: vertical;
      outline: none;
      transition: border-color 200ms ease, box-shadow 200ms ease;
      margin-top: 20px;
    }

    .drop-textarea:focus {
      border-color: #AE99FF;
      box-shadow: 0 0 0 3px rgba(174, 153, 255, 0.12);
    }

    .drop-textarea::placeholder {
      color: rgba(249, 249, 249, 0.55);
    }

    /* CTA button */
    .drop-cta {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      margin-top: 32px;
      padding: 14px 28px;
      border-radius: 999px;
      background: #AE99FF;
      border: none;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: #1a1a1d;
      cursor: pointer;
      font-weight: 500;
      transition: opacity 200ms ease, box-shadow 200ms ease;
      position: relative;
      overflow: hidden;
    }

    .drop-cta:hover {
      box-shadow: 0 0 24px rgba(174, 153, 255, 0.45);
      opacity: 0.9;
    }

    /* Sign off */
    .drop-signoff {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: rgba(249, 249, 249, 0.75);
      margin-top: 48px;
    }

    /* ─── DROP SECTION LAYOUT CLASSES ──────────────────────────────────────── */
    .drop-section {
      min-height: 80dvh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 80px 52px;
    }
    .drop-section-hero {
      min-height: 100dvh;
      padding: 88px 52px 80px;
      position: relative;
    }
    .drop-flip-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-top: 0;
    }
    .drop-compare-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 32px;
    }
    .drop-journey-list {
      margin-top: 32px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .drop-quiz-options {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .drop-reflect-list {
      display: flex;
      flex-direction: column;
      gap: 28px;
      margin-top: 32px;
    }

    /* Reveal on scroll — each staggerable child starts hidden and is revealed by JS */
    .drop-reveal-stagger {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity .65s cubic-bezier(0.2,0.8,0.2,1), transform .65s cubic-bezier(0.2,0.8,0.2,1);
    }
    .drop-reveal-stagger.in { opacity: 1; transform: none; }

    /* ─── MOBILE ───────────────────────────────────────────────────────────── */
    @media (max-width: 768px) {
      /* Drop panel: single column, no nav or visual columns */
      #drop-panel {
        grid-template-columns: 100% !important;
      }

      #drop-nav {
        display: none !important;
      }

      #drop-visual {
        display: none !important;
      }

      /* Transparent so brain shows through; mask removed — it hides content on mobile */
      #drop-content {
        background: transparent !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
      }

      /* Content full width, lighter padding */
      .drop-screen {
        padding: 72px 24px 40px;
        min-height: 100dvh;
      }

      .drop-screen:first-of-type {
        padding-top: 80px;
      }

      /* Tighter type scale */
      .drop-h1 {
        font-size: clamp(36px, 10vw, 52px);
      }

      .drop-h2 {
        font-size: clamp(26px, 7vw, 38px);
      }

      .drop-body {
        font-size: 16px;
        max-width: 100%;
      }

      /* Programme cards: single column on mobile */
      .prog-cards {
        grid-template-columns: 1fr;
      }

      /* Pills: full width on mobile */
      .pill-grid {
        flex-direction: column;
      }

      .survey-pill {
        width: 100%;
        text-align: left;
        padding: 12px 20px;
      }

      /* Textarea full width */
      .drop-textarea {
        max-width: 100%;
      }

      /* Scroll hint: adjust position for mobile */
      #drop-scroll-hint {
        left: 24px !important;
        bottom: 28px !important;
      }

      /* CTA full width on mobile */
      .drop-cta {
        width: 100%;
        justify-content: center;
      }

      /* Chapter hint labels: smaller, more compact */
      .chapter-hint {
        font-size: 9px !important;
        padding: 5px 10px !important;
      }

      /* Hub: brain takes full width on mobile, no split layout */
      #canvas-container {
        left: 0 !important;
        width: 100% !important;
      }

      /* Hub hero text: centred below brain on mobile */
      #hub-hero {
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-align: center;
        width: 90vw !important;
      }
    }
