/* ============================================================
     NUMBERS AS MACHINES — Generator-Based Numerics Library
     Complete Stylesheet
     ============================================================ */

/* ============================================================
     1. CSS CUSTOM PROPERTIES (Design Tokens)
     ============================================================ */
:root {
  /* Color Palette — Dark technical theme */
  --color-bg-primary: #0a0e1a;
  --color-bg-secondary: #0f1525;
  --color-bg-tertiary: #141c2e;
  --color-bg-card: #111827;
  --color-bg-elevated: #1a2236;
  --color-bg-code: #0d1117;

  --color-accent-primary: #4f9cf9;
  --color-accent-secondary: #7c3aed;
  --color-accent-tertiary: #06b6d4;
  --color-accent-green: #10b981;
  --color-accent-amber: #f59e0b;
  --color-accent-red: #ef4444;
  --color-accent-purple: #a78bfa;

  --color-text-primary: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-accent: #4f9cf9;
  --color-text-code: #7dd3fc;

  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-default: rgba(255, 255, 255, 0.1);
  --color-border-accent: rgba(79, 156, 249, 0.3);

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-blue: 0 0 20px rgba(79, 156, 249, 0.15);
  --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 260px;
  --content-max-width: 780px;
  --layout-max-width: 1280px;
}

/* ============================================================
     2. RESET & BASE STYLES
     ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(79, 156, 249, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul,
ol {
  list-style: none;
}

code,
pre {
  font-family: var(--font-mono);
}

strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

em {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ============================================================
     3. SITE HEADER
     ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: 100;
  transition:
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.site-header.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo-icon {
  font-size: var(--text-xl);
  color: var(--color-accent-primary);
  animation: spin-slow 8s linear infinite;
  display: inline-block;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.header-brand-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Navigation */
.header-nav {
  flex: 1;
}

.header-nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header-nav-link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
  white-space: nowrap;
}

.header-nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.header-nav-link.active {
  color: var(--color-accent-primary);
  background: rgba(79, 156, 249, 0.1);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-left: auto;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-border-accent);
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: var(--radius-full);
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

/* ============================================================
     4. HERO SECTION
     ============================================================ */
.hero-section {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-20));
  padding-bottom: var(--space-20);
  overflow: hidden;
}

/* Animated background grid */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 156, 249, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 156, 249, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(79, 156, 249, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  text-align: center;
}

/* Eyebrow tags */
.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.hero-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  background: rgba(79, 156, 249, 0.1);
  border: 1px solid rgba(79, 156, 249, 0.2);
  border-radius: var(--radius-full);
}

/* Title */
.hero-title {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
  font-weight: var(--font-weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, #e2e8f0 0%, #4f9cf9 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  letter-spacing: 0.01em;
}

.hero-lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 680px;
  margin: 0 auto var(--space-10);
}

/* Hero primitive block */
.hero-primitive-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-10);
  padding: var(--space-5) var(--space-8);
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-glow-blue),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.primitive-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  opacity: 0.8;
}

.primitive-code {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-text-code);
  white-space: pre;
}

/* Hero stats row */
.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

.hero-stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  min-width: 120px;
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.hero-stat-badge:hover {
  border-color: var(--color-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-primary);
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.03em;
}

/* ============================================================
     5. CONTENT LAYOUT (Sidebar + Main)
     ============================================================ */
.content-layout {
  position: relative;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-12);
  align-items: start;
}

/* ============================================================
     6. SIDEBAR TABLE OF CONTENTS
     ============================================================ */
.sidebar-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
  max-height: calc(100vh - var(--header-height) - var(--space-16));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-default) transparent;
}

.sidebar-toc::-webkit-scrollbar {
  width: 4px;
}

.sidebar-toc::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-toc::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-full);
}

.toc-inner {
  padding: var(--space-6);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
}

.toc-heading {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  counter-reset: none;
}

.toc-sublist {
  margin-top: var(--space-1);
  margin-left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.toc-link {
  display: block;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
  line-height: 1.4;
}

.toc-item--level-1 > .toc-link {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.toc-item--level-2 > .toc-link {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.toc-link:hover {
  color: var(--color-accent-primary);
  background: rgba(79, 156, 249, 0.08);
  border-left-color: rgba(79, 156, 249, 0.4);
}

.toc-link.active {
  color: var(--color-accent-primary);
  background: rgba(79, 156, 249, 0.1);
  border-left-color: var(--color-accent-primary);
}

/* Progress bar */
.toc-progress {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
}

.toc-progress-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width var(--transition-base);
}

/* ============================================================
     7. ARTICLE MAIN
     ============================================================ */
.article-main {
  min-width: 0;
  padding-bottom: var(--space-24);
}

.article-body {
  max-width: var(--content-max-width);
}

/* ============================================================
     8. ARTICLE SECTIONS
     ============================================================ */
.article-section {
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.article-section:last-child {
  border-bottom: none;
}

.article-section--closing {
  background: linear-gradient(180deg, transparent, rgba(79, 156, 249, 0.02));
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  border: 1px solid var(--color-border-subtle);
  margin-top: var(--space-8);
}

/* Section header */
.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.section-number {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-mono);
  color: var(--color-accent-primary);
  opacity: 0.6;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* Section body */
.section-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.section-intro {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.section-body p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.key-concept {
  color: var(--color-accent-primary);
  font-weight: var(--font-weight-semibold);
}

/* ============================================================
     9. CALLOUTS
     ============================================================ */
.callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.callout-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  line-height: 1.4;
}

.callout-content {
  flex: 1;
  min-width: 0;
}

.callout-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.callout-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: inherit;
}

/* Callout variants */
.callout--info {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--color-accent-tertiary);
}

.callout--info .callout-title {
  color: var(--color-accent-tertiary);
}
.callout--info .callout-text {
  color: rgba(6, 182, 212, 0.85);
}

.callout--warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--color-accent-amber);
}

.callout--warning .callout-title {
  color: var(--color-accent-amber);
}
.callout--warning .callout-text {
  color: rgba(245, 158, 11, 0.85);
}

.callout--solution {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--color-accent-green);
}

.callout--solution .callout-title {
  color: var(--color-accent-green);
}
.callout--solution .callout-text {
  color: rgba(16, 185, 129, 0.85);
}

.callout--critical {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--color-accent-red);
}

.callout--critical .callout-title {
  color: var(--color-accent-red);
}
.callout--critical .callout-text {
  color: rgba(239, 68, 68, 0.85);
}

.callout--insight {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--color-accent-purple);
}

.callout--insight .callout-title {
  color: var(--color-accent-purple);
}
.callout--insight .callout-text {
  color: rgba(167, 139, 250, 0.85);
}

.callout--caveat {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--color-accent-secondary);
}

.callout--caveat .callout-title {
  color: var(--color-accent-secondary);
}
.callout--caveat .callout-text {
  color: rgba(167, 139, 250, 0.85);
}

/* ============================================================
     10. CODE BLOCKS
     ============================================================ */
.code-figure {
  margin: 0;
}

.code-caption {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  padding-left: var(--space-1);
}

.code-block {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-default) transparent;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 156, 249, 0.3), transparent);
}

.code-block::-webkit-scrollbar {
  height: 4px;
}

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

.code-block::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-full);
}

.code-content {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-code);
  white-space: pre;
  display: block;
}

/* Language-specific tinting */
.code-block--c .code-content {
  color: #a8d8a8;
}

.code-block--llvm .code-content {
  color: #ffd6a5;
}

.code-block--python .code-content {
  color: #b5d5f5;
}

/* Inline code */
.inline-code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-text-code);
  background: rgba(79, 156, 249, 0.1);
  border: 1px solid rgba(79, 156, 249, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}

/* ============================================================
     11. PROPERTIES GRID
     ============================================================ */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.property-card {
  padding: var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.property-card:hover {
  border-color: var(--color-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
}

.property-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--color-accent-primary);
  line-height: 1;
}

.property-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.property-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ============================================================
     12. FEATURE LISTS
     ============================================================ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.feature-check {
  color: var(--color-accent-green);
  font-size: var(--text-base);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* Numbered feature list */
.numbered-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  counter-reset: feature-counter;
}

.numbered-feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  counter-increment: feature-counter;
  position: relative;
  transition: border-color var(--transition-fast);
}

.numbered-feature-item::before {
  content: counter(feature-counter, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-primary);
  opacity: 0.6;
  flex-shrink: 0;
  padding-top: 0.15em;
  min-width: 24px;
}

.numbered-feature-item:hover {
  border-color: var(--color-border-accent);
}

.numbered-feature-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  flex-shrink: 0;
  min-width: 140px;
}

.numbered-feature-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ============================================================
     13. DATA TABLES
     ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-default);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-default) transparent;
}

.table-wrapper::-webkit-scrollbar {
  height: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-full);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table-caption {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-5);
  text-align: left;
  background: var(--color-bg-code);
  border-bottom: 1px solid var(--color-border-subtle);
}

.table-head {
  background: var(--color-bg-elevated);
}

.table-th {
  padding: var(--space-3) var(--space-5);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-default);
  white-space: nowrap;
}

.table-body {
  background: var(--color-bg-secondary);
}

.table-row {
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition-fast);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-row--automaton {
  background: rgba(79, 156, 249, 0.03);
}

.table-row--series {
  background: rgba(124, 58, 237, 0.03);
}

.table-td {
  padding: var(--space-4) var(--space-5);
  color: var(--color-text-secondary);
  vertical-align: middle;
  line-height: var(--leading-normal);
}

.table-td--tier {
  white-space: nowrap;
}

.table-td--class {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.table-td--dim {
  font-family: var(--font-mono);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-primary);
  text-align: center;
}

.table-td--examples {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Tier badges */
.tier-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.tier-badge--automaton {
  background: rgba(79, 156, 249, 0.15);
  color: var(--color-accent-primary);
  border: 1px solid rgba(79, 156, 249, 0.25);
}

.tier-badge--series {
  background: rgba(124, 58, 237, 0.15);
  color: var(--color-accent-purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* Cost badges */
.cost-badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
}

.cost-badge--fast {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-accent-green);
}

.cost-badge--moderate {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-accent-amber);
}

/* Growth badges */
.growth-badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

.growth-badge--constant {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-accent-green);
}

.growth-badge--log {
  background: rgba(79, 156, 249, 0.15);
  color: var(--color-accent-primary);
}

.growth-badge--linear {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-accent-red);
}

/* ============================================================
     14. PRIMITIVE BLOCKS
     ============================================================ */
.primitive-block {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition-base);
}

.primitive-block:hover {
  border-color: var(--color-border-accent);
}

.primitive-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.primitive-tag {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  background: rgba(79, 156, 249, 0.1);
  border: 1px solid rgba(79, 156, 249, 0.2);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  white-space: nowrap;
}

.primitive-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.primitive-scope {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
}

.primitive-desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* API modes row */
.api-modes-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.api-mode-card {
  padding: var(--space-4);
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

.api-mode-code {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-code);
  margin-bottom: var(--space-2);
}

.api-mode-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ============================================================
     15. CONCEPT HIGHLIGHT
     ============================================================ */
.concept-highlight {
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(79, 156, 249, 0.06), rgba(124, 58, 237, 0.06));
  border: 1px solid rgba(79, 156, 249, 0.2);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.concept-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
}

.concept-highlight-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
}

.concept-highlight-body {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* ============================================================
     16. THEOREM BLOCK
     ============================================================ */
.theorem-block {
  padding: var(--space-6) var(--space-8);
  background: var(--color-bg-elevated);
  border-left: 3px solid var(--color-accent-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  position: relative;
}

.theorem-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin-bottom: var(--space-3);
}

.theorem-statement {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  font-style: italic;
}

/* ============================================================
     17. EXAMPLES BLOCK
     ============================================================ */
.examples-block {
  padding: var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

.examples-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.examples-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.examples-item::before {
  content: '→';
  color: var(--color-accent-primary);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.examples-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================================
     18. ONTOLOGY BREAKDOWN
     ============================================================ */
.ontology-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--color-bg-code);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
}

.ontology-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.ontology-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ontology-term {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-primary);
  min-width: 80px;
}

.ontology-equals {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.ontology-def {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ============================================================
     19. CLASSIFICATION GRID
     ============================================================ */
.classification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.classification-card {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

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

.classification-card--accessible {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.classification-card--crypto {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.classification-card--uncomputable {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.classification-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.classification-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.classification-card--accessible .classification-title {
  color: var(--color-accent-green);
}
.classification-card--crypto .classification-title {
  color: var(--color-accent-amber);
}
.classification-card--uncomputable .classification-title {
  color: var(--color-accent-red);
}

.classification-desc {
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

/* ============================================================
     20. COLLAPSE BLOCK (Program = Number)
     ============================================================ */
.collapse-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.collapse-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition-fast);
}

.collapse-item:last-child {
  border-bottom: none;
}

.collapse-item:hover {
  background: var(--color-bg-elevated);
}

.collapse-item p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.collapse-arrow {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-accent-primary);
  flex-shrink: 0;
}

/* ============================================================
     21. API LAYERS DIAGRAM
     ============================================================ */
.api-layers {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.api-layer {
  padding: var(--space-5) var(--space-6);
  border: 1px solid;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}

.api-layer:hover {
  transform: translateX(4px);
}

.api-layer--user {
  background: rgba(79, 156, 249, 0.06);
  border-color: rgba(79, 156, 249, 0.25);
}

.api-layer--combinator {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.25);
}

.api-layer--primitive {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.25);
}

.api-layer-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.api-layer--user .api-layer-label {
  color: var(--color-accent-primary);
}
.api-layer--combinator .api-layer-label {
  color: var(--color-accent-purple);
}
.api-layer--primitive .api-layer-label {
  color: var(--color-accent-tertiary);
}

.api-layer-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.api-layer-arrow {
  text-align: center;
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  line-height: 1;
}

/* ============================================================
     22. ROADMAP PHASES
     ============================================================ */
.roadmap-phases {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.roadmap-phase {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.roadmap-phase::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

#phase-1::before {
  background: var(--color-accent-green);
}
#phase-2::before {
  background: var(--color-accent-amber);
}
#phase-3::before {
  background: var(--color-accent-primary);
}
#phase-4::before {
  background: var(--color-accent-purple);
}

.roadmap-phase:hover {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-md);
}

.roadmap-phase-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.phase-number {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.phase-confidence {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

.phase-confidence--high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-accent-green);
}

.phase-confidence--research {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-accent-amber);
}

.phase-confidence--required {
  background: rgba(79, 156, 249, 0.15);
  color: var(--color-accent-primary);
}

.phase-confidence--future {
  background: rgba(167, 139, 250, 0.15);
  color: var(--color-accent-purple);
}

.phase-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.phase-desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.phase-deliverables {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.phase-deliverables li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.phase-deliverables li:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-secondary);
}

/* ============================================================
     23. MANIFESTO LIST
     ============================================================ */
.manifesto-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.manifesto-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.manifesto-item:hover {
  border-color: var(--color-border-accent);
  background: var(--color-bg-elevated);
}

.manifesto-bullet {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--color-accent-primary);
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ============================================================
     24. CLOSING QUOTE
     ============================================================ */
.closing-quote {
  padding: var(--space-8) var(--space-10);
  background: linear-gradient(135deg, rgba(79, 156, 249, 0.05), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(79, 156, 249, 0.15);
  border-radius: var(--radius-2xl);
  position: relative;
  text-align: center;
}

.closing-quote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 80px;
  color: var(--color-accent-primary);
  opacity: 0.15;
  font-family: var(--font-serif);
  line-height: 1;
}

.closing-quote-text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* ============================================================
     25. SITE FOOTER
     ============================================================ */
.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
  margin-top: var(--space-16);
}

.footer-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-col-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.footer-col-body {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link-item {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: color var(--transition-fast);
}

.footer-link-item:last-child {
  border-bottom: none;
}

.footer-link-text {
  cursor: default;
}

.footer-link-item:hover .footer-link-text {
  color: var(--color-text-secondary);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
  cursor: default;
}

.footer-tag:hover {
  color: var(--color-accent-primary);
  border-color: rgba(79, 156, 249, 0.3);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
}

.footer-bottom-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ============================================================
     26. SCROLLBAR GLOBAL
     ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border-default);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ============================================================
     27. SELECTION
     ============================================================ */
::selection {
  background: rgba(79, 156, 249, 0.25);
  color: var(--color-text-primary);
}

/* ============================================================
     28. FOCUS STYLES
     ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
     29. RESPONSIVE — TABLET (max 1024px)
     ============================================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .content-layout {
    gap: var(--space-8);
  }

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

  .footer-col--concepts {
    grid-column: 1 / -1;
  }
}

/* ============================================================
     30. RESPONSIVE — MOBILE (max 768px)
     ============================================================ */
@media (max-width: 768px) {
  /* Header */
  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border-subtle);
    padding: var(--space-4);
    z-index: 99;
  }

  .header-nav.open {
    display: block;
  }

  .header-nav-list {
    flex-direction: column;
    gap: var(--space-1);
  }

  .header-nav-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Hero */
  .hero-section {
    padding-top: calc(var(--header-height) + var(--space-12));
    padding-bottom: var(--space-12);
  }

  .hero-stats-row {
    gap: var(--space-3);
  }

  .hero-stat-badge {
    min-width: 100px;
    padding: var(--space-3) var(--space-4);
  }

  /* Content layout — single column */
  .content-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--space-4);
  }

  /* Sidebar becomes collapsible on mobile */
  .sidebar-toc {
    position: static;
    max-height: none;
    overflow: visible;
    order: -1;
  }

  .toc-inner {
    padding: var(--space-4);
  }

  /* Sections */
  .article-section {
    padding: var(--space-8) 0;
  }

  .article-section--closing {
    padding: var(--space-8) var(--space-4);
  }

  .section-title {
    font-size: var(--text-xl);
  }

  /* Tables */
  .table-td,
  .table-th {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
  }

  /* Properties grid */
  .properties-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Numbered feature list */
  .numbered-feature-item {
    flex-wrap: wrap;
  }

  .numbered-feature-label {
    min-width: auto;
  }

  /* API modes */
  .api-modes-row {
    grid-template-columns: 1fr;
  }

  /* Classification grid */
  .classification-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-inner {
    padding: var(--space-10) var(--space-4) var(--space-6);
  }

  /* Closing quote */
  .closing-quote {
    padding: var(--space-6) var(--space-5);
  }

  .closing-quote-text {
    font-size: var(--text-base);
  }

  /* Ontology breakdown */
  .ontology-item {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .ontology-term {
    min-width: auto;
  }

  /* Roadmap phase */
  .roadmap-phase-header {
    flex-wrap: wrap;
  }
}

/* ============================================================
     31. RESPONSIVE — SMALL MOBILE (max 480px)
     ============================================================ */
@media (max-width: 480px) {
  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-primitive-block {
    padding: var(--space-4) var(--space-5);
  }

  .primitive-code {
    font-size: var(--text-base);
  }

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

  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }

  .code-block {
    padding: var(--space-4);
  }

  .code-content {
    font-size: var(--text-xs);
  }

  .section-header {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* ============================================================
     32. PRINT STYLES
     ============================================================ */
@media print {
  .site-header,
  .sidebar-toc,
  .mobile-menu-toggle {
    display: none;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  body {
    background: white;
    color: black;
  }

  .code-block {
    border: 1px solid #ccc;
    background: #f5f5f5;
  }

  .code-content {
    color: #333;
  }
}

/* ============================================================
     33. ANIMATION UTILITIES
     ============================================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(79, 156, 249, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(79, 156, 249, 0.4);
  }
}

.hero-inner {
  animation: fade-in-up 0.8s ease both;
}

.hero-stat-badge {
  animation: fade-in-up 0.6s ease both;
}

.hero-stat-badge:nth-child(1) {
  animation-delay: 0.1s;
}
.hero-stat-badge:nth-child(2) {
  animation-delay: 0.2s;
}
.hero-stat-badge:nth-child(3) {
  animation-delay: 0.3s;
}
.hero-stat-badge:nth-child(4) {
  animation-delay: 0.4s;
}

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

  html {
    scroll-behavior: auto;
  }

  .header-logo-icon {
    animation: none;
  }
}
