/* ============================================================
   EnforceCore Design System
   Accent: Cyan #06b6d4 (AKIOUD AI family brand)
   ============================================================ */

:root {
  /* Colors - Light */
  --bg: #ffffff;
  --bg-alt: #f0fdff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e0f2fe;
  --accent: #06b6d4;         /* Cyan 500 */
  --accent-hover: #0891b2;   /* Cyan 600 */
  --accent-dim: rgba(6, 182, 212, 0.08);
  --accent-glow: rgba(6, 182, 212, 0.15);

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

  /* Font */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-alt: #061c1f;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --accent: #22d3ee;         /* Cyan 400 */
  --accent-hover: #67e8f9;   /* Cyan 300 */
  --accent-dim: rgba(34, 211, 238, 0.08);
  --accent-glow: rgba(34, 211, 238, 0.12);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; height: auto; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-4);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
p { margin-bottom: var(--space-4); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
em { font-style: italic; }
strong { font-weight: 700; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}
.hidden { display: none !important; }

/* Utility classes (used by header/footer partials) */
.flex             { display: flex; }
.inline-flex      { display: inline-flex; }
.items-center     { align-items: center; }
.items-start      { align-items: flex-start; }
.justify-center   { justify-content: center; }
.justify-between  { justify-content: space-between; }
.flex-wrap        { flex-wrap: wrap; }
.h-full           { height: 100%; }
.gap-1            { gap: 0.25rem; }
.gap-2            { gap: var(--space-2); }
.gap-3            { gap: var(--space-3); }
.gap-4            { gap: var(--space-4); }
.gap-6            { gap: var(--space-6); }
.gap-8            { gap: var(--space-8); }
.w-full           { width: 100%; }
.min-w-0          { min-width: 0; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-alt);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
  color: var(--text);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
}
.badge-version {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.badge-license {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================================
   Logo Switching (dark/light)
   ============================================================ */
.logo-light { display: block; }
.logo-dark  { display: none;  }
[data-theme="dark"] .logo-light { display: none;  }
[data-theme="dark"] .logo-dark  { display: block; }

/* ============================================================
   Header
   ============================================================ */
header {
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
}
[data-theme="dark"] header {
  background: rgba(9, 9, 11, 0.9);
  border-bottom-color: rgba(255,255,255,0.07);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--text); background: var(--bg-alt); }

.nav-separator {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.25rem;
}

.nav-icon-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-icon-btn:hover { color: var(--text); background: var(--bg-alt); }

/* Search */
.search-container { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  display: flex;
  pointer-events: none;
}
.search-shortcut {
  position: absolute;
  right: 10px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
  background: var(--bg);
  pointer-events: none;
  opacity: 0.7;
}
#search-input {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 200px;
  transition: all 0.2s;
}
#search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-dim);
  width: 260px;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 30px -5px rgba(0,0,0,0.1);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  padding: 6px;
}
.search-results.active { display: block; animation: slideDown 0.1s ease-out; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.search-result-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--bg-alt); }
.search-result-title { font-weight: 600; font-size: 0.9rem; color: var(--text); margin-bottom: 2px; }
.search-result-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  padding: var(--space-16) 0 var(--space-12);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.1) 0%, transparent 65%);
  pointer-events: none;
}
[data-theme="dark"] .hero-glow {
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.12) 0%, transparent 65%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.hero-text {
  flex: 1;
  min-width: 0;
  max-width: 560px;
}

.hero-code {
  flex: 1;
  min-width: 0;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-6);
}

.hero h1 {
  color: var(--text);
  margin-bottom: var(--space-6);
}

.gradient-text {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 50%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* Install Bar */
.install-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #d4d4d8;
  cursor: default;
  transition: border-color 0.2s;
  max-width: 100%;
}
.install-bar:hover { border-color: var(--accent); }
.install-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #71717a;
  text-transform: uppercase;
  flex-shrink: 0;
}
.install-cmd { color: #d4d4d8; font-family: var(--font-mono); }
.install-copy {
  background: #27272a;
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  color: #71717a;
  display: flex;
  align-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.install-copy:hover { background: #3f3f46; color: var(--accent); }

/* Stats Row */
.stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: var(--space-12);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  flex: 1;
  min-width: 120px;
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-align: center;
  line-height: 1.3;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   Code Window
   ============================================================ */
.code-window {
  background: #111113;
  border-radius: var(--radius-lg);
  border: 1px solid #2a2a30;
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}

.code-window-bar {
  background: #1c1c21;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #2a2a30;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }

.code-tabs {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.code-tab {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: #71717a;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  background: transparent;
  transition: all 0.15s;
}
.code-tab:hover { color: #d4d4d8; }
.code-tab.active { color: #d4d4d8; background: rgba(255,255,255,0.08); }

.code-body { position: relative; }
.code-content {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #cdd6f4;
  overflow-x: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.code-content code { background: none; padding: 0; border-radius: 0; font-size: inherit; }

/* Inline syntax colours */
.c  { color: #6272a4; font-style: italic; }   /* comment / keyword */
.kw { color: #cba6f7; }                        /* keyword */
.fn { color: #89dceb; }                        /* function */
.s  { color: #a6e3a1; }                        /* string */
.t  { color: #fab387; }                        /* type / number */

/* ============================================================
   Frameworks Strip
   ============================================================ */
.frameworks-section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.frameworks-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-4);
}
.frameworks-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.framework-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.framework-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Section Header (shared)
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-12);
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ============================================================
   Comparison Section
   ============================================================ */
.comparison-section {
  padding: var(--space-20) 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 820px;
  margin: 0 auto;
}

.comparison-col {
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
}
.comparison-col-bad  { background: rgba(239, 68, 68, 0.03); border-color: rgba(239, 68, 68, 0.2); }
.comparison-col-good { background: rgba(6, 182, 212, 0.04); border-color: rgba(6, 182, 212, 0.25); }

[data-theme="dark"] .comparison-col-bad  { background: rgba(239, 68, 68, 0.05); }
[data-theme="dark"] .comparison-col-good { background: rgba(34, 211, 238, 0.05); }

.comparison-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-6);
}
.comparison-badge-bad  { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.comparison-badge-good { background: var(--accent-dim); color: var(--accent); }

.comparison-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.comparison-item-bad,
.comparison-item-good {
  font-size: 0.925rem;
  line-height: 1.5;
  padding-left: 1.6rem;
  position: relative;
}
.comparison-item-bad::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
}
.comparison-item-good::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   Components Section
   ============================================================ */
.components-section {
  padding: var(--space-20) 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

.component-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all 0.2s;
}
.component-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-dim);
  transform: translateY(-2px);
}
.component-card h3 { margin-bottom: 0; font-size: 1.1rem; }
.component-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; line-height: 1.6; }

.component-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.component-code {
  background: #111113;
  border-radius: var(--radius-md);
  border: 1px solid #2a2a30;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-x: auto;
  margin-top: auto;
}
.component-code code { background: none; padding: 0; font-size: inherit; color: #cdd6f4; }

/* ============================================================
   Proof Section
   ============================================================ */
.proof-section {
  padding: var(--space-20) 0;
}

.proof-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
}

.proof-text {
  flex: 0 0 340px;
}
.proof-text h2 { line-height: 1.25; }
.proof-text p  { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }
.proof-text .btn { margin-top: var(--space-2); }

.proof-table-wrapper {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.proof-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.proof-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.proof-table tr:last-child td { border-bottom: none; }
.proof-table tr:hover td { background: var(--bg-alt); }

.proof-pass {
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}

/* ============================================================
   Steps Section
   ============================================================ */
.steps-section {
  padding: var(--space-20) 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.step {
  position: relative;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.step h3 { font-size: 1.1rem; margin-bottom: var(--space-2); }
.step p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: var(--space-4); }

.step-code {
  background: #111113;
  border: 1px solid #2a2a30;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #cdd6f4;
  overflow-x: auto;
  margin: 0;
}
.step-code code { background: none; padding: 0; font-size: inherit; }

.steps-cta {
  text-align: center;
  margin-top: var(--space-12);
}

/* ============================================================
   FAQ Section
   ============================================================ */
.faq-section {
  padding: var(--space-20) 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.faq-item:nth-child(2n) { border-right: none; }
.faq-item:nth-last-child(-n+2) { border-bottom: none; }

.faq-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: var(--space-6);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  transition: background 0.15s;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-q:hover { background: var(--bg-alt); }

.faq-a {
  padding: 0 var(--space-6) var(--space-6);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-a p { margin-bottom: 0; }
.faq-a code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: var(--bg-alt);
  border-radius: 4px;
  color: var(--accent);
}
.faq-a a { color: var(--accent); text-decoration: underline; text-decoration-color: transparent; }
.faq-a a:hover { text-decoration-color: currentColor; }

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  padding: var(--space-20) 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border);
}
.cta-section h2 { margin-bottom: var(--space-4); }
.cta-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.cta-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.cta-meta a { color: var(--accent); }
.cta-meta a:hover { text-decoration: underline; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Code copy button (injected by JS into docs pre blocks) */
.code-block-wrapper {
  position: relative;
  margin-bottom: var(--space-4);
}
.code-block-wrapper pre { margin-bottom: 0; }
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 4px;
  color: #a1a1aa;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { background: #3f3f46; color: #f4f4f5; }

/* ============================================================
   Legal Pages
   ============================================================ */
.legal-page {
  padding: var(--space-12) 0 var(--space-20);
}

.legal-hero {
  max-width: 680px;
  margin: 0 auto var(--space-12);
  text-align: center;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

.legal-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.15s;
  color: var(--text);
  text-decoration: none;
}
.legal-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-dim);
  transform: translateY(-2px);
  color: var(--text);
}
.legal-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.legal-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.legal-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.legal-prose {
  max-width: 760px;
  margin: 0 auto;
}
.legal-prose h1 { margin-bottom: var(--space-2); }
.legal-prose h2 {
  font-size: 1.15rem;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.legal-prose p { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); }
.legal-prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: var(--space-4);
}
.legal-prose li { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 0.25rem; }
.legal-prose a { color: var(--accent); text-decoration: underline; text-decoration-color: transparent; }
.legal-prose a:hover { text-decoration-color: currentColor; }

.legal-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.legal-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.legal-breadcrumb a { color: var(--accent); }
.legal-breadcrumb a:hover { text-decoration: underline; }

/* Callouts (used in docs + legal pages) */
.callout {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  border-left: 4px solid;
}
.callout p { margin-bottom: 0; color: inherit; font-size: 0.9rem; }
.callout-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.callout-info  { background: rgba(6,182,212,0.06); border-color: var(--accent); color: var(--text); }
.callout-info .callout-title  { color: var(--accent); }
.callout-warn  { background: rgba(234,179,8,0.07); border-color: #eab308; color: var(--text); }
.callout-warn .callout-title  { color: #ca8a04; }
.callout-danger { background: rgba(239,68,68,0.07); border-color: #ef4444; color: var(--text); }
.callout-danger .callout-title { color: #dc2626; }

/* Docs EN-only notice badge */
.docs-lang-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: var(--space-6);
}

/* ============================================================
   Docs Layout
   ============================================================ */
.docs-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}
.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: var(--space-6);
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.docs-content {
  flex-grow: 1;
  padding: var(--space-8);
  min-width: 0;
  max-width: 860px;
  margin: 0 auto;
}

/* Sidebar Nav */
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav li { margin-bottom: 2px; }
.docs-nav a {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all 0.15s;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.docs-nav a:hover  { color: var(--text); background: var(--bg-alt); transform: translateX(2px); }
.docs-nav a.active { color: var(--accent); background: var(--accent-dim); font-weight: 600; border-left-color: var(--accent); }

.section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 28px 0 10px 10px;
  opacity: 0.8;
}
.section-title:first-child { margin-top: 0; }

@media (max-width: 768px) {
  .docs-wrapper     { flex-direction: column; }
  .docs-sidebar     { width: 100%; height: auto; position: relative; top: 0; border-right: none; border-bottom: 1px solid var(--border); max-height: 300px; }
  .docs-content     { padding: var(--space-4); }
}

/* ============================================================
   Docs Content — Typography & Elements
   ============================================================ */

/* Headings */
.docs-content h1 { margin-bottom: var(--space-2); }
.docs-content h2 {
  font-size: 1.35rem;
  margin-top: var(--space-12, 3rem);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.docs-content h3 {
  font-size: 1.1rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.docs-content h4 {
  font-size: 0.95rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

/* Paragraphs */
.docs-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.docs-content strong { color: var(--text); }

/* Links */
.docs-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}
.docs-content a:hover {
  text-decoration-color: currentColor;
}

/* Lists */
.docs-content ul,
.docs-content ol {
  padding-left: 1.5rem;
  margin-bottom: var(--space-4);
}
.docs-content ul { list-style: disc; }
.docs-content ol { list-style: decimal; }
.docs-content li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.docs-content li strong { color: var(--text); }

/* Tables */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.docs-content thead {
  background: var(--bg-alt);
}
.docs-content th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.docs-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  line-height: 1.6;
}
.docs-content tbody tr:last-child td { border-bottom: none; }
.docs-content tbody tr:hover td { background: var(--accent-dim); }

/* Horizontal rules */
.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* Images */
.docs-content img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: var(--space-4) 0;
}

/* Blockquotes */
.docs-content blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.docs-content blockquote p {
  color: var(--text);
  margin-bottom: 0;
}

/* ============================================================
   Code Block Styling (docs)
   ============================================================ */
pre {
  background: #111113;
  border: 1px solid #2a2a30;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--space-4);
  color: #cdd6f4;
}
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.18em 0.4em;
  background: var(--bg-alt);
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre code { background: none; padding: 0; border: none; border-radius: 0; font-size: inherit; color: inherit; }

/* ============================================================
   Animation
   ============================================================ */
.animate-in {
  opacity: 0;
  animation: fadeInUp 0.55s ease-out forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
  }
  .hero-text {
    max-width: 100%;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .proof-inner {
    flex-direction: column;
  }
  .proof-text {
    flex: none;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .faq-item:nth-child(n) { border-right: none; }
  .faq-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .faq-item:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 var(--space-4); }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .stats-row { gap: 0; padding: var(--space-2); }
  .stat-item { padding: var(--space-3) var(--space-4); min-width: 90px; }
  .stat-divider { height: 24px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .components-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Light Mode — Code Blocks
   Use :not([data-theme="dark"]) to prevent specificity wars.
   Hero .code-window always stays dark (terminal preview).
   ============================================================ */
:root:not([data-theme="dark"]) pre {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}
:root:not([data-theme="dark"]) pre code {
  color: #334155;
  background: none;
  border: none;
}
:root:not([data-theme="dark"]) .code-block-wrapper pre {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
:root:not([data-theme="dark"]) .copy-btn {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
}
:root:not([data-theme="dark"]) .copy-btn:hover {
  background: #cbd5e1;
  color: #1e293b;
}
:root:not([data-theme="dark"]) code {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0e7490;
}
:root:not([data-theme="dark"]) pre code {
  background: none;
  border: none;
  color: inherit;
}

/* ============================================================
   Dark Mode — Code Blocks
   ============================================================ */
[data-theme="dark"] pre {
  background: #111113;
  border: 1px solid #2a2a30;
  color: #cdd6f4;
}
[data-theme="dark"] pre code {
  color: #cdd6f4;
  background: none;
  border: none;
}
[data-theme="dark"] .code-block-wrapper pre {
  background: #111113;
  border-color: #2a2a30;
  color: #cdd6f4;
}
[data-theme="dark"] .copy-btn {
  background: #27272a;
  border-color: #3f3f46;
  color: #a1a1aa;
}
[data-theme="dark"] .copy-btn:hover {
  background: #3f3f46;
  color: #f4f4f5;
}
[data-theme="dark"] code {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--accent);
}
[data-theme="dark"] pre code {
  background: none;
  border: none;
  color: inherit;
}

/* .code-window always stays dark (hero terminal preview) */
.code-window pre,
.code-window pre code,
.code-window .code-content,
.code-window .code-content code { background: transparent !important; border: none !important; color: #cdd6f4 !important; }
.component-code, .component-code code { background: #111113 !important; border-color: #2a2a30; color: #cdd6f4 !important; }
.step-code, .step-code code { background: #111113 !important; border-color: #2a2a30; color: #cdd6f4 !important; }

/* ============================================================
   Highlight.js — Light Theme (Docs code blocks)
   ============================================================ */
:root:not([data-theme="dark"]) .hljs-keyword,
:root:not([data-theme="dark"]) .hljs-selector-tag   { color: #0369a1; font-weight: 600; }
:root:not([data-theme="dark"]) .hljs-string,
:root:not([data-theme="dark"]) .hljs-addition        { color: #15803d; }
:root:not([data-theme="dark"]) .hljs-number,
:root:not([data-theme="dark"]) .hljs-literal         { color: #b45309; }
:root:not([data-theme="dark"]) .hljs-title,
:root:not([data-theme="dark"]) .hljs-function        { color: #0e7490; }
:root:not([data-theme="dark"]) .hljs-comment,
:root:not([data-theme="dark"]) .hljs-quote           { color: #94a3b8; font-style: italic; }
:root:not([data-theme="dark"]) .hljs-type,
:root:not([data-theme="dark"]) .hljs-built_in        { color: #7c3aed; }
:root:not([data-theme="dark"]) .hljs-attr,
:root:not([data-theme="dark"]) .hljs-attribute        { color: #0e7490; }
:root:not([data-theme="dark"]) .hljs-variable,
:root:not([data-theme="dark"]) .hljs-template-variable { color: #b45309; }
:root:not([data-theme="dark"]) .hljs-name             { color: #0369a1; }
:root:not([data-theme="dark"]) .hljs-selector-class   { color: #0e7490; }
:root:not([data-theme="dark"]) .hljs-deletion         { color: #dc2626; }
:root:not([data-theme="dark"]) .hljs-meta             { color: #64748b; }

/* ============================================================
   Highlight.js — Dark Theme (Docs code blocks)
   ============================================================ */
[data-theme="dark"] .hljs-keyword,
[data-theme="dark"] .hljs-selector-tag   { color: #cba6f7; font-weight: 600; }
[data-theme="dark"] .hljs-string,
[data-theme="dark"] .hljs-addition        { color: #a6e3a1; }
[data-theme="dark"] .hljs-number,
[data-theme="dark"] .hljs-literal         { color: #fab387; }
[data-theme="dark"] .hljs-title,
[data-theme="dark"] .hljs-function        { color: #89dceb; }
[data-theme="dark"] .hljs-comment,
[data-theme="dark"] .hljs-quote           { color: #6272a4; font-style: italic; }
[data-theme="dark"] .hljs-type,
[data-theme="dark"] .hljs-built_in        { color: #f9e2af; }
[data-theme="dark"] .hljs-attr,
[data-theme="dark"] .hljs-attribute        { color: #89dceb; }
[data-theme="dark"] .hljs-variable,
[data-theme="dark"] .hljs-template-variable { color: #fab387; }
[data-theme="dark"] .hljs-name             { color: #cba6f7; }
[data-theme="dark"] .hljs-selector-class   { color: #89dceb; }
[data-theme="dark"] .hljs-deletion         { color: #f38ba8; }
[data-theme="dark"] .hljs-meta             { color: #a6adc8; }

/* Inline syntax spans (hero manual highlighting) — already dark-only, fine */

/* ============================================================
   Card Grid (Blog & Case Studies listings)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}

.content-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
}
.content-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-dim);
  transform: translateY(-3px);
  color: var(--text);
}

.card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  background: var(--bg-alt);
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.card-content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-2);
  color: var(--text);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-4);
}

.card-footer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

.card-coming-soon {
  opacity: 0.5;
  pointer-events: none;
}
.card-coming-soon .card-footer { color: var(--text-muted); }

/* ============================================================
   Blog Post / Case Study Article Layout
   ============================================================ */
.blog-post-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
}
.blog-post-main h1 { margin-bottom: var(--space-6); }
.blog-post-main h2 {
  font-size: 1.25rem;
  margin-top: var(--space-10, 2.5rem);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.blog-post-main p { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); }
.blog-post-main ul, .blog-post-main ol { padding-left: 1.5rem; margin-bottom: var(--space-4); }
.blog-post-main li { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 0.25rem; }
.blog-post-main a { color: var(--accent); }
.blog-post-main a:hover { text-decoration: underline; }
.blog-post-main strong { color: var(--text); }
.blog-post-main blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ============================================================
   Expanded Footer
   ============================================================ */
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  padding: var(--space-12) 0 var(--space-6);
}
.footer-brand {
  max-width: 280px;
}
.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}
.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .footer-brand { max-width: 100%; grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   Header Nav — desktop layout (pure CSS, no utility classes on <nav>)
   ============================================================ */
header nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* GitHub nav link: icon + text inline */
.nav-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ============================================================
   Mobile Navigation — breakpoint: 1024px
   Hamburger hidden on desktop, nav hidden on mobile by default.
   Same-specificity rule later in the file wins (no !important needed).
   ============================================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  line-height: 0;
}
.mobile-menu-btn:hover { background: var(--bg-alt); }

@media (max-width: 1024px) {
  /* Show hamburger */
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Collapse nav — absolute so backdrop-filter on header doesn't trap fixed positioning */
  header nav {
    display: none;
    position: absolute;
    top: 100%;           /* immediately below the header bar */
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);  /* dynamic viewport height for mobile */
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: var(--space-6);
    gap: 4px;
    z-index: 998;
    overflow-y: auto;
  }

  /* Open state */
  header nav.open { display: flex; }

  /* Nav items take full width, larger tap targets */
  header nav .nav-link {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
  }
  header nav .nav-link:hover { background: var(--bg-alt); color: var(--text); }

  /* Divider not useful in column layout */
  header nav .nav-separator { display: none; }

  /* Search full width */
  header nav .search-container { width: 100%; margin: var(--space-2) 0; }
  header nav #search-input { width: 100%; }
  header nav #search-input:focus { width: 100%; }

  /* Theme toggle: full-width row in overlay */
  header nav .nav-icon-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
  }
  header nav .nav-icon-btn:hover { background: var(--bg-alt); color: var(--text); }

  /* Keep logo accessible above overlay */
  .logo-link { position: relative; z-index: 999; }
}

/* ============================================================
   Feature Cards (community page)
   ============================================================ */
.features { padding: var(--space-12) 0 var(--space-20); }
.grid { display: grid; gap: var(--space-6); }
.grid-responsive { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature-card {
  padding: var(--space-6);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0; }

/* ============================================================
   Version Badge (docs)
   ============================================================ */
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: var(--space-6);
}

