/* ==========================================================================
   VIZOPS DESIGN SYSTEM v2.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Typography */
    --font-display: 'Space Grotesk', 'SF Pro Display', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', 'SF Pro Text', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* Color Palette - Refined for sophistication */
    --color-primary-50: #f0fdfa;
    --color-primary-100: #ccfbf1;
    --color-primary-200: #99f6e4;
    --color-primary-300: #5eead4;
    --color-primary-400: #2dd4bf;
    --color-primary-500: #14b8a6;
    --color-primary-600: #0d9488;
    --color-primary-700: #0f766e;
    --color-primary-800: #115e59;
    --color-primary-900: #134e4a;

    /* Accent - Cyan for data visualization */
    --color-accent-400: #22d3ee;
    --color-accent-500: #06b6d4;
    --color-accent-600: #0891b2;

    /* ML Purple - For RL/ML specific elements */
    --color-ml-300: #c4b5fd;
    --color-ml-400: #a78bfa;
    --color-ml-500: #8b5cf6;

    /* Neutrals - Dark theme */
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-400: #a3a3a3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;
    --color-neutral-950: #0a0a0a;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Spacing Scale (8px grid) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow-primary: 0 0 40px -10px var(--color-primary-500);
    --shadow-glow-accent: 0 0 40px -10px var(--color-accent-500);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;

    /* Accessibility - Focus ring colors */
    --focus-ring-color: #2dd4bf;
    --focus-ring-offset: 2px;
    --focus-ring-width: 2px;

    /* Theme Tokens (light defaults) */
    --bg-primary: #faf9f7;
    --bg-secondary: #f0efed;
    --bg-surface: rgba(0, 0, 0, 0.03);
    --bg-surface-hover: rgba(0, 0, 0, 0.06);
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --text-body: #374151;
    --text-muted: #8c8c8c;
    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.2);
    --surface: rgba(0, 0, 0, 0.03);
    --surface-hover: rgba(0, 0, 0, 0.06);
    --accent: #b45309;
    --accent-hover: #92400e;
    --accent-subtle: rgba(180, 83, 9, 0.08);
    --accent-border: rgba(180, 83, 9, 0.25);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover-border: rgba(180, 83, 9, 0.3);
    --dropdown-bg: #ffffff;
    --header-bg: rgba(250, 249, 247, 0.9);
    --backdrop-1: rgba(16, 185, 129, 0.06);
    --backdrop-2: rgba(124, 58, 237, 0.04);
    --code-bg: #f6f8fa;
    --code-text: #0550ae;
    --code-inline-bg: rgba(5, 80, 174, 0.08);
    --blockquote-border: #0d9488;
    --blockquote-bg: rgba(13, 148, 136, 0.05);
    --skeleton-bg: rgba(0, 0, 0, 0.08);
    --tag-bg: rgba(180, 83, 9, 0.08);
    --tag-text: #92400e;
    --tag-border: rgba(180, 83, 9, 0.2);
    --footer-text: #6b7280;
    --share-btn-bg: rgba(0, 0, 0, 0.03);
    --share-btn-border: rgba(0, 0, 0, 0.1);
    --share-btn-text: #374151;
    --like-btn-border: rgba(0, 0, 0, 0.1);
    --like-btn-bg: rgba(0, 0, 0, 0.03);
    --link-color: #0d6e4e;
    --company-logo-filter: none;
    --link-hover: #0d9488;
    --hr-color: rgba(0, 0, 0, 0.1);
    --gradient-text-from: #1a1a1a;
    --gradient-text-to: #374151;
    --img-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

/* ====== DARK THEME ====== */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --bg-surface-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-body: #d4d4d8;
    --text-muted: #737373;
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-subtle: rgba(245, 158, 11, 0.1);
    --accent-border: rgba(245, 158, 11, 0.3);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-border: rgba(245, 158, 11, 0.3);
    --dropdown-bg: #1c1c1c;
    --header-bg: rgba(10, 10, 10, 0.8);
    --backdrop-1: #10b98133;
    --backdrop-2: #7c3aed22;
    --code-bg: #1e1e2e;
    --code-text: #61afef;
    --code-inline-bg: rgba(97, 175, 239, 0.1);
    --blockquote-border: #34d399;
    --blockquote-bg: rgba(52, 211, 153, 0.05);
    --skeleton-bg: rgba(255, 255, 255, 0.1);
    --tag-bg: rgba(245, 158, 11, 0.1);
    --tag-text: #f59e0b;
    --tag-border: rgba(245, 158, 11, 0.3);
    --footer-text: #a3a3a3;
    --share-btn-bg: rgba(255, 255, 255, 0.05);
    --share-btn-border: rgba(255, 255, 255, 0.1);
    --share-btn-text: #ffffff;
    --like-btn-border: rgba(255, 255, 255, 0.1);
    --like-btn-bg: rgba(255, 255, 255, 0.05);
    --link-color: #34d399;
    --link-hover: #6ee7b7;
    --hr-color: rgba(255, 255, 255, 0.1);
    --gradient-text-from: #ffffff;
    --gradient-text-to: #d4d4d4;
    --img-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Theme-aware base styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-body);
}

/* Theme transition for smooth switching */
body,
.min-h-screen {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   LIGHT THEME — Tailwind Class Overrides
   Remaps hardcoded dark-theme Tailwind classes to CSS variable values
   when [data-theme="light"] is active. This avoids editing 400+ JSX refs.
   ========================================================================== */

/* --- Backgrounds --- */
[data-theme="light"] .bg-neutral-950,
[data-theme="light"] .bg-neutral-900,
[data-theme="light"] .bg-\[\#0a0a0a\] {
    background-color: var(--bg-primary) !important;
}
[data-theme="light"] .bg-neutral-800 {
    background-color: var(--bg-secondary) !important;
}
/* Note: .bg-black intentionally NOT overridden — it's used for
   modal backdrops, image overlays, and indicators that must stay dark. */
/* Translucent white surfaces → translucent black surfaces */
[data-theme="light"] .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .bg-white\/15 {
    background-color: rgba(0, 0, 0, 0.055) !important;
}
[data-theme="light"] .bg-white\/20 {
    background-color: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .hover\:bg-white\/15:hover {
    background-color: rgba(0, 0, 0, 0.055) !important;
}
/* Black overlays stay dark (modals, backdrops) */

/* --- Text Colors --- */
[data-theme="light"] .text-white {
    color: var(--text-primary) !important;
}
[data-theme="light"] .text-neutral-100,
[data-theme="light"] .text-neutral-200 {
    color: var(--text-primary) !important;
}
[data-theme="light"] .text-neutral-300 {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .text-neutral-400 {
    color: var(--text-muted) !important;
}
[data-theme="light"] .text-neutral-500 {
    color: var(--text-muted) !important;
}
/* Accent text */
[data-theme="light"] .text-amber-400,
[data-theme="light"] .text-amber-500 {
    color: var(--accent) !important;
}
[data-theme="light"] .text-amber-300 {
    color: var(--accent-hover) !important;
}

/* --- Borders --- */
[data-theme="light"] .border-white\/5,
[data-theme="light"] .border-white\/10 {
    border-color: var(--border) !important;
}
[data-theme="light"] .border-white\/20,
[data-theme="light"] .border-white\/30 {
    border-color: var(--border-hover) !important;
}
[data-theme="light"] .border-neutral-800,
[data-theme="light"] .border-neutral-700 {
    border-color: var(--border) !important;
}
/* Accent borders */
[data-theme="light"] .border-amber-400\/20,
[data-theme="light"] .border-amber-400\/30,
[data-theme="light"] .border-amber-400\/50 {
    border-color: var(--accent-border) !important;
}

/* --- Hover states --- */
[data-theme="light"] .hover\:bg-white\/5:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .hover\:bg-white\/10:hover {
    background-color: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .hover\:bg-white\/20:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .hover\:border-white\/20:hover,
[data-theme="light"] .hover\:border-white\/30:hover {
    border-color: var(--border-hover) !important;
}
[data-theme="light"] .hover\:border-amber-400\/30:hover,
[data-theme="light"] .hover\:border-amber-400\/50:hover {
    border-color: var(--accent-border) !important;
}
[data-theme="light"] .hover\:text-white:hover {
    color: var(--text-primary) !important;
}
[data-theme="light"] .hover\:text-amber-400:hover {
    color: var(--accent) !important;
}
[data-theme="light"] .hover\:bg-neutral-800:hover {
    background-color: var(--bg-secondary) !important;
}
[data-theme="light"] .hover\:bg-amber-400\/10:hover {
    background-color: var(--accent-subtle) !important;
}
[data-theme="light"] .hover\:bg-amber-400\/20:hover {
    background-color: rgba(180, 83, 9, 0.12) !important;
}

/* --- Gradients --- */
[data-theme="light"] .from-neutral-950 {
    --tw-gradient-from: var(--bg-primary) !important;
}
[data-theme="light"] .to-neutral-950 {
    --tw-gradient-to: var(--bg-primary) !important;
}
[data-theme="light"] .from-neutral-900 {
    --tw-gradient-from: var(--bg-secondary) !important;
}
[data-theme="light"] .to-neutral-900 {
    --tw-gradient-to: var(--bg-secondary) !important;
}
/* Translucent gradient stops */
[data-theme="light"] .from-white\/5 {
    --tw-gradient-from: rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .from-white\/8 {
    --tw-gradient-from: rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .from-white\/10 {
    --tw-gradient-from: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .from-white\/20 {
    --tw-gradient-from: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .to-white\/0 {
    --tw-gradient-to: transparent !important;
}
[data-theme="light"] .to-white\/3 {
    --tw-gradient-to: rgba(0, 0, 0, 0.015) !important;
}
[data-theme="light"] .to-white\/5 {
    --tw-gradient-to: rgba(0, 0, 0, 0.03) !important;
}

/* --- Accent backgrounds --- */
[data-theme="light"] .bg-amber-400\/10,
[data-theme="light"] .bg-amber-400\/5 {
    background-color: var(--accent-subtle) !important;
}
[data-theme="light"] .bg-amber-500\/10 {
    background-color: var(--accent-subtle) !important;
}

/* --- Ring / Focus colors --- */
[data-theme="light"] .ring-white\/10,
[data-theme="light"] .ring-white\/20 {
    --tw-ring-color: var(--border) !important;
}

/* --- Divide colors --- */
[data-theme="light"] .divide-white\/10 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--border) !important;
}

/* --- Placeholder text --- */
[data-theme="light"] .placeholder-neutral-500::placeholder,
[data-theme="light"] .placeholder\:text-neutral-500::placeholder {
    color: var(--text-muted) !important;
}

/* --- Shadow overrides (reduce dark shadows in light mode) --- */
[data-theme="light"] .shadow-amber-500\/25 {
    --tw-shadow-color: rgba(180, 83, 9, 0.15) !important;
}
[data-theme="light"] .shadow-black\/20,
[data-theme="light"] .shadow-black\/30 {
    --tw-shadow-color: rgba(0, 0, 0, 0.08) !important;
}

/* --- Translucent neutral backgrounds --- */
[data-theme="light"] .bg-neutral-900\/30 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .bg-neutral-900\/50 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .bg-neutral-900\/95 {
    background-color: rgba(250, 249, 247, 0.95) !important;
}
[data-theme="light"] .hover\:bg-neutral-800\/80:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .bg-neutral-800\/80 {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* --- Gradient edge fades (marquee, overlays, etc.) --- */
[data-theme="light"] .from-neutral-900\/30 {
    --tw-gradient-from: rgba(250, 249, 247, 0.3) !important;
}
[data-theme="light"] .to-neutral-900\/30 {
    --tw-gradient-to: rgba(250, 249, 247, 0.3) !important;
}
[data-theme="light"] .from-neutral-900\/50 {
    --tw-gradient-from: rgba(250, 249, 247, 0.5) !important;
}

/* --- Translucent white text (invisible on light bg) --- */
[data-theme="light"] .text-white\/80 {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .text-white\/90 {
    color: var(--text-primary) !important;
}
[data-theme="light"] .text-white\/60,
[data-theme="light"] .text-white\/70 {
    color: var(--text-muted) !important;
}

/* --- Focus text overrides --- */
[data-theme="light"] .focus\:text-white:focus {
    color: var(--text-primary) !important;
}

/* --- Selection overrides --- */
[data-theme="light"] .selection\:bg-amber-400\/30 *::selection,
[data-theme="light"] .selection\:bg-amber-400\/30::selection {
    background-color: rgba(180, 83, 9, 0.15) !important;
}
[data-theme="light"] .selection\:text-amber-100 *::selection,
[data-theme="light"] .selection\:text-amber-100::selection {
    color: #92400e !important;
}

/* --- min-h-screen background --- */
[data-theme="light"] .min-h-screen {
    background-color: var(--bg-primary) !important;
    color: var(--text-body) !important;
}

/* --- Gradient text (bg-clip-text) with white/light gradients → dark in light mode --- */
[data-theme="light"] .bg-clip-text.from-white {
    --tw-gradient-from: #1a1a1a !important;
    --tw-gradient-to: rgba(26, 26, 26, 0) !important;
}
[data-theme="light"] .bg-clip-text.via-neutral-100 {
    --tw-gradient-via-stops: , #4a4a4a, !important;
    --tw-gradient-stops: var(--tw-gradient-from), #4a4a4a, var(--tw-gradient-to) !important;
}
[data-theme="light"] .bg-clip-text.to-neutral-300 {
    --tw-gradient-to: #7a7a7a !important;
}
/* Ghost/watermark text: from-white/20 to-white/5 */
[data-theme="light"] .bg-clip-text.from-white\/20 {
    --tw-gradient-from: rgba(26, 26, 26, 0.15) !important;
}
[data-theme="light"] .bg-clip-text.to-white\/5 {
    --tw-gradient-to: rgba(26, 26, 26, 0.04) !important;
}

/* --- Radial gradient backgrounds (decorative blobs) --- */
[data-theme="light"] .bg-\[radial-gradient\(circle_at_30\%_30\%\,\#10b98133\,transparent_60\%\)\] {
    background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.08), transparent 60%) !important;
}
[data-theme="light"] .bg-\[radial-gradient\(circle_at_70\%_70\%\,\#7c3aed22\,transparent_60\%\)\] {
    background: radial-gradient(circle at 70% 70%, rgba(124, 58, 237, 0.05), transparent 60%) !important;
}

/* ==========================================================================
   LIGHT THEME — Custom Component Overrides
   Remaps hardcoded hex colors in solution pages, use-case accordions,
   problem grids, comparison boxes, intervention panels, etc.
   ========================================================================== */

/* --- Translucent amber text (case study category tags) --- */
[data-theme="light"] .text-amber-400\/80 {
    color: #b45309 !important;
}
[data-theme="light"] .text-amber-400\/70 {
    color: #c2410c !important;
}

/* --- Use Case Accordions --- */
[data-theme="light"] .use-case-accordion {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .use-case-accordion:hover {
    border-color: rgba(13, 148, 136, 0.4);
}
[data-theme="light"] .use-case-accordion[open] {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(13, 148, 136, 0.5);
}
[data-theme="light"] .use-case-title {
    color: #1a1a1a;
}
[data-theme="light"] .use-case-icon {
    color: #0d9488;
}
[data-theme="light"] .use-case-metric-badge {
    background: rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.3);
}
[data-theme="light"] .metric-value-small {
    color: #0d9488;
}
[data-theme="light"] .metric-label-small {
    color: #0f766e;
}
[data-theme="light"] .accordion-chevron {
    color: #737373;
}
[data-theme="light"] .use-case-accordion[open] .accordion-chevron {
    color: #0d9488;
}
[data-theme="light"] .use-case-content {
    border-top-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .use-case-content p {
    color: #4a4a4a;
}
[data-theme="light"] .use-case-scenario {
    color: #5c5c5c;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .use-case-highlight {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(6, 182, 212, 0.04));
    color: #333;
}
[data-theme="light"] .use-case-highlight strong {
    color: #0d9488;
}

/* --- Problem Grid --- */
[data-theme="light"] .problem-card {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.2);
}
[data-theme="light"] .problem-card:hover {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
}
[data-theme="light"] .problem-icon-svg {
    color: #dc2626;
}
[data-theme="light"] .problem-title {
    color: #dc2626;
}
[data-theme="light"] .problem-desc {
    color: #5c5c5c;
}
[data-theme="light"] .impact-number {
    color: #dc2626;
}
[data-theme="light"] .impact-label {
    color: #737373;
}
[data-theme="light"] .problem-impact {
    border-top-color: rgba(239, 68, 68, 0.15);
}

/* --- Comparison Box --- */
[data-theme="light"] .comparison-before {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="light"] .comparison-after {
    background: rgba(13, 148, 136, 0.05);
    border-color: rgba(13, 148, 136, 0.25);
}
[data-theme="light"] .comparison-before .comparison-label {
    color: #dc2626;
}
[data-theme="light"] .comparison-after .comparison-label {
    color: #0d9488;
}
[data-theme="light"] .comparison-content {
    color: #4a4a4a;
}

/* --- Stats Row --- */
[data-theme="light"] .stats-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .stat-number {
    color: #1a1a1a;
}
[data-theme="light"] .stat-label {
    color: #737373;
}

/* --- Result Callout --- */
[data-theme="light"] .result-callout {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(6, 182, 212, 0.04) 100%);
    border-color: rgba(13, 148, 136, 0.3);
}
[data-theme="light"] .result-metric {
    color: #0d9488;
}

/* --- Case Study Teaser --- */
[data-theme="light"] .case-study-teaser {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: #4a4a4a;
}
[data-theme="light"] .case-study-teaser strong {
    color: #0d9488;
}

/* --- Solution Content Prose --- */
[data-theme="light"] .solution-content > p:first-of-type {
    color: #5c5c5c;
}
[data-theme="light"] .solution-content blockquote {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-left-color: #0d9488;
}
[data-theme="light"] .solution-content blockquote p {
    color: #333;
}
[data-theme="light"] .solution-content blockquote p:last-child {
    color: #5c5c5c;
}

/* --- Intervention Panel --- */
[data-theme="light"] .intervention-panel {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .intervention-sidebar {
    background: rgba(0, 0, 0, 0.03);
    border-right-color: rgba(0, 0, 0, 0.08);
}
@media (max-width: 900px) {
    [data-theme="light"] .intervention-sidebar {
        border-bottom-color: rgba(0, 0, 0, 0.08);
    }
}
[data-theme="light"] .intervention-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .intervention-nav-item.active {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: rgba(13, 148, 136, 0.3);
}
[data-theme="light"] .nav-number {
    background: rgba(0, 0, 0, 0.06);
    color: #737373;
}
[data-theme="light"] .intervention-nav-item.active .nav-number {
    background: linear-gradient(135deg, #0d9488, #0891b2);
    color: #fff;
}
[data-theme="light"] .nav-title {
    color: #5c5c5c;
}
[data-theme="light"] .intervention-nav-item.active .nav-title {
    color: #1a1a1a;
}
[data-theme="light"] .nav-subtitle {
    color: #8c8c8c;
}
[data-theme="light"] .intervention-nav-item.active .nav-subtitle {
    color: #0d9488;
}
[data-theme="light"] .intervention-detail-content h4 {
    color: #0d9488;
}
[data-theme="light"] .intervention-detail-content > p {
    color: #4a4a4a;
}
[data-theme="light"] .intervention-detail-content .reward-formula {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(13, 148, 136, 0.3);
    color: #0d9488;
}
[data-theme="light"] .intervention-visual {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

/* --- Trace Stream --- */
[data-theme="light"] .trace-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .trace-label {
    color: #737373;
}
[data-theme="light"] .trace-value {
    color: #333;
}
[data-theme="light"] .trace-value.success {
    color: #059669;
}

/* --- Reward Sliders --- */
[data-theme="light"] .slider-row > span:first-child {
    color: #5c5c5c;
}
[data-theme="light"] .slider-row > span:last-child {
    color: #0d9488;
}

/* --- Pareto Chart & Steer --- */
[data-theme="light"] .axis-label {
    color: #737373;
}
[data-theme="light"] .steer-label {
    color: #737373;
}
[data-theme="light"] .steer-output {
    background: rgba(13, 148, 136, 0.06);
    border-color: rgba(13, 148, 136, 0.2);
}

/* --- Use Case Tabs (legacy) --- */
[data-theme="light"] .use-case-tabs h3 {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Skip Navigation Link
   -------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 24px;
    background: var(--color-primary-500);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: none;
}

/* --------------------------------------------------------------------------
   Focus States - Visible for keyboard navigation
   -------------------------------------------------------------------------- */

/* Default focus-visible styles for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    border-radius: var(--radius-md);
}

/* Remove default outline for mouse users (focus without focus-visible) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for dark backgrounds */
.bg-neutral-950 a:focus-visible,
.bg-neutral-950 button:focus-visible,
[class*="bg-neutral-9"] a:focus-visible,
[class*="bg-neutral-9"] button:focus-visible {
    outline-color: var(--color-primary-400);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.2);
}

/* Focus styles for cards and interactive containers */
[role="button"]:focus-visible,
[role="link"]:focus-visible,
.group:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* --------------------------------------------------------------------------
   Color Contrast Fixes
   -------------------------------------------------------------------------- */

/* Improve contrast for neutral-400 text on dark backgrounds */
/* Original: #a3a3a3 on #0a0a0a = ~7.5:1 (passes WCAG AAA) */
/* But some elements need higher contrast */

/* Secondary text - ensure minimum 4.5:1 contrast */
.text-neutral-400 {
    color: #a3a3a3; /* 7.5:1 contrast on #0a0a0a - passes AAA */
}

/* Improve placeholder contrast */
::placeholder {
    color: #737373; /* neutral-500 - 4.6:1 contrast, passes AA */
    opacity: 1;
}

/* Improve disabled state contrast */
:disabled,
[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Link colors with better contrast */
a {
    color: inherit;
}

/* Ensure sufficient contrast for teal text on dark */
.text-teal-400 {
    color: #2dd4bf; /* 8.5:1 contrast on #0a0a0a */
}

.text-teal-300 {
    color: #5eead4; /* 11:1 contrast on #0a0a0a */
}

/* Error state with sufficient contrast */
.text-red-400 {
    color: #f87171; /* 5.3:1 contrast on #0a0a0a */
}

/* Success state */
.text-emerald-400 {
    color: #34d399; /* 8.8:1 contrast on #0a0a0a */
}

/* --------------------------------------------------------------------------
   Reduced Motion Support
   -------------------------------------------------------------------------- */

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

    /* Keep essential transitions but make them instant */
    .transition-all,
    .transition-colors,
    .transition-opacity,
    .transition-transform {
        transition-duration: 0.01ms !important;
    }

    /* Disable hover transforms */
    *:hover {
        transform: none !important;
    }

    /* Disable parallax and floating animations */
    [class*="animate-"] {
        animation: none !important;
    }

    /* Keep focus indicators visible */
    :focus-visible {
        transition: outline-offset 0.01ms ease !important;
    }
}

/* --------------------------------------------------------------------------
   Screen Reader Only (Visually Hidden)
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Make sr-only content visible when focused (for skip links) */
.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* --------------------------------------------------------------------------
   Touch Target Sizes (Minimum 44x44px for mobile)
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
    button,
    a,
    input[type="checkbox"],
    input[type="radio"],
    select {
        min-height: 44px;
        min-width: 44px;
    }

    /* Ensure clickable areas are large enough */
    .touch-target {
        position: relative;
    }

    .touch-target::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 44px;
        min-height: 44px;
    }
}

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

/* Body and base text */
body,
p,
button,
input,
textarea,
select {
    font-family: var(--font-body);
    font-weight: 400;
}

/* Headlines - Space Grotesk for tech credibility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    font-weight: 600;
}

h1 {
    font-weight: 700;
    line-height: 1.1;
    font-size: clamp(36px, 5vw, 56px);
}

h2 {
    font-weight: 600;
    line-height: 1.2;
    font-size: clamp(28px, 4vw, 40px);
}

h3 {
    font-weight: 600;
    line-height: 1.3;
    font-size: clamp(20px, 3vw, 28px);
}

h4 {
    font-weight: 600;
    line-height: 1.4;
    font-size: clamp(18px, 2.5vw, 22px);
}

/* Metrics and numbers - Monospace with tabular figures */
.metric-value,
.stat-number,
[data-metric] {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum' 1, 'zero' 1;
    letter-spacing: -0.01em;
}

/* Code and technical text */
code, pre, .code-text {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.feature h3 {
    font-weight: 600;
}

.submit-button, .subscribe-button {
    font-weight: 500;
}

p {
    font-weight: 400;
    line-height: 1.6;
}


body {
    line-height: 1.6;
}

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

header {
    padding: 20px 0;
    background-color: transparent;
}

.header-content {
    font-family: 'Inter';
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    text-decoration: none;
}

.logo-image {
    margin-top: 12px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.contact-button {
    padding: 8px 16px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.contact-button:hover {
    background-color: #2980b9;
}

.hero {
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #2c3e50;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 18px;
    color: #5a6c7d;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.input-form-container {
    display: block;
    max-width: 400px;
    margin: 0 auto;
    padding: 8px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.email-icon {
    position: absolute;
    left: 12px;
    color: #7f8c8d;
}

#subscribeEmail {
    width: 100%;
    padding: 12px;
    padding-left: 44px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: #2c3e50;             
    border: 1px solid #e1e8ed;
}

/* Also add these to handle the placeholder text color */
#subscribeEmail::placeholder {
    color: #7f8c8d;
}

.subscribe-button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.subscribe-button:hover {
    background: #2980b9;
}

.arc-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    overflow: hidden;
}

.arc-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.mission {
    padding: 40px 0;
}

.mission-label {
    font-size: 18px;
    display: inline-block;
    color: #3498db;
    margin-bottom: 20px;
    padding: 8px 24px;
    background: linear-gradient(to bottom, 
        #e3f2fd 0%,
        #bbdefb 100%
    );
    border-radius: 9999px;
    border: 1px solid #90caf9;
    font-weight: 500;
}

.mission h2 {
    font-weight: 600;
    line-height: 1.2;
    font-size: 36px;
    margin-bottom: 24px;
    max-width: 900px;
    color: #2c3e50;
}

.text-4xl h2 {
    font-weight: 600;
    line-height: 1.2;
    font-size: 36px;
    margin-bottom: 24px;
    max-width: 800px;
    color: #2c3e50;
}

.mission p {
    font-size: 18px;
    color: #5a6c7d;
    max-width: 900px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.feature {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #e3f2fd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #90caf9;
}

.feature h3 {
    font-size: 20px;
    color: #2c3e50;
}

.feature p {
    color: #5a6c7d;
    font-size: 16px;
    margin-top: -10px;
}

.perspective-1000 {
    perspective: 1000px;
    }
    
    .backface-hidden {
    backface-visibility: hidden;
    }
    
    .rotate-y-180 {
    transform: rotateY(180deg);
    }
    
    .rotate-y-0 {
    transform: rotateY(0deg);
    }

.cta {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(to bottom, transparent, #f0f4f8);
    position: relative;
}

.cta-image-container {
    /*padding: 120px 0;*/
    width: 100%;
    margin-bottom: -20px;  /* Spacing between image and heading */
}

.cta-image {
    width: 100%;
    height: auto;
    display: block;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        #e1e8ed, 
        transparent
    );
}

.primary-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    background-color: #2980b9;
}

.cta-button {
    display: inline-block;
    margin-top: -20px;
    padding: 8px 16px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.cta-button:hover {
    background-color: #2980b9;
}


/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 32px;
    }

    /* Header mobile styles - completely rewritten */
    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        width: 100%;
    }

    .logo {
        flex: 0 0 auto;
    }

    .contact-button {
        flex: 0 0 auto;
        padding: 8px 12px !important;
        font-size: 13px !important;
        width: auto !important;
        max-width: 120px !important;
        min-width: auto !important;
        white-space: nowrap;
        text-align: center;
        display: inline-block;
    }

    /* Hero section mobile styles */
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
        padding: 0 8px;
    }

    .hero p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
        padding: 0 8px;
    }

    /* Mission section mobile styles */
    .mission {
        padding: 32px 0;
    }

    .mission h2 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .mission p {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Features mobile styles */
    .features {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }

    .feature {
        padding: 20px;
        background: white;
        border-radius: 12px;
        border: 1px solid #e1e8ed;
    }

    .feature h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .feature p {
        font-size: 14px;
        margin-top: 0;
    }

    /* Use Cases mobile styles */
    .use-cases .container {
        padding: 0 12px;
    }

    /* Modalities mobile styles */
    .modalities .container {
        padding: 0 12px;
    }

    /* Form mobile styles */
    .input-form-container {
        max-width: 100%;
        margin: 0 16px;
    }

    /* Arc container mobile */
    .arc-container {
        height: 120px;
    }

    /* CTA mobile styles */
    .cta {
        padding: 40px 0;
    }

    .cta-image {
        height: 120px;
    }

    /* Modal mobile styles */
    .modal-content {
        margin: 20px;
        padding: 24px;
        max-width: calc(100% - 40px);
    }

    .modal h2 {
        font-size: 24px;
        margin-top: 0;
    }

    /* Typography adjustments */
    h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    /* Button adjustments */
    .primary-button,
    .cta-button {
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 24px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 24px !important;
        line-height: 1.2 !important;
        padding: 0 4px;
    }

    .hero p {
        font-size: 14px !important;
        line-height: 1.4 !important;
        padding: 0 4px;
    }

    .mission h2 {
        font-size: 20px;
    }

    .mission p {
        font-size: 14px;
    }

    .feature {
        padding: 16px;
    }

    .input-form-container {
        margin: 0 8px;
    }

    .modal-content {
        margin: 16px;
        padding: 20px;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 18px;
    }

    .mission h2 {
        font-size: 32px;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 50px auto;
    padding: 40px;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.modal h2 {
    font-size: 36px;
    margin-top: -20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.modal p {
    color: #5a6c7d;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #7f8c8d;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.submit-button:hover {
    transform: translateY(-1px);
    background-color: #2980b9;
}

.email-section {
    width: 100%;
    box-sizing: border-box;
    margin-top: 30px;
    padding: 20px;
    background-color: #f0f4f8;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.email-section h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-top: -6px;
    margin-bottom: 8px;
}

.email-section p {
    margin-top: 0px;
    margin-bottom: 12px;
    color: #5a6c7d;
}

.email-link {
    color: #3498db;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.email-link:hover {
    color: #2980b9;
}

.email-link:before {
    content: '@';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #e3f2fd;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    color: #3498db;
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 14px;
    border-top: 1px solid #e1e8ed;
    background-color: #f8f9fa;
}

/* ==========================================================================
   SOLUTION PAGE COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Metrics Grid - Hero stats display
   -------------------------------------------------------------------------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.metric-card {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(45, 212, 191, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(20, 184, 166, 0.15);
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2dd4bf 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #a3a3a3;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Problem Grid - Pain points display
   -------------------------------------------------------------------------- */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .problem-grid {
        grid-template-columns: 1fr;
    }
}

.problem-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.problem-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
}

.problem-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.problem-icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #f87171;
    flex-shrink: 0;
}

.problem-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.problem-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: #f87171;
}

.problem-desc {
    font-size: 0.9rem;
    color: #a3a3a3;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.problem-impact {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(239, 68, 68, 0.15);
}

.impact-number {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fca5a5;
}

.impact-label {
    font-size: 0.8rem;
    color: #737373;
}

/* --------------------------------------------------------------------------
   Comparison Box - Before/After display
   -------------------------------------------------------------------------- */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .comparison-box {
        grid-template-columns: 1fr;
    }
}

.comparison-before,
.comparison-after {
    border-radius: 1rem;
    padding: 1.5rem;
}

.comparison-before {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.comparison-after {
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.comparison-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.comparison-before .comparison-label {
    color: #f87171;
}

.comparison-after .comparison-label {
    color: #2dd4bf;
}

.comparison-content {
    font-size: 0.95rem;
    color: #d4d4d4;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Result Callout - Highlighted metrics in use cases
   -------------------------------------------------------------------------- */
.result-callout {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    display: inline-block;
}

.result-metric {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #2dd4bf;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Stats Row - Results section metrics
   -------------------------------------------------------------------------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2.5rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #737373;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Approach Section - Solution explanation
   -------------------------------------------------------------------------- */
.approach-section {
    margin: 1.5rem 0;
}

.approach-section pre {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem !important;
    overflow-x: auto;
    font-size: 0.9rem;
}

.approach-section code {
    color: #2dd4bf !important;
    background: transparent !important;
}

/* --------------------------------------------------------------------------
   Use Case Accordion - Expandable scenario sections
   -------------------------------------------------------------------------- */
.use-case-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.use-case-accordion {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.use-case-accordion:hover {
    border-color: rgba(45, 212, 191, 0.3);
}

.use-case-accordion[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(45, 212, 191, 0.4);
}

.use-case-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.use-case-summary::-webkit-details-marker {
    display: none;
}

.use-case-summary::marker {
    display: none;
}

.use-case-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.use-case-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #2dd4bf;
    flex-shrink: 0;
}

.use-case-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
}

.use-case-metric-badge {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 2rem;
    padding: 0.375rem 0.875rem;
    flex-shrink: 0;
}

.metric-value-small {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: #2dd4bf;
}

.metric-label-small {
    font-size: 0.75rem;
    color: #5eead4;
    text-transform: lowercase;
}

.accordion-chevron {
    width: 1.25rem;
    height: 1.25rem;
    color: #737373;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.use-case-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
    color: #2dd4bf;
}

.use-case-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0;
}

.use-case-content p {
    margin: 1rem 0;
    font-size: 0.95rem;
    color: #d4d4d4;
    line-height: 1.7;
}

.use-case-content p:first-child {
    margin-top: 1.25rem;
}

.use-case-content .result-callout {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.use-case-scenario {
    font-size: 0.9rem;
    color: #a3a3a3;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.use-case-highlight {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(6, 182, 212, 0.05));
    border-left: 3px solid #14b8a6;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #e5e5e5;
}

.use-case-highlight strong {
    color: #2dd4bf;
}

.case-study-teaser {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #d4d4d4;
    text-align: center;
}

.case-study-teaser strong {
    color: #2dd4bf;
}

/* Legacy tabs support (backwards compatibility) */
.use-case-tabs {
    margin: 1.5rem 0;
}

.use-case-tabs h3 {
    font-size: 1.5rem !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.use-case-tabs h3:first-child {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   Solution Content Prose Overrides
   -------------------------------------------------------------------------- */
.solution-content h1:first-child {
    display: none; /* Hide first h1 since we have hero */
}

.solution-content > p:first-of-type {
    font-size: 1.25rem;
    color: #d4d4d4;
    line-height: 1.7;
    margin-bottom: 0;
}

.solution-content blockquote {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 4px solid #2dd4bf;
    border-radius: 0 1rem 1rem 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: normal;
}

.solution-content blockquote p {
    font-size: 1.1rem;
    color: #e5e5e5;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.solution-content blockquote p:last-child {
    font-size: 0.9rem;
    color: #a3a3a3;
    font-style: normal;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Intervention Panel - Horizontal card layout with sidebar navigation
   -------------------------------------------------------------------------- */
.intervention-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    min-height: 400px;
}

@media (max-width: 900px) {
    .intervention-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

/* Left Sidebar Navigation */
.intervention-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

@media (max-width: 900px) {
    .intervention-sidebar {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

.intervention-nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

@media (max-width: 900px) {
    .intervention-nav-item {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
    }
}

.intervention-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.intervention-nav-item.active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
    border-color: rgba(45, 212, 191, 0.3);
}

.intervention-nav-item.active::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #2dd4bf, #06b6d4);
    border-radius: 3px 0 0 3px;
}

@media (max-width: 900px) {
    .intervention-nav-item.active::after {
        right: auto;
        bottom: -1px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 3px;
        border-radius: 3px 3px 0 0;
    }
}

.nav-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: #737373;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.intervention-nav-item.active .nav-number {
    background: linear-gradient(135deg, #2dd4bf, #06b6d4);
    color: #000;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

@media (max-width: 900px) {
    .nav-text {
        display: none;
    }
}

.nav-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #a3a3a3;
    transition: color 0.25s ease;
}

.intervention-nav-item.active .nav-title {
    color: #ffffff;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: #525252;
    transition: color 0.25s ease;
}

.intervention-nav-item.active .nav-subtitle {
    color: #5eead4;
}

/* Right Detail Panel */
.intervention-detail {
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 900px) {
    .intervention-detail {
        padding: 1.5rem;
    }
}

.intervention-detail-content {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.intervention-detail-content.active {
    display: block;
}

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

.intervention-detail-content h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #2dd4bf;
    margin-bottom: 1rem;
}

.intervention-detail-content > p {
    font-size: 1rem;
    color: #d4d4d4;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.intervention-detail-content .reward-formula {
    display: block;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #5eead4;
    margin-bottom: 1.5rem;
}

/* Intervention Visual Containers */
.intervention-visual {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* TraceStream Demo */
.trace-stream-demo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .trace-stream-demo {
        grid-template-columns: 1fr;
    }
}

.trace-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.5rem;
}

.trace-label {
    font-size: 0.875rem;
    color: #737373;
    font-weight: 500;
}

.trace-value {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: #d4d4d4;
}

.trace-value.success {
    color: #34d399;
}

/* Reward Sliders */
.reward-sliders {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-row > span:first-child {
    width: 100px;
    font-size: 0.875rem;
    color: #a3a3a3;
    flex-shrink: 0;
}

.slider-bar {
    height: 8px;
    background: linear-gradient(90deg, #2dd4bf, #06b6d4);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.slider-row > span:last-child {
    width: 40px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #2dd4bf;
    text-align: right;
}

/* Pareto Chart */
.pareto-chart {
    position: relative;
    height: 200px;
    padding: 1rem;
}

.axis-label {
    font-size: 0.75rem;
    color: #737373;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.axis-label.y-axis {
    position: absolute;
    left: 0;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
}

.axis-label.x-axis {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.pareto-points {
    position: relative;
    width: 100%;
    height: 100%;
    margin-left: 2rem;
}

.pareto-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(45, 212, 191, 0.5);
    border: 2px solid #2dd4bf;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pareto-point.active {
    width: 16px;
    height: 16px;
    background: #2dd4bf;
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.5);
}

.pareto-curve {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 150'%3E%3Cpath d='M20 30 Q60 35 90 55 T160 120' stroke='%232dd4bf' stroke-width='2' fill='none' opacity='0.3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    pointer-events: none;
}

/* Steering Demo */
.steering-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.steer-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.steer-label {
    font-size: 0.875rem;
    color: #737373;
    min-width: 80px;
}

.steer-label.right {
    text-align: right;
}

.steer-slider {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #f59e0b, #737373 50%, #2dd4bf);
    border-radius: 4px;
    position: relative;
}

.steer-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 3px solid #2dd4bf;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.steer-output {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 0.5rem;
}

.output-label {
    font-size: 0.875rem;
    color: #737373;
}

.output-value {
    font-family: var(--font-display);
    font-weight: 600;
    color: #2dd4bf;
}

/* Improvement Chart */
.improvement-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: #a3a3a3;
    text-align: center;
}

.chart-area {
    position: relative;
    height: 120px;
    background:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20% 25%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.chart-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 1.5px;
}

.chart-line.baseline {
    bottom: 30%;
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    opacity: 0.6;
    clip-path: polygon(0 50%, 10% 60%, 20% 45%, 30% 55%, 40% 50%, 50% 52%, 60% 48%, 70% 50%, 80% 45%, 90% 48%, 100% 50%);
    height: 60px;
}

.chart-line.improvement {
    bottom: 20%;
    background: linear-gradient(90deg, #14b8a6 0%, #2dd4bf 50%, #5eead4 100%);
    clip-path: polygon(0 80%, 10% 75%, 20% 65%, 30% 55%, 40% 45%, 50% 38%, 60% 30%, 70% 25%, 80% 20%, 90% 15%, 100% 10%);
    height: 80px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #737373;
}

.legend-item::before {
    content: '';
    width: 12px;
    height: 3px;
    border-radius: 1.5px;
}

.legend-item.baseline::before {
    background: #f87171;
}

.legend-item.improvement::before {
    background: #2dd4bf;
}

.improvement-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .improvement-stats {
        grid-template-columns: 1fr;
    }
}

.improvement-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.improvement-stats .stat-label {
    font-size: 0.75rem;
    color: #737373;
}

.improvement-stats .stat-delta {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #34d399;
}

/* Pareto Chart V2 (SVG-based scatter plot) */
.pareto-chart-v2 {
    width: 100%;
    overflow: hidden;
}

/* Safety Profile Label */
.safety-profile-label {
    text-align: center;
    font-size: 0.75rem;
    color: #a3a3a3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Steer Code Preview */
.steer-code-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .steer-code-preview {
        grid-template-columns: 1fr;
    }
}

.code-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
}

.code-panel.paranoid {
    border-color: rgba(245, 158, 11, 0.3);
}

.code-panel.optimized {
    border-color: rgba(45, 212, 191, 0.3);
}

.code-panel-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-panel.paranoid .code-panel-header {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.code-panel.optimized .code-panel-header {
    color: #2dd4bf;
    background: rgba(45, 212, 191, 0.08);
}

.code-snippet {
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.6;
    color: #d4d4d4;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    background: transparent;
    border: none;
}

/* Convergence Chart */
.convergence-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.convergence-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .convergence-metrics {
        grid-template-columns: 1fr;
    }
}

.convergence-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.convergence-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #34d399;
}

.convergence-label {
    font-size: 0.75rem;
    color: #737373;
}

/* Mobile responsive adjustments for intervention tabs */
@media (max-width: 768px) {
    .intervention-tabs {
        gap: 0.25rem;
        padding: 0.375rem;
    }

    .intervention-tab {
        padding: 0.5rem 0.75rem;
    }

    .tab-label {
        font-size: 0.75rem;
    }

    .intervention-content {
        padding: 1.25rem;
    }

    .intervention-content h4 {
        font-size: 1.25rem;
    }
}
