/* =====================================================================
   Enlangg Official Engineering Design System
   Aesthetic: Obsidian Editorial & Systems Precision (Bun / Zig / Rust)
   ===================================================================== */

:root, [data-theme="dark"] {
  --bg-page: #09090b;
  --bg-surface: #111115;
  --bg-card: #16161c;
  --bg-card-hover: #1c1c24;
  --bg-subtle: #20202a;
  --bg-active: #272736;
  --bg-code: #0d0d12;
  
  --border-subtle: #23232b;
  --border-card: #292934;
  --border-hover: #3f3f50;
  --border-focus: #5b5b6e;

  --text-primary: #f4f4f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #3f3f46;

  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-gold: #fbbf24;
  --accent-gold-subtle: rgba(251, 191, 36, 0.12);
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-rose: #f43f5e;

  --btn-primary-bg: #f4f4f7;
  --btn-primary-fg: #09090b;

  --nav-bg: rgba(9, 9, 11, 0.92);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

[data-theme="light"] {
  --bg-page: #f9fafb;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-subtle: #e5e7eb;
  --bg-active: #d1d5db;
  --bg-code: #0f172a;
  
  --border-subtle: #e5e7eb;
  --border-card: #d1d5db;
  --border-hover: #9ca3af;
  --border-focus: #4b5563;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --accent-emerald: #059669;
  --accent-emerald-subtle: rgba(5, 150, 105, 0.1);
  --accent-amber: #d97706;
  --accent-gold: #b45309;
  --accent-gold-subtle: rgba(180, 83, 9, 0.1);
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-rose: #e11d48;

  --btn-primary-bg: #0f172a;
  --btn-primary-fg: #ffffff;

  --nav-bg: rgba(249, 250, 251, 0.94);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* =====================================================================
   Precision Technical Blueprint Grid
   ===================================================================== */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .container { padding: 0 20px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
}

/* =====================================================================
   Universal Foundation Navigation Bar
   ===================================================================== */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all 0.2s ease;
}

.nav-container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.logo-mark img,
.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-brand:hover .logo-mark {
  transform: scale(1.06);
}

.logo-text {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.nav-version-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--bg-subtle);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Light / Dark Mode Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(15deg);
}

.nav-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #10b981;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

.nav-btn-download:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-color: #10b981;
  color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
}

.nav-btn-official {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn-official:hover {
  background: var(--bg-subtle);
  border-color: rgba(251, 191, 36, 0.5);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.nav-btn-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-btn-github:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

[data-theme="dark"] .nav-btn-download:hover {
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  display: flex;
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-page);
  padding: 20px 20px 48px;
  z-index: 999;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.25s;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-drawer a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 46px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-drawer a:hover,
.mobile-drawer a.active {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.mobile-drawer a.active {
  color: var(--accent-gold);
  border-left: 3px solid var(--accent-gold);
}

/* =====================================================================
   Page Hero Headers (Standard across all interior pages)
   ===================================================================== */
.page-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-page) 100%);
}

.page-hero-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.15;
}

.page-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.6;
}

.page-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* =====================================================================
   Index Landing Page Hero & Sections
   ===================================================================== */
.hero-section {
  padding: 72px 0 54px;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-tag,
.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero-pill-badge:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  color: var(--text-primary);
}

.pill-divider {
  color: var(--text-muted);
  opacity: 0.6;
}

.pill-gold {
  color: #fbbf24;
  font-weight: 600;
}

.badge-arrow {
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}

.hero-pill-badge:hover .badge-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.pulse-dot {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 2.2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title-gradient {
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* Dual Primary Installers Grid */
.hero-installers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1140px;
  margin-bottom: 36px;
  text-align: left;
}

.installer-card-gui {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.installer-dl-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.installer-dl-btn:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
}

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

.dl-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-sm);
  color: #10b981;
  flex-shrink: 0;
}

.dl-btn-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.dl-btn-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dl-btn-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.dl-btn-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.installer-flow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 7px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.step-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.flow-arrow {
  color: var(--text-muted);
}

.installer-card-cli {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.installer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.os-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-page);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.os-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.os-tab:hover { color: var(--text-primary); }
.os-tab.active { background: var(--bg-subtle); color: var(--text-primary); }

.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.copy-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }
.copy-btn.copied { color: #10b981; border-color: #10b981; }

.installer-body {
  display: flex;
  align-items: center;
  padding: 20px 18px;
  background: var(--bg-code);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  overflow-x: auto;
  flex-grow: 1;
}

.prompt-symbol {
  color: var(--accent-emerald);
  margin-right: 12px;
  font-weight: 700;
  user-select: none;
}

.installer-body code {
  color: #f4f4f6;
  white-space: nowrap;
}

.installer-features {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.feature-item svg { color: var(--accent-emerald); }

.hero-stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  margin-top: 12px;
  max-width: 860px;
  width: 100%;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
}

/* =====================================================================
   Section Common Typography
   ===================================================================== */
.section-heading {
  text-align: center;
  margin-bottom: 44px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =====================================================================
   Playground & IDE Component Styles (Shared by index and playground.html)
   ===================================================================== */
.playground-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  position: relative;
}

.playground-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.presets-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.preset-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.preset-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.preset-btn.active {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--accent-gold);
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  font-family: var(--font-sans);
}

.run-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.shortcut-kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 5px;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 2px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.panel-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-weight: 600;
}

.panel-meta-info {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.editor-body-wrap {
  display: flex;
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-page);
}

.editor-line-numbers {
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-faint);
  user-select: none;
  text-align: right;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  overflow-y: hidden;
}

#codeEditor {
  flex-grow: 1;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  white-space: pre;
  overflow-y: auto;
  tab-size: 4;
}

.terminal-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-code);
}

.term-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.terminal-actions {
  display: flex;
  gap: 6px;
}

.terminal-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #a1a1aa;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.terminal-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.terminal-body-wrap {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #34d399;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-dim { color: #71717a; }
.term-err { color: #ef4444; }

.playground-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.status-time { color: var(--accent-gold); }

/* =====================================================================
   Domain Showcase Tabs & Benchmark Cards
   ===================================================================== */
.domains-section { padding: 60px 0 70px; }

.domains-tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.domain-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.domain-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.domain-tab:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.domain-tab.active {
  background: var(--bg-card);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dom-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.dom-badge-core { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.dom-badge-front { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }
.dom-badge-serv { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.dom-badge-des { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.dom-badge-mob { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.dom-badge-db { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

.dom-ext {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dom-name { font-size: 0.74rem; color: var(--text-muted); }

.domain-content-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.domain-details {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.domain-tier-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
}

.domain-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.domain-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.domain-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.highlight-bullet {
  color: var(--accent-gold);
  font-size: 0.7rem;
}

.domain-code-preview {
  background: var(--bg-code);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.code-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(14, 14, 18, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #a1a1aa;
}

.domain-code-preview pre {
  padding: 24px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #38bdf8;
  overflow-x: auto;
}

/* Benchmarks Grid */
.benchmarks-section { padding: 60px 0 70px; }

.benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.bench-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bench-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.bench-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.bench-icon { font-size: 1.1rem; }

.bench-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bench-value {
  font-family: var(--font-mono);
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 12px;
}

.bench-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.bench-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  flex-grow: 1;
}

.bench-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.bench-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.bar-name {
  width: 90px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bar-track {
  flex-grow: 1;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent-emerald);
  border-radius: 999px;
}

.bar-fill.fill-secondary { background: var(--text-muted); }

.bar-val {
  color: var(--text-primary);
  font-weight: 600;
  width: 48px;
  text-align: right;
}

.bench-badge-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.badge-pill-green {
  font-size: 0.74rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-pill-amber {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* =====================================================================
   Definitive 3D Animated Book Component
   ===================================================================== */
.book-section { padding: 80px 0 96px; }

.book-container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  position: relative;
  box-shadow: var(--card-shadow);
}

.book-showcase-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.perspective-presets-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: 999px;
}

.presets-bar-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.view-preset-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.view-preset-btn:hover { color: var(--text-primary); }
.view-preset-btn.active {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold);
  font-weight: 600;
}

.book-stage {
  position: relative;
  width: 300px;
  height: 400px;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: grab;
  user-select: none;
  margin: 10px auto 20px;
  touch-action: none;
}

.book-stage.is-dragging { cursor: grabbing; }

.book-3d {
  position: relative;
  width: 240px;
  height: 340px;
  transform-style: preserve-3d;
  transform: rotateY(-22deg) rotateX(10deg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 20px auto 0;
  animation: bookFloat 6s ease-in-out infinite;
}

@keyframes bookFloat {
  0%, 100% { transform: translateY(0px) rotateY(-22deg) rotateX(10deg); }
  50%      { transform: translateY(-10px) rotateY(-25deg) rotateX(12deg); }
}

.book-stage.is-dragging .book-3d,
.book-stage.book-open .book-3d {
  animation-play-state: paused;
}

.book-spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 340px;
  transform: rotateY(-90deg) translateZ(16px);
  transform-origin: left center;
  background: linear-gradient(90deg, #18181c 0%, #25252e 45%, #151519 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  backface-visibility: hidden;
}

.spine-rib {
  width: 24px;
  height: 2px;
  background: rgba(251, 191, 36, 0.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.spine-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f6d27e;
}

.spine-pages {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #a1a1aa;
  letter-spacing: 0.08em;
}

.page-edge-right {
  position: absolute;
  top: 4px;
  right: 0;
  width: 30px;
  height: 332px;
  transform: rotateY(90deg) translateZ(15px);
  transform-origin: right center;
  background: repeating-linear-gradient(
    to right,
    #ded8c4 0px,
    #eee8d5 1px,
    #d5cea8 2px,
    #eee8d5 3px
  );
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
}

.page-edge-top {
  position: absolute;
  top: 0;
  left: 4px;
  width: 232px;
  height: 30px;
  transform: rotateX(90deg) translateZ(15px);
  transform-origin: top center;
  background: repeating-linear-gradient(
    to bottom,
    #ded8c4 0px,
    #eee8d5 1px,
    #d5cea8 2px,
    #eee8d5 3px
  );
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
}

.page-edge-bottom {
  position: absolute;
  bottom: 0;
  left: 4px;
  width: 232px;
  height: 30px;
  transform: rotateX(-90deg) translateZ(15px);
  transform-origin: bottom center;
  background: repeating-linear-gradient(
    to top,
    #ded8c4 0px,
    #eee8d5 1px,
    #d5cea8 2px,
    #eee8d5 3px
  );
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
}

.book-back-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 340px;
  transform: translateZ(-16px) rotateY(180deg);
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px 0 0 4px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
}

.back-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

.back-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.back-blurb {
  font-size: 0.72rem;
  color: #a1a1aa;
  line-height: 1.45;
  margin-bottom: 12px;
}

.back-features-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--accent-emerald);
}

.barcode-graphic {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.barcode-lines {
  font-family: monospace;
  font-size: 0.75rem;
  color: #71717a;
}

.isbn-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #71717a;
}

.back-license {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.book-inside-page {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 226px;
  height: 332px;
  transform: translateZ(15px);
  background: #fbf9f4;
  color: #1a1a1f;
  border-radius: 0 4px 4px 0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 6px 0 12px rgba(0, 0, 0, 0.12), 2px 0 6px rgba(0, 0, 0, 0.1);
  backface-visibility: hidden;
  overflow: hidden;
}

.page-turn-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.08) 0%, transparent 40%, rgba(255,255,255,0.5) 100%);
  opacity: 0;
  pointer-events: none;
}

.page-turn-overlay.flipping { animation: pageCurl 0.4s ease-out; }

@keyframes pageCurl {
  0% { opacity: 0.8; transform: scaleX(0.8) skewY(-3deg); }
  50% { opacity: 0.3; }
  100% { opacity: 0; transform: scaleX(1) skewY(0deg); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #b45309;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.page-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-highlight-badge {
  font-size: 0.64rem;
  font-weight: 600;
  color: #047857;
  background: #d1fae5;
  padding: 2px 7px;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 8px;
}

.page-excerpt {
  font-size: 0.72rem;
  line-height: 1.45;
  color: #4b5563;
  margin-bottom: 10px;
}

.page-code-snippet {
  background: #18181b;
  color: #f4f4f6;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.5;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.code-kw { color: #fbbf24; font-weight: 600; }
.code-val { color: #34d399; }
.code-id { color: #38bdf8; }
.code-op { color: #f43f5e; }
.code-num { color: #a78bfa; }

.page-seal {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 6px;
}

.book-front-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 340px;
  transform-origin: left center;
  transform: translateZ(16px) rotateY(0deg);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(145deg, #191920 0%, #0e0e13 60%, #15151b 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 0 4px 4px 0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 6px 4px 20px rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(0, 0, 0, 0.8);
  backface-visibility: hidden;
  cursor: pointer;
  z-index: 10;
}

.book-stage.book-open .book-front-cover {
  transform: translateZ(16px) rotateY(-145deg);
}

.cover-crease {
  position: absolute;
  top: 0;
  left: 8px;
  bottom: 0;
  width: 3px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(255, 255, 255, 0.06));
}

.cover-emblem-line {
  width: 28px;
  height: 2px;
  background: #f6d27e;
  margin-bottom: 12px;
  opacity: 0.85;
}

.book-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

.book-title {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f6d27e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  margin-bottom: 8px;
}

.title-divider {
  width: 32px;
  height: 2px;
  background: var(--accent-gold);
  margin-bottom: 10px;
}

.book-author {
  font-size: 0.74rem;
  color: #a1a1aa;
}

.cover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-pages-pill {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--accent-gold);
}

.open-hint {
  font-size: 0.68rem;
  color: #a1a1aa;
  transition: color 0.15s ease;
}

.book-front-cover:hover .open-hint {
  color: var(--text-primary);
}

.book-ground-shadow {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 22px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease, width 0.4s ease;
}

.book-stage.book-open .book-ground-shadow {
  width: 320px;
  transform: translateX(-35%);
}

.drag-hint-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}

.book-interactive-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.book-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.book-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  font-family: var(--font-sans);
}

.book-ctrl-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

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

.book-ctrl-btn.active {
  background: var(--accent-gold-subtle);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.page-flip-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-nav-arrow {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.page-scrubber-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-hover);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.page-dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--accent-gold);
}

.chapter-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.chapter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chapter-chip:hover { color: var(--text-primary); }
.chapter-chip.active {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--accent-gold);
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.book-paragraph {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.book-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: var(--font-sans);
}

.secondary-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}

.book-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.02em;
}

.meta-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =====================================================================
   Documentation Layout & Specification Reader (docs.html)
   ===================================================================== */
.docs-page-container {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 36px;
  padding: 40px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 16px;
}

.docs-nav-group-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.docs-nav-item a {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.docs-nav-item a:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.docs-nav-item.active a {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.docs-article-section {
  scroll-margin-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs-h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.docs-h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 12px;
}

.docs-p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.docs-callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-emerald);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-callout.callout-amber {
  border-left-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.05);
}

.docs-callout-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-block-card {
  background: var(--bg-code);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #a1a1aa;
}

.code-block-body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #38bdf8;
  white-space: pre-wrap !important;
  word-break: break-word;
  tab-size: 2;
  overflow-x: auto;
  background: var(--bg-code);
}

.docs-toc {
  position: sticky;
  top: 80px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--border-subtle);
}

.toc-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s ease;
}

.toc-item a:hover { color: var(--text-primary); }

/* =====================================================================
   Installation Matrix Center (install.html)
   ===================================================================== */
.install-page-section { padding: 50px 0 80px; }

.install-tabs-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.install-method-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.install-method-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.method-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.method-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

.checksum-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.checksum-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.checksum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  gap: 12px;
}

.checksum-file { font-weight: 700; color: var(--accent-gold); }
.checksum-hash { color: var(--text-secondary); word-break: break-all; }

/* =====================================================================
   Tutorials & Curriculum Layout (learn.html)
   ===================================================================== */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 50px 0 80px;
}

.curriculum-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.curriculum-card:hover { transform: translateY(-3px); }

.lesson-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.lesson-difficulty {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.diff-easy { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.diff-mid { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.diff-adv { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.lesson-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lesson-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

/* =====================================================================
   Library & Python Injection Reference (library.html)
   ===================================================================== */
.library-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 50px 0 80px;
}

.search-module-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-box {
  flex-grow: 1;
  position: relative;
  min-width: 260px;
}

.lib-search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
}

.lib-search-input:focus { border-color: var(--accent-emerald); }

.search-icon-pos {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.module-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-pill {
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.mod-pill:hover, .mod-pill.active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.mod-pill.active {
  background: rgba(251, 191, 36, 0.14);
  color: var(--accent-gold);
  border-color: rgba(251, 191, 36, 0.4);
}

.python-bridge-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bridge-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.bridge-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.api-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.api-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--card-shadow);
}

.api-signature {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.api-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* =====================================================================
   Community, Roadmap & Governance (community.html)
   ===================================================================== */
.roadmap-timeline-section { padding: 50px 0 80px; }

.roadmap-phases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.phase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--card-shadow);
}

.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phase-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.phase-badge-completed {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.phase-badge-wip {
  font-size: 0.72rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.phase-badge-planned {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 999px;
}

.phase-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.phase-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* =====================================================================
   About Organization & Foundation Charter (about.html)
   ===================================================================== */
.about-content-section {
  padding: 50px 0 80px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.compiler-pipeline-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.stage-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stage-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* =====================================================================
   Blog & Publications (blog.html)
   ===================================================================== */
.blog-posts-section { padding: 50px 0 80px; }

.blog-featured-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  box-shadow: var(--card-shadow);
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.post-tag {
  color: var(--accent-emerald);
  font-weight: 700;
}

.blog-post-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}

.blog-card:hover { transform: translateY(-3px); }

/* =====================================================================
   Frequently Asked Questions Accordion (Shared)
   ===================================================================== */
.faq-section { padding: 60px 0 80px; }

.faq-accordion-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-card:hover { border-color: var(--border-hover); }

.faq-card.active {
  border-color: rgba(251, 191, 36, 0.4);
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.faq-icon {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  line-height: 1;
}

.faq-card.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-gold);
}

.faq-answer {
  display: none;
  padding: 0 24px 22px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.faq-card.active .faq-answer { display: block; }

/* =====================================================================
   Standard Library & Module Explorer Styles
   ===================================================================== */
.lib-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.lib-search-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.lib-search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.module-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-pill {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mod-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.mod-pill.active {
  background: rgba(234, 179, 8, 0.12);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.api-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.api-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.api-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.api-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.api-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.api-mod-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

.api-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.api-code-snippet {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-x: auto;
}

pre {
  font-family: var(--font-mono);
  white-space: pre-wrap !important;
  word-break: break-word;
}

/* =====================================================================
   Universal Foundation Multi-Column Footer
   ===================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 36px;
  background: var(--bg-surface);
  position: relative;
  z-index: 10;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #10b981;
  width: fit-content;
}

.beacon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-links-list a:hover {
  color: var(--text-primary);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive Utilities */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.table-responsive table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.table-responsive th {
  padding: 12px 16px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-responsive td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.table-responsive tr:last-child td {
  border-bottom: none;
}

.chip-bar-scrollable {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding: 4px 0 10px;
  margin-bottom: 16px;
}

@media (min-width: 861px) {
  .chip-bar-scrollable {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.chip-bar-scrollable::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chip-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.chip-btn.active {
  background: var(--accent-gold-subtle);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.mobile-docs-jumper {
  display: none;
  position: sticky;
  top: 61px;
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  margin: 0 -16px 24px;
}

/* =====================================================================
   Learn Page & NotebookLM Video Theater Portal
   ===================================================================== */
.learn-portal-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  max-width: 1340px;
  margin: 0 auto;
  padding: 32px 32px 80px;
  align-items: start;
}

.curriculum-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.curriculum-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.curriculum-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curriculum-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.curriculum-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.curriculum-item-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--bg-card);
  transition: all 0.15s ease;
}

.curriculum-item-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.curriculum-item-link.active {
  background: rgba(251, 191, 36, 0.08);
  border-color: var(--accent-gold);
}

.curriculum-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.curriculum-track-num {
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.curriculum-video-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.curriculum-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.learn-main-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.topic-lesson-section {
  scroll-margin-top: 80px;
}

.video-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.video-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.video-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-frame-wrap video,
.video-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.video-placeholder-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #181822 0%, #0a0a0e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.video-placeholder-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.15);
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-placeholder-icon:hover {
  transform: scale(1.08);
  background: var(--accent-gold);
  color: #09090b;
}

.video-placeholder-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.video-placeholder-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.5;
}

.video-placeholder-hint code {
  color: var(--accent-emerald);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.video-caption-bar {
  padding: 10px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.lesson-takeaways-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 16px;
}

.lesson-takeaways-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.lesson-takeaways-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-takeaway-item {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.lesson-takeaway-item code {
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.82rem;
}

/* =====================================================================
   Responsive Design Breakpoints
   ===================================================================== */
@media (max-width: 1080px) {
  .benchmarks-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-page-container { grid-template-columns: 240px 1fr; }
  .docs-toc { display: none; }
  .learn-portal-container { grid-template-columns: 300px 1fr; gap: 24px; padding: 24px 20px 60px; }
  .footer-top-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .compiler-pipeline-box { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-installers-grid { grid-template-columns: 1fr; }
  .install-tabs-matrix { grid-template-columns: 1fr; }
  .learn-portal-container { grid-template-columns: 1fr; padding: 20px 16px 60px; }
  .curriculum-sidebar { position: static; max-height: none; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-panel { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .domain-tabs { grid-template-columns: repeat(3, 1fr); }
  .domain-content-card { grid-template-columns: 1fr; }
  .domain-code-preview { border-left: none; border-top: 1px solid var(--border-subtle); }
  .book-container { grid-template-columns: 1fr; text-align: center; padding: 36px 24px; gap: 40px; }
  .book-stage { transform: scale(0.95); margin: 0 auto; }
  .book-actions { justify-content: center; }
  .book-meta-grid { max-width: 480px; margin: 16px auto 0; }
  .docs-page-container { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .mobile-docs-jumper { display: block; }
  .roadmap-phases-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 40px 0 32px; }
  .page-title { font-size: 2rem; }
}

@media (max-width: 600px) {
  .domain-tabs { grid-template-columns: repeat(2, 1fr); }
  .benchmarks-grid { grid-template-columns: 1fr; }
  .learn-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .compiler-pipeline-box { grid-template-columns: 1fr; }
  .footer-top-grid { grid-template-columns: 1fr; }
  .book-stage { transform: scale(0.85); margin: -10px auto; }
  .book-meta-grid { grid-template-columns: 1fr; gap: 12px; }
  .installer-flow-steps { flex-direction: column; align-items: flex-start; }
  .flow-arrow { display: none; }
  .hero-stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 18px; }
  .stat-divider { display: none; }
  .page-hero { padding: 32px 0 24px; }
  .page-title { font-size: 1.65rem; line-height: 1.25; }
  .page-desc { font-size: 0.9rem; line-height: 1.55; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn-group .btn { width: 100%; justify-content: center; }
  .code-block-header { padding: 8px 12px; }
  .code-block-body { padding: 14px 12px; font-size: 0.78rem; }
}

@media (max-width: 420px) {
  .book-stage { transform: scale(0.75); margin: -25px auto; }
  .nav-version-pill { display: none; }
  .nav-btn-download span { display: none; }
  .nav-btn-download { padding: 8px 10px; }
  .page-title { font-size: 1.45rem; }
  .hero-stats-strip { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .book-stage { transform: scale(0.68); margin: -35px auto; }
  .container { padding: 0 12px; }
  .page-hero { padding: 24px 0 20px; }
  .page-title { font-size: 1.35rem; }
}
