/*
 * VELORA FONT SYSTEM
 * ==================
 * 
 * Single Source: Adobe Typekit (https://use.typekit.net/iju8wjq.css)
 * 
 * Font Families:
 * - Display (Headlines, Logo): lust-display
 * - Serif (Paragraphs, Quotes): source-serif-4
 * - Sans (Forms, Navigation, Buttons): source-sans-3
 * 
 * Usage:
 * - Always use CSS variables: var(--font-display), var(--font-serif), var(--font-sans)
 * - Never hardcode font names directly
 * - Tailwind classes: font-display, font-serif, font-sans
 * 
 * Special Cases:
 * - Monospace code: 'JetBrains Mono' (calculator labels only)
 * - Zodiac symbols: 'Arial Unicode MS' (Unicode rendering only)
 */

/**
 * VELORA COMPREHENSIVE DESIGN TOKENS
 * 
 * This is the consolidated, authoritative design token file for Velora.
 * It merges and organizes all tokens from:
 * - velora-design-tokens-base.css
 * - zodiac-cozy-tokens.css
 * - Other component-specific tokens
 * 
 * ⚠️  LARGE ADDITIONS - REGRESSION TEST COVERAGE REQUIRED
 * ============================================================
 * This file has significant token additions (1,058 lines total).
 * All changes require comprehensive testing before production deployment.
 * 
 * REQUIRED VERIFICATION:
 * - ✓ Visual regression testing across all pages using new tokens
 * - ✓ Dark mode validation: all token values render correctly in dark mode
 * - ✓ Typography testing: verify all text rendering across browsers
 * - ✓ Color contrast: ensure WCAG AA compliance for all color tokens
 * - ✓ Spacing consistency: verify padding/margin token application
 * - ✓ Cross-browser testing: Chrome, Firefox, Safari, Edge
 * 
 * TEST MATRIX:
 * - Homepage: hero, cards, navigation
 * - Calculator pages: all calculator themes with planet-specific tokens
 * - Zodiac pages: sign-specific colors, element tokens
 * - Blog pages: typography tokens, spacing
 * - Dark mode: all color tokens, background tokens
 * - Responsive: mobile (320px), tablet (768px), desktop (1024px+)
 * 
 * See CSS_CONSOLIDATION_REGRESSION_TESTING.md for detailed verification steps.
 * 
 * Structure:
 * 1. Color Tokens (Palette, Semantic)
 * 2. Typography Tokens
 * 3. Spacing & Layout
 * 4. Shadows & Effects
 * 5. Motion & Animation
 * 6. Surface & Components
 * 7. Dark Mode Overrides
 * 8. Reading State Tokens
 * 9. Responsive Adjustments
 * 10. Component Styles
 */

:root {
    /* ========================================
       1. COLOR TOKENS - PALETTE
       ======================================== */

    /* Primary Brand Colors - Mystical Purple */
    --purple-primary: #8b5cf6;
    --purple-dark: #6d28d9;
    --purple-light: #a78bfa;
    --purple-pale: #ede9fe;

    /* Secondary Brand Colors - Gold & Warm Accents */
    --gold-warm: #d4a574;
    --gold-dark: #92400e;
    --gold-light: #fcd34d;
    --gold-pale: #fef08a;

    /* Cosmic Palette (from velora-cosmic-tokens.css) */
    --primary-600: #5b3fd9;
    --primary-500: #7b5cff;
    --primary-100: #ebe4ff;
    --accent-500: #f973c5;
    --accent-100: #ffe4f4;

    /* Gemstone & Mystical Palette */
    --jade-deep: #047857;
    --jade-light: #6ee7b7;
    --jade-pale: #d1fae5;

    --sapphire-deep: #1e40af;
    --sapphire-light: #60a5fa;
    --sapphire-pale: #dbeafe;

    --rose-deep: #be185d;
    --rose-light: #f472b6;
    --rose-pale: #fbcfe8;

    --emerald-deep: #059669;
    --emerald-light: #10b981;
    --emerald-pale: #d1fae5;

    /* Element Colors (Astrological) */
    --elem-fire: #ff6b6b;
    --elem-earth: #68a36f;
    --elem-air: #4eaadf;
    --elem-water: #6c7bff;

    /* Calculator Theme Colors */
    --theme-birth-chart-primary: #FF8C42;
    --theme-birth-chart-accent: #FFB366;
    --theme-birth-chart-light: #FFD700;

    --theme-moon-primary: #8b5cf6;
    --theme-moon-accent: #a78bfa;

    --theme-venus-primary: #E879F9;
    --theme-venus-accent: #F472B6;
    --theme-venus-light: #FCA5A5;

    --theme-mars-primary: #DC2626;
    --theme-mars-accent: #EF4444;
    --theme-mars-light: #F87171;

    --theme-mercury-primary: #4A5FBF;
    --theme-mercury-accent: #5B7CC7;
    --theme-mercury-light: #7B9FE3;

    --theme-jupiter-primary: #7C3AED;
    --theme-jupiter-accent: #8B5CF6;
    --theme-jupiter-light: #A78BFA;

    --theme-saturn-primary: #475569;
    --theme-saturn-accent: #64748B;
    --theme-saturn-light: #94A3B8;

    --theme-rising-primary: #C9A961;
    --theme-rising-accent: #D4AF37;
    --theme-rising-light: #F59E0B;

    --theme-transit-primary: #4FC3DC;
    --theme-transit-accent: #3FB8AF;
    --theme-transit-light: #06B6D4;

    /* Neutral Grays */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;

    /* Atmospheric Background Modes (from atmospheric-tokens.css) */
    --bg-parchment: #FAF8F5;
    --bg-parchment-dark: #1A1A1A;
    --bg-mist: #F5F3FF;
    --bg-mist-dark: #1A1F35;
    --bg-clear: transparent;

    /* Surface Tokens (from grounding-tokens.css) */
    --surface-base: #faf8f5;
    --surface-base-dark: #0b0f26;
    --surface-card: #ffffff;
    --surface-card-dark: #151829;
    --surface-soft: #f5f3ff;
    --surface-soft-dark: #1a1f35;
    --surface-parchment: #faf8f5;
    --surface-parchment-dark: #0b0f26;
    --surface-mist: #f5f3ff;
    --surface-mist-dark: #1a1f35;
    --surface-paper: #ffffff;
    --surface-paper-dark: #151829;
    --surface-overlay: rgba(255, 255, 255, 0.95);
    --surface-overlay-dark: rgba(11, 15, 38, 0.95);

    /* Form Surface Tokens */
    --form-surface-light: var(--surface-base); /* #faf8f5 */
    --form-surface-dark: #2a2a2a; /* Charcoal, not pure black */
    --form-border-light: rgba(0, 0, 0, 0.08);
    --form-border-dark: rgba(255, 255, 255, 0.12);
    --form-shadow-light: 0 2px 4px rgba(0, 0, 0, 0.04),
                         0 1px 2px rgba(0, 0, 0, 0.06);
    --form-shadow-dark: 0 4px 8px rgba(0, 0, 0, 0.3),
                        0 0 0 1px rgba(255, 255, 255, 0.05);

    /* Paper & Background Tones */
    --paper: #faf8f3;
    --paper-alt: #f5f3ee;
    --paper-hover: #ede9fe;
    --paper-pressed: #e9d5ff;

    /* Semantic Colors */
    --ink-strong: #1a1a1a;
    --ink-base: #2d2d2d;
    --ink-soft: #4a4a4a;
    --ink-muted: #6a6a6a;

    /* Text Colors (from cosmic tokens) */
    --text-strong: #151022;
    --text-default: #2a203f;
    --text-soft: #6b6288;
    --text-muted: #9a92b5;

    --success-color: #10b981;
    --success-bg: #ecfdf5;
    --warning-color: #f59e0b;
    --warning-bg: #fffbeb;
    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --info-color: #3b82f6;
    --info-bg: #eff6ff;

    /* ========================================
       2. TYPOGRAPHY TOKENS
       ======================================== */

    /* Typography - Single source from Adobe Typekit */
    --velora-font-display: 'lust-display', Georgia, serif;
    --velora-font-serif: 'source-serif-4', Georgia, serif;
    --velora-font-sans: 'source-sans-3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --velora-font-mono: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;

    /* Shorter aliases for convenience */
    --font-display: var(--velora-font-display);
    --font-serif: var(--velora-font-serif);
    --font-sans: var(--velora-font-sans);
    --font-mono: var(--velora-font-mono);
    
    /* Font weights */
    --velora-font-weight-light: 400;
    --velora-font-weight-regular: 400;
    --velora-font-weight-medium: 700;
    --velora-font-weight-bold: 700;

    /* Font Sizes - Fluid Typography */
    --text-xs: clamp(0.75rem, 1vw, 0.875rem);
    --text-sm: clamp(0.875rem, 1.1vw, 1rem);
    --text-base: clamp(1rem, 1.2vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.4vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.6vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 2vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 2.5vw, 2.25rem);
    --text-4xl: clamp(2.25rem, 3vw, 3rem);
    --text-5xl: clamp(3rem, 4vw, 3.75rem);

    /* Heading Specific */
    --heading-h1-size: clamp(2.5rem, 5vw, 3.5rem);
    --heading-h2-size: clamp(2rem, 4vw, 3rem);
    --heading-h3-size: clamp(1.5rem, 2.5vw, 2rem);
    --heading-h4-size: clamp(1.25rem, 2vw, 1.5rem);

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-heading: 1.25;
    --line-height-body: 1.6;
    --line-height-relaxed: 1.8;

    /* Letter Spacing */
    --letter-spacing-tight: -0.01em;
    --letter-spacing-normal: 0em;
    --letter-spacing-heading: 0.01em;
    --letter-spacing-body: 0.005em;
    --letter-spacing-wide: 0.1em;

    /* ========================================
       3. SPACING & LAYOUT
       ======================================== */

    /* Grounding Scale - Strict 4/8/12/16/24/32/48/64px rhythm */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */

    /* Core Spacing Scale (legacy compatibility) */
    --space-xs: var(--space-1);
    --space-sm: var(--space-2);
    --space-md: var(--space-4);
    --space-lg: var(--space-6);
    --space-xl: var(--space-8);
    --space-2xl: 2.5rem;
    --space-3xl: var(--space-12);
    --space-4xl: var(--space-16);
    --space-5xl: 5rem;

    /* Monetization Spacing (from monetization-tokens.css) */
    --monetization-space-xs: 0.5rem;
    /* 8px */
    --monetization-space-sm: 0.75rem;
    /* 12px */
    --monetization-space-md: 1rem;
    /* 16px */
    --monetization-space-lg: 1.5rem;
    /* 24px */
    --monetization-space-xl: 2rem;
    /* 32px */
    --monetization-space-2xl: 3rem;
    /* 48px */
    --monetization-space-3xl: 4rem;
    /* 64px */

    /* Monetization Rhythm */
    --monetization-rhythm-sm: 1.5rem;
    /* 24px */
    --monetization-rhythm-md: 2rem;
    /* 32px */
    --monetization-rhythm-lg: 3rem;
    /* 48px */

    /* Section Padding */
    --monetization-section-padding-desktop: 4.5rem;
    /* 72px */
    --monetization-section-padding-desktop-lg: 6rem;
    /* 96px */
    --monetization-section-padding-mobile: 2.5rem;
    /* 40px */
    --monetization-section-padding-mobile-lg: 3.5rem;
    /* 56px */

    /* Editorial Spacing */
    --space-chapter: clamp(3rem, 5vw, 5rem);
    --space-section: clamp(2.5rem, 4vw, 4rem);
    --space-element: clamp(1.5rem, 2.5vw, 2.5rem);

    /* Mobile Spacing (Reduced) */
    --space-chapter-mobile: 2rem;
    --space-section-mobile: 1.5rem;
    --space-element-mobile: 1rem;

    /* Container Widths */
    --container-xs: 20rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-xl: 36rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    --container-4xl: 56rem;
    --container-5xl: 64rem;

    /* Text Widths (Reading Comfort) */
    --text-width-narrow: 50ch;
    --text-width-normal: 65ch;
    --text-width-wide: 75ch;
    --text-width-extra: 85ch;

    /* Gaps & Gaps in Layouts */
    --gap-tight: 0.5rem;
    --gap-normal: 1rem;
    --gap-relaxed: 1.5rem;
    --gap-spacious: 2rem;

    /* ========================================
       4. SHADOWS & EFFECTS
       ======================================== */

    /* Grounding Shadow Scale - Max 3 levels: tight, subtle, elevated */
    --shadow-tight: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-tight-dark: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-subtle-dark: 0 2px 4px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-elevated: 0 4px 8px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-elevated-dark: 0 4px 8px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.6);

    /* Elevation System (legacy) */
    --shadow-none: none;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

    /* Monetization Shadows (from monetization-tokens.css) */
    --monetization-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
    --monetization-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.08);
    --monetization-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.1);
    --monetization-shadow-card: 0 2px 8px rgba(139, 92, 246, 0.08);

    /* Specialized Shadows */
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.2);
    --shadow-glow-soft: 0 0 15px rgba(139, 92, 246, 0.1);
    --shadow-gold: 0 0 20px rgba(212, 165, 116, 0.15);
    --shadow-inner-light: inset 0 2px 4px rgba(255, 255, 255, 0.3);
    --shadow-inner-dark: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-soft: var(--shadow-subtle);

    /* Paper Shadow (Elevated Cards) */
    --shadow-paper: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 20px rgba(139, 92, 246, 0.05);
    --shadow-paper-hover: 0 4px 12px rgba(0, 0, 0, 0.12), 0 0 30px rgba(139, 92, 246, 0.1);

    /* Stroke Tokens - Borders replace excessive shadows */
    --stroke-subtle: rgba(0, 0, 0, 0.08);
    --stroke-subtle-dark: rgba(255, 255, 255, 0.1);
    --stroke-base: rgba(0, 0, 0, 0.12);
    --stroke-base-dark: rgba(255, 255, 255, 0.15);
    --stroke-strong: rgba(0, 0, 0, 0.2);
    --stroke-strong-dark: rgba(255, 255, 255, 0.25);

    /* Monetization Border Colors */
    --monetization-border: rgba(139, 92, 246, 0.2);
    --monetization-border-subtle: rgba(139, 92, 246, 0.1);
    --monetization-border-strong: rgba(139, 92, 246, 0.3);

    /* Blur Effects */
    --blur-none: 0;
    --blur-sm: 4px;
    --blur-md: 8px;
    --blur-lg: 12px;
    --blur-xl: 20px;

    /* Backdrop Blur */
    --backdrop-blur-sm: blur(4px);
    --backdrop-blur-md: blur(8px);
    --backdrop-blur-lg: blur(12px);

    /* ========================================
       5. MOTION & ANIMATION
       ======================================== */

    /* Grounding Motion Tokens - Short, physical durations for UI */
    --motion-ui-fast: 200ms;
    --motion-ui-base: 300ms;
    --motion-ui-slow: 400ms;

    /* Page sections and major reveals */
    --motion-section-fast: 400ms;
    --motion-section-base: 500ms;
    --motion-section-slow: 600ms;

    /* Background/atmosphere */
    --motion-atmosphere: 30s;

    /* Easing functions */
    --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-section: cubic-bezier(0.4, 0, 0.2, 1);

    /* Transform limits */
    --transform-ui-max: 6px;
    --transform-section-max: 12px;

    /* Transition Durations (legacy) */
    --duration-instant: 0ms;
    --duration-fast: 75ms;
    --duration-normal: 150ms;
    --duration-slow: 300ms;
    --duration-slower: 500ms;
    --duration-slowest: 700ms;
    --transition-base: var(--motion-ui-base);
    --transition-fast: var(--motion-ui-fast);

    /* Easing Functions (legacy) */
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-ritual: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Motion Durations (Ritual/Ceremony) */
    --motion-ritual: 250ms;
    --motion-ritual-slow: 350ms;

    /* ========================================
       6. SURFACE & COMPONENT TOKENS
       ======================================== */

    /* Monetization Color Tokens */
    --monetization-bg: #faf8f5;
    --monetization-card: #ffffff;
    --monetization-card-tint: rgba(139, 92, 246, 0.02);
    --monetization-surface: #f5f3ff;
    --monetization-surface-soft: #f3eefc;

    /* Monetization Primary Colors */
    --monetization-primary: #6B46C1;
    --monetization-primary-hover: #5B3FD9;
    --monetization-primary-light: #8B5CF6;
    --monetization-primary-lighter: #A78BFA;
    --monetization-focus-ring: rgba(107, 70, 193, 0.35);

    /* Monetization Trust Accents */
    --monetization-success: #10B981;
    --monetization-success-muted: #6EE7B7;
    --monetization-success-bg: rgba(16, 185, 129, 0.1);
    --monetization-warning: #F59E0B;
    --monetization-warning-muted: #FCD34D;
    --monetization-warning-bg: rgba(245, 158, 11, 0.1);

    /* Monetization Text Colors */
    --monetization-text-primary: #1A1A1A;
    --monetization-text-secondary: #4A4A4A;
    --monetization-text-muted: #6B7280;
    --monetization-text-soft: #9CA3AF;

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

    /* Monetization Radius (from monetization-tokens.css) */
    --monetization-radius-sm: 8px;
    --monetization-radius-md: 12px;
    --monetization-radius-lg: 16px;
    --monetization-radius-xl: 20px;
    --monetization-radius-full: 9999px;

    /* Grounding Radii Scale */
    --radius-card: var(--radius-lg);
    --radius-button: var(--radius-full);
    --radius-input: var(--radius-md);

    /* Border Widths */
    --border-none: 0;
    --border-thin: 1px;
    --border-normal: 2px;
    --border-thick: 3px;

    /* Border Colors */
    --border-light: rgba(0, 0, 0, 0.05);
    --border-normal: rgba(0, 0, 0, 0.1);
    --border-strong: rgba(0, 0, 0, 0.2);
    --border-accent: var(--purple-primary);

    /* Opacity Scale */
    --opacity-0: 0;
    --opacity-10: 0.1;
    --opacity-20: 0.2;
    --opacity-30: 0.3;
    --opacity-40: 0.4;
    --opacity-50: 0.5;
    --opacity-60: 0.6;
    --opacity-70: 0.7;
    --opacity-80: 0.8;
    --opacity-90: 0.9;
    --opacity-100: 1;

    /* Z-Index Scale */
    --z-hide: -1;
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-offcanvas: 1040;
    --z-modal-backdrop: 1050;
    --z-modal: 1060;
    --z-popover: 1070;
    --z-tooltip: 1080;

    /* ========================================
       7. READING STATE TOKENS
       ======================================== */

    /* Reading State - Light Mode (Clarity) */
    --reading-bg-light: #fafaf8;
    --reading-contrast-light: #1a1a1a;
    --reading-separator-light: rgba(0, 0, 0, 0.05);
    --reading-illustration-opacity-light: 1.0;
    --reading-mood-light: "editorial";
    --reading-font-smoothing-light: antialiased;
    --reading-letter-spacing-light: -0.01em;
    --reading-line-height-light: 1.7;

    /* Reading State - Dark Mode (Contemplation) */
    --reading-bg-dark: #1a1f2e;
    --reading-contrast-dark: #e8eaed;
    --reading-separator-dark: rgba(255, 255, 255, 0.08);
    --reading-illustration-opacity-dark: 0.85;
    --reading-mood-dark: "contemplation";
    --reading-font-smoothing-dark: subpixel-antialiased;
    --reading-letter-spacing-dark: 0;
    --reading-line-height-dark: 1.75;

    /* Reading Focus State (Light Mode Defaults) */
    --reading-focus-bg: var(--purple-pale);
    --reading-focus-border: var(--purple-primary);
    --reading-focus-outline: var(--purple-dark);

    /* Reading Highlight State */
    --reading-highlight-bg: var(--gold-pale);
    --reading-highlight-text: var(--gold-dark);

    /* Reading Visited State */
    --reading-visited-text: #8b5cf6;
    --reading-visited-hover: #7c3aed;

    /* Reading Active/Current State */
    --reading-active-bg: var(--paper-hover);
    --reading-active-border: var(--gold-warm);

    /* Reading Disabled State */
    --reading-disabled-text: var(--ink-muted);
    --reading-disabled-bg: var(--paper-alt);

    /* Interaction Physics */
    --press-down: translateY(1px);
    --press-down-strong: translateY(2px);
    --focus-ring-width: 2px;
    --focus-ring-offset: 2px;
    --focus-ring-color: var(--monetization-primary, #6B46C1);
    --hover-contrast: 0.05;
}

/* ========================================
   8. DARK MODE OVERRIDES - CONSOLIDATED
   ======================================== */

[data-theme="dark"] {
    /* Paper & Background Tones */
    --paper: #1a1a1a;
    --paper-alt: #242424;
    --paper-hover: #2d2d2d;
    --paper-pressed: #3a3a3a;

    /* Atmospheric Backgrounds */
    --bg-parchment: var(--bg-parchment-dark);
    --bg-mist: var(--bg-mist-dark);

    /* Surfaces */
    --surface-base: var(--surface-base-dark);
    --surface-card: var(--surface-card-dark);
    --surface-soft: var(--surface-soft-dark);
    --surface-parchment: var(--surface-parchment-dark);
    --surface-mist: var(--surface-mist-dark);
    --surface-paper: var(--surface-paper-dark);
    --surface-overlay: var(--surface-overlay-dark);

    /* Ink/Text Colors */
    --ink-strong: #f5f5f5;
    --ink-base: #d9d9d9;
    --ink-soft: #a8a8a8;
    --ink-muted: #7a7a7a;

    /* Text Colors (Cosmic) */
    --text-strong: #f9f6ff;
    --text-default: #e8e4f0;
    --text-soft: #b8b0d0;
    --text-muted: #8a7fa8;

    /* Monetization Text */
    --monetization-text-primary: #e8eaed;
    --monetization-text-secondary: #b8bcc4;
    --monetization-text-muted: #8e9199;
    --monetization-text-soft: #6e7178;

    /* Enhanced Purples */
    --purple-primary: #a78bfa;
    --purple-dark: #c4b5fd;
    --purple-light: #8b5cf6;
    --purple-pale: #4c1d95;

    /* Enhanced Gold */
    --gold-warm: #f59e0b;
    --gold-dark: #fbbf24;
    --gold-light: #fcd34d;
    --gold-pale: #78350f;

    /* Cosmic Palette - Dark */
    --primary-600: #8b5cf6;
    --primary-500: #a78bfa;
    --primary-100: #2d1b69;
    --accent-500: #f973c5;
    --accent-100: #5a1a42;

    /* Backgrounds - Dark */
    --bg-page: #050616;
    --bg-surface: #0b0f26;
    --bg-surface-soft: #151829;
    --monetization-bg: #1a1f2e;
    --monetization-card: #242938;
    --monetization-surface: #202637;
    --monetization-surface-soft: #1a1f35;

    /* Form Surface Tokens - Dark */
    --form-surface: var(--form-surface-dark);
    --form-border: var(--form-border-dark);
    --form-shadow: var(--form-shadow-dark);

    /* Borders */
    --border-light: rgba(255, 255, 255, 0.05);
    --border-normal: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --border-subtle: var(--stroke-subtle-dark);

    /* Strokes */
    --stroke-subtle: var(--stroke-subtle-dark);
    --stroke-base: var(--stroke-base-dark);
    --stroke-strong: var(--stroke-strong-dark);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.2);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(167, 139, 250, 0.3);
    --shadow-glow-soft: 0 0 15px rgba(167, 139, 250, 0.15);
    --shadow-gold: 0 0 20px rgba(245, 158, 11, 0.2);
    --shadow-inner-light: inset 0 2px 4px rgba(255, 255, 255, 0.1);
    --shadow-inner-dark: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-paper: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 20px rgba(167, 139, 250, 0.1);
    --shadow-paper-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 30px rgba(167, 139, 250, 0.15);
    --shadow-tight: var(--shadow-tight-dark);
    --shadow-subtle: var(--shadow-subtle-dark);
    --shadow-elevated: var(--shadow-elevated-dark);

    /* Textures & Ornaments */
    --grain-opacity: 0.05;
    --ornament-opacity: 0.25;

    /* Reading Focus States */
    --reading-focus-bg: rgba(139, 92, 246, 0.2);
    --reading-focus-border: var(--purple-primary);
    --reading-highlight-bg: rgba(245, 158, 11, 0.2);
    --reading-highlight-text: var(--gold-light);
    --reading-visited-text: #c4b5fd;
    --reading-visited-hover: #a78bfa;
    --reading-active-bg: var(--paper-hover);
    --reading-active-border: var(--gold-light);
    --reading-disabled-text: var(--ink-muted);
    --reading-disabled-bg: var(--paper-alt);

    /* Illustration opacity - Muted to reduce visual dominance */
    --illustration-opacity: var(--reading-illustration-opacity-dark, 0.85);

    /* Typography rendering */
    -webkit-font-smoothing: subpixel-antialiased;
}

/* ========================================
   9. TEXTURE & ORNAMENT TOKENS
   ======================================== */

:root {
    --grain-opacity: 0.03;
    --ornament-opacity: 0.15;
    --shimmer-opacity: 0.4;

    /* Legacy Compatibility Mappings */
    --velora-bg-page: var(--surface-base);
    --velora-bg-surface: var(--surface-card);
    --velora-bg-surface-soft: var(--surface-soft);
    --velora-bg-atmospheric: var(--bg-parchment);
    --velora-bg-atmospheric-alt: var(--bg-mist);
    --velora-shadow-sm: var(--shadow-tight);
    --velora-shadow-md: var(--shadow-subtle);
    --velora-shadow-lg: var(--shadow-elevated);
    --velora-border-subtle: var(--stroke-subtle);
    --velora-border-strong: var(--stroke-base);
    --velora-accent-primary: var(--purple-primary);
    --velora-text-primary: var(--ink-strong);
    --velora-text-secondary: var(--ink-base);
    --velora-text-muted: var(--ink-muted);
}

/* ========================================
   10. RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    :root {
        --space-chapter: var(--space-chapter-mobile);
        --space-section: var(--space-section-mobile);
        --space-element: var(--space-element-mobile);
    }

    .prose-velora {
        max-width: 100%;
    }
}

/* ========================================
   11. REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    :root {
        --motion-ritual: 0ms;
        --motion-ritual-slow: 0ms;
        --duration-fast: 0ms;
        --duration-normal: 0ms;
        --duration-slow: 0ms;
        --duration-slower: 0ms;
        --duration-slowest: 0ms;
    }
}

/* ========================================
   12. COMPONENT STYLES - EDITORIAL
   ======================================== */

/* Base Typography */
.prose-velora {
    font-family: var(--font-serif);
    font-size: var(--text-base);
    line-height: var(--line-height-body);
    color: var(--ink-strong);
}

/* Headings */
h1,
.h1 {
    font-family: var(--font-serif);
    font-size: var(--heading-h1-size);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-lg);
}

h2,
.h2 {
    font-family: var(--font-serif);
    font-size: var(--heading-h2-size);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

h3,
.h3 {
    font-family: var(--font-serif);
    font-size: var(--heading-h3-size);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

h4,
.h4 {
    font-family: var(--font-serif);
    font-size: var(--heading-h4-size);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

/* Paragraphs */
p {
    margin-bottom: 1.5em;
    line-height: var(--line-height-body);
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: var(--purple-primary);
    text-decoration: none;
    position: relative;
    transition: color var(--duration-normal) var(--ease-out);
}

a:hover {
    color: var(--purple-dark);
}

a:visited {
    color: var(--reading-visited-text);
}

a:visited:hover {
    color: var(--reading-visited-hover);
}

/* Lists */
ul,
ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-body);
}

/* Blockquotes */
blockquote {
    border-left: var(--border-normal) solid var(--gold-warm);
    padding-left: var(--space-lg);
    margin: var(--space-lg) 0;
    font-style: italic;
    color: var(--ink-soft);
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.95em;
    background-color: var(--paper-alt);
    color: var(--ink-strong);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm);
}

pre {
    background-color: var(--paper-alt);
    color: var(--ink-base);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Strong & Emphasis */
strong {
    font-weight: var(--font-weight-semibold);
    color: var(--ink-strong);
}

em {
    font-style: italic;
}

/* ========================================
   13. COMPONENT STYLES - COZY EDITORIAL
   ======================================== */

/* Cozy Chapter Heading */
.cozy-chapter-heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-element);
    margin-bottom: var(--space-section);
    padding: var(--space-element) 0;
}

.cozy-chapter-eyebrow {
    font-family: var(--font-sans);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-weight: 500;
    letter-spacing: var(--letter-spacing-heading);
    text-transform: uppercase;
    color: var(--gold-warm);
    opacity: 0.8;
}

.cozy-chapter-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin: 0;
}

.cozy-chapter-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: var(--line-height-body);
    letter-spacing: var(--letter-spacing-body);
    color: var(--ink-soft);
    margin: 0;
    font-style: italic;
}

/* Cozy Prose Block */
.cozy-prose-block {
    --text-column-width: var(--text-width-normal);
    max-width: var(--text-column-width);
    line-height: var(--line-height-body);
    letter-spacing: var(--letter-spacing-body);
    color: var(--ink-strong);
}

.cozy-prose-block--medium {
    --text-column-width: var(--text-width-wide);
}

.cozy-prose-block--wide {
    --text-column-width: var(--text-width-extra);
}

.cozy-prose-block--centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cozy-prose-block p {
    margin-bottom: 1.5em;
    max-width: var(--text-column-width);
}

.cozy-prose-block p:last-child {
    margin-bottom: 0;
}

.cozy-prose-block h2,
.cozy-prose-block h3,
.cozy-prose-block h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: var(--line-height-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--ink-strong);
    margin-top: 2em;
    margin-bottom: 1em;
}

.cozy-prose-block ul,
.cozy-prose-block ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
    max-width: var(--text-column-width);
}

.cozy-prose-block li {
    margin-bottom: 0.75em;
}

.cozy-prose-block blockquote {
    border-left: 3px solid var(--gold-warm);
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: var(--ink-soft);
    max-width: var(--text-column-width);
}

.cozy-prose-block strong {
    font-weight: 600;
    color: var(--ink-strong);
}

/* ========================================
   14. RESPONSIVE ADJUSTMENTS FOR COZY
   ======================================== */

@media (max-width: 768px) {
    .cozy-chapter-heading {
        gap: var(--space-element-mobile);
        margin-bottom: var(--space-section-mobile);
        padding: var(--space-element-mobile) 0;
    }

    .cozy-prose-block {
        max-width: 100%;
    }

    .cozy-prose-block p,
    .cozy-prose-block ul,
    .cozy-prose-block ol,
    .cozy-prose-block blockquote {
        max-width: 100%;
    }
}

/* ========================================
   15. UTILITY CLASSES
   ======================================== */

/* Text Sizing */
.text-xs {
    font-size: var(--text-xs);
}

.text-sm {
    font-size: var(--text-sm);
}

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

.text-lg {
    font-size: var(--text-lg);
}

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

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

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

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

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

/* Spacing Utilities */
.space-x-xs {
    column-gap: var(--space-xs);
}

.space-x-sm {
    column-gap: var(--space-sm);
}

.space-x-md {
    column-gap: var(--space-md);
}

.space-x-lg {
    column-gap: var(--space-lg);
}

.space-x-xl {
    column-gap: var(--space-xl);
}

.space-y-xs {
    row-gap: var(--space-xs);
}

.space-y-sm {
    row-gap: var(--space-sm);
}

.space-y-md {
    row-gap: var(--space-md);
}

.space-y-lg {
    row-gap: var(--space-lg);
}

.space-y-xl {
    row-gap: var(--space-xl);
}

/* Color Utilities */
.text-accent {
    color: var(--purple-primary);
}

.text-gold {
    color: var(--gold-warm);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-error {
    color: var(--error-color);
}

.bg-paper {
    background-color: var(--paper);
}

.bg-paper-alt {
    background-color: var(--paper-alt);
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

/* Radius Utilities */
.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* ========================================
   END OF COMPREHENSIVE DESIGN TOKENS
   ======================================== */
/* ========================================
   CALCULATOR COLLAGE & STAGE TOKENS
   ======================================== */

:root {
    /* Collage/Stage Surfaces (Light) */
    --surface-stage: #FDFCFA;
    --surface-paper: #F9F8F6;
    --border-collage: rgba(0, 0, 0, 0.08);
    --shadow-collage: 0 2px 8px rgba(0, 0, 0, 0.04);
    --illustration-opacity-light: 1;
}

[data-theme="dark"] {
    /* Collage/Stage Surfaces (Dark) */
    --surface-stage: #1A1A1E;
    --surface-paper: #242428;
    --border-collage: rgba(255, 255, 255, 0.1);
    --shadow-collage: 0 2px 8px rgba(0, 0, 0, 0.2);
    --illustration-opacity-dark: 0.85;
}