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

html { zoom: 0.75; }

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-surface: rgba(10, 10, 15, 0.82);
  --accent-blue: #4f7df9;
  --accent-purple: #9b5de5;
  --accent-pink: #f15bb5;
  --accent-cyan: #00f5d4;
  --accent-orange: #ff6b35;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --gradient-1: linear-gradient(135deg, #4f7df9, #9b5de5);
  --gradient-2: linear-gradient(135deg, #9b5de5, #f15bb5);
  --gradient-3: linear-gradient(135deg, #00f5d4, #4f7df9);
  --pixel-font: 'Press Start 2P', monospace;
  --body-font: 'Inter', sans-serif;
  --heading-font: 'Space Grotesk', sans-serif;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 60px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --border-subtle: 1px solid rgba(255,255,255,0.05);
  --border-accent: 1px solid rgba(79,125,249,0.15);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --glow-cyan: 0 12px 40px rgba(0,245,212,0.35);
  --glow-blue: 0 8px 30px rgba(79,125,249,0.3);
  --glow-purple: 0 8px 30px rgba(155,93,229,0.3);
  --sidebar-width: 384px;
  --content-max: 1000px;
  --topbar-height: 60px;
  --page-margin-x: clamp(24px, 6vw, 64px);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========== NOISE OVERLAY ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ========== GRID BACKGROUND ========== */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,125,249,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,125,249,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ========== CURSOR GLOW ========== */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(79,125,249,0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.3s ease, top 0.3s ease;
}

/* ========== LOADING SCREEN ========== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out-expo);
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-text {
  font-family: var(--pixel-font);
  font-size: clamp(10px, 2vw, 16px);
  background: linear-gradient(135deg, #c9a0f0, #7c4dba);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  50% { background-position: 0 0; }
  100% { background-position: 100% 0; }
}

/* ========== TOP NAV ========== */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(79,125,249,0.08);
}
#topbar.topbar--centered .nav-right {
  position: absolute;
  left: 24px;
  right: 24px;
  justify-content: center;
  pointer-events: none;
}
#topbar.topbar--centered .profile-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  z-index: 1;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.nav-back-btn {
  display: none;
}
.nav-home-btn {
  display: none;
}
.nav-home-btn.visible {
  display: flex;
}
.nav-back-btn.visible {
  display: flex;
}
.nav-logo {
  font-family: var(--pixel-font);
  font-size: 10px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav-home-actions {
  display: none;
  align-items: center;
  gap: 10px;
}
.nav-home-actions.visible {
  display: flex;
  pointer-events: auto;
}
.nav-home-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-home-action:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.nav-home-action-label {
  white-space: nowrap;
}
.nav-ask-ai {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  pointer-events: auto;
}
.nav-ask-ai:hover {
  background: rgba(0,245,212,0.08);
}
.nav-ask-ai.hidden {
  display: none;
}
/* ========== PROFILE AVATAR & DROPDOWN ========== */
.profile-wrap { position: relative; z-index: 200; }
.btn-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}
.btn-avatar:hover { border-color: rgba(79,125,249,0.12); background: var(--bg-card-hover); }
.avatar-letter {
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: #e6edf3;
  text-transform: uppercase;
  line-height: 1;
}
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 200;
}
.profile-dropdown.visible { display: block; }
.profile-dropdown-header { padding: 14px 16px 10px; }
.profile-dropdown-name {
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 600;
  color: #e6edf3;
}
.profile-dropdown-email {
  font-family: var(--body-font);
  font-size: 14px;
  color: #848d97;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-dropdown-divider { height: 1px; background: rgba(255,255,255,0.05); }
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 500;
  color: #c9d1d9;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
}
.profile-dropdown-item:hover { background: rgba(255,255,255,0.04); }
.profile-dropdown-item svg { opacity: 0.6; flex-shrink: 0; }
.profile-dropdown-item:hover svg { opacity: 0.9; }
.profile-dropdown-item--danger { color: #f85149; }
.profile-dropdown-item--danger:hover { background: rgba(248,81,73,0.08); }
.profile-dropdown-item--danger svg { opacity: 0.7; }

/* ========== PROFILE / PASSWORD MODALS ========== */
.profile-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(1, 4, 9, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.profile-modal-overlay.visible { display: block; }
.profile-modal {
  display: none;
  position: fixed;
  top: min(20vh, 140px);
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  z-index: 401;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 16px 70px rgba(0,0,0,0.5);
  overflow: hidden;
}
.profile-modal.visible { display: block; }
.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #21262d;
}
.profile-modal-title {
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 600;
  color: #e6edf3;
  margin: 0;
}
.profile-modal-close {
  background: none;
  border: none;
  color: #848d97;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.1s;
  display: flex;
}
.profile-modal-close:hover { color: #e6edf3; background: #21262d; }
#profile-form, #password-form { padding: 32px; }
.profile-field { margin-bottom: 16px; }
.profile-label {
  display: block;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: 6px;
}
.profile-input {
  width: 100%;
  font-family: var(--body-font);
  font-size: 14px;
  color: #e6edf3;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.profile-input:focus { border-color: #58a6ff; }
.profile-input::placeholder { color: #484f58; }
.profile-field-hint {
  font-family: var(--body-font);
  font-size: 12px;
  color: #6e7681;
  margin-top: 4px;
}
.profile-msg {
  font-family: var(--body-font);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}
.profile-msg.success { color: #3fb950; }
.profile-msg.error { color: #f85149; }
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.profile-btn {
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.profile-btn--secondary {
  color: #c9d1d9;
  background: #21262d;
  border-color: #30363d;
}
.profile-btn--secondary:hover { background: #30363d; border-color: #484f58; color: #e6edf3; }
.profile-btn--primary {
  color: var(--bg-primary, #0a0a0f);
  background: var(--accent-cyan, #00f5d4);
  border-color: transparent;
  font-weight: 700;
}
.profile-btn--primary:hover { background: #33f7dc; }
.profile-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text-primary);
}
.btn-hamburger svg { width: 24px; height: 24px; }

/* ========== SEARCH SHORTCUT BADGE ========== */
.search-shortcut {
  font-family: var(--body-font);
  font-size: 10px;
  color: #6e7681;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.4;
  margin-left: 2px;
}
.resource-nav-svg {
  opacity: 0.6;
  flex-shrink: 0;
}

/* ========== SEARCH MODAL ========== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(1, 4, 9, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-overlay.visible { display: block; }
.search-modal {
  display: none;
  position: fixed;
  top: min(20vh, 120px);
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100vw - 32px));
  max-height: 480px;
  z-index: 301;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: 0 16px 70px rgba(0,0,0,0.5);
  overflow: hidden;
  flex-direction: column;
}
.search-modal.visible { display: flex; }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #21262d;
}
.search-input-icon { color: #848d97; flex-shrink: 0; }
#search-input {
  flex: 1;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 400;
  color: #e6edf3;
  background: none;
  border: none;
  outline: none;
  min-width: 0;
}
#search-input::placeholder { color: #484f58; }
.search-esc {
  font-family: var(--body-font);
  font-size: 11px;
  color: #6e7681;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.search-results {
  overflow-y: auto;
  max-height: 400px;
  padding: 6px;
}
.search-results:empty { display: none; }
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.search-result:hover, .search-result.active { background: #21262d; }
.search-result-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: #0d1117;
  border-radius: 6px;
  border: 1px solid #30363d;
}
.search-result-body { flex: 1; min-width: 0; }
.search-result-title {
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 500;
  color: #e6edf3;
  line-height: 1.4;
}
.search-result-title mark {
  background: rgba(210, 153, 34, 0.25);
  color: #e3b341;
  border-radius: 2px;
  padding: 0 1px;
}
.search-result-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.search-result-level {
  font-family: var(--body-font);
  font-size: 11px;
  font-weight: 600;
  color: #848d97;
}
.search-result-snippet {
  font-family: var(--body-font);
  font-size: 12px;
  color: #6e7681;
  line-height: 1.4;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-snippet mark {
  background: rgba(210, 153, 34, 0.2);
  color: #d29922;
  border-radius: 2px;
  padding: 0 1px;
}
.search-result-check {
  flex-shrink: 0;
  margin-top: 6px;
  color: #3fb950;
  opacity: 0.7;
}
.search-empty {
  text-align: center;
  padding: 32px 16px;
  color: #6e7681;
  font-family: var(--body-font);
  font-size: 14px;
}
.search-empty-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.4; }
.search-hint {
  text-align: center;
  padding: 32px 16px;
  color: #484f58;
  font-family: var(--body-font);
  font-size: 13px;
}

/* ========== VIEWS ========== */
#homepage {
  position: relative;
  z-index: 2;
  padding-top: var(--topbar-height);
  padding-bottom: var(--space-2xl);
  min-height: 100vh;
}
#section-view {
  display: none;
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  overflow: hidden;
}
#section-view.active {
  display: flex;
  align-items: stretch;
}

/* ========== HOMEPAGE HERO ========== */
.homepage-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--page-margin-x) 0;
  position: relative;
  z-index: 10;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}
.hero-left {
  flex: 1;
}
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeSlideUp 0.6s 0.3s var(--ease-out-expo) forwards;
}
.hero-brand-the {
  font-family: var(--pixel-font);
  font-size: clamp(10px, 1.5vw, 14px);
  color: rgba(155, 93, 229, 0.4);
  letter-spacing: 0.3em;
  margin-bottom: 4px;
  margin-left: 4px;
}
.hero-brand-main {
  font-family: var(--pixel-font);
  font-size: clamp(24px, 4.5vw, 52px);
  line-height: 1.15;
  background: linear-gradient(180deg, #c9a0f0 0%, #7c4dba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-brand-program {
  font-family: var(--pixel-font);
  font-size: clamp(10px, 1.5vw, 14px);
  color: rgba(155, 93, 229, 0.35);
  letter-spacing: 0.5em;
  margin-top: 8px;
  margin-left: 4px;
  white-space: nowrap;
}
.hero-desc {
  font-family: var(--body-font);
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 460px;
  opacity: 0;
  animation: fadeSlideUp 0.6s 0.5s var(--ease-out-expo) forwards;
}

.hero-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.5s var(--ease-out-expo) forwards;
  width: 380px;
}
.hero-shared-tiles {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== COMPACT HERO ========== */
.hero-inner--compact {
  align-items: flex-end;
}
.hero-inner--compact .hero-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.hero-brand-gif {
  width: clamp(60px, 8vw, 90px);
  height: clamp(60px, 8vw, 90px);
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.hero-brand--compact {
  margin-bottom: 0;
}
.hero-brand-main--compact {
  font-size: clamp(16px, 3vw, 28px);
}

/* ========== RESOURCE NAV TILES ========== */
.hero-right--compact {
  width: auto;
}
.resource-nav-tiles {
  display: flex;
  gap: 16px;
}
.resource-nav-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s var(--ease-out-expo);
}
.resource-nav-tile:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(79,125,249,0.12);
  transform: translateY(-1px);
}
.resource-nav-icon {
  font-size: 18px;
  line-height: 1;
}
.resource-nav-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.resource-nav-label {
  white-space: nowrap;
}

/* ========== TRACK SUBHEADINGS ========== */
.track-section {
  margin-top: var(--space-xl);
}
.track-subheading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.track-subheading-text {
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ========== HOMEPAGE BODY ========== */
.homepage-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--page-margin-x) 0;
}

/* ========== SHARED TILES (in hero right column) ========== */
.shared-tile {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  overflow: hidden;
  position: relative;
}
.shared-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-3);
  opacity: 0;
  transition: opacity 0.3s;
}
.shared-tile:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(79,125,249,0.12);
}
.shared-tile:hover::before { opacity: 1; }
.shared-tile-gif {
  width: 100px;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
  border: var(--border-subtle);
  flex-shrink: 0;
}
.shared-tile-info { flex: 1; min-width: 0; }
.shared-tile-badge {
  font-family: var(--pixel-font);
  font-size: 7px;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 4px;
}
.shared-tile-badge.cyan { background: rgba(0,245,212,0.12); color: var(--accent-cyan); }
.shared-tile-title {
  font-family: var(--heading-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.shared-tile-progress {
  font-family: var(--pixel-font);
  font-size: 7px;
  color: var(--text-muted);
  margin-top: 2px;
}
.shared-tile svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s;
}
.shared-tile:hover svg { color: var(--accent-cyan); }

/* ========== ADVENTURE PICKER ========== */
.adventure-section {
  padding-top: var(--space-lg);
}

.adventure-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  opacity: 0; transform: translateY(16px);
  transition: all 0.6s var(--ease-out-expo);
}
.adventure-divider.visible { opacity: 1; transform: translateY(0); }
.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,93,229,0.2), transparent);
}
.divider-diamond {
  width: 8px;
  height: 8px;
  background: var(--accent-purple);
  transform: rotate(45deg);
  opacity: 0.4;
}

.adventure-intro {
  text-align: left;
  margin-bottom: var(--space-xl);
  opacity: 0; transform: translateY(16px);
  transition: all 0.6s 0.1s var(--ease-out-expo);
}
.adventure-intro.visible { opacity: 1; transform: translateY(0); }
.adventure-eyebrow {
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--accent-purple);
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}
.adventure-heading {
  font-family: var(--heading-font);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.adventure-fork {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  opacity: 0; transform: translateY(16px);
  transition: all 0.6s 0.2s var(--ease-out-expo);
}
.adventure-fork.visible { opacity: 1; transform: translateY(0); }

.adventure-path {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
}
.adventure-path:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.08);
}
.path-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 120px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.path-glow.job { background: radial-gradient(circle, rgba(79,125,249,0.15), transparent 70%); }
.path-glow.business { background: radial-gradient(circle, rgba(155,93,229,0.15), transparent 70%); }
.adventure-path:hover .path-glow { opacity: 1; }

.path-content {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
}
.path-icon {
  margin-bottom: var(--space-md);
  opacity: 0.7;
}
.path-badge {
  font-family: var(--pixel-font);
  font-size: 7px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: var(--space-md);
}
.path-badge.job { background: rgba(79,125,249,0.12); color: var(--accent-blue); }
.path-badge.business { background: rgba(155,93,229,0.12); color: var(--accent-purple); }

.path-title {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}
.path-desc {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}
.path-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}
.path-features li {
  font-family: var(--body-font);
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feat-arrow {
  color: var(--accent-cyan);
  font-size: 12px;
  flex-shrink: 0;
}
.path-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--heading-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: gap 0.3s var(--ease-out-expo);
}
.adventure-path:hover .path-cta { gap: var(--space-md); }

.adventure-or {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-lg);
}
.adventure-or span {
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.4;
}

/* ========== JOURNEY MAP (after adventure chosen) ========== */
.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  opacity: 0; transform: translateY(16px);
  transition: all 0.6s var(--ease-out-expo);
}
.journey-header.visible { opacity: 1; transform: translateY(0); }

.journey-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.breadcrumb-home {
  font-family: var(--body-font);
  font-size: 22px;
  font-weight: 500;
  color: #848d97;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.breadcrumb-home:hover { color: #58a6ff; }
.journey-breadcrumb svg { color: #6e7681; opacity: 0.6; }
.breadcrumb-current {
  font-family: var(--body-font);
  font-size: 22px;
  font-weight: 600;
  color: #e6edf3;
}
.journey-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 500;
  color: #c9d1d9;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.journey-switch-btn:hover {
  color: #e6edf3;
  border-color: #484f58;
  background: #30363d;
}

/* Journey timeline — vertical stack */
.journey-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.journey-node {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-lg);
  opacity: 0; transform: translateY(16px);
  transition: all 0.6s var(--ease-out-expo);
}
.journey-node.visible { opacity: 1; transform: translateY(0); }

.journey-node.locked { opacity: 0.45; }
.journey-node.locked .journey-node-card { cursor: not-allowed; }

.journey-connector {
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.04);
}
.journey-node.completed .journey-connector {
  background: linear-gradient(180deg, rgba(0,245,212,0.2), rgba(0,245,212,0.04));
}

.journey-node-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: all 0.3s;
}
.journey-node.completed .journey-node-marker {
  border-color: rgba(0,245,212,0.25);
  background: rgba(0,245,212,0.06);
}
.node-number {
  font-family: var(--pixel-font);
  font-size: 12px;
  color: var(--text-muted);
}

.journey-node-card {
  flex: 1;
  display: flex;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
}
.journey-node-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gradient-3);
  opacity: 0;
  transition: opacity 0.3s;
}
.journey-node-card:hover {
  transform: translateX(4px);
  background: var(--bg-card-hover);
  border-color: rgba(79,125,249,0.1);
}
.journey-node-card:hover::before { opacity: 1; }
.journey-node.locked .journey-node-card:hover {
  transform: none;
  background: var(--bg-card);
  border-color: rgba(255,255,255,0.05);
}
.journey-node.locked .journey-node-card::before { display: none; }

.node-card-top {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
}
.node-card-gif {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.node-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.node-card-title {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.node-card-desc {
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}
.node-card-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 280px;
}
.node-card-locked-label {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}
.node-card-purchase-tag {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-family: var(--pixel-font);
  font-size: 9px;
  padding: 6px 12px;
  background: rgba(0,245,212,0.1);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  z-index: 2;
  white-space: nowrap;
}

/* Shared badge styles */
.tile-badge {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  letter-spacing: 1px;
  width: auto;
}
.tile-badge.blue { background: rgba(79,125,249,0.15); color: var(--accent-blue); }
.tile-badge.cyan { background: rgba(0,245,212,0.15); color: var(--accent-cyan); }
.tile-badge.purple { background: rgba(155,93,229,0.15); color: var(--accent-purple); }
.tile-badge.pink { background: rgba(241,91,181,0.15); color: var(--accent-pink); }
.tile-badge.orange { background: rgba(255,107,53,0.15); color: var(--accent-orange); }

/* Shared progress bar */
.progress-bar {
  flex: 1;
  min-width: 80px;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-3);
  border-radius: var(--radius-pill);
  transition: width 0.6s var(--ease-out-expo);
}
.progress-text {
  font-family: var(--pixel-font);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ========== SECTION VIEW LAYOUT (GitHub dark) ========== */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: none;
  background: var(--bg-primary);
  padding: var(--space-md) 0 0;
  display: flex;
  flex-direction: column;
}
#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
#sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
#content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0 16px;
  background: #080b10;
}
.content-inner {
  flex: 1;
  width: 100%;
  max-width: none;
  background: #11151b;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255,255,255,0.04);
  border-bottom: none;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* ========== SIDEBAR (GitHub dark) ========== */
.sidebar-header {
  padding: var(--space-xs) var(--space-lg) var(--space-md);
  border-bottom: none;
  margin-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-level-title {
  font-family: var(--body-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.sidebar-level-gif {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  border: none;
  margin-top: var(--space-sm);
}
.sidebar-level-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--body-font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  opacity: 1;
}
.sidebar-group-divider {
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: #e6edf3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
}
.sidebar-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px var(--space-lg);
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 2px solid transparent;
}
.sidebar-lesson:hover { background: #161b22; }
.sidebar-lesson.current {
  background: rgba(47, 129, 247, 0.08);
  border-left-color: #2f81f7;
}
.sidebar-lesson-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: #161b22;
  border-radius: 6px;
  border: 1px solid #30363d;
  transition: opacity 0.2s;
}
.sidebar-lesson.incomplete .sidebar-lesson-icon { opacity: 0.4; }
.sidebar-lesson.current .sidebar-lesson-icon { opacity: 1; background: rgba(47, 129, 247, 0.1); border-color: rgba(47, 129, 247, 0.3); }
.sidebar-lesson.completed .sidebar-lesson-icon { opacity: 0.7; }
.sidebar-lesson-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-lesson-name {
  font-family: var(--body-font);
  font-size: 0.875rem;
  font-weight: 500;
  color: #848d97;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.sidebar-lesson.incomplete .sidebar-lesson-name { color: #6e7681; }
.sidebar-lesson.current .sidebar-lesson-name { color: #e6edf3; font-weight: 600; }
.sidebar-lesson.completed .sidebar-lesson-name { color: #848d97; }
.sidebar-lesson-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.content-tag {
  font-family: var(--body-font);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-transform: uppercase;
}
.content-tag.setup-guide { background: rgba(47, 129, 247, 0.12); color: #58a6ff; }
.content-tag.process-cycle { background: rgba(47, 129, 247, 0.12); color: #58a6ff; }
.content-tag.secret-sauce { background: rgba(210, 153, 34, 0.12); color: #d29922; }
.sidebar-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: auto;
  border-top: 1px solid #21262d;
  position: sticky;
  bottom: 0;
  background: #0d1117;
}
.sidebar-progress-text {
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 500;
  color: #848d97;
  white-space: nowrap;
}
.sidebar-progress-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sidebar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #30363d;
  background: transparent;
  transition: all 0.3s;
}
.sidebar-dot.done {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* ========== SIDEBAR BACK BUTTON (GitHub dark) ========== */
.btn-sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-lg);
  margin-bottom: 0;
  transition: color 0.15s;
}
.btn-sidebar-back svg { color: #ffffff; opacity: 1; transition: opacity 0.15s; }
.btn-sidebar-back:hover { color: #e6edf3; }
.btn-sidebar-back:hover svg { opacity: 1; }

/* ========== LESSON HERO HEADER ========== */
.lesson-hero {
  text-align: center;
  padding: 40px 0 32px;
  max-width: 800px;
  margin: 0 auto;
}
.lesson-hero-badge {
  display: inline-block;
  font-family: var(--heading-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 99px;
  padding: 6px 16px;
  margin-bottom: 20px;
}
.lesson-hero-title {
  font-family: var(--heading-font);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #e6edf3;
  margin: 0 auto;
}
.lesson-hero-icon {
  margin-right: 0.4em;
}

/* ========== LESSON CONTENT BLOCKS (GitHub dark) ========== */
.lesson-content {
  max-width: 800px;
  margin: 0 auto;
}
.lesson-content:last-of-type {
  flex: 1;
}
.lesson-content h1 {
  font-family: var(--body-font);
  font-size: clamp(1.8rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e6edf3;
  line-height: 1.25;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid #21262d;
}
.lesson-content h2 {
  font-family: var(--body-font);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e6edf3;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid #21262d;
}
.lesson-content h3 {
  font-family: var(--body-font);
  font-size: 1.25rem;
  font-weight: 600;
  color: #e6edf3;
  margin-top: 28px;
  margin-bottom: var(--space-sm);
}
.lesson-content p {
  font-family: var(--body-font);
  font-size: 1rem;
  color: #a8b2bc;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.lesson-content p strong { color: #e6edf3; font-weight: 600; }
.lesson-content a {
  color: #58a6ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lesson-content a:hover { color: #79c0ff; }
.lesson-content ul, .lesson-content ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}
.lesson-content li {
  font-family: var(--body-font);
  font-size: 1rem;
  color: #a8b2bc;
  line-height: 1.7;
  margin-bottom: var(--space-xs);
}
.lesson-content hr {
  border: none;
  height: 1px;
  background: #21262d;
  margin: var(--space-xl) 0;
}
.lesson-content img {
  display: block;
  width: 100%;
  margin: var(--space-md) 0;
  border-radius: 12px;
  border: 1px solid #30363d;
}
.lesson-badges {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.callout-box {
  background: rgba(56, 139, 253, 0.08);
  border: 1px solid rgba(56, 139, 253, 0.25);
  border-left: 3px solid #58a6ff;
  border-radius: 6px;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}
.callout-box p {
  font-family: var(--body-font);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: #c9d1d9;
  margin-bottom: 0;
}
/* ── Warning Callout (yellow) ── */
.callout-warning {
  background: rgba(227, 179, 65, 0.10);
  border: 1px solid rgba(227, 179, 65, 0.30);
  border-left: 4px solid #e3b341;
  border-radius: 8px;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}
.callout-warning .callout-warning-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.callout-warning .callout-warning-emoji {
  font-size: 1.5rem;
}
.callout-warning .callout-warning-title {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: #e3b341;
  margin: 0;
}
.callout-warning p {
  font-family: var(--body-font);
  font-size: 0.95rem;
  color: #c9d1d9;
  line-height: 1.7;
  margin-bottom: 10px;
}
.callout-warning p:last-child {
  margin-bottom: 0;
}
.callout-warning ul {
  margin: 8px 0;
  padding-left: 20px;
}
.callout-warning li {
  font-family: var(--body-font);
  font-size: 0.95rem;
  color: #c9d1d9;
  line-height: 1.7;
  margin-bottom: 6px;
}
.callout-warning strong {
  color: #e3b341;
}

/* ── Key Takeaway Tile ── */
.key-takeaway {
  background: rgba(155, 93, 229, 0.10);
  border: 1px solid rgba(155, 93, 229, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-2xl) 0 var(--space-lg);
}
.key-takeaway-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.key-takeaway-emoji {
  font-size: 1.5rem;
  line-height: 1;
}
.key-takeaway-heading {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.key-takeaway-body {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.key-takeaway-quote {
  border-left: 3px solid var(--accent-purple);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
}
.key-takeaway-quote p {
  font-family: var(--body-font);
  font-size: 1rem;
  font-style: italic;
  color: #c9b3f0;
  line-height: 1.7;
  margin: 0;
}
.key-takeaway-bottom {
  font-family: var(--body-font);
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
  margin: 0;
}
.key-takeaway--homepage {
  width: 100%;
  margin: var(--space-lg) 0 0;
  max-width: none;
}

.prompt-block {
  position: relative;
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 10px;
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
}
.prompt-block-title {
  margin-top: 0 !important;
  margin-bottom: var(--space-sm) !important;
  color: #e6edf3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt-block-title svg {
  flex-shrink: 0;
}
.prompt-block p.prompt-desc {
  color: #9ca3af;
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}
.prompt-block pre {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.prompt-block .prompt-label {
  display: block;
  font-family: var(--body-font);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.prompt-block .btn-copy {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a0a0f;
  background: #00f5d4;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  margin-top: 12px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.prompt-block .btn-copy:hover { opacity: 0.9; transform: translateY(-1px); background: #00f5d4; border-color: transparent; }
.prompt-block .btn-copy.copied { color: #0a0a0f; background: rgba(0, 245, 212, 0.7); border-color: transparent; }
.prompt-block .btn-copy svg { flex-shrink: 0; }
/* ── Voice Brain Dump ── */
.voice-dump-block {
  background: rgba(155, 93, 229, 0.06);
  border: 1px solid rgba(155, 93, 229, 0.25);
  border-radius: 12px;
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
}
.voice-dump-block h3 {
  margin-top: 0 !important;
  margin-bottom: var(--space-sm) !important;
  color: #e6edf3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-dump-questions {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}
.voice-dump-questions li {
  position: relative;
  padding: 10px 12px 10px 36px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #c9d1d9;
  line-height: 1.5;
}
.voice-dump-questions li::before {
  content: attr(data-num);
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9b5de5;
}
.voice-dump-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e6edf3;
  font-family: var(--body-font);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 12px 16px;
  resize: vertical;
  margin: var(--space-sm) 0;
}
.voice-dump-textarea::placeholder { color: #6b7280; }
.voice-dump-textarea:focus { outline: none; border-color: rgba(155, 93, 229, 0.5); }
.voice-dump-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.btn-record {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #9b5de5;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-record:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-record.recording {
  background: #e5484d;
  animation: pulse-record 1.5s ease-in-out infinite;
}
@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); }
}
.rec-dot {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: blink-dot 1s ease-in-out infinite;
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.btn-copy-context {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a0a0f;
  background: #00f5d4;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-copy-context:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-copy-context.copied { background: rgba(0, 245, 212, 0.7); }
.voice-dump-status {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 6px;
}
.voice-dump-status.active { color: #e5484d; font-weight: 600; }
.voice-dump-prompt {
  display: none;
}
.voice-dump-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: var(--space-md) 0;
}

.checklist {
  margin: var(--space-md) 0;
  list-style: none;
  padding: 0;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  cursor: pointer;
}
.checklist-item .check-prefix {
  font-family: var(--body-font);
  font-size: 10px;
  font-weight: 600;
  color: #3fb950;
  margin-top: 5px;
  flex-shrink: 0;
}
.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #30363d;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.15s;
  background: #0d1117;
}
.checklist-item input[type="checkbox"]:hover {
  border-color: #58a6ff;
}
.checklist-item input[type="checkbox"]:checked {
  background: #238636;
  border-color: #238636;
}
.checklist-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checklist-item label {
  font-family: var(--body-font);
  font-size: 14px;
  color: #c9d1d9;
  line-height: 1.6;
  cursor: pointer;
}
.checklist-item.checked label { text-decoration: line-through; color: #6e7681; }
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #30363d;
  margin: var(--space-lg) 0;
  background: #161b22;
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.local-video {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: var(--space-lg) auto;
  border-radius: 12px;
  border: 1px solid #30363d;
  background: #161b22;
}
.local-video video {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.caption {
  font-family: var(--body-font);
  font-size: 14px;
  font-style: italic;
  color: #848d97;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}
.code-block {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 20px;
  margin: var(--space-md) 0;
  overflow-x: auto;
}
.code-block code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  color: #c9d1d9;
  line-height: 1.6;
}
.lesson-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: rgba(110, 118, 129, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #e6edf3;
}
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 6px;
  overflow: hidden;
  margin: var(--space-lg) 0;
  border: 1px solid #30363d;
}
.lesson-content th, .lesson-content td {
  font-family: var(--body-font);
  font-size: 14px;
  color: #c9d1d9;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #21262d;
}
.lesson-content th { font-weight: 600; color: #e6edf3; background: #161b22; }
.lesson-content tr:last-child td { border-bottom: none; }
.coming-soon {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.coming-soon-icon { font-size: 48px; margin-bottom: var(--space-lg); opacity: 0.5; }
.coming-soon h2 {
  font-family: var(--body-font) !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: #848d97 !important;
  margin-top: 0 !important;
}
.coming-soon p { color: #6e7681 !important; }

/* ========== MARK COMPLETE BUTTON (GitHub dark) ========== */
.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #238636;
  border: 1px solid rgba(240, 246, 252, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: var(--space-xl);
}
.btn-complete:hover { background: #2ea043; }
.btn-complete.completed { background: rgba(63, 185, 80, 0.12); color: #3fb950; border-color: rgba(63, 185, 80, 0.3); cursor: default; }
.btn-complete.completed:hover { background: rgba(63, 185, 80, 0.12); }

/* ========== LESSON FOOTER NAV (GitHub dark) ========== */
/* ========== STEP FOOTER (sticky bottom bar) ========== */
.lesson-step-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  position: sticky;
  bottom: 0;
  background: #0d1117;
  border-top: 1px solid #30363d;
  padding: var(--space-lg) var(--space-xl);
  z-index: 10;
}
.lesson-step-footer .btn-lesson-nav:first-child {
  justify-self: start;
}
.lesson-step-footer .btn-lesson-nav:last-child {
  justify-self: end;
}
.footer-progress {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body-font);
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 999px;
  padding: 10px 16px;
  white-space: nowrap;
}
.footer-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #4b5563;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(13, 17, 23, 0.45);
  transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}
.footer-progress-dot.done {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.12), 0 0 16px rgba(88, 166, 255, 0.35);
}
.btn-lesson-nav {
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 600;
  color: #e6edf3;
  background: #2a2f38;
  border: 1px solid #444c56;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.btn-lesson-nav:hover { background: #3a414b; border-color: #5a6370; color: #fff; }
.btn-lesson-nav.hidden { display: none; }
.btn-lesson-nav.invisible { visibility: hidden; }
.btn-lesson-nav .nav-label { font-size: 13px; color: #a0a8b4; margin-right: 6px; }

/* ========== STEP INDICATOR (dots) ========== */
.step-indicator {
  display: none;
}
.step-counter { font-family: var(--body-font); font-size: 14px; font-weight: 600; color: #c9d1d9; white-space: nowrap; }
.step-dots { display: flex; gap: 7px; flex-wrap: nowrap; }
.step-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid #484f58;
  transition: all 0.15s;
  cursor: pointer;
}
.step-dot.active { background: #2f81f7; border-color: #2f81f7; }
.step-dot.visited { border-color: #2f81f7; }

/* ========== MOBILE BOTTOM NAV (GitHub dark) ========== */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: #0d1117;
  border-top: 1px solid #21262d;
  height: 60px;
}
.bottom-nav-items { display: flex; height: 100%; }
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #848d97;
  font-family: var(--body-font);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.15s;
  border: none;
  background: none;
  min-height: 44px;
}
.bottom-nav-item.active { color: #2f81f7; }
.bottom-nav-item svg { width: 20px; height: 20px; }

/* ========== SIDEBAR OVERLAY (MOBILE, GitHub dark) ========== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(1, 4, 9, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.visible { display: block; }

/* ========== CONFETTI CANVAS ========== */
#confetti-canvas { position: fixed; inset: 0; z-index: 9998; pointer-events: none; }

/* ========== TOOLTIP ========== */
.tooltip {
  position: fixed;
  font-family: var(--heading-font);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.tooltip.visible { opacity: 1; }

/* ========== LOCKED CONTENT OVERLAY ========== */
.locked-content-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--space-lg);
}

.locked-content-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  background: rgba(22, 22, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.locked-icon {
  margin-bottom: var(--space-md);
}

.locked-title {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.locked-desc {
  font-family: var(--body-font);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.locked-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.locked-divider::before,
.locked-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.locked-code-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #topbar.topbar--centered .nav-right {
    position: static;
    left: auto;
    right: auto;
    transform: none;
  }
  #topbar.topbar--centered .profile-wrap {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
  }
  .nav-home-action {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .nav-home-action-label {
    display: none;
  }
  .hero-inner { flex-direction: column; text-align: center; gap: var(--space-xl); }
  .hero-brand { align-items: center; }
  .hero-desc { max-width: none; }
  .hero-right { width: 100%; }
  .hero-progress-ring { justify-content: center; }

  .adventure-fork { grid-template-columns: 1fr; gap: var(--space-md); }
  .adventure-or { padding: var(--space-sm) 0; }

  .journey-header { flex-direction: column; gap: var(--space-md); text-align: center; }
  .journey-breadcrumb { justify-content: center; }
  .journey-switch-btn { width: 100%; justify-content: center; }

  .journey-node-card { flex-direction: column; }
  .node-card-top { width: 100%; height: 120px; }
  .node-card-gif { height: 120px; }
}

@media (max-width: 600px) {
  .nav-home-actions {
    gap: 8px;
  }
  .search-shortcut { display: none; }
  .search-modal { top: 8px; max-height: calc(100vh - 16px); }
  .homepage-hero { padding: var(--space-xl) var(--space-md) 0; }
  .homepage-body { padding: var(--space-lg) var(--space-md) 0; }

  #sidebar {
    position: fixed;
    left: 0; top: var(--topbar-height);
    width: 280px;
    min-width: 280px;
    height: calc(100vh - var(--topbar-height));
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out-expo);
    background: #0d1117;
  }
  #sidebar.open { transform: translateX(0); }

  #content-area {
    padding: 16px 16px 0 16px;
  }
  .content-inner {
    padding: 24px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
  }

  #section-view { flex-direction: column; }
  .btn-hamburger { display: flex; }
  #bottom-nav { display: flex; }
  .lesson-step-footer { padding: var(--space-sm) var(--space-md); }
  .footer-progress { padding: 8px 12px; font-size: 12px; }
  .step-counter { font-size: 11px; }
  .step-dots { gap: 4px; }

  .journey-node { gap: var(--space-md); }
  .journey-connector { left: 15px; }
  .journey-node-marker { width: 32px; height: 32px; }
  .node-number { font-size: 8px; }

  .chat-drawer { width: 100%; max-width: 100%; }
}

/* ========== AI CHAT DRAWER ========== */

.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.chat-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  z-index: 1000;
  background: var(--bg-secondary);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.chat-drawer.open {
  transform: translateX(0);
}

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-drawer-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.chat-drawer-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0,245,212,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-drawer-title {
  font-family: var(--heading-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.chat-drawer-subtitle {
  font-family: var(--body-font);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.chat-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.chat-drawer-close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Welcome state */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-sm);
}
.chat-welcome-icon {
  font-size: 32px;
  margin-bottom: var(--space-sm);
}
.chat-welcome-title {
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.chat-welcome-desc {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.chat-welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}
.chat-chip {
  font-family: var(--body-font);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.chat-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(0,245,212,0.2);
}

/* Message bubbles */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: chatFadeIn 0.3s var(--ease-out-expo);
}
@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
  align-self: flex-end;
}
.chat-msg.assistant {
  align-self: flex-start;
}
.chat-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.55;
}
.chat-msg.user .chat-msg-bubble {
  background: var(--accent-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-msg-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom-left-radius: 4px;
}
.chat-msg-bubble code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: rgba(255,255,255,0.08);
  padding: 2px 5px;
  border-radius: 4px;
}
.chat-msg.user .chat-msg-bubble code {
  background: rgba(255,255,255,0.15);
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  animation: chatFadeIn 0.3s var(--ease-out-expo);
}
.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Input area */
.chat-input-area {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.chat-context-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding: 6px 10px;
  background: rgba(79,125,249,0.06);
  border-radius: var(--radius-sm);
}
.chat-input-form {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 8px 8px 8px 16px;
  transition: border-color 0.2s;
}
.chat-input-form:focus-within {
  border-color: rgba(0,245,212,0.3);
}
.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  padding: 4px 0;
}
.chat-input::placeholder {
  color: var(--text-muted);
}
.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chat-send-btn:hover {
  background: #33f7dd;
  transform: scale(1.05);
}
.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── EDIT MODE (localhost only) ── */
.lesson-content[data-step-index] {
  position: relative;
}
.step-editor-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  background: rgba(79, 125, 249, 0.12);
  border: 1px dashed rgba(79, 125, 249, 0.4);
  border-radius: 8px;
  user-select: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.lesson-content[data-step-index]:hover .step-editor-controls {
  opacity: 1;
  pointer-events: auto;
}
.step-editor-label {
  font-size: 11px;
  font-weight: 600;
  color: #4f7df9;
  font-family: 'Space Grotesk', monospace;
  margin-right: auto;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.step-editor-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 125, 249, 0.15);
  border: 1px solid rgba(79, 125, 249, 0.3);
  border-radius: 6px;
  color: #4f7df9;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}
.step-editor-btn:hover:not(:disabled) {
  background: #4f7df9;
  color: #fff;
  transform: scale(1.1);
}
.step-editor-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Action box — reusable tile for downloads, copy-paste prompts, actionable assets */
.action-box {
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 10px;
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0;
}
.action-box-title {
  margin-top: 0 !important;
  color: #e6edf3;
}
.action-box p {
  color: #9ca3af;
  font-size: 0.95rem;
}

/* Download button */
.download-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #00f5d4;
  color: #0a0a0f !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
  margin-top: 8px;
}
.download-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ========== BUSINESS 101 VISUAL COMPONENTS ========== */

/* ── Department Cards Grid ── */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.dept-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.dept-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--gradient-1));
  opacity: 0.8;
}
.dept-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.dept-card .dept-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}
.dept-card .dept-title {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.dept-card .dept-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.dept-card .dept-metric {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: var(--accent-cyan);
  margin-top: var(--space-md);
  letter-spacing: 0.5px;
}

/* Card accent colors per department */
.dept-card.marketing { --card-accent: linear-gradient(90deg, #f15bb5, #9b5de5); }
.dept-card.sales { --card-accent: linear-gradient(90deg, #ff6b35, #f15bb5); }
.dept-card.ops { --card-accent: linear-gradient(90deg, #4f7df9, #00f5d4); }
.dept-card.support { --card-accent: linear-gradient(90deg, #00f5d4, #4f7df9); }
.dept-card.finance { --card-accent: linear-gradient(90deg, #9b5de5, #4f7df9); }
.dept-card.intelligence { --card-accent: linear-gradient(90deg, #00f5d4, #9b5de5); }

/* ── Flow Diagram ── */
.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin: var(--space-xl) 0;
  overflow-x: auto;
  padding: var(--space-md) 0;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  flex-shrink: 0;
  animation: fadeSlideUp 0.5s var(--ease-out-expo) forwards;
  opacity: 0;
}
.flow-step:nth-child(1) { animation-delay: 0.1s; }
.flow-step:nth-child(2) { animation-delay: 0.2s; }
.flow-step:nth-child(3) { animation-delay: 0.3s; }
.flow-step:nth-child(4) { animation-delay: 0.4s; }
.flow-step:nth-child(5) { animation-delay: 0.5s; }
.flow-step:nth-child(6) { animation-delay: 0.6s; }
.flow-step:nth-child(7) { animation-delay: 0.7s; }
.flow-step:nth-child(8) { animation-delay: 0.8s; }
.flow-step:nth-child(9) { animation-delay: 0.9s; }
.flow-step:nth-child(10) { animation-delay: 1.0s; }
.flow-step .flow-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.flow-step:hover .flow-icon {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}
.flow-step .flow-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100px;
  line-height: 1.3;
}
.flow-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  padding: 0 4px;
  margin-bottom: 20px;
}

/* ── Vertical Flow (Workflow Chain) ── */
.workflow-chain {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--space-xl) 0;
  padding-left: var(--space-lg);
  border-left: 2px solid rgba(79,125,249,0.2);
}
.workflow-step {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  padding-left: var(--space-xl);
  animation: fadeSlideUp 0.4s var(--ease-out-expo) forwards;
  opacity: 0;
}
.workflow-step:nth-child(1) { animation-delay: 0.15s; }
.workflow-step:nth-child(2) { animation-delay: 0.3s; }
.workflow-step:nth-child(3) { animation-delay: 0.45s; }
.workflow-step:nth-child(4) { animation-delay: 0.6s; }
.workflow-step:nth-child(5) { animation-delay: 0.75s; }
.workflow-step:nth-child(6) { animation-delay: 0.9s; }
.workflow-step:nth-child(7) { animation-delay: 1.05s; }
.workflow-step::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-blue);
  z-index: 1;
}
.workflow-step.active::before {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0,245,212,0.4);
}
.workflow-step .wf-trigger {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.workflow-step .wf-action {
  font-size: 0.95rem;
  color: var(--text-primary);
}
.workflow-step .wf-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Comparison Cards ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: stretch;
  margin: var(--space-xl) 0;
}
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: stretch;
  margin: var(--space-xl) 0;
}
.compare-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.compare-card.old {
  border-color: rgba(241,91,181,0.2);
}
.compare-card.new {
  border-color: rgba(0,245,212,0.2);
}
.compare-card .compare-label {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}
.compare-card.old .compare-label { color: var(--accent-pink); }
.compare-card.new .compare-label { color: var(--accent-cyan); }
.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Stat Cards ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}
.stat-card .stat-number {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Folder Tree ── */
.folder-tree {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}
.folder-tree .tree-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: fadeSlideUp 0.3s var(--ease-out-expo) forwards;
  opacity: 0;
}
.folder-tree .tree-line:nth-child(1) { animation-delay: 0.05s; }
.folder-tree .tree-line:nth-child(2) { animation-delay: 0.1s; }
.folder-tree .tree-line:nth-child(3) { animation-delay: 0.15s; }
.folder-tree .tree-line:nth-child(4) { animation-delay: 0.2s; }
.folder-tree .tree-line:nth-child(5) { animation-delay: 0.25s; }
.folder-tree .tree-line:nth-child(6) { animation-delay: 0.3s; }
.folder-tree .tree-line:nth-child(7) { animation-delay: 0.35s; }
.folder-tree .tree-line:nth-child(8) { animation-delay: 0.4s; }
.folder-tree .tree-line:nth-child(9) { animation-delay: 0.45s; }
.folder-tree .tree-line:nth-child(10) { animation-delay: 0.5s; }
.folder-tree .tree-indent { color: var(--text-muted); user-select: none; }
.folder-tree .tree-icon { flex-shrink: 0; }
.folder-tree .tree-name { color: var(--text-primary); }
.folder-tree .tree-comment { color: var(--text-muted); font-size: 0.75rem; margin-left: auto; }
.folder-tree .tree-name.highlight { color: var(--accent-cyan); }

/* ── Glowing Pill Badge ── */
.glow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--heading-font);
}
.glow-pill.blue { background: rgba(79,125,249,0.15); color: var(--accent-blue); border: 1px solid rgba(79,125,249,0.3); }
.glow-pill.pink { background: rgba(241,91,181,0.15); color: var(--accent-pink); border: 1px solid rgba(241,91,181,0.3); }
.glow-pill.cyan { background: rgba(0,245,212,0.15); color: var(--accent-cyan); border: 1px solid rgba(0,245,212,0.3); }
.glow-pill.purple { background: rgba(155,93,229,0.15); color: var(--accent-purple); border: 1px solid rgba(155,93,229,0.3); }
.glow-pill.orange { background: rgba(255,107,53,0.15); color: var(--accent-orange); border: 1px solid rgba(255,107,53,0.3); }

/* ── Animated Pulse Dot ── */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 2s ease-in-out infinite;
}
.pulse-dot.green { background: #00d26a; }
.pulse-dot.blue { background: var(--accent-blue); }
.pulse-dot.pink { background: var(--accent-pink); }
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}

/* ── Big Quote Block ── */
.big-quote {
  border-left: 4px solid var(--accent-purple);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(155,93,229,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.big-quote p {
  font-family: var(--heading-font);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}
.big-quote .quote-author {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ── Icon List (visual bullet list) ── */
.icon-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--bg-card);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
}
.icon-list .il-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.icon-list .il-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.icon-list .il-text strong {
  color: var(--text-primary);
}

/* ── SaaS Replacement Table ── */
.replace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.replace-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
}
.replace-card .rc-old {
  font-size: 0.85rem;
  color: var(--accent-pink);
  text-decoration: line-through;
  opacity: 0.7;
}
.replace-card .rc-new {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: 4px;
}
.replace-card .rc-savings {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: #00d26a;
  margin-top: var(--space-sm);
}
