/* Copied from abstractframework.ai assets/css/main.css (gh-pages e6e5471) so abstractcore.ai shares its look. Edit there first. */
/* ═══════════════════════════════════════════════════════════════════════════
   AbstractFramework — Premium Dark Theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────────────────────── */

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

/* ── Custom Properties ────────────────────────────────────────────────── */

:root {
  /* Palette — core */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --green: #10b981;
  --green-light: #34d399;
  --pink: #ec4899;
  --pink-light: #f472b6;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --blue: #3b82f6;

  /* Palette — surfaces */
  --bg-deep: #050508;
  --bg: #0a0a12;
  --bg-surface: #0e0e18;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-solid: #111119;
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --bg-code: #08080e;

  /* Palette — borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.04);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Palette — text */
  --text: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #8080a0;  /* WCAG AA on the dark grounds (was #5c5c78) */

  /* Palette — glows */
  --glow-primary: rgba(99, 102, 241, 0.15);
  --glow-primary-strong: rgba(99, 102, 241, 0.35);
  --glow-accent: rgba(6, 182, 212, 0.15);
  --glow-green: rgba(16, 185, 129, 0.15);
  --glow-pink: rgba(236, 72, 153, 0.15);
  --glow-amber: rgba(245, 158, 11, 0.15);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #10b981 100%);
  --gradient-text: linear-gradient(135deg, #818cf8, #22d3ee, #34d399);
  --gradient-border: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.3), rgba(16, 185, 129, 0.5));
  --gradient-divider: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.2), transparent);
  --gradient-pink: linear-gradient(135deg, #ec4899, #6366f1);
  --gradient-green: linear-gradient(135deg, #10b981, #06b6d4);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Menlo', 'Monaco', 'Consolas', monospace;

  /* Font sizes — fluid clamp scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --text-xl: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --text-2xl: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
  --text-3xl: clamp(1.8rem, 1.4rem + 2vw, 2.8rem);
  --text-4xl: clamp(2.5rem, 2rem + 3vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-glow-accent: 0 0 40px rgba(6, 182, 212, 0.12);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 250ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;

  /* Z layers */
  --z-base: 1;
  --z-card: 10;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
}


/* ── Base ─────────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Dot-grid background pattern on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

::selection {
  background: var(--primary);
  color: #fff;
}


/* ── Links ────────────────────────────────────────────────────────────── */

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--accent-light);
}


/* ── Images ───────────────────────────────────────────────────────────── */

img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* ── Inline code ──────────────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  color: var(--accent-light);
  white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 0 var(--space-xl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 18, 0.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-light);
  transition:
    background var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-divider);
  opacity: 0.5;
}

.nav.scrolled {
  background: rgba(10, 10, 18, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: opacity var(--duration) var(--ease);
}

.nav-brand:hover {
  color: var(--text);
  opacity: 0.85;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition:
    color var(--duration) var(--ease),
    text-shadow var(--duration) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 1px;
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.nav-cta:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow:
    0 4px 20px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.3);
}

.nav-cta:hover::before {
  opacity: 1;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--duration) var(--ease);
}

.mobile-toggle:hover {
  color: var(--primary-light);
}

/* Mobile nav open state */
@media (max-width: 768px) {
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 18, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border);
    gap: var(--space-sm);
    z-index: var(--z-nav);
  }

  .nav-links.open a {
    padding: 0.6rem 0;
  }
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
  padding: var(--space-xl);
}

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem var(--space-xl) var(--space-3xl);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(16, 185, 129, 0.04), transparent),
    var(--bg);
}

/* Animated radial glow */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
  animation: heroGlow 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-3%, 2%) scale(1.02); }
  66% { transform: translate(2%, -1%) scale(0.98); }
}

/* Grid pattern overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 80%);
  animation: gridDrift 30s linear infinite;
  pointer-events: none;
}

@keyframes gridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(64px, 64px); }
}

/* Floating particles (pure CSS) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(99, 102, 241, 0.35), transparent),
    radial-gradient(1px 1px at 25% 70%, rgba(6, 182, 212, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 40% 35%, rgba(16, 185, 129, 0.25), transparent),
    radial-gradient(1px 1px at 55% 85%, rgba(99, 102, 241, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 15%, rgba(6, 182, 212, 0.35), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(16, 185, 129, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 15% 90%, rgba(236, 72, 153, 0.2), transparent),
    radial-gradient(1px 1px at 90% 30%, rgba(245, 158, 11, 0.2), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(99, 102, 241, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 35% 10%, rgba(6, 182, 212, 0.25), transparent),
    radial-gradient(1px 1px at 80% 80%, rgba(99, 102, 241, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 5% 50%, rgba(16, 185, 129, 0.3), transparent);
  animation: particleFloat 40s linear infinite;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes particleFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100px); }
}


/* ── Hero Content ─────────────────────────────────────────────────────── */

.hero-inner {
  max-width: 900px;
  text-align: center;
  position: relative;
  z-index: var(--z-base);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  background: rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.02em;
  animation: fadeSlideDown 0.8s var(--ease-out) both;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 16px rgba(16, 185, 129, 0.3); }
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
  letter-spacing: -0.035em;
  margin-bottom: var(--space-lg);
  animation: fadeSlideDown 0.8s 0.15s var(--ease-out) both;
}

.hero h1 .gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

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

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.75;
  animation: fadeSlideDown 0.8s 0.3s var(--ease-out) both;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  animation: fadeSlideDown 0.8s 0.45s var(--ease-out) both;
}


/* ── Hero Code Block ──────────────────────────────────────────────────── */

.hero-code {
  background: #1a1b26;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  text-align: left;
  max-width: 580px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
  white-space: pre;
  animation: fadeSlideDown 0.8s 0.6s var(--ease-out) both;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.hero-code::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

/* Terminal dots decoration */
.hero-code::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow:
    16px 0 0 #febc2e,
    32px 0 0 #28c840;
  opacity: 0;
}

.hero-code pre {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  overflow-x: auto;
  white-space: pre;
}

.hero-code pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

.hero-code .kw, .kw { color: #c678dd; }
.hero-code .fn, .fn { color: #61afef; }
.hero-code .str, .str { color: #98c379; }
.hero-code .cmt, .cmt { color: #5c6370; font-style: italic; }


/* ── Hero Entrance Animations ─────────────────────────────────────────── */

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

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


/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.85rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition:
    all var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.3),
    0 4px 16px rgba(99, 102, 241, 0.2);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.5),
    0 8px 30px rgba(99, 102, 241, 0.35),
    0 0 60px rgba(99, 102, 241, 0.15);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.4),
    0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(99, 102, 241, 0.15);
}

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


/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS — Layout + Typography
   ═══════════════════════════════════════════════════════════════════════════ */

section {
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
  z-index: var(--z-base);
}

/* Gradient divider between sections */
section + section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--gradient-divider);
}

/* Sections with bg-surface don't need dividers */
section[style*="background"]::before {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  position: relative;
  padding: 0.3rem 0;
}

.section-label::before,
.section-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4));
}

.section-label::before {
  right: calc(100% + 12px);
}

.section-label::after {
  left: calc(100% + 12px);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.4), transparent);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.75;
}


/* ═══════════════════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.stats-bar {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: var(--space-2xl) var(--space-xl);
  flex-wrap: wrap;
  position: relative;
  z-index: var(--z-base);
}

.stat {
  text-align: center;
  position: relative;
}

.stat + .stat::before {
  content: '';
  position: absolute;
  left: calc(-1 * clamp(1rem, 2.5vw, 2rem));
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.stat-num {
  font-size: clamp(2.2rem, 2rem + 2vw, 3rem);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ENTRY POINTS — Two-card hero section
   ═══════════════════════════════════════════════════════════════════════════ */

.entry-points {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.entry-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition:
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
}

/* Animated gradient top border */
.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-size: 200% 100%;
  animation: borderGradientShift 4s ease-in-out infinite;
}

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

/* Inner glow on hover */
.entry-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease);
  pointer-events: none;
}

.entry-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.entry-card:hover::after {
  opacity: 1;
}

/* Core variant */
.entry-card.core::before {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
}

.entry-card.core {
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.06) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(99, 102, 241, 0.03) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.entry-card.core:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 50px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.entry-card.core::after {
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08), transparent 70%);
}

/* Gateway variant */
.entry-card.gateway::before {
  background: linear-gradient(90deg, var(--green), var(--accent), var(--green));
  background-size: 200% 100%;
}

.entry-card.gateway {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.06) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(16, 185, 129, 0.03) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.entry-card.gateway:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 50px rgba(16, 185, 129, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.entry-card.gateway::after {
  background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08), transparent 70%);
}

.entry-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.entry-icon {
  width: 43px;
  height: 43px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: transform var(--duration) var(--ease);
}

.entry-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.entry-card:hover .entry-icon {
  transform: scale(1.08);
}

.entry-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.entry-card > p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.65;
  font-size: var(--text-sm);
}

.entry-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.entry-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.entry-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.entry-card.core .entry-features li::before {
  background: var(--primary-light);
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}

.entry-card.gateway .entry-features li::before {
  background: var(--green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

/* Entry point scenario blocks */
.entry-scenario {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.entry-scenario h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.entry-scenario p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARCHITECTURE DIAGRAM
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Interactive Isometric Cubes ── */

.cubes-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.iso-grid {
  position: relative;
  transform-style: preserve-3d;
  height: calc(5 * 110px + 80px);
  width: calc(4 * 90px);
}

.cube-wrap {
  position: absolute;
  cursor: pointer;
  transition: transform 400ms cubic-bezier(.4,0,.2,1),
              filter 600ms cubic-bezier(.4,0,.2,1),
              opacity 600ms cubic-bezier(.4,0,.2,1);
}

.cube-wrap:hover,
.cube-wrap.active {
  transform: translate(var(--tx),var(--ty)) translateY(-16px) scale(1.18);
  z-index: 100;
  filter: brightness(1.4) drop-shadow(0 12px 28px rgba(255,255,255,.1));
}

.cube-wrap.dimmed {
  opacity: .15;
  filter: brightness(.4);
}

.cube {
  width: var(--size);
  height: var(--size);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-30deg) rotateY(45deg);
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.face.top { transform: rotateX(90deg) translateZ(calc(var(--size)/2)); background: var(--c-top); }
.face.left { transform: rotateY(-90deg) translateZ(calc(var(--size)/2)); background: var(--c-left); }
.face.right { transform: translateZ(calc(var(--size)/2)); background: var(--c-right); }

.cube-wrap[data-layer="app"]        { --c-top:#1a9e6e; --c-left:#0f7a52; --c-right:#14b87a; }
.cube-wrap[data-layer="control"]    { --c-top:#0891b2; --c-left:#0e6e8a; --c-right:#06b6d4; }
.cube-wrap[data-layer="compose"]    { --c-top:#6366f1; --c-left:#4f46e5; --c-right:#818cf8; }
.cube-wrap[data-layer="foundation"] { --c-top:#4f46e5; --c-left:#3730a3; --c-right:#6366f1; }
.cube-wrap[data-layer="plugin"]     { --c-top:#db2777; --c-left:#be185d; --c-right:#ec4899; }
.cube-wrap[data-layer="knowledge"]  { --c-top:#d97706; --c-left:#b45309; --c-right:#f59e0b; }

.cube-tooltip {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(18,18,26,.95);
  backdrop-filter: blur(12px);
  border: 1px solid #2a2a3a;
  padding: 16px 22px;
  border-radius: 12px;
  width: 280px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
  text-align: left;
  line-height: 1.55;
}

.cube-tooltip .tip-layer {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cube-tooltip .tip-name {
  font-weight: 700;
  color: #e4e4ef;
  font-size: .92rem;
}

.cube-tooltip .tip-desc {
  color: #9898b0;
  font-size: .78rem;
  margin-top: 8px;
  line-height: 1.7;
}

.cube-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(18,18,26,.95);
}

.cube-wrap:hover .cube-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cube-label {
  position: absolute;
  width: 140px;
  left: 50%;
  margin-left: -70px;
  text-align: center;
  top: calc(100% + 14px);
  font-size: .7rem;
  font-weight: 600;
  color: #7a7a96;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: .02em;
  transition: color 250ms ease;
}

.cube-wrap:hover .cube-label,
.cube-wrap.active .cube-label {
  color: #c4c4d8;
}

.layer-label {
  position: absolute;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .55;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.layer-label.highlight {
  opacity: .8;
}

.layer-connector {
  position: absolute;
  width: 1px;
  border-left: 1px dashed #1e1e2e;
  pointer-events: none;
  z-index: -1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.comp-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition:
    all var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Animated gradient border on hover */
.comp-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: var(--gradient-border);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-slow) var(--ease);
}

.comp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: var(--bg-card-solid);
  z-index: -1;
}

.comp-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow:
    var(--shadow),
    0 0 30px rgba(99, 102, 241, 0.06);
}

.comp-card:hover::before {
  opacity: 1;
}

.comp-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
}

.comp-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.comp-tag.foundation {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.comp-tag.composition {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.comp-tag.app {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.comp-tag.modality {
  background: rgba(236, 72, 153, 0.12);
  color: var(--pink-light);
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.comp-tag.memory {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.comp-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.comp-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-top: 0.5rem;
}

.comp-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.comp-link {
  font-size: var(--text-xs);
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  transition:
    color var(--duration) var(--ease),
    gap var(--duration) var(--ease);
}

.comp-link:hover {
  color: var(--accent-light);
  gap: 0.4rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SHOWCASE — Image + Text pairs
   ═══════════════════════════════════════════════════════════════════════════ */

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin: var(--space-3xl) 0;
}

.showcase-grid.reverse {
  direction: rtl;
}

.showcase-grid.reverse > * {
  direction: ltr;
}

.showcase-img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Glow ring on hover */
.showcase-img::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--gradient-border);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-slow) var(--ease);
}

.showcase-img:hover {
  transform: scale(1.015) translateY(-2px);
  box-shadow:
    0 16px 60px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(99, 102, 241, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.showcase-img:hover::before {
  opacity: 0.6;
}

.showcase-img img {
  width: 100%;
  display: block;
  transition: transform var(--duration-slow) var(--ease);
}

.showcase-img:hover img {
  transform: scale(1.02);
}

.showcase-content h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.015em;
}

.showcase-content p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-lg);
  font-size: var(--text-base);
}

.showcase-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.showcase-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.showcase-features li .icon {
  color: var(--green);
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.showcase-features li svg {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CODE BLOCKS — Proper formatting
   ═══════════════════════════════════════════════════════════════════════════ */

.code-block {
  background: #1a1b26;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: calc(2.4rem + 1rem) 1.75rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  overflow-x: auto;
  margin: var(--space-lg) 0;
  position: relative;
  white-space: pre;
  color: var(--text-secondary);
  tab-size: 4;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* macOS window chrome header with traffic light dots */
.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.4rem;
  background:
    radial-gradient(circle 5px at 18px 50%, #ff5f56 4.5px, transparent 5px),
    radial-gradient(circle 5px at 38px 50%, #ffbd2e 4.5px, transparent 5px),
    radial-gradient(circle 5px at 58px 50%, #27ca3f 4.5px, transparent 5px),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  background-color: #16161e;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 1;
}

/* Left accent bar */
.code-block::after {
  content: '';
  position: absolute;
  top: 2.4rem;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.08), transparent);
  border-radius: 0 2px 2px 0;
}

/* Copy button — sits inside the header bar */
.copy-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  font-family: var(--font);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  z-index: 2;
}

.copy-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.1);
}

.copy-btn.copied {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Scrollbar for code blocks */
.code-block::-webkit-scrollbar {
  height: 6px;
}

.code-block::-webkit-scrollbar-track {
  background: transparent;
}

.code-block::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Syntax highlighting — One Dark Pro / Tokyo Night inspired */
.code-block .line-kw,
.line-kw { color: #c678dd; }

.code-block .line-fn,
.line-fn { color: #61afef; }

.code-block .line-str,
.line-str { color: #98c379; }

.code-block .line-cmt,
.line-cmt { color: #5c6370; font-style: italic; }

.code-block .line-var,
.line-var { color: #d19a66; }

/* pre + code elements used standalone */
pre {
  white-space: pre;
  overflow-x: auto;
  font-family: var(--mono);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: #abb2bf;
  white-space: pre;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MULTIMODAL VISUAL
   ═══════════════════════════════════════════════════════════════════════════ */

.multimodal-visual {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.multimodal-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-divider);
}

.mm-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin: var(--space-xl) 0;
}

.mm-node {
  padding: 1.2rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  min-width: 140px;
  font-size: var(--text-sm);
  position: relative;
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
}

.mm-node:hover {
  transform: translateY(-2px);
}

.mm-node.input {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--primary-light);
}

.mm-node.input:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.mm-node.process {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-light);
}

.mm-node.process:hover {
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

.mm-node.output {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green-light);
}

.mm-node.output:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.mm-arrow {
  color: var(--text-muted);
  font-size: 1.4rem;
  opacity: 0.7;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DEPLOYMENT MODES
   ═══════════════════════════════════════════════════════════════════════════ */

.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.mode-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition:
    all var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Distinct identity per card via nth-child color tinting */
.mode-card:nth-child(1)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.mode-card:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--accent));
}

.mode-card:nth-child(3)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--primary));
}

.mode-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow:
    var(--shadow),
    0 0 40px rgba(99, 102, 241, 0.06);
}

.mode-card:nth-child(1):hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.mode-card:nth-child(2):hover {
  border-color: rgba(16, 185, 129, 0.2);
}

.mode-card:nth-child(3):hover {
  border-color: rgba(236, 72, 153, 0.2);
}

.mode-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.2));
}

.mode-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.mode-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.mode-tags {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-tag {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition:
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.mode-card:hover .mode-tag {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════════════════════════════════════ */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition:
    all var(--duration) var(--ease),
    box-shadow var(--duration-slow) var(--ease);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    var(--shadow),
    0 0 40px rgba(99, 102, 241, 0.06);
  transform: translateY(-3px);
}

.gallery-item img {
  transition: transform var(--duration-slow) var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-caption {
  padding: 0.85rem 1.15rem;
  background: var(--bg-card-solid);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO SHOWCASE
   ═══════════════════════════════════════════════════════════════════════════ */

.video-showcase {
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow:
    0 8px 48px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition:
    box-shadow var(--duration-slow) var(--ease),
    border-color var(--duration) var(--ease);
}

.video-showcase:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow:
    0 12px 60px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(99, 102, 241, 0.06);
}

.video-showcase video {
  width: 100%;
  display: block;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.cta-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 5rem var(--space-xl);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(99, 102, 241, 0.1), transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 100%, rgba(6, 182, 212, 0.05), transparent 50%);
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.cta-section h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
  border-top: 1px solid var(--border-light);
  background: var(--bg-deep);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-divider);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: 0.75rem;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: 0.3rem 0;
  transition:
    color var(--duration) var(--ease),
    padding-left var(--duration) var(--ease);
}

.footer-col a:hover {
  color: var(--text);
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL-TRIGGERED REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--duration-slower) var(--ease-out),
    transform var(--duration-slower) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveals: children delay cascading */
.reveal.visible .entry-card,
.reveal.visible .comp-card,
.reveal.visible .mode-card,
.reveal.visible .gallery-item,
.reveal.visible .mm-node,
.reveal.visible .stat {
  animation: staggerReveal 0.6s var(--ease-out) both;
}

.reveal.visible .entry-card:nth-child(1),
.reveal.visible .comp-card:nth-child(1),
.reveal.visible .mode-card:nth-child(1),
.reveal.visible .gallery-item:nth-child(1),
.reveal.visible .mm-node:nth-child(1),
.reveal.visible .stat:nth-child(1) { animation-delay: 0ms; }

.reveal.visible .entry-card:nth-child(2),
.reveal.visible .comp-card:nth-child(2),
.reveal.visible .mode-card:nth-child(2),
.reveal.visible .gallery-item:nth-child(2),
.reveal.visible .mm-node:nth-child(2),
.reveal.visible .stat:nth-child(2) { animation-delay: 80ms; }

.reveal.visible .comp-card:nth-child(3),
.reveal.visible .mode-card:nth-child(3),
.reveal.visible .mm-node:nth-child(3),
.reveal.visible .stat:nth-child(3) { animation-delay: 160ms; }

.reveal.visible .comp-card:nth-child(4),
.reveal.visible .mm-node:nth-child(4),
.reveal.visible .stat:nth-child(4) { animation-delay: 240ms; }

.reveal.visible .comp-card:nth-child(5),
.reveal.visible .mm-node:nth-child(5) { animation-delay: 320ms; }

.reveal.visible .comp-card:nth-child(6) { animation-delay: 400ms; }

.reveal.visible .comp-card:nth-child(7) { animation-delay: 480ms; }

.reveal.visible .comp-card:nth-child(8) { animation-delay: 560ms; }
.reveal.visible .comp-card:nth-child(9) { animation-delay: 640ms; }
.reveal.visible .comp-card:nth-child(10) { animation-delay: 720ms; }
.reveal.visible .comp-card:nth-child(11) { animation-delay: 800ms; }
.reveal.visible .comp-card:nth-child(12) { animation-delay: 880ms; }
.reveal.visible .comp-card:nth-child(13) { animation-delay: 960ms; }
.reveal.visible .comp-card:nth-child(14) { animation-delay: 1040ms; }

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

/* Stat number counter-like appearance */
.reveal.visible .stat-num {
  animation: countAppear 0.8s var(--ease-spring) both;
}

.reveal.visible .stat:nth-child(1) .stat-num { animation-delay: 100ms; }
.reveal.visible .stat:nth-child(2) .stat-num { animation-delay: 200ms; }
.reveal.visible .stat:nth-child(3) .stat-num { animation-delay: 300ms; }
.reveal.visible .stat:nth-child(4) .stat-num { animation-delay: 400ms; }

@keyframes countAppear {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING / PARALLAX-LIKE SUBTLE EFFECTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Gentle float on specific decorative elements */
.mode-icon {
  animation: gentleFloat 6s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mode-card:hover .mode-icon {
  animation: none;
  transform: scale(1.1);
}



/* ═══════════════════════════════════════════════════════════════════════════
   SVG ICON STYLING (inline SVGs in cards)
   ═══════════════════════════════════════════════════════════════════════════ */

.comp-card svg,
.entry-card svg,
.mode-card svg {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  fill: currentColor;
  flex-shrink: 0;
}

.nav-brand svg,
.footer-brand svg {
  transition:
    filter var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.nav-brand:hover svg,
.footer-brand:hover svg {
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
  transform: rotate(-5deg) scale(1.05);
}


/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first breakpoints
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .entry-points {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .entry-card {
    grid-row: auto;
    grid-template-rows: none;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .showcase-grid.reverse {
    direction: ltr;
  }

  .showcase-content {
    order: 2;
  }

  .showcase-img {
    order: 1;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .section-label::before,
  .section-label::after {
    display: none;
  }
}

/* ── Mobile (≤ 768px) ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav {
    padding: 0 var(--space-md);
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 6rem var(--space-lg) var(--space-2xl);
    min-height: auto;
  }

  section {
    padding: var(--space-3xl) var(--space-lg);
  }

  .section-header {
    margin-bottom: var(--space-xl);
  }

  .modes-grid {
    grid-template-columns: 1fr;
  }

  .components-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    gap: var(--space-lg);
  }

  .stat + .stat::before {
    display: none;
  }

  .mm-flow {
    flex-direction: column;
    gap: var(--space-md);
  }

  .mm-arrow {
    transform: rotate(90deg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-code {
    font-size: 0.75rem;
    padding: 1.25rem 1.25rem;
    max-width: 100%;
  }

  .code-block {
    font-size: 0.75rem;
    padding: calc(2.4rem + 0.75rem) 1.25rem 1rem;
    border-radius: var(--radius-sm);
  }

  .entry-card {
    padding: var(--space-xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
  }
}

/* ── Small mobile (≤ 480px) ───────────────────────────────────────────── */

@media (max-width: 480px) {
  :root {
    --space-xl: 1.25rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3.5rem;
  }

  .hero {
    padding: 5.5rem var(--space-md) var(--space-xl);
  }

  section {
    padding: var(--space-2xl) var(--space-md);
  }

  .nav {
    height: 56px;
  }

  .nav-brand {
    font-size: 0.95rem;
  }

  .nav-brand svg {
    width: 24px;
    height: 24px;
  }

  .entry-card {
    padding: var(--space-lg);
  }

  .comp-card {
    padding: 1.25rem;
  }

  .mode-card {
    padding: var(--space-lg);
  }

  .hero-code {
    font-size: 0.7rem;
    padding: 1rem;
    line-height: 1.7;
  }

  .code-block {
    font-size: 0.7rem;
    padding: calc(2.4rem + 0.6rem) 1rem 0.85rem;
    line-height: 1.7;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Gradient text utility */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card utility */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* Glow utility */
.glow-primary { box-shadow: var(--shadow-glow); }
.glow-accent { box-shadow: var(--shadow-glow-accent); }




/* ═══════════════════════════════════════════════════════════════════════════
   NAV DROPDOWN
   ═══════════════════════════════════════════════════════════════════════════ */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 14, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-overlay);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown-group {
  padding: 0.35rem 0;
}

.nav-dropdown-group + .nav-dropdown-group {
  border-top: 1px solid var(--border);
}

.nav-dropdown-label {
  display: block;
  padding: 0.25rem 1.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.4rem 1.15rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.06);
  padding-left: 1.35rem;
}

.nav-dropdown-menu a::after {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) var(--bg-deep);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Documentation Pages
   ═══════════════════════════════════════════════════════════════════════════ */

.doc-hero {
  padding: clamp(120px, 15vh, 200px) 0 clamp(60px, 8vh, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.doc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, var(--glow-primary) 0%, transparent 70%);
  pointer-events: none;
}

.doc-hero-inner {
  position: relative;
  z-index: 1;
}

.doc-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--glow-primary);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 24px;
}

.doc-badge.capability {
  background: var(--glow-accent);
  color: var(--accent-light);
  border-color: rgba(6, 182, 212, 0.2);
}

.doc-badge.application {
  background: var(--glow-green);
  color: var(--green-light);
  border-color: rgba(16, 185, 129, 0.2);
}

.doc-badge.knowledge {
  background: var(--glow-amber);
  color: var(--amber-light);
  border-color: rgba(245, 158, 11, 0.2);
}

.doc-badge.composition {
  background: var(--glow-pink);
  color: var(--pink-light);
  border-color: rgba(236, 72, 153, 0.2);
}

.doc-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.1;
}

.doc-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.doc-meta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.doc-meta .btn-sm {
  padding: 8px 20px;
  font-size: 0.8rem;
}

/* Doc section layout */
.doc-section {
  padding: clamp(48px, 6vh, 80px) 0;
  border-top: 1px solid var(--border);
}

.doc-section .container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.doc-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.doc-section h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text);
}

.doc-section p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 1rem;
}

.doc-section ul,
.doc-section ol {
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 20px 24px;
  font-size: 1rem;
}

.doc-section li {
  margin-bottom: 8px;
}

.doc-section li strong {
  color: var(--text);
}

/* Feature grid in doc pages */
.doc-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.doc-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

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

.doc-feature h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.doc-feature p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Doc page footer */
.doc-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.doc-footer a {
  color: var(--primary-light);
  text-decoration: none;
}

.doc-footer a:hover {
  text-decoration: underline;
}

/* Table styles for doc pages */
.doc-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.doc-section th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
}

.doc-section td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.doc-section td code,
.doc-section p code {
  background: var(--bg-code);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--accent-light);
  border: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   CODE TABS
   ═══════════════════════════════════════════════════════════════════════════ */

.code-tabs {
  margin: var(--space-lg) 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1b26;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.tab-nav {
  display: flex;
  gap: 0.25rem;
  background:
    radial-gradient(circle 5px at 18px 50%, #ff5f56 4.5px, transparent 5px),
    radial-gradient(circle 5px at 38px 50%, #ffbd2e 4.5px, transparent 5px),
    radial-gradient(circle 5px at 58px 50%, #27ca3f 4.5px, transparent 5px),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  background-color: #16161e;
  padding: 0.5rem 0.5rem 0 5rem;
  position: relative;
}

.tab-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(99, 102, 241, 0.3),
    rgba(6, 182, 212, 0.2),
    transparent
  );
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  position: relative;
  letter-spacing: 0.01em;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.15);
  border-bottom-color: transparent;
}

.tab-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px 2px 0 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel .code-block {
  margin-top: 0;
  border: none;
  border-radius: 0;
  padding-top: 1.5rem;
}

.tab-panel .code-block::before {
  display: none;
}

.tab-panel .code-block::after {
  top: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CAROUSEL
   ═══════════════════════════════════════════════════════════════════════════ */

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s var(--ease);
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 600px;
  object-fit: contain;
  display: block;
  background: #0a0a0f;
}

.carousel-caption {
  padding: 0.85rem 1.15rem;
  background: var(--bg-card-solid);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-70%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.4);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-card-solid);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary-light);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}


/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO PLAYER
   ═══════════════════════════════════════════════════════════════════════════ */

.audio-showcase {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.audio-player {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--duration) var(--ease);
}

.audio-player:hover {
  border-color: var(--border-hover);
}

.audio-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.audio-icon {
  font-size: 1.5rem;
  color: var(--pink);
  line-height: 1;
}

.audio-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text);
  margin-bottom: 4px;
}

.audio-prompt {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

audio {
  border-radius: 6px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ROADMAP TIMELINE
   ═══════════════════════════════════════════════════════════════════════════ */

.roadmap-timeline {
  position: relative;
  padding-left: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--primary), var(--text-muted));
}

.roadmap-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 2rem;
}

.roadmap-item:last-child {
  padding-bottom: 0;
}

.roadmap-marker {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  z-index: 1;
}

.roadmap-item.done .roadmap-marker {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.roadmap-item.active .roadmap-marker {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.roadmap-item.upcoming .roadmap-marker {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

.roadmap-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--duration) var(--ease);
}

.roadmap-item:hover .roadmap-content {
  border-color: var(--border-hover);
}

.roadmap-item.active .roadmap-content {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.06);
}

.roadmap-content h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.roadmap-content p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.roadmap-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.roadmap-status.current {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border-color: rgba(99, 102, 241, 0.2);
}

.roadmap-status.planned {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   KNOWLEDGE GRAPH DIAGRAM
   ═══════════════════════════════════════════════════════════════════════════ */

.kg-diagram {
  width: 100%;
  max-width: 420px;
}

.kg-diagram svg {
  width: 100%;
  height: auto;
}

.kg-diagram svg text {
  font-family: var(--font);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Component Dropdown Nav
   ═══════════════════════════════════════════════════════════════════════════ */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  cursor: pointer;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: rgba(14, 14, 24, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 0;
  margin-top: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
  animation: dropdownFade 200ms ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-group {
  padding: 4px 0;
}

.nav-dropdown-group + .nav-dropdown-group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  padding-top: 8px;
}

.nav-dropdown-label {
  display: block;
  padding: 4px 20px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.nav-dropdown-menu a {
  display: block;
  padding: 7px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 150ms ease;
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-dropdown-menu a::after {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Comparison Table
   ═══════════════════════════════════════════════════════════════════════════ */

.comparison-table {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.comparison-table table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.comparison-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.comparison-table th.highlight {
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.08);
}

.comparison-table td {
  padding: 12px 18px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.comparison-table td.highlight {
  color: var(--text);
  background: rgba(99, 102, 241, 0.04);
  font-weight: 500;
}

.comparison-table tr:hover td {
  background: var(--bg-card-hover);
}

.comparison-table tr:hover td.highlight {
  background: rgba(99, 102, 241, 0.08);
}

.comparison-table .check {
  color: var(--green);
  font-weight: 700;
}

.comparison-table .partial {
  color: var(--amber);
  font-weight: 700;
}

.comparison-table .no {
  color: var(--text-muted);
  font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Package Navigation
   ═══════════════════════════════════════════════════════════════════════════ */

.pkg-nav {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pkg-nav-inner {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  max-width: 1200px;
  margin: 0 auto;
  white-space: nowrap;
}

.pkg-nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 200ms ease;
}

.pkg-nav-link:hover {
  color: var(--text-secondary);
  background: var(--bg-card);
}

.pkg-nav-link.active {
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.12);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SITE REFRESH 2026-09 — install tabs, "what you get", personas, journeys
   ═══════════════════════════════════════════════════════════════════════════ */

/* Keyboard focus that is visible on the dark ground */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: calc(var(--z-nav) + 1);
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: 0.75rem; color: #fff; }

/* Dropdowns also open from the keyboard */
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu.narrow { min-width: 240px; }
.nav-dropdown-menu a small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 400;
  margin-top: 1px;
}
@media (max-width: 768px) {
  .nav-links.open .nav-dropdown-menu { display: none !important; }
}

/* Small version chip */
.ver {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--primary-light);
  vertical-align: middle;
  white-space: nowrap;
}
.ver.green { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: var(--green-light); }
.ver.pink { background: rgba(236,72,153,.1); border-color: rgba(236,72,153,.25); color: var(--pink-light); }
.ver.amber { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); color: var(--amber-light); }

/* Install block */
.install-wrap { max-width: 900px; margin: 0 auto; }
.install-wrap .tab-nav { overflow-x: auto; scrollbar-width: none; }
.install-wrap .tab-nav::-webkit-scrollbar { display: none; }
.install-wrap .tab-btn { white-space: nowrap; }
.install-wrap .code-block { white-space: pre-wrap; word-break: break-all; }
.tab-panel .install-notes {
  padding: 1rem 1.75rem 1.5rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.install-notes ul { list-style: none; display: grid; gap: 0.4rem; }
.install-notes li { position: relative; padding-left: 1.3rem; }
.install-notes li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.install-notes a { color: var(--accent-light); }
.install-notes code { font-size: 0.8em; }

.install-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  counter-reset: istep;
}
.install-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem;
  counter-increment: istep;
  position: relative;
}
.install-step::before {
  content: counter(istep);
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--glow-primary-strong);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}
.install-step h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.install-step p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }

/* "What you get" cards with a screenshot on top */
.get-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.get-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.get-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.get-card .shot {
  aspect-ratio: 16 / 10;
  background: var(--bg-code);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.get-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; cursor: zoom-in; }
.get-card .body { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.get-card h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.get-card p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.65; }
.get-card code { font-size: 0.78em; }
.get-card .comp-links { margin-top: auto; padding-top: 0.4rem; }

/* App strip: small cards for each app */
.app-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.app-chip {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.app-chip:hover { border-color: rgba(16,185,129,.35); background: var(--bg-card-hover); color: var(--text); }
.app-chip strong { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: 0.95rem; }
.app-chip span.where { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--green-light); margin: 0.25rem 0 0.35rem; }
.app-chip p { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.55; }

/* Persona cards */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.persona-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
}
.persona-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--persona, var(--gradient-brand));
  opacity: .8;
}
.persona-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-3px); color: var(--text); }
.persona-card .p-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
}
.persona-card h3 { font-size: 1.15rem; }
.persona-card .p-who { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.persona-card ul { list-style: none; display: grid; gap: .35rem; font-size: .85rem; color: var(--text-secondary); }
.persona-card li::before { content: '→ '; color: var(--text-muted); }
.persona-card .p-go { margin-top: auto; font-weight: 600; font-size: .88rem; color: var(--primary-light); }
.persona-card.user { --persona: linear-gradient(90deg, #10b981, #06b6d4); }
.persona-card.creator { --persona: linear-gradient(90deg, #ec4899, #f59e0b); }
.persona-card.dev { --persona: linear-gradient(90deg, #6366f1, #06b6d4); }
.persona-card.arch { --persona: linear-gradient(90deg, #06b6d4, #3b82f6); }
.persona-card.research { --persona: linear-gradient(90deg, #f59e0b, #10b981); }
.persona-card.ops { --persona: linear-gradient(90deg, #818cf8, #ec4899); }

/* Callouts */
.callout {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(6,182,212,.25);
  background: rgba(6,182,212,.06);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin: var(--space-lg) 0;
}
.callout strong { color: var(--text); }
.callout.warn { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.06); }
.callout.ok { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.06); }
.callout .c-icon { flex: 0 0 auto; margin-top: 0.15rem; }
.callout a { color: var(--accent-light); }
.callout code { font-size: .82em; }

/* Journey pages: "your first hour" */
.journey { max-width: 900px; margin: 0 auto; display: grid; gap: var(--space-lg); counter-reset: jstep; }
.j-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.1rem;
  counter-increment: jstep;
}
.j-step::before {
  content: counter(jstep);
  display: grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 1px solid rgba(99,102,241,.35);
  box-shadow: 0 0 20px var(--glow-primary);
  color: var(--primary-light);
  font-weight: 800;
}
.j-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  min-width: 0;
}
.j-body h3 { font-size: 1.08rem; margin-bottom: .35rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.j-body .j-time { font-size: .72rem; font-weight: 600; color: var(--text-muted); font-family: var(--mono); }
.j-body p, .j-body li { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.7; }
.j-body ul, .j-body ol { padding-left: 1.2rem; margin: .4rem 0; display: grid; gap: .25rem; }
.j-body .code-block { margin: .8rem 0 .2rem; white-space: pre-wrap; word-break: break-word; }
.j-body a { color: var(--accent-light); }
.j-body img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin-top: .8rem; cursor: zoom-in; }

.try-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.try-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.try-card .t-num { font-family: var(--mono); font-size: .72rem; color: var(--accent-light); letter-spacing: .1em; }
.try-card h3 { font-size: 1.05rem; }
.try-card p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.65; }
.try-card .code-block { margin: .3rem 0 0; font-size: .74rem; padding: calc(2.4rem + .5rem) 1rem .9rem; white-space: pre-wrap; word-break: break-word; }
.try-card a { color: var(--accent-light); }

.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-md); }
.next-link {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--duration) var(--ease);
}
.next-link:hover { border-color: rgba(99,102,241,.4); color: var(--text); }
.next-link strong { display: block; font-size: .92rem; }
.next-link span { color: var(--text-secondary); font-size: .8rem; line-height: 1.5; }

/* Persona switcher shown under the hero of each journey page */
.persona-switch { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: var(--space-lg); }
.persona-switch a {
  padding: .35rem .9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 500;
}
.persona-switch a:hover { color: var(--text); border-color: var(--border-hover); }
.persona-switch a[aria-current="page"] { color: #fff; background: rgba(99,102,241,.25); border-color: rgba(99,102,241,.4); }

/* Plain data tables on content pages */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.data-table th { color: var(--text); border-bottom: 2px solid var(--border); font-weight: 600; }
.data-table td { color: var(--text-secondary); }
.data-table code { font-size: .8em; }
.data-table a { color: var(--accent-light); }
.table-wrap { overflow-x: auto; }

/* Screenshot figure */
.figure { margin: 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-lg); cursor: zoom-in; }
.figure figcaption { color: var(--text-muted); font-size: .8rem; margin-top: .6rem; text-align: center; }

/* Release timeline reuses the roadmap styles; tighten the text */
.roadmap-content p code { font-size: .8em; }

@media (max-width: 1024px) {
  .get-grid, .persona-grid, .try-grid { grid-template-columns: 1fr 1fr; }
  .install-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .get-grid, .persona-grid, .try-grid, .install-steps { grid-template-columns: 1fr; }
  .j-step { grid-template-columns: 2.2rem 1fr; gap: .7rem; }
  .j-step::before { width: 2.1rem; height: 2.1rem; font-size: .85rem; }
  .j-body { padding: 1rem; }
  .tab-panel .install-notes { padding: 1rem 1.1rem 1.25rem; }
  .tab-btn { padding: .55rem .85rem; }
  .tab-nav { padding-left: 4.4rem; }
}

/* Cubes: seven apps in the top row; the layer table replaces them on phones */
.iso-grid { width: calc(7 * 90px); }
@media (max-width: 760px) { .cubes-container { display: none; } }

/* Grid children must be allowed to shrink below their content width */
.showcase-grid > *, .modes-grid > *, .components-grid > *, .get-grid > *, .try-grid > *, .persona-grid > * { min-width: 0; }
.hero-inner { max-width: min(900px, 100%); padding-inline: 0; }
@media (max-width: 768px) { .hero-inner { padding-inline: 0.25rem; } }
/* Long inline paths and commands wrap instead of widening the page */
:not(pre) > code { overflow-wrap: anywhere; white-space: normal; }
.j-body, .install-step, .try-card, .mode-card, .comp-card, .callout { overflow-wrap: break-word; }
@media (max-width: 480px) { .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); overflow-wrap: anywhere; } }
.app-strip { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .app-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .app-strip { grid-template-columns: 1fr; } }
.hero-code.wrap pre, .hero-code.wrap code { white-space: pre-wrap; word-break: break-word; }
.j-body .code-block pre, .j-body .code-block code,
.try-card .code-block pre, .try-card .code-block code,
.install-wrap .code-block pre, .install-wrap .code-block code { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .hero-inner { padding-inline: 1rem; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero-actions .btn { width: auto; max-width: none; padding: 0.6rem 1.1rem; }
  .hero-actions .btn-primary { flex-basis: 100%; max-width: 300px; }
}
.data-table.optout td:last-child code { white-space: nowrap; overflow-wrap: normal; }
.recs-table td, .recs-table th { min-width: 9rem; font-size: .8rem; } .recs-table td code { white-space: normal; }
.recs-why summary { cursor: pointer; color: var(--text-muted); font-size: .8rem; }
.recs-why summary:hover { color: var(--text-secondary); }
.recs-why small { display: block; color: var(--text-muted); margin-top: .3rem; line-height: 1.5; }
.recs-table td { vertical-align: top; }

/* ═══════════════════════════════════════════════════════════════════════════
   SITE RETHINK 2026-09-29 — layer table on phones, "where it fits", runtime
   diagram, continuity frames, multimodal artifacts, reserved footnote
   ═══════════════════════════════════════════════════════════════════════════ */

/* The cube diagram needs width; phones get the layer table instead */
.layer-table { display: none; }
@media (max-width: 760px) { .layer-table { display: block; margin-top: var(--space-lg); } }
.reserved-note { color: var(--text-muted); font-size: .82rem; text-align: center; margin-top: var(--space-lg); line-height: 1.6; }
.reserved-note code { font-size: .78rem; }

/* Where it fits: three layers */
.fit-layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.fit-layer { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.fit-layer .fit-num { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.fit-layer h3 { font-size: 1.1rem; margin: .4rem 0 .5rem; }
.fit-layer p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.65; }
.fit-layer .fit-pkgs { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.fit-layer.l1 .fit-num { color: var(--primary-light); }
.fit-layer.l2 .fit-num { color: var(--accent-light); }
.fit-layer.l3 .fit-num { color: var(--green-light); }
.fit-compare { margin-top: var(--space-xl); }
@media (max-width: 900px) { .fit-layers { grid-template-columns: 1fr; } }

/* Runtime / gateway / thin-clients diagram (inline SVG, CSS keyframes) */
.arch-flow { margin-top: var(--space-2xl); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-xl); align-items: center; }
.arch-flow svg { width: 100%; height: auto; display: block; }
.arch-flow .af-box { fill: rgba(18, 18, 30, .92); stroke-width: 1.5; }
.arch-flow .af-title { font: 700 15px var(--font, Inter, sans-serif); fill: var(--text); }
.arch-flow .af-sub { font: 400 11.5px var(--font, Inter, sans-serif); fill: var(--text-secondary); }
.arch-flow .af-tag { font: 600 10px var(--mono, monospace); letter-spacing: .08em; }
.arch-flow .af-line { fill: none; stroke-width: 2; stroke-dasharray: 5 9; }
.arch-flow .af-down { animation: af-flow 1.6s linear infinite; }
.arch-flow .af-up { animation: af-flow-up 1.6s linear infinite; }
.arch-flow .af-ledger rect { animation: af-append 4.8s ease-in-out infinite; opacity: .25; }
.arch-flow .af-ledger rect:nth-child(2) { animation-delay: .8s; }
.arch-flow .af-ledger rect:nth-child(3) { animation-delay: 1.6s; }
.arch-flow .af-ledger rect:nth-child(4) { animation-delay: 2.4s; }
.arch-flow .af-ledger rect:nth-child(5) { animation-delay: 3.2s; }
@keyframes af-flow { to { stroke-dashoffset: -28; } }
@keyframes af-flow-up { to { stroke-dashoffset: 28; } }
@keyframes af-append { 0%, 100% { opacity: .25; } 15%, 45% { opacity: 1; } }
.arch-legend { display: grid; gap: .9rem; }
.arch-legend div { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.arch-legend h4 { font-size: .95rem; margin-bottom: .25rem; }
.arch-legend p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }
.arch-legend .k-rt { border-left: 3px solid #6366f1; }
.arch-legend .k-gw { border-left: 3px solid #06b6d4; }
.arch-legend .k-cl { border-left: 3px solid #10b981; }
@media (max-width: 900px) { .arch-flow { grid-template-columns: 1fr; } }

/* Continuity: the same run in three device frames */
.devices { display: grid; grid-template-columns: 1.3fr .7fr 1.3fr; gap: var(--space-lg); align-items: end; margin-top: var(--space-xl); }
.device { background: var(--bg-card-solid, #12121e); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.device.phone { border-radius: 26px; padding-top: .4rem; }
.device .d-bar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border-bottom: 1px solid var(--border); font-size: .72rem; color: var(--text-muted); font-family: var(--mono); }
.device .d-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.14); display: inline-block; }
.device .d-body { padding: .9rem; display: grid; gap: .55rem; min-height: 12.5rem; align-content: start; font-size: .8rem; line-height: 1.5; }
.device.term .d-body { font-family: var(--mono); font-size: .72rem; background: #0d0d16; }
.device .msg { padding: .45rem .7rem; border-radius: 10px; max-width: 92%; }
.device .msg.u { justify-self: end; background: rgba(99,102,241,.22); color: var(--text); }
.device .msg.a { background: rgba(255,255,255,.05); color: var(--text-secondary); }
.device.term .msg { border-radius: 0; padding: 0; background: none; max-width: 100%; justify-self: start; }
.device.term .msg.u { color: #a5b4fc; }
.device.term .msg.u::before { content: '> '; color: var(--text-muted); }
.device .d-caption { padding: .6rem .8rem .8rem; font-size: .75rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.device .d-caption strong { color: var(--text); font-weight: 600; }
.devices .m1, .devices .m2, .devices .m3, .devices .m4 { opacity: 0; animation: dev-show 12s ease-out infinite; }
.devices .m2 { animation-delay: 2.5s; }
.devices .m3 { animation-delay: 5s; }
.devices .m4 { animation-delay: 7.5s; }
@keyframes dev-show { 0% { opacity: 0; transform: translateY(6px); } 4%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (max-width: 900px) { .devices { grid-template-columns: 1fr; } .device .d-body { min-height: 0; } }

/* Multimodal artifacts next to the code */
.mm-artifacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-top: var(--space-xl); }
.mm-artifact { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.mm-artifact img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; cursor: zoom-in; }
.mm-artifact .a-body { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .45rem; }
.mm-artifact .a-kind { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pink-light); }
.mm-artifact p { color: var(--text-secondary); font-size: .82rem; line-height: 1.55; }
.mm-artifact audio { width: 100%; }
.mm-artifact .a-audio { aspect-ratio: 16 / 10; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(236,72,153,.18), transparent 70%), var(--bg-code); font-size: 2.4rem; color: var(--pink-light); }
@media (max-width: 900px) { .mm-artifacts { grid-template-columns: 1fr; } }
.defaults-note { max-width: 860px; margin: 0 auto var(--space-lg); }

@media (prefers-reduced-motion: reduce) {
  .arch-flow .af-down, .arch-flow .af-up, .arch-flow .af-ledger rect { animation: none; opacity: 1; }
  .devices .m1, .devices .m2, .devices .m3, .devices .m4 { animation: none; opacity: 1; }
}
#top .hero-code { max-width: 660px; }
.hero-code pre { overflow-x: auto; }
/* the cube field extends left of the grid box (negative columns); centre cubes + layer labels */
.iso-grid { left: 225px; }
/* home hero: keep the three-line tagline on three lines at phone width (Generate everything. is the widest line) */
@media (max-width: 480px) { #top h1 { font-size: clamp(1.6rem, 7.4vw, 2.5rem); overflow-wrap: normal; } }

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2 (2026-09-29) — compact rhythm, quick start, terminal blocks, icon copy
   buttons, modality hub, typed component cards, the ledger section
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tighter vertical rhythm everywhere */
section { padding: 4.5rem var(--space-xl); }
.section-header { margin-bottom: 2.5rem; }
.section-title { margin-bottom: .75rem; }
@media (max-width: 768px) {
  section { padding: 3rem var(--space-lg); }
  .section-header { margin-bottom: 1.75rem; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Compact hero */
.hero { min-height: auto; padding: 7.25rem var(--space-xl) 3.25rem; }
.hero .hero-badge { margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: 1rem; }
.hero .hero-sub { margin-bottom: 1.5rem; max-width: 760px; line-height: 1.65; }
.hero .hero-sub .io { color: var(--text-secondary); display: block; margin-top: .35rem; font-size: .95em; }
.hero .hero-sub .io b { color: var(--text); font-weight: 600; }
.hero .hero-actions { margin-bottom: 1.25rem; gap: .6rem; }
.hero .hero-actions .btn { padding: .6rem 1.15rem; font-size: .9rem; }
@media (max-width: 768px) { .hero { padding: 5.5rem var(--space-md) 2.5rem; } }

/* Quick start: segmented control over one terminal line */
.qs { max-width: 660px; margin: 0 auto 1rem; text-align: left; animation: fadeSlideDown .8s .5s var(--ease-out) both; }
.qs-tabs {
  position: relative; display: inline-flex; gap: 2px; padding: 3px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: .5rem;
}
.qs-tab {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  font: 500 .8rem var(--font); color: var(--text-secondary);
  padding: .38rem .8rem; border-radius: 7px; transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.qs-tab:hover { color: var(--text); }
.qs-tab[aria-selected="true"] { color: #fff; background: rgba(99,102,241,.28); box-shadow: 0 0 0 1px rgba(129,140,248,.35) inset; }
.qs-term {
  position: relative; display: flex; align-items: center; gap: .65rem;
  background: #000; border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: .8rem 3.2rem .8rem 1rem; font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(99,102,241,.08);
}
.qs-term::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: 10px 10px 0 0; background: var(--gradient-brand); opacity: .55; }
.qs-prompt { color: var(--green-light); user-select: none; flex: 0 0 auto; }
.qs-cmd { color: #e6e6ef; background: none; border: 0; padding: 0; font-size: inherit; white-space: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.qs-cmd::-webkit-scrollbar { display: none; }
.qs-term .copy-btn { top: 50%; right: .5rem; transform: translateY(-50%); }
.qs-note { margin-top: .45rem; font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.qs-note a { color: var(--accent-light); }
@media (max-width: 560px) {
  .qs-tabs { display: flex; width: 100%; }
  .qs-tab { flex: 1; padding: .38rem .3rem; font-size: .76rem; }
  .qs-cmd { white-space: pre-wrap; word-break: break-all; }
}

/* Compact hero code sample */
#top .hero-code { background: #0b0b10; padding: 1rem 1.25rem; line-height: 1.6; font-size: .78rem; max-width: 660px; margin-top: .75rem; }
#top .hero-code .copy-btn { top: .5rem; right: .5rem; }

/* Code blocks: near-black editor, pure-black terminal for shell */
.code-block { background: #0b0b10; border-color: rgba(255,255,255,.08); }
.code-block::before { background-color: #111118; }
.code-block.term { background: #000; }
.code-block.term::before {
  background:
    radial-gradient(circle 5px at 18px 50%, #ff5f56 4.5px, transparent 5px),
    radial-gradient(circle 5px at 38px 50%, #ffbd2e 4.5px, transparent 5px),
    radial-gradient(circle 5px at 58px 50%, #27ca3f 4.5px, transparent 5px);
  background-color: #0a0a0a;
}
.code-block.term::after { background: linear-gradient(to bottom, rgba(16,185,129,.25), rgba(6,182,212,.08), transparent); }
.code-block.term code { color: #e6e6ef; }

/* Copy button: an icon with a brief "Copied" state */
.copy-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  top: .3rem; right: .45rem; font-size: 0; line-height: 0;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 7px;
  color: var(--text-secondary);
}
.copy-btn:hover { color: var(--text); background: rgba(255,255,255,.12); }
.copy-btn.copied { color: var(--green-light); border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.12); }
.copy-btn .copy-tip {
  position: absolute; right: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  font: 500 .68rem var(--font); line-height: 1; color: var(--green-light); white-space: nowrap;
  background: rgba(10,10,16,.95); border: 1px solid rgba(16,185,129,.35); border-radius: 5px; padding: .28rem .45rem;
  opacity: 0; pointer-events: none; transition: opacity 150ms ease;
}
.copy-btn.copied .copy-tip { opacity: 1; }

/* Stats bar: numbers with the modalities named */
.stats-bar { padding: 1.75rem var(--space-xl) 2rem; gap: clamp(1.5rem, 4vw, 3.25rem); }
.stat-sub { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; max-width: 15rem; line-height: 1.45; }
.stat-num { font-size: clamp(1.9rem, 1.6rem + 1.6vw, 2.6rem); }

/* Modality hub: inputs, one generate(), outputs */
.mm-hub { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1.15fr); gap: 1.25rem; align-items: center; }
.mm-col { display: grid; gap: .5rem; }
.mm-col-title { font: 600 .68rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .15rem; }
.mm-item {
  position: relative; display: grid; grid-template-columns: 30px 1fr; gap: .7rem; align-items: start;
  padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--mm-tint, rgba(99,102,241,.10)), rgba(0,0,0,0) 65%), var(--bg-card);
}
.mm-item .mm-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.04); color: var(--mm-c, var(--primary-light)); }
.mm-item h4 { font-size: .86rem; font-weight: 600; line-height: 1.3; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.mm-item h4 small { font: 500 .66rem var(--mono); color: var(--mm-c, var(--primary-light)); letter-spacing: .02em; }
.mm-item p { color: var(--text-secondary); font-size: .76rem; line-height: 1.45; margin-top: .1rem; }
.mm-col.in .mm-item { --mm-tint: rgba(6,182,212,.10); --mm-c: var(--accent-light); }
.mm-col.out .mm-item { --mm-tint: rgba(236,72,153,.11); --mm-c: var(--pink-light); }
.mm-col.out .mm-item.text-out { --mm-tint: rgba(99,102,241,.10); --mm-c: var(--primary-light); }
.mm-core { position: relative; display: grid; justify-items: center; gap: .6rem; padding: 0 .25rem; }
.mm-core-box {
  position: relative; padding: 1.1rem 1.2rem; border-radius: 14px; text-align: center; min-width: 13rem;
  background: #07070c; border: 1px solid rgba(129,140,248,.35);
  box-shadow: 0 0 0 1px rgba(99,102,241,.1) inset, 0 0 60px rgba(99,102,241,.18);
}
.mm-core-box::before { content: ''; position: absolute; inset: -1px; border-radius: 14px; padding: 1px; background: var(--gradient-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.mm-core-box code { display: block; font: 600 1.02rem var(--mono); color: #fff; background: none; border: 0; padding: 0; }
.mm-core-box span { display: block; margin-top: .35rem; font-size: .72rem; color: var(--text-muted); }
.mm-core-box .mm-core-lib { font: 600 .66rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--primary-light); margin: 0 0 .45rem; }
.mm-wire { width: 64px; height: 2px; background: linear-gradient(90deg, rgba(6,182,212,.1), rgba(129,140,248,.7), rgba(236,72,153,.1)); position: relative; overflow: hidden; border-radius: 2px; }
.mm-wire::after { content: ''; position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: mm-pulse 2.4s linear infinite; }
.mm-core .mm-wire.l { position: absolute; right: 100%; top: 50%; }
.mm-core .mm-wire.r { position: absolute; left: 100%; top: 50%; }
@keyframes mm-pulse { to { left: 100%; } }
@media (max-width: 1000px) {
  .mm-hub { grid-template-columns: 1fr; }
  .mm-core .mm-wire { display: none; }
  .mm-core { order: -1; }
}
.mm-foot { margin-top: 1rem; text-align: center; color: var(--text-muted); font-size: .82rem; line-height: 1.6; max-width: 820px; margin-inline: auto; }

/* Code tabs with the real artifacts beside them */
.mm-proof { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 2.25rem; align-items: start; }
.mm-proof .code-tabs { margin: 0; }
.mm-proof .tab-btn { font-size: .78rem; }
.mm-proof-side { display: grid; gap: .75rem; }
.mm-proof-side h3 { font-size: .72rem; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.mm-art { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.mm-art img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; cursor: zoom-in; }
.mm-art .a-body { padding: .7rem .85rem .8rem; display: grid; gap: .35rem; }
.mm-art .a-kind { font: 600 .64rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--pink-light); display: flex; justify-content: space-between; gap: .5rem; }
.mm-art .a-kind em { font-style: normal; color: var(--text-muted); letter-spacing: 0; text-transform: none; }
.mm-art p { color: var(--text-secondary); font-size: .76rem; line-height: 1.45; }
.mm-art p q { color: var(--text); }
.mm-art audio { width: 100%; height: 34px; }
@media (max-width: 1000px) { .mm-proof { grid-template-columns: 1fr; } }

/* Components: grouped by layer, typed background gradient (top-left colour to black) */
.comp-group { grid-column: 1 / -1; display: flex; align-items: baseline; gap: .75rem; margin: 1rem 0 -.25rem; }
.comp-group:first-child { margin-top: 0; }
.comp-group h3 { font: 700 .72rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.comp-group p { font-size: .8rem; color: var(--text-muted); }
.components-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.comp-card { padding: 1.35rem 1.4rem; }
.comp-card::after { background: linear-gradient(135deg, var(--card-tint, rgba(255,255,255,.03)), rgba(0,0,0,0) 60%), var(--bg-card-solid); }
.comp-card.t-app { --card-tint: rgba(16,185,129,.10); }
.comp-card.t-plugin { --card-tint: rgba(236,72,153,.10); }
.comp-card.t-knowledge { --card-tint: rgba(245,158,11,.10); }
.comp-card.t-foundation { --card-tint: rgba(99,102,241,.12); }
.comp-card.t-compose { --card-tint: rgba(139,92,246,.11); }
.comp-card.t-control { --card-tint: rgba(6,182,212,.11); }
.comp-card.t-toolkit { --card-tint: rgba(161,161,181,.09); }
.comp-card .sub-list { margin-top: .6rem; display: grid; gap: .3rem; list-style: none; }
.comp-card .sub-list li { font-size: .78rem; color: var(--text-secondary); line-height: 1.5; padding-left: .9rem; position: relative; }
.comp-card .sub-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }
.comp-card .sub-list code { font-size: .74rem; }
.comp-tag.composition { background: rgba(139,92,246,.13); color: #c4b5fd; border-color: rgba(139,92,246,.22); }
.comp-tag.control { background: rgba(6,182,212,.12); color: var(--accent-light); border: 1px solid rgba(6,182,212,.18); }
.comp-tag.toolkit { background: rgba(161,161,181,.10); color: #c4c4d4; border: 1px solid rgba(161,161,181,.2); }

/* Cubes: five layer rows; composition violet, toolkits grey */
.iso-grid { height: calc(4 * 110px + 80px); }
.cube-wrap[data-layer="compose"] { --c-top:#7c3aed; --c-left:#5b21b6; --c-right:#8b5cf6; }
.cube-wrap[data-layer="toolkit"] { --c-top:#6b6b80; --c-left:#4a4a5c; --c-right:#8a8aa0; }
.cube-wrap:focus-visible .cube-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* The ledger is the run */
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; }
.ledger-points { display: grid; gap: .75rem; margin-top: 1.25rem; }
.ledger-point { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; }
.ledger-point .lp-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(245,158,11,.12); color: var(--amber-light); border: 1px solid rgba(245,158,11,.25); }
.ledger-point h4 { font-size: .92rem; margin-bottom: .1rem; }
.ledger-point p { color: var(--text-secondary); font-size: .84rem; line-height: 1.55; }
.ledger-lead { font-size: 1.02rem; color: var(--text); line-height: 1.65; }
.ledger-lead em { font-style: normal; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }
.ledger-viz { background: #000; border: 1px solid rgba(245,158,11,.22); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 60px rgba(0,0,0,.5), 0 0 60px rgba(245,158,11,.06); }
.ledger-viz .lv-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .85rem; border-bottom: 1px solid rgba(255,255,255,.08); font: 500 .7rem var(--mono); color: var(--text-muted); }
.ledger-viz .lv-bar b { color: var(--amber-light); font-weight: 600; }
.ledger-viz .lv-live { display: inline-flex; align-items: center; gap: .35rem; color: var(--green-light); }
.ledger-viz .lv-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,.7); }
.ledger-rows { list-style: none; padding: .5rem 0; font: .72rem/1.5 var(--mono); }
.ledger-rows li { display: grid; grid-template-columns: 2.2rem 5.6rem 1fr auto; gap: .6rem; padding: .32rem .85rem; color: var(--text-secondary); border-left: 2px solid transparent; }
.ledger-rows li .n { color: var(--text-muted); }
.ledger-rows li .k { color: var(--accent-light); }
.ledger-rows li .k.wait { color: var(--amber-light); }
.ledger-rows li .k.llm { color: #c4b5fd; }
.ledger-rows li .k.tool { color: var(--pink-light); }
.ledger-rows li .s { color: var(--green-light); }
.ledger-rows li .s.w { color: var(--amber-light); }
.ledger-rows li .d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-rows li.cursor { border-left-color: var(--amber); background: rgba(245,158,11,.06); }
.ledger-viz .lv-clients { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.08); }
.ledger-viz .lv-clients div { padding: .55rem .7rem; font-size: .7rem; color: var(--text-muted); border-right: 1px solid rgba(255,255,255,.06); line-height: 1.4; }
.ledger-viz .lv-clients div:last-child { border-right: 0; }
.ledger-viz .lv-clients b { display: block; color: var(--text); font-weight: 600; font-size: .74rem; }
.ledger-rows li { animation: lv-in 9s ease-out infinite; opacity: 0; }
.ledger-rows li:nth-child(1) { animation-delay: 0s; }
.ledger-rows li:nth-child(2) { animation-delay: .7s; }
.ledger-rows li:nth-child(3) { animation-delay: 1.4s; }
.ledger-rows li:nth-child(4) { animation-delay: 2.1s; }
.ledger-rows li:nth-child(5) { animation-delay: 2.8s; }
.ledger-rows li:nth-child(6) { animation-delay: 3.5s; }
.ledger-rows li:nth-child(7) { animation-delay: 4.2s; }
.ledger-rows li:nth-child(8) { animation-delay: 4.9s; }
@keyframes lv-in { 0% { opacity: 0; transform: translateX(-6px); } 5%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.ledger-routes { margin-top: 1rem; }
@media (max-width: 1000px) { .ledger-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ledger-rows li { grid-template-columns: 1.6rem 4.6rem 1fr; } .ledger-rows li .s { display: none; } }

/* Install: the four steps as one compact row */
.install-steps.compact { margin-top: 1rem; gap: .6rem; }
.install-steps.compact .install-step { padding: .8rem .9rem .85rem; display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: start; }
.install-steps.compact .install-step::before { width: 1.4rem; height: 1.4rem; font-size: .72rem; margin: 0; grid-row: span 2; }
.install-steps.compact .install-step h4 { font-size: .86rem; margin: 0 0 .15rem; }
.install-steps.compact .install-step p { font-size: .78rem; line-height: 1.5; }
.install-wrap .code-tabs { margin-top: 0; }
#getting-started .section-header { margin-bottom: 1.5rem; }

/* Pending slots render nothing */
.pending-slot:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .mm-wire::after, .ledger-rows li { animation: none; opacity: 1; }
  .qs { animation: none; }
}
.code-tabs { background: #0b0b10; }
.tab-nav { background-color: #111118; }
.code-tabs:has(.tab-panel.active .code-block.term) { background: #000; }
/* The markup's line breaks around <pre> must not render as blank lines */
.code-block:has(> pre), .hero-code:has(> pre) { white-space: normal; }
.tab-panel .code-block { padding-top: 1.1rem; padding-bottom: 1.1rem; }
#top .hero-code, .qs { max-width: 800px; }
.mm-proof .code-block { font-size: .76rem; }
.ledger-grid { align-items: start; }
.ledger-rows li { grid-template-columns: 2rem 6.6rem 1fr auto; }
.ledger-routes pre, .ledger-routes code { white-space: pre-wrap; word-break: break-all; }
.comp-card.t-control { grid-column: span 2; }
.comp-card.t-control .sub-list { grid-template-columns: 1fr 1fr; gap: .3rem 1.2rem; }
@media (max-width: 700px) { .comp-card.t-control { grid-column: auto; } .comp-card.t-control .sub-list { grid-template-columns: 1fr; } }
.mm-proof .tab-nav { overflow-x: auto; scrollbar-width: none; }
.mm-proof .tab-nav::-webkit-scrollbar { display: none; }
.mm-proof .tab-btn { white-space: nowrap; }
#top .hero-code { padding-right: 2.75rem; }
@media (max-width: 560px) { .qs-term { align-items: flex-start; } }
.qs, #top .hero-code { max-width: 840px; }
.qs-term { font-size: .78rem; }
/* Short inline code stays whole; only long tokens may break on phones */
li code, p code, td code, .mm-foot code { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 560px) { li code.long, p code.long, td code.long { white-space: normal; overflow-wrap: anywhere; } }
/* Flow: four steps in one row, two by two below 1024 px */
.flow-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .flow-steps { grid-template-columns: 1fr; } }
/* Code blocks scroll instead of clipping; keep text clear of the icon button */
.code-block pre { overflow-x: auto; padding-right: 2.25rem; }
/* Package bar: all entries on one line at 1440 px, centred wrap below 1200 px, scroll with edge fade on phones */
.pkg-nav-inner { max-width: 1400px; gap: 2px; padding: 7px 16px; justify-content: center; }
.pkg-nav-link { padding: 5px 9px; font-size: .76rem; white-space: nowrap; }
@media (max-width: 1200px) { .pkg-nav-inner { flex-wrap: wrap; white-space: normal; } }
@media (max-width: 640px) {
  .pkg-nav-inner { flex-wrap: nowrap; justify-content: flex-start; white-space: nowrap; }
  .pkg-nav { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%); }
}
/* Principles: a class, so the phone rule applies */
.principles-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* Lightbox close button */
.lightbox-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 1rem); right: 1rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(10,10,16,.85); color: #fff; cursor: pointer; }
.lightbox-close:hover { background: rgba(40,40,56,.95); }
/* Package bar and nav: topic pages (Consoles, Automations) read as topics, not packages */
.pkg-nav-divider { align-self: center; width: 1px; height: 18px; margin: 0 6px; background: var(--border-hover); flex: 0 0 auto; }
.pkg-nav-link.topic, .nav-dropdown-menu a.topic { font-style: italic; color: var(--text-muted); opacity: .85; }
.pkg-nav-link.topic::before, .nav-dropdown-menu a.topic::before { content: '\2192\00a0'; font-style: normal; opacity: .6; }
.pkg-nav-link.topic.active { opacity: 1; color: var(--primary-light); }
.code-sub { font: 600 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding: .8rem 1.1rem .1rem; background: #000; }
/* Profile cards: badges on one baseline; "Light +" marks the inclusive profiles */
.profile-cards .mode-card { display: flex; flex-direction: column; }
.profile-cards .mode-card .mode-tags { margin-top: auto; padding-top: 1rem; }
.profile-cards .mode-icon { height: 40px; display: grid; place-items: center; }
.mode-tag.light-plus { color: var(--accent-light); border-color: rgba(6,182,212,.35); background: rgba(6,182,212,.08); }
/* Entry points: the two generate tabs */
.gen-tabs { margin-top: 2.5rem; }
.gen-tabs .gen-title { font-size: 1.15rem; text-align: center; margin-bottom: .4rem; }
.gen-tabs .gen-sub { color: var(--text-secondary); font-size: .9rem; text-align: center; max-width: 780px; margin: 0 auto 1rem; line-height: 1.6; }
.gen-tabs .tab-nav { overflow-x: auto; scrollbar-width: none; }
.gen-tabs .tab-btn { white-space: nowrap; }
.mm-proof-side h3 a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Before/after pair inside a carousel slide */
.c3-slide > .c3-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #000; aspect-ratio: var(--c3-ratio); }
.c3-slide > .c3-pair img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Video tabs: no terminal chrome needed around media */
.video-tabs { background: transparent; border: 0; box-shadow: none; }
.video-tabs .tab-nav { background: none; padding-left: 0; }
.video-tabs .tab-panel { padding-top: 1rem; }
.i2v-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.i2v-pair figure { margin: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.i2v-pair img, .i2v-pair video { display: block; width: 100%; height: auto; aspect-ratio: 832 / 480; object-fit: cover; background: #000; }
.i2v-pair figcaption { padding: .7rem 1rem .9rem; font-size: .8rem; color: var(--text-secondary); line-height: 1.55; }
@media (max-width: 800px) { .i2v-pair { grid-template-columns: 1fr; } }
.qs-steps { margin-top: .9rem; grid-template-columns: repeat(4, minmax(0,1fr)); }
.qs-steps .install-step { background: rgba(10,10,18,.6); }
@media (max-width: 900px) { .qs-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .qs-steps { grid-template-columns: 1fr; } }
/* Entry-card bullets flow as one inline sentence (a flex li split text and code chips into columns) */
.entry-features li { display: block; position: relative; padding-left: calc(6px + 0.65rem); }
.entry-features li::before { position: absolute; left: 0; top: 0; }
.install-note-small { color: var(--text-muted); font-size: .8rem; margin-top: .5rem; line-height: 1.5; }
/* Profile cards: icon, title, text and badges share rows across the three cards (subgrid),
   so every badge block starts on the same line whatever its number of rows */
.profile-cards { grid-template-rows: repeat(4, auto); row-gap: 0; }
.profile-cards .mode-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; row-gap: 0; }
.profile-cards .mode-card .mode-tags { margin-top: 0; padding-top: 1rem; align-self: start; }
@media (max-width: 768px) { .profile-cards { grid-template-rows: none; row-gap: var(--space-lg); } .profile-cards .mode-card { grid-row: auto; grid-template-rows: none; } }
.profile-cards { grid-template-rows: repeat(5, auto); }
.profile-cards .mode-card { grid-row: span 5; }
.profile-note { color: var(--text-muted); font-size: .75rem; line-height: 1.5; margin-top: .75rem; }
@media (max-width: 768px) { .profile-cards { grid-template-rows: none; } .profile-cards .mode-card { grid-row: auto; } .profile-note:empty { display: none; } }
.profile-cards .mode-card p.profile-note { color: var(--text-muted); font-size: .75rem; line-height: 1.5; margin-top: .75rem; }
/* Round 5: hero keywords and the per-modality direction strip */
.hero-sub .kw-prod { font-weight: 700; color: #fff; }
.hero .hero-sub .io .kw-mm { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.mm-dir { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .5rem; margin: 1.25rem 0 0; }
.mm-dir li { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .6rem; text-align: center; }
.mm-dir b { display: block; font-size: .82rem; color: var(--text); }
.mm-dir span { display: block; font: 500 .7rem var(--mono); color: var(--accent-light); margin-top: .15rem; }
@media (max-width: 1000px) { .mm-dir { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mm-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gen-schema { max-width: 640px; margin: 0 auto 1rem; }
.mm-dir-note { text-align: center; color: var(--text-muted); font-size: .8rem; margin-top: .6rem; }
/* Chips (round 6): one visual system for card facts — small icon + short label, equal height,
   one row at the bottom of each card. Classes for other pages: .chip-cards (card grid),
   .chip-row (the row), .chip (one fact), .chip-ic (its icon), .chip-accent (the highlighted one). */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; height: 26px; padding: 0 .6rem; border-radius: 7px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.1); color: var(--text-secondary);
  font: 500 .72rem var(--font); line-height: 1; white-space: nowrap; }
.chip code { font-size: .7rem; background: none; border: 0; padding: 0; color: var(--accent-light); }
.chip .chip-ic { flex: 0 0 auto; color: var(--text-muted); }
.chip.chip-accent { color: var(--accent-light); border-color: rgba(6,182,212,.35); background: rgba(6,182,212,.08); }
.chip-cards .mode-card { display: flex; flex-direction: column; }
.chip-cards .mode-card .chip-row { margin-top: auto; padding-top: 1rem; }
.profile-cards .mode-card .chip-row { justify-content: center; padding-top: 1rem; align-self: start; }
#deploy h3.reveal + .modes-grid, #deploy h3.reveal + .chip-cards { margin-top: 0; }
/* Round 6: the printed answer under each generate block; the memory explanation paragraph */
.gen-answer { margin: .9rem 0 0; padding: .7rem 1rem; border-left: 3px solid var(--accent); background: rgba(6,182,212,.06); border-radius: 0 8px 8px 0; color: var(--text-secondary); font-size: .85rem; line-height: 1.6; }
.gen-answer span { font: 600 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-light); margin-right: .4rem; }
.tab-panel .gen-answer { margin: 0 1.1rem 1.1rem; }
.mr-explain { max-width: 820px; margin: 0 auto 2rem; text-align: center; color: var(--text-secondary); line-height: 1.7; }
.showcase-img:has(.vfig) { border: 0; box-shadow: none; background: none; overflow: visible; transform: none; }
.showcase-img:has(.vfig)::before, .showcase-img:has(.vfig)::after { display: none; }
.vfig figcaption { color: var(--text-muted); font-size: .8rem; line-height: 1.5; margin-top: .6rem; }
/* Flow: five step cards (round 7) — one row at desktop, 3 + 2 on tablets, one column on phones */
.flow-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.flow-steps .mode-card { padding: 1.25rem 1.2rem; }
@media (max-width: 1200px) { .flow-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); } .flow-steps .mode-card { grid-column: span 2; } .flow-steps .mode-card:nth-child(n+4) { grid-column: span 3; } }
@media (max-width: 700px) { .flow-steps { grid-template-columns: 1fr; } .flow-steps .mode-card, .flow-steps .mode-card:nth-child(n+4) { grid-column: auto; } }
/* Main navbar: eleven entries stay on one line down to the mobile menu breakpoint */
.nav-links a { white-space: nowrap; }
@media (max-width: 1320px) { .nav-links { gap: .1rem; } .nav-links a { padding-left: .55rem; padding-right: .55rem; font-size: .84rem; } .nav-cta { padding-left: .7rem !important; padding-right: .7rem !important; } }
/* Below 1100 px the eleven entries no longer fit: use the menu button, as on phones */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-brand { font-size: 1.05rem; gap: .6rem; }
  .nav-links.open { display: flex !important; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10,10,18,.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: var(--space-md) var(--space-xl); border-bottom: 1px solid var(--border); gap: var(--space-sm); z-index: var(--z-nav); }
  .nav-links.open a { padding: .6rem 0; font-size: .95rem; }
  .nav-links.open .nav-dropdown-menu { display: none !important; }
}
/* Cube field: scale down between tablet and desktop instead of widening the page */
.cubes-container { overflow-x: clip; }
@media (max-width: 1100px) { .iso-grid { transform: scale(.82); transform-origin: top center; margin-bottom: -90px; } }
@media (max-width: 900px) { .iso-grid { transform: scale(.7); margin-bottom: -150px; } }
/* Package-page heroes: the logo image is centred above the title (img is display:block globally) */
.hero-inner > img { margin-left: auto; margin-right: auto; }
.cmp-detail { display: block; margin-top: .35rem; font-size: .74rem; color: var(--text-muted); line-height: 1.5; }
