/**
 * SilkCircuit Theme for VitePress
 * Electric meets elegant — the visual identity of Sibyl
 * Dark: SilkCircuit Neon | Light: SilkCircuit Dawn
 */

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY — Inter + JetBrains Mono
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Font Stacks */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', Consolas, monospace;

  /* VitePress Font Overrides */
  --vp-font-family-base: var(--font-family-base);
  --vp-font-family-mono: var(--font-family-mono);

  /* ═══════════════════════════════════════════════════════════════
     SILKCIRCUIT NEON PALETTE (Dark Mode) - OKLCH
     Matches apps/web/src/app/globals.css
     ═══════════════════════════════════════════════════════════════ */

  /* Primary Accent Colors - OKLCH for P3 gamut */
  --sc-purple: oklch(64% 0.31 328);
  --sc-magenta: oklch(70% 0.32 328);
  --sc-cyan: oklch(92% 0.16 180);
  --sc-coral: oklch(72% 0.22 350);
  --sc-yellow: oklch(95% 0.13 105);
  --sc-green: oklch(88% 0.23 145);
  --sc-red: oklch(68% 0.22 25);

  /* Fallback hex for older browsers */
  --iris-purple: #e135ff;
  --iris-purple-light: #f06eff;
  --iris-purple-deep: #bd93f9;
  --iris-cyan: #80ffea;
  --iris-cyan-light: #a5ffef;
  --iris-coral: #ff6ac1;
  --iris-yellow: #f1fa8c;
  --iris-green: #50fa7b;
  --iris-red: #ff6363;

  /* Backgrounds - deep purple base */
  --sc-bg-base: oklch(10% 0.02 285);
  --sc-bg-dark: oklch(6% 0.015 285);
  --sc-bg-highlight: oklch(14% 0.025 285);
  --sc-bg-elevated: oklch(17% 0.03 285);
  --sc-bg-surface: oklch(21% 0.035 285);

  /* Fallback hex */
  --iris-bg-base: #121218;
  --iris-bg-panel: #181820;
  --iris-bg-elevated: #1e1e28;
  --iris-bg-code: #1a1a24;
  --iris-bg-highlight: #2d283c;

  /* Text */
  --sc-fg-primary: oklch(98% 0.005 110);
  --sc-fg-muted: oklch(62% 0.035 280);
  --sc-fg-subtle: oklch(42% 0.03 280);

  /* Fallback hex */
  --iris-text-primary: #f8f8f2;
  --iris-text-secondary: #e0e0e0;
  --iris-text-muted: #a0a0a0;
  --iris-text-dim: #6a6a7a;

  /* ═══════════════════════════════════════════════════════════════
     SILKCIRCUIT DAWN PALETTE (Light Mode) - OKLCH
     ═══════════════════════════════════════════════════════════════ */

  /* Primary Accent Colors (darker for light backgrounds) */
  --dawn-purple: oklch(42% 0.28 300);
  --dawn-magenta: oklch(40% 0.26 340);
  --dawn-cyan: oklch(45% 0.16 200);
  --dawn-coral: oklch(50% 0.22 350);
  --dawn-yellow: oklch(52% 0.16 85);
  --dawn-green: oklch(45% 0.20 145);
  --dawn-red: oklch(50% 0.24 25);

  /* Fallback hex */
  --dawn-purple-hex: #7e2bd5;
  --dawn-purple-light: #9e4df3;
  --dawn-purple-deep: #5c1a9e;
  --dawn-cyan-hex: #007f8e;
  --dawn-cyan-light: #00666e;

  /* Backgrounds (lavender-white) */
  --dawn-bg-dark: oklch(95% 0.01 290);
  --dawn-bg-base: oklch(97% 0.008 290);
  --dawn-bg-elevated: oklch(100% 0 0);
  --dawn-bg-highlight: oklch(94% 0.015 290);
  --dawn-bg-surface: oklch(91% 0.02 290);

  /* Fallback hex */
  --dawn-bg-base-hex: #faf8ff;
  --dawn-bg-panel: #f1ecff;
  --dawn-bg-elevated-hex: #efeaff;
  --dawn-bg-code: #e1daf7;
  --dawn-bg-highlight-hex: #d9d2f2;
  --dawn-bg-active: #d0c8eb;

  /* Text (darker for light backgrounds) */
  --dawn-fg-primary: oklch(18% 0.03 290);
  --dawn-fg-muted: oklch(45% 0.04 290);
  --dawn-fg-subtle: oklch(65% 0.03 290);

  /* Fallback hex */
  --dawn-text-primary: #2b2540;
  --dawn-text-secondary: #3d3558;
  --dawn-text-muted: #5a4d78;
  --dawn-text-dim: #8b6ab8;

  /* ═══════════════════════════════════════════════════════════════
     VITEPRESS THEME OVERRIDES (Default/Dark)
     ═══════════════════════════════════════════════════════════════ */

  /* Brand Colors - using OKLCH with hex fallback */
  --vp-c-brand-1: var(--sc-purple, var(--iris-purple));
  --vp-c-brand-2: var(--sc-magenta, var(--iris-purple-light));
  --vp-c-brand-3: var(--iris-purple-deep);
  --vp-c-brand-soft: oklch(64% 0.31 328 / 0.14);

  /* Accent overrides */
  --vp-c-tip-1: var(--sc-cyan, var(--iris-cyan));
  --vp-c-tip-2: var(--iris-cyan-light);
  --vp-c-tip-3: var(--sc-cyan, var(--iris-cyan));
  --vp-c-tip-soft: oklch(92% 0.16 180 / 0.14);

  --vp-c-warning-1: var(--sc-yellow, var(--iris-yellow));
  --vp-c-warning-2: var(--sc-yellow, var(--iris-yellow));
  --vp-c-warning-3: var(--sc-yellow, var(--iris-yellow));
  --vp-c-warning-soft: oklch(95% 0.13 105 / 0.14);

  --vp-c-danger-1: var(--sc-red, var(--iris-red));
  --vp-c-danger-2: var(--sc-red, var(--iris-red));
  --vp-c-danger-3: var(--sc-red, var(--iris-red));
  --vp-c-danger-soft: oklch(68% 0.22 25 / 0.14);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE STYLING (SilkCircuit Dawn)
   ═══════════════════════════════════════════════════════════════ */

:root:not(.dark) {
  --vp-c-bg: var(--dawn-bg-base, var(--dawn-bg-base-hex));
  --vp-c-bg-alt: var(--dawn-bg-dark, var(--dawn-bg-panel));
  --vp-c-bg-elv: var(--dawn-bg-elevated, var(--dawn-bg-elevated-hex));
  --vp-c-bg-soft: var(--dawn-bg-highlight, var(--dawn-bg-highlight-hex));

  --vp-c-text-1: var(--dawn-fg-primary, var(--dawn-text-primary));
  --vp-c-text-2: var(--dawn-fg-muted, var(--dawn-text-secondary));
  --vp-c-text-3: var(--dawn-fg-subtle, var(--dawn-text-muted));

  --vp-c-brand-1: var(--dawn-purple, var(--dawn-purple-hex));
  --vp-c-brand-2: var(--dawn-magenta, var(--dawn-purple-light));
  --vp-c-brand-3: var(--dawn-purple-deep);
  --vp-c-brand-soft: oklch(42% 0.28 300 / 0.12);

  --vp-c-tip-1: var(--dawn-cyan, var(--dawn-cyan-hex));
  --vp-c-tip-2: var(--dawn-cyan-light);
  --vp-c-tip-3: var(--dawn-cyan, var(--dawn-cyan-hex));
  --vp-c-tip-soft: oklch(45% 0.16 200 / 0.12);

  --vp-c-warning-1: var(--dawn-yellow);
  --vp-c-warning-2: var(--dawn-yellow);
  --vp-c-warning-3: var(--dawn-yellow);
  --vp-c-warning-soft: oklch(52% 0.16 85 / 0.12);

  --vp-c-danger-1: var(--dawn-red);
  --vp-c-danger-2: var(--dawn-red);
  --vp-c-danger-3: var(--dawn-red);
  --vp-c-danger-soft: oklch(50% 0.24 25 / 0.12);

  --vp-c-divider: oklch(42% 0.28 300 / 0.15);
  --vp-c-divider-light: oklch(42% 0.28 300 / 0.08);

  --vp-c-gutter: var(--dawn-bg-dark, var(--dawn-bg-panel));

  --vp-code-block-bg: var(--dawn-bg-code);
  --vp-code-tab-divider: var(--dawn-purple, var(--dawn-purple-hex));
  --vp-code-copy-code-bg: var(--dawn-bg-highlight, var(--dawn-bg-highlight-hex));
  --vp-code-copy-code-hover-bg: var(--dawn-bg-active);
}

/* Light Mode Navigation */
:root:not(.dark) .VPNav {
  background: oklch(97% 0.008 290 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(126, 43, 213, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(126, 43, 213, 0.08);
}

:root:not(.dark) .VPNavBarTitle .title {
  background: linear-gradient(135deg, var(--dawn-purple), var(--dawn-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

:root:not(.dark) .VPNavBarMenuLink:hover,
:root:not(.dark) .VPNavBarMenuLink.active {
  color: var(--dawn-purple);
}

/* Light Mode Sidebar */
:root:not(.dark) .VPSidebar {
  background: oklch(98% 0.006 290);
  border-right: 1px solid rgba(126, 43, 213, 0.08);
}

/* Hide the curtain divider */
:root:not(.dark) .curtain {
  display: none !important;
}

/* Light Mode Sidebar Group Titles */
:root:not(.dark) .VPSidebarItem.level-0 > .item > .text {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dawn-purple);
  opacity: 0.85;
  padding: 8px 0 4px 0;
}

:root:not(.dark) .VPSidebarItem.level-0 > .item > .text::before {
  content: '›';
  margin-right: 6px;
  color: var(--dawn-cyan);
  font-weight: 400;
}

/* Light Mode Sidebar Links */
:root:not(.dark) .VPSidebarItem.level-1 .text {
  color: var(--dawn-text-secondary);
  font-weight: 400;
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

:root:not(.dark) .VPSidebarItem .link:hover .text {
  color: var(--dawn-purple);
  padding-left: 4px;
}

:root:not(.dark) .VPSidebarItem.is-active > .item > .link > .text {
  color: var(--dawn-purple) !important;
  font-weight: 600;
  -webkit-text-fill-color: var(--dawn-purple);
}

/* Light Mode Hero */
:root:not(.dark) .VPHero .name {
  background: linear-gradient(135deg, var(--dawn-purple) 0%, var(--dawn-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

:root:not(.dark) .VPHero .tagline {
  color: var(--dawn-text-secondary);
}

:root:not(.dark) .VPHero .VPButton.brand {
  background: linear-gradient(135deg, var(--dawn-purple), var(--dawn-coral));
  border: none;
  box-shadow: 0 4px 16px rgba(126, 43, 213, 0.25);
  transition: all 0.3s ease;
}

:root:not(.dark) .VPHero .VPButton.brand:hover {
  box-shadow: 0 6px 24px rgba(126, 43, 213, 0.35);
  transform: translateY(-2px);
}

:root:not(.dark) .VPHero .VPButton.alt {
  border-color: var(--dawn-cyan);
  color: var(--dawn-cyan);
}

:root:not(.dark) .VPHero .VPButton.alt:hover {
  background: rgba(0, 127, 142, 0.08);
}

/* Light Mode Headings */
:root:not(.dark) .vp-doc h1 {
  background: linear-gradient(135deg, var(--dawn-purple), var(--dawn-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

:root:not(.dark) .vp-doc h2 {
  border-top: 1px solid rgba(126, 43, 213, 0.15);
  padding-top: 24px;
  color: var(--dawn-text-primary);
}

:root:not(.dark) .vp-doc h2::before {
  content: '◆ ';
  color: var(--dawn-purple);
}

/* Light Mode Links */
:root:not(.dark) .vp-doc a {
  color: var(--dawn-purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

:root:not(.dark) .vp-doc a:hover {
  color: var(--dawn-cyan);
}

/* Light Mode Inline Code */
:root:not(.dark) .vp-doc :not(pre) > code {
  background: var(--dawn-bg-code);
  color: var(--dawn-coral);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Light Mode Code Blocks */
:root:not(.dark) .vp-doc div[class*='language-'] {
  background: var(--dawn-bg-code);
  border: 1px solid rgba(126, 43, 213, 0.15);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(126, 43, 213, 0.08);
}

:root:not(.dark) .vp-doc div[class*='language-']::before {
  color: var(--dawn-text-muted);
}

/* Light Mode Tables */
:root:not(.dark) .vp-doc table {
  border-collapse: collapse;
  width: 100%;
}

:root:not(.dark) .vp-doc th {
  background: var(--dawn-bg-elevated);
  color: var(--dawn-purple);
  font-weight: 600;
  border-bottom: 2px solid var(--dawn-purple);
}

:root:not(.dark) .vp-doc td {
  border-bottom: 1px solid rgba(126, 43, 213, 0.12);
}

:root:not(.dark) .vp-doc tr:hover td {
  background: rgba(126, 43, 213, 0.04);
}

/* Light Mode Blockquotes */
:root:not(.dark) .vp-doc blockquote {
  border-left: 4px solid var(--dawn-purple);
  background: rgba(126, 43, 213, 0.05);
  color: var(--dawn-text-secondary);
}

/* Light Mode Custom Containers */
:root:not(.dark) .vp-doc .tip {
  border-color: var(--dawn-cyan);
  background: rgba(0, 127, 142, 0.08);
}

:root:not(.dark) .vp-doc .warning {
  border-color: var(--dawn-yellow);
  background: rgba(168, 134, 0, 0.08);
}

:root:not(.dark) .vp-doc .danger {
  border-color: var(--dawn-red);
  background: rgba(193, 39, 45, 0.08);
}

:root:not(.dark) .vp-doc .info {
  border-color: var(--dawn-purple-light);
  background: rgba(158, 77, 243, 0.08);
}

/* Light Mode Features Grid */
:root:not(.dark) .VPFeature {
  background: var(--dawn-bg-panel);
  border: 1px solid rgba(126, 43, 213, 0.12);
  border-radius: 12px;
  transition: all 0.3s ease;
}

:root:not(.dark) .VPFeature:hover {
  border-color: var(--dawn-purple);
  box-shadow: 0 4px 20px rgba(126, 43, 213, 0.12);
  transform: translateY(-4px);
}

:root:not(.dark) .VPFeature .title {
  color: var(--dawn-purple);
}

:root:not(.dark) .VPFeature .details {
  color: var(--dawn-text-muted);
}

/* Light Mode Footer */
:root:not(.dark) .VPFooter {
  background: var(--dawn-bg-panel);
  border-top: 1px solid rgba(126, 43, 213, 0.1);
}

:root:not(.dark) .VPFooter .message,
:root:not(.dark) .VPFooter .copyright {
  color: var(--dawn-text-muted);
}

/* Light Mode Search */
:root:not(.dark) .VPLocalSearchBox .search-input {
  background: var(--dawn-bg-elevated);
  border: 1px solid rgba(126, 43, 213, 0.15);
}

:root:not(.dark) .VPLocalSearchBox .search-input:focus {
  border-color: var(--dawn-purple);
  box-shadow: 0 0 8px rgba(126, 43, 213, 0.15);
}

/* Light Mode Keyboard Keys */
:root:not(.dark) kbd {
  background: var(--dawn-bg-elevated);
  border: 1px solid rgba(126, 43, 213, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--dawn-purple);
  box-shadow: 0 2px 0 rgba(126, 43, 213, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE STYLING
   ═══════════════════════════════════════════════════════════════ */

.dark {
  --vp-c-bg: var(--sc-bg-base, var(--iris-bg-base));
  --vp-c-bg-alt: var(--sc-bg-dark, var(--iris-bg-panel));
  --vp-c-bg-elv: var(--sc-bg-elevated, var(--iris-bg-elevated));
  --vp-c-bg-soft: var(--sc-bg-highlight, var(--iris-bg-highlight));

  --vp-c-text-1: var(--sc-fg-primary, var(--iris-text-primary));
  --vp-c-text-2: var(--iris-text-secondary);
  --vp-c-text-3: var(--sc-fg-muted, var(--iris-text-muted));

  --vp-c-divider: oklch(64% 0.31 328 / 0.15);
  --vp-c-divider-light: oklch(64% 0.31 328 / 0.08);

  --vp-c-gutter: var(--sc-bg-dark, var(--iris-bg-panel));

  --vp-code-block-bg: var(--iris-bg-code);
  --vp-code-tab-divider: var(--sc-purple, var(--iris-purple));
  --vp-code-copy-code-bg: var(--sc-bg-highlight, var(--iris-bg-highlight));
  --vp-code-copy-code-hover-bg: var(--sc-bg-elevated, var(--iris-bg-elevated));
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION & HEADER
   ═══════════════════════════════════════════════════════════════ */

.dark .VPNav {
  background: oklch(10% 0.02 285 / 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(128, 255, 234, 0.12);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4),
              0 8px 24px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(225, 53, 255, 0.2),
              0 0 60px rgba(128, 255, 234, 0.1);
}

.dark .VPNavBarTitle .title {
  background: linear-gradient(135deg, var(--iris-purple), var(--iris-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.dark .VPNavBarMenuLink:hover,
.dark .VPNavBarMenuLink.active {
  color: var(--iris-cyan);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */

.dark .VPSidebar {
  background: oklch(10% 0.02 285 / 0.95);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(128, 255, 234, 0.08);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4),
              8px 0 40px rgba(0, 0, 0, 0.3),
              4px 0 30px rgba(225, 53, 255, 0.15),
              6px 0 50px rgba(128, 255, 234, 0.08);
}

/* Hide the curtain divider */
.dark .curtain {
  display: none !important;
}

/* Sidebar Group Titles - Distinguished from links */
.dark .VPSidebarItem.level-0 > .item > .text {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--iris-purple);
  opacity: 0.9;
  padding: 8px 0 4px 0;
}

/* Sidebar Group Title Indicator */
.dark .VPSidebarItem.level-0 > .item > .text::before {
  content: '›';
  margin-right: 6px;
  color: var(--iris-cyan);
  font-weight: 400;
}

/* Sidebar Links */
.dark .VPSidebarItem.level-1 .text {
  color: var(--iris-text-secondary);
  font-weight: 400;
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.dark .VPSidebarItem .link:hover .text {
  color: var(--iris-cyan);
  padding-left: 4px;
}

.dark .VPSidebarItem.is-active > .item > .link > .text {
  color: var(--iris-cyan) !important;
  font-weight: 600;
  -webkit-text-fill-color: var(--iris-cyan);
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT STYLING
   ═══════════════════════════════════════════════════════════════ */

/* Hero Section */
.dark .VPHero .name {
  background: linear-gradient(135deg, var(--iris-purple) 0%, var(--iris-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .VPHero .tagline {
  color: var(--iris-text-secondary);
}

.dark .VPHero .VPButton.brand {
  background: linear-gradient(135deg, var(--iris-purple), var(--iris-coral));
  border: none;
  box-shadow: 0 0 20px rgba(225, 53, 255, 0.3);
  transition: all 0.3s ease;
}

.dark .VPHero .VPButton.brand:hover {
  box-shadow: 0 0 30px rgba(225, 53, 255, 0.5);
  transform: translateY(-2px);
}

.dark .VPHero .VPButton.alt {
  border-color: var(--iris-cyan);
  color: var(--iris-cyan);
}

.dark .VPHero .VPButton.alt:hover {
  background: rgba(128, 255, 234, 0.1);
}

/* Headings */
.dark .vp-doc h1 {
  background: linear-gradient(135deg, var(--iris-purple), var(--iris-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .vp-doc h2 {
  border-top: 1px solid rgba(128, 255, 234, 0.1);
  padding-top: 24px;
  color: var(--iris-text-primary);
}

.dark .vp-doc h2::before {
  content: '◆ ';
  color: var(--iris-purple);
}

/* Links */
.dark .vp-doc a {
  color: var(--iris-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dark .vp-doc a:hover {
  color: var(--iris-purple);
}

/* Inline Code */
.dark .vp-doc :not(pre) > code {
  background: var(--iris-bg-code);
  color: var(--iris-coral);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Code Blocks */
.dark .vp-doc div[class*='language-'] {
  background: var(--iris-bg-code);
  border: 1px solid rgba(128, 255, 234, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .vp-doc div[class*='language-']::before {
  color: var(--iris-text-muted);
}

/* Tables */
.dark .vp-doc table {
  border-collapse: collapse;
  width: 100%;
}

.dark .vp-doc th {
  background: var(--iris-bg-elevated);
  color: var(--iris-cyan);
  font-weight: 600;
  border-bottom: 2px solid var(--iris-purple);
}

.dark .vp-doc td {
  border-bottom: 1px solid rgba(128, 255, 234, 0.1);
}

.dark .vp-doc tr:hover td {
  background: rgba(128, 255, 234, 0.04);
}

/* Blockquotes */
.dark .vp-doc blockquote {
  border-left: 4px solid var(--iris-purple);
  background: rgba(225, 53, 255, 0.05);
  color: var(--iris-text-secondary);
}

/* Custom Containers */
.dark .vp-doc .tip {
  border-color: var(--iris-cyan);
  background: rgba(128, 255, 234, 0.08);
}

.dark .vp-doc .warning {
  border-color: var(--iris-yellow);
  background: rgba(241, 250, 140, 0.08);
}

.dark .vp-doc .danger {
  border-color: var(--iris-red);
  background: rgba(255, 99, 99, 0.08);
}

.dark .vp-doc .info {
  border-color: var(--iris-purple-deep);
  background: rgba(189, 147, 249, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   FEATURES GRID
   ═══════════════════════════════════════════════════════════════ */

.dark .VPFeature {
  background: var(--iris-bg-panel);
  border: 1px solid rgba(128, 255, 234, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.dark .VPFeature:hover {
  border-color: var(--iris-purple);
  box-shadow: 0 0 20px rgba(225, 53, 255, 0.15);
  transform: translateY(-4px);
}

.dark .VPFeature .title {
  color: var(--iris-cyan);
}

.dark .VPFeature .details {
  color: var(--iris-text-muted);
}

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

.dark .VPFooter {
  background: var(--iris-bg-panel);
  border-top: 1px solid rgba(128, 255, 234, 0.1);
}

.dark .VPFooter .message,
.dark .VPFooter .copyright {
  color: var(--iris-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════════ */

.dark .VPLocalSearchBox .search-input {
  background: var(--iris-bg-elevated);
  border: 1px solid rgba(128, 255, 234, 0.2);
}

.dark .VPLocalSearchBox .search-input:focus {
  border-color: var(--iris-purple);
  box-shadow: 0 0 10px rgba(225, 53, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* Keyboard Keys */
.dark kbd {
  background: var(--iris-bg-elevated);
  border: 1px solid rgba(128, 255, 234, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--iris-cyan);
  box-shadow: 0 2px 0 rgba(128, 255, 234, 0.1);
}

/* Gradient Text Utility */
.gradient-text {
  background: linear-gradient(135deg, var(--iris-purple), var(--iris-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Effect */
.glow {
  box-shadow: 0 0 20px rgba(225, 53, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(225, 53, 255, 0.3); }
  50% { box-shadow: 0 0 30px rgba(225, 53, 255, 0.5); }
}

.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT-SPECIFIC: SIBYL BRANDING
   Oracle theme — knowledge, memory, collective intelligence
   ═══════════════════════════════════════════════════════════════ */

/* Oracle indicator animation - mystical shimmer */
@keyframes oracle-shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes oracle-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Logo sizing */
.VPNavBarTitle .logo {
  height: 36px;
  width: auto;
}

@media (min-width: 960px) {
  .VPNavBarTitle .logo {
    height: 42px;
  }
}

/* Hero section enhancements */
.dark .VPHero .text {
  position: relative;
}


/* Feature cards with oracle-themed icons */
.dark .VPFeature .icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(128, 255, 234, 0.4));
}

:root:not(.dark) .VPFeature .icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 6px rgba(126, 43, 213, 0.3));
}

/* Sidebar section dividers - only between sections */
.dark .VPSidebarItem.level-0 + .VPSidebarItem.level-0 {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(128, 255, 234, 0.08);
}

:root:not(.dark) .VPSidebarItem.level-0 + .VPSidebarItem.level-0 {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(126, 43, 213, 0.08);
}

/* Footer with project branding */
.dark .VPFooter::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--iris-purple) 20%,
    var(--iris-cyan) 50%,
    var(--iris-purple) 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: oracle-flow 8s ease infinite;
  margin-bottom: 24px;
}

:root:not(.dark) .VPFooter::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--dawn-purple) 20%,
    var(--dawn-cyan) 50%,
    var(--dawn-purple) 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: oracle-flow 8s ease infinite;
  margin-bottom: 24px;
}

/* API page method signatures */
.dark .vp-doc h3 code {
  background: linear-gradient(135deg, var(--iris-bg-code), var(--iris-bg-elevated));
  border: 1px solid rgba(225, 53, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 1rem;
}

:root:not(.dark) .vp-doc h3 code {
  background: linear-gradient(135deg, var(--dawn-bg-code), var(--dawn-bg-elevated));
  border: 1px solid rgba(126, 43, 213, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 1rem;
}

/* Table of contents active indicator */
.dark .VPDocOutlineItem.root .outline-link.active {
  color: var(--iris-cyan);
  border-left: 2px solid var(--iris-purple);
  padding-left: 10px;
  margin-left: -2px;
}

:root:not(.dark) .VPDocOutlineItem.root .outline-link.active {
  color: var(--dawn-purple);
  border-left: 2px solid var(--dawn-cyan);
  padding-left: 10px;
  margin-left: -2px;
}

/* ═══════════════════════════════════════════════════════════════
   MERMAID DIAGRAMS
   Live SVG diagrams rendered client-side from ```mermaid fences.
   ═══════════════════════════════════════════════════════════════ */

.mermaid-diagram {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1rem;
  border-radius: 12px;
  overflow: auto;
}

.mermaid-diagram svg {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  background: transparent !important;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.mermaid-diagram svg:hover {
  transform: scale(1.01);
}

/* Keep diagram type on the SilkCircuit mono stack */
.mermaid-diagram .nodeLabel,
.mermaid-diagram .edgeLabel,
.mermaid-diagram .cluster-label,
.mermaid-diagram text {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace !important;
}

/* Click-to-zoom hint */
.mermaid-diagram::after {
  content: 'Click to zoom';
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-style: italic;
  opacity: 0.6;
}

/* ── Dark mode (SilkCircuit Neon) ── */
.dark .mermaid-diagram {
  background: var(--iris-bg-elevated);
  border: 1px solid rgba(128, 255, 234, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(225, 53, 255, 0.08);
}

.dark .mermaid-diagram::after {
  color: var(--iris-text-dim);
}

/* ── Light mode (SilkCircuit Dawn) ── */
:root:not(.dark) .mermaid-diagram {
  background: var(--dawn-bg-panel);
  border: 1px solid rgba(126, 43, 213, 0.14);
  box-shadow: 0 2px 12px rgba(126, 43, 213, 0.08);
}

:root:not(.dark) .mermaid-diagram::after {
  color: var(--dawn-text-dim);
}

/* ── Click-to-zoom modal ── */
.mermaid-zoom-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding: 2rem;
  cursor: zoom-out;
  overflow: auto;
  backdrop-filter: blur(8px);
}

.mermaid-zoom-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mermaid-zoom-modal svg {
  max-width: 95vw;
  max-height: 95vh;
  width: auto !important;
  height: auto !important;
  padding: 2rem;
  border-radius: 12px;
  cursor: zoom-out;
}

.dark .mermaid-zoom-modal {
  background: rgba(18, 18, 24, 0.95);
}

.dark .mermaid-zoom-modal svg {
  background: var(--iris-bg-panel) !important;
  box-shadow: 0 0 40px rgba(225, 53, 255, 0.3);
}

:root:not(.dark) .mermaid-zoom-modal {
  background: rgba(250, 248, 255, 0.95);
}

:root:not(.dark) .mermaid-zoom-modal svg {
  background: var(--dawn-bg-panel) !important;
  box-shadow: 0 8px 40px rgba(126, 43, 213, 0.2);
}
