@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=swap');

:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Premium Dark Theme Palette */
  --bg-primary: #030303;
  --bg-secondary: #0a0a0c;
  --bg-tertiary: #121215;
  --bg-accent-glow: radial-gradient(circle at top, rgba(99, 102, 241, 0.12) 0%, rgba(3, 3, 3, 0) 70%);

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --border-color: rgba(255, 255, 255, 0.05);
  --border-active: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.09);

  --accent-color: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-rgb: 99, 102, 241;

  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  --max-content-width: 820px;
  --header-height: 64px;
  --sidebar-width: 280px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Global Reset & Base Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* Base Ambient Effects */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: var(--bg-accent-glow);
  z-index: -1;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at top, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top, black, transparent 80%);
  z-index: -2;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Main Layout Shell */
.app-container {
  display: flex;
  flex-direction: column;
  min-h-screen: 100vh;
  position: relative;
}

/* Premium Header styling */
.premium-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(3, 3, 3, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s;
}
.brand-section:hover {
  opacity: 0.9;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Fast Search Bar Widget styling */
.search-widget-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 220px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.search-widget-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-active);
}
.search-shortcut {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-muted);
}

.social-icon-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.social-icon-link:hover {
  color: var(--text-primary);
}

/* Dynamic Page Container Grid */
.view-container {
  display: none;
  margin-top: var(--header-height);
  flex: 1;
}
.view-container.active {
  display: flex;
}

/* --- HOME PAGE HERO --- */
.hero-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: 80px 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #a5b4fc;
  margin-bottom: 32px;
  backdrop-filter: blur(4px);
}
.hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  max-width: 900px;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 80px;
  flex-wrap: wrap;
  width: 100%;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(255,255,255,0.18);
}

.npm-code-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.npm-code-copy:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* Feature highlight cards on landing */
.home-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.home-section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 120px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 1px 1px rgba(255,255,255,0.05) inset;
}
.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-color);
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- DOCUMENTATION INTERFACE --- */
.docs-view {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  position: relative;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar navigation */
.docs-sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--border-color);
  padding: 40px 24px 80px 32px;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-category-group {
  margin-bottom: 32px;
}
.sidebar-category-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.sidebar-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.sidebar-link-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.sidebar-link-item.active {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.09);
  border-left: 2px solid var(--accent-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 10px;
}
.sidebar-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 9999px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

/* Documentation Content Pane */
.docs-content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 120px 64px;
}

.docs-content-container {
  max-width: var(--max-content-width);
  margin: 0;
}

/* Prose layout and markdown rhythm */
.prose {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1.05rem;
}
.prose p {
  margin-bottom: 24px;
}
.prose h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.prose h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  line-height: 1.3;
}
.prose h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.prose h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 8px;
}
.prose ul, .prose ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 8px;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  color: #e0f2fe;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: 0.9rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent-color);
  padding-left: 20px;
  margin-bottom: 28px;
  font-style: italic;
  color: var(--text-primary);
}

.prose hr {
  border: 0;
  border-bottom: 1px solid var(--border-color);
  margin: 48px 0;
}

/* Callout Box element */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.03);
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
}
.callout-icon {
  color: var(--accent-color);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.callout-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.callout-body strong {
  color: var(--text-primary);
}
.callout.warning {
  border-color: rgba(245, 158, 11, 0.15);
  background: rgba(245, 158, 11, 0.03);
}
.callout.warning .callout-icon {
  color: var(--warning-color);
}
.callout.danger {
  border-color: rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.03);
}
.callout.danger .callout-icon {
  color: var(--danger-color);
}

/* API Property table styling */
.api-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  background: var(--bg-secondary);
}
.api-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.api-table th {
  border-bottom: 1px solid var(--border-color);
  padding: 12px 18px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
}
.api-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.api-table tr:last-child td {
  border-bottom: none;
}
.prop-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #38bdf8;
}
.prop-type {
  font-family: var(--font-mono);
  color: #f472b6;
  font-size: 0.8rem;
}
.prop-default {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.prop-desc {
  color: var(--text-secondary);
}
.prop-required {
  font-size: 0.75rem;
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 500;
  margin-left: 4px;
}

/* Premium Code Container with copy functionality */
.code-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.015);
}
.code-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-copy {
  background: transparent;
  border: 1px solid transparent;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.code-container pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  max-height: 500px;
}

/* Custom Interactive Tabs selector */
.tab-container {
  margin-bottom: 28px;
}
.tab-headers {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 4px;
  margin-bottom: 16px;
}
.tab-header-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-header-btn:hover {
  color: var(--text-primary);
}
.tab-header-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-color);
}
.tab-content-panel {
  display: none;
}
.tab-content-panel.active {
  display: block;
}

/* SVG Flow diagram animations */
.arch-diagram-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.arch-node {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  width: 280px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.2s;
  z-index: 2;
}
.arch-node:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}
.arch-node h4 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.arch-node p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.arch-arrow {
  height: 40px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-active), transparent);
  position: relative;
  z-index: 1;
}
.arch-arrow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
  animation: flow-arrow 1.8s infinite linear;
}
@keyframes flow-arrow {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Dynamic Live Demo widget */
.preview-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.preview-header-bar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.01);
}
.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.preview-dot.active {
  background: var(--success-color);
}
.preview-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.preview-body {
  padding: 24px;
}

/* Global search overlay and modal system */
.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.search-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  width: 100%;
  max-width: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 1px 1px rgba(255,255,255,0.05) inset;
  overflow: hidden;
  transform: translateY(-20px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.search-backdrop.open .search-modal {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}
.search-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  outline: none;
}
.search-input-field::placeholder {
  color: var(--text-muted);
}
.search-close-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.search-result-item:hover, .search-result-item.selected {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
}
.search-result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.search-result-excerpt {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-excerpt mark {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0 2px;
}

.search-empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer layout elements */
.premium-footer {
  border-top: 1px solid var(--border-color);
  background: #010102;
  padding: 60px 32px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-logo {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
  opacity: 0.8;
}
.footer-right {
  display: flex;
  gap: 32px;
}
.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--text-primary);
}

/* Mobile responsive drawer styling */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.4rem;
}

/* HighlightJS custom theme integrations */
.hljs-comment, .hljs-quote { color: #5c6370; font-style: italic; }
.hljs-doctag, .hljs-keyword, .hljs-formula { color: #c678dd; }
.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { color: #e06c75; }
.hljs-literal { color: #56b6c2; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta .hljs-string { color: #98c379; }
.hljs-built_in, .hljs-class .hljs-title { color: #e6c07b; }
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-id, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { color: #d19a66; }
.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { color: #61afef; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: bold; }
.hljs-link { text-decoration: underline; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .docs-sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    bottom: 0;
    background: var(--bg-primary);
    z-index: 90;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 20px 0 40px rgba(0,0,0,0.8);
  }
  .docs-sidebar.open {
    left: 0;
  }
  .docs-content-wrapper {
    padding: 32px 24px;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .search-widget-trigger {
    width: 40px;
    padding: 6px;
    justify-content: center;
  }
  .search-widget-trigger span, .search-widget-trigger .search-shortcut {
    display: none;
  }
  .hero-title {
    font-size: 2.8rem;
  }
}

/* --- PREMIUM HOME PAGE REDESIGN STYLES --- */
.mt-20 { margin-top: 80px; }
.mb-20 { margin-bottom: 80px; }

/* 1. Architecture Preview */
.arch-preview-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.preview-body-graph {
  padding: 40px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.03) 0%, transparent 80%), #050508;
}

/* 2. Extensibility Preview Split Editor Mockup */
.home-extensibility-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.ext-split-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
}
@media (max-width: 768px) {
  .ext-split-editor {
    grid-template-columns: 1fr;
  }
}
.editor-side {
  border-right: 1px solid var(--border-color);
  background: #050508;
  display: flex;
  flex-direction: column;
}
.editor-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #08080c;
}
.dot-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.tab-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.editor-code {
  flex: 1;
  padding: 24px;
  margin: 0;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: left;
}
.preview-side {
  background: #08080c;
  display: flex;
  flex-direction: column;
}
.preview-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #0a0a0f;
}
.preview-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}
.preview-chat-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  text-align: left;
}
.preview-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.4;
}
.preview-bubble.user {
  align-self: flex-end;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.preview-bubble.custom-ai {
  align-self: flex-start;
  background: #030303;
  border: 1px solid rgba(99, 102, 241, 0.2);
  width: 100%;
}
.bubble-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}
.custom-card-frame {
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.1);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.status-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-color);
}

/* 3. Homepage tab-container overrides */
.home-code-tab-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.tab-content-panel {
  display: none;
}
.tab-content-panel.active {
  display: block;
}
.tab-headers {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.tab-header-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.tab-header-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.tab-header-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

/* 4. Roadmap milestones timeline */
.home-roadmap-timeline {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.timeline-nodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  text-align: left;
}
@media (max-width: 768px) {
  .timeline-nodes-grid {
    grid-template-columns: 1fr;
  }
}
.timeline-node {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s;
}
.timeline-node.active {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99,102,241,0.05);
}
.timeline-node:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}
.timeline-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  background: rgba(99,102,241,0.08);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}
.timeline-node h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.timeline-node p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 5. Vision callout layouts */
.home-vision-callouts .vision-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}
.home-vision-callouts .vision-card:hover {
  border-color: var(--border-active);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 6. CTA Card Layout */
.home-cta-card {
  background: radial-gradient(circle at top right, rgba(99,102,241,0.08) 0%, transparent 60%), var(--bg-secondary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 15px 50px rgba(99,102,241,0.08);
  margin-top: 40px;
}
