/**
 * 🎨 DESIGN TOKENS
 * Unified design system for Site Mechanic
 * Version: 2.0 - Business-Ready Streamline
 * 
 * Usage: Import this before styles.css in all HTML files
 * <link rel="stylesheet" href="/design-tokens.css">
 */

:root {
  /* ========================================
     COLORS - SEMANTIC SYSTEM
     ======================================== */
  
  /* Primary Brand Colors */
  --color-primary: #5bf4e7;           /* Cyan - CTAs, active states (from dark mode logo) */
  --color-primary-hover: #4dd8cc;     /* Slightly darker for hover */
  --color-primary-dim: rgba(91, 244, 231, 0.1);  /* Subtle backgrounds */
  
  --color-secondary: #0AFFEF;         /* Cyan - Accents, highlights */
  --color-secondary-hover: #00D9CF;
  --color-secondary-dim: rgba(10, 255, 239, 0.1);
  
  /* Semantic State Colors */
  --color-success: #0FFF73;           /* Green - Pass, excellent */
  --color-warning: #FFB84D;           /* Orange - Needs improvement */
  --color-error: #FF4D4D;             /* Red - Critical, failed */
  --color-info: #4D9FFF;              /* Blue - Information */
  
  /* Performance Score Colors (legacy compatibility) */
  --color-excellent: #0FFF73;         /* 90-100 */
  --color-good: #7FFF7F;              /* 70-89 */
  --color-fair: #FFB84D;              /* 50-69 */
  --color-poor: #FF6B6B;              /* 30-49 */
  --color-failing: #FF4D4D;           /* 0-29 */
  
  /* Grayscale */
  --color-white: #FFFFFF;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #E5E5E5;
  --color-gray-300: #D4D4D4;
  --color-gray-400: #A3A3A3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  --color-black: #000000;
  
  /* Text Colors (Dark Mode) */
  --color-text: #FFFFFF;
  --color-text-secondary: #CCCCCC;
  --color-text-muted: #888888;
  
  /* ========================================
     BACKGROUNDS
     ======================================== */
  
  /* Base Backgrounds */
  --bg-base: #0B0D10;                 /* Main page background */
  --bg-elevated: #111418;             /* Cards, panels */
  --bg-card: #161A1F;                 /* Individual cards */
  --bg-input: #1A1E23;                /* Input fields */
  --bg-overlay: rgba(11, 13, 16, 0.95); /* Modals */
  
  /* Gradient Backgrounds */
  --bg-gradient-primary: linear-gradient(135deg, rgba(0, 255, 157, 0.1), rgba(10, 255, 239, 0.05));
  --bg-gradient-success: linear-gradient(135deg, rgba(15, 255, 115, 0.1), rgba(0, 255, 157, 0.05));
  --bg-gradient-warning: linear-gradient(135deg, rgba(255, 184, 77, 0.15), rgba(255, 104, 68, 0.1));
  --bg-gradient-error: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 68, 68, 0.1));
  --bg-gradient-dark: linear-gradient(180deg, #0B0D10 0%, #111418 100%);
  
  /* ========================================
     BORDERS
     ======================================== */
  
  --border-color: rgba(255, 255, 255, 0.08);        /* Default borders */
  --border-color-strong: rgba(255, 255, 255, 0.15); /* Emphasized borders */
  --border-color-subtle: rgba(255, 255, 255, 0.05); /* Very subtle dividers */
  
  /* Semantic Borders */
  --border-primary: 2px solid var(--color-primary);
  --border-success: 2px solid var(--color-success);
  --border-warning: 2px solid var(--color-warning);
  --border-error: 2px solid var(--color-error);
  
  /* ========================================
     SPACING SCALE
     Based on 8px base unit
     ======================================== */
  
  --space-0: 0;
  --space-1: 4px;     /* 0.25rem */
  --space-2: 8px;     /* 0.5rem */
  --space-3: 12px;    /* 0.75rem */
  --space-4: 16px;    /* 1rem */
  --space-5: 20px;    /* 1.25rem */
  --space-6: 24px;    /* 1.5rem */
  --space-8: 32px;    /* 2rem */
  --space-10: 40px;   /* 2.5rem */
  --space-12: 48px;   /* 3rem */
  --space-16: 64px;   /* 4rem */
  --space-20: 80px;   /* 5rem */
  --space-24: 96px;   /* 6rem */
  
  /* Semantic Spacing */
  --space-xs: var(--space-2);   /* 8px */
  --space-sm: var(--space-4);   /* 16px */
  --space-md: var(--space-6);   /* 24px */
  --space-lg: var(--space-8);   /* 32px */
  --space-xl: var(--space-12);  /* 48px */
  --space-2xl: var(--space-16); /* 64px */
  
  /* Standard Card Padding */
  --card-padding: var(--space-8);  /* 32px / 2rem */
  
  /* ========================================
     TYPOGRAPHY
     ======================================== */
  
  /* Font Families */
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 2rem;       /* 32px */
  --text-4xl: 2.5rem;     /* 40px */
  --text-5xl: 3rem;       /* 48px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* ========================================
     SHADOWS & GLOWS
     ======================================== */
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.8);
  
  /* Glows (for interactive elements) */
  --glow-primary: 0 0 8px rgba(0, 255, 157, 0.4);
  --glow-primary-strong: 0 0 16px rgba(0, 255, 157, 0.6);
  --glow-secondary: 0 0 8px rgba(10, 255, 239, 0.4);
  --glow-success: 0 0 8px rgba(15, 255, 115, 0.4);
  --glow-warning: 0 0 8px rgba(255, 184, 77, 0.4);
  --glow-error: 0 0 8px rgba(255, 77, 77, 0.4);
  
  /* ========================================
     BORDER RADIUS
     ======================================== */
  
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* ========================================
     Z-INDEX SCALE
     ======================================== */
  
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  
  /* Semantic Z-Index */
  --z-base: var(--z-0);
  --z-dropdown: var(--z-10);
  --z-sticky: var(--z-20);
  --z-fixed: var(--z-30);
  --z-modal: var(--z-40);
  --z-toast: var(--z-50);
  
  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */
  
  /* Durations */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  
  /* Easing Functions */
  --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-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Common Transitions */
  --transition-colors: color var(--duration-base) var(--ease-in-out),
                       background-color var(--duration-base) var(--ease-in-out),
                       border-color var(--duration-base) var(--ease-in-out);
  --transition-transform: transform var(--duration-base) var(--ease-out);
  --transition-opacity: opacity var(--duration-base) var(--ease-in-out);
  --transition-all: all var(--duration-base) var(--ease-in-out);
  
  /* ========================================
     LAYOUT
     ======================================== */
  
  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1400px;
  
  /* Grid */
  --grid-columns: 12;
  --grid-gap: var(--space-6);  /* 24px */
  
  /* Breakpoints (for reference in JS) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* ========================================
     COMPONENT TOKENS
     ======================================== */
  
  /* Buttons */
  --btn-padding-x: var(--space-6);
  --btn-padding-y: var(--space-3);
  --btn-radius: var(--radius-md);
  --btn-font-size: var(--text-base);
  --btn-font-weight: var(--font-weight-semibold);
  
  /* Inputs */
  --input-padding-x: var(--space-4);
  --input-padding-y: var(--space-3);
  --input-radius: var(--radius-md);
  --input-border: 1px solid var(--border-color);
  --input-font-size: var(--text-base);
  
  /* Cards */
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-md);
  --card-border: 1px solid var(--border-color);

  /* Modal */
  --modal-backdrop: rgba(0, 0, 0, 0.85);
  --modal-width-sm: 400px;
  --modal-width-md: 600px;
  --modal-width-lg: 900px;

  /* Pro Report Block */
  --pro-block-gradient: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --pro-block-glow: 0 4px 20px rgba(91, 244, 231, 0.3);

  /* Screenshot Lightbox */
  --lightbox-bg: rgba(0, 0, 0, 0.95);
  --lightbox-arrow-size: 48px;

  /* ========================================
     UI.CSS COMPATIBILITY ALIASES
     (For gradual migration from ui.css)
     ======================================== */

  /* Color Aliases */
  --color-accent: var(--color-primary);           /* ui.css accent → primary */
  --color-accent-hover: var(--color-primary-hover);
  --color-accent-light: var(--color-primary-dim);

  /* Spacing Aliases (ui.css used different values) */
  --space-ui-5: var(--space-6);   /* ui.css --space-5 was 24px, ours is 20px */

  /* Background Aliases */
  --color-bg: var(--bg-base);
  --color-surface: var(--bg-card);
  --color-border: var(--border-color);

  /* ========================================
     ACCESSIBILITY
     ======================================== */
  
  /* Focus Rings */
  --focus-ring: 0 0 0 3px rgba(91, 244, 231, 0.3);
  --focus-ring-offset: 2px;
  
  /* Touch Targets (WCAG 2.1 Level AAA) */
  --touch-target-min: 48px;

  /* ========================================
     SWISS-MINIMAL HOMEPAGE TOKENS
     ======================================== */

  /* Hero Container */
  --container-hero: 1120px;

  /* Swiss Card & Section */
  --swiss-card-padding: 20px;
  --swiss-section-gap: 20px;
  --swiss-border: 1px solid rgba(255, 255, 255, 0.08);
  --swiss-border-light: 1px solid rgba(0, 0, 0, 0.08);

  /* Swiss Buttons */
  --swiss-btn-height: 44px;
  --swiss-btn-radius: 10px;

  /* Hero Typography */
  --hero-headline-size: 2.5rem;      /* 40px */
  --hero-headline-weight: 700;
  --hero-headline-leading: 1.15;
  --hero-subhead-size: 1.125rem;     /* 18px */
  --hero-subhead-weight: 400;
}

/* ========================================
   DARK MODE EXPLICIT OVERRIDES
   Ensure cyan #5bf4e7 is used (matching logo)
   ======================================== */

body:not(.white-theme) {
  --color-primary: #5bf4e7;
  --color-primary-hover: #4dd8cc;
  --color-primary-dim: rgba(91, 244, 231, 0.1);
  --color-accent: #5bf4e7;
  --color-accent-hover: #4dd8cc;
}

/* ========================================
   LIGHT MODE OVERRIDES
   Using brand red #dd3838 from light mode logo
   ======================================== */

body.white-theme,
html[data-theme="light"] {
  /* Primary Brand Colors - Light Mode (red from logo) */
  --color-primary: #dd3838;
  --color-primary-hover: #c52f2f;
  --color-primary-dim: rgba(221, 56, 56, 0.1);

  --color-secondary: #ff5252;
  --color-secondary-hover: #e04545;
  --color-secondary-dim: rgba(255, 82, 82, 0.1);

  /* Semantic State Colors - adjusted for light mode */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Backgrounds - Light mode */
  --bg-base: #ffffff;
  --bg-elevated: #f9fafb;
  --bg-card: #ffffff;
  --bg-input: #f3f4f6;
  --bg-overlay: rgba(255, 255, 255, 0.95);

  /* Borders - Light mode */
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-strong: rgba(0, 0, 0, 0.2);
  --border-color-subtle: rgba(0, 0, 0, 0.05);

  /* Text colors - Light mode */
  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;

  /* Gradient Backgrounds - Light mode */
  --bg-gradient-primary: linear-gradient(135deg, rgba(221, 56, 56, 0.1), rgba(255, 82, 82, 0.05));
  --bg-gradient-success: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  --bg-gradient-warning: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.1));
  --bg-gradient-error: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.1));

  /* Effects - Light mode */
  --focus-ring: 0 0 0 3px rgba(221, 56, 56, 0.3);
  --pro-block-glow: 0 4px 20px rgba(221, 56, 56, 0.2);

  /* Update aliases */
  --color-accent: var(--color-primary);
  --color-accent-hover: var(--color-primary-hover);
  --color-accent-light: var(--color-primary-dim);

  /* Swiss tokens - light theme */
  --swiss-border: 1px solid rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: light) {
  /* System light mode preference - apply same overrides */
  :root:not(.dark-forced) {
    --color-primary: #dd3838;
    --color-primary-hover: #c52f2f;
    --color-primary-dim: rgba(221, 56, 56, 0.1);
  }
}

/* ========================================
   REPORT THEME TOKENS (data-theme system)
   Single source of truth for report surfaces,
   text, severity accents, dials, and gradients.
   ======================================== */

/* --- Dark theme (default) --- */
html[data-theme="dark"],
:root {
  /* Core Surfaces */
  --r-bg: #0B0D10;
  --r-surface-1: #161A1F;
  --r-surface-2: #1C2128;
  --r-border: rgba(255, 255, 255, 0.10);
  --r-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);

  /* Text */
  --r-text: #F1F5F9;
  --r-text-muted: #94A3B8;
  --r-text-faint: #64748B;

  /* Severity Accents */
  --r-good: #22C55E;
  --r-warn: #F59E0B;
  --r-bad: #EF4444;
  --r-info: #3B82F6;

  /* Dial / Ring */
  --r-dial-track: rgba(255, 255, 255, 0.14);
  --r-dial-glow: none;

  /* Gradient ramps (same colors, different presentation) */
  --r-g-traffic:  #EF4444, #F59E0B, #EAB308, #22C55E;
  --r-g-teal:     #10B981, #06B6D4, #3B82F6;
  --r-g-cool:     #06B6D4, #3B82F6, #8B5CF6;
  --r-g-warmrisk: #F97316, #EF4444, #B91C1C;

  /* Table */
  --r-table-row-alt: rgba(255, 255, 255, 0.03);
  --r-table-divider: rgba(255, 255, 255, 0.08);

  /* Code blocks */
  --r-code-bg: #111418;
  --r-code-border: rgba(255, 255, 255, 0.08);

  /* Accordion header hover */
  --r-accordion-hover: rgba(255, 255, 255, 0.04);

  /* Card accent border (severity) */
  --r-card-accent-width: 3px;
}

/* --- Light theme --- */
html[data-theme="light"] {
  /* Core Surfaces */
  --r-bg: #FFFFFF;
  --r-surface-1: #FFFFFF;
  --r-surface-2: #F8FAFC;
  --r-border: rgba(0, 0, 0, 0.10);
  --r-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

  /* Text */
  --r-text: #111827;
  --r-text-muted: #6B7280;
  --r-text-faint: #9CA3AF;

  /* Severity Accents */
  --r-good: #16A34A;
  --r-warn: #D97706;
  --r-bad: #DC2626;
  --r-info: #2563EB;

  /* Dial / Ring */
  --r-dial-track: rgba(0, 0, 0, 0.10);
  --r-dial-glow: none;

  /* Table */
  --r-table-row-alt: rgba(0, 0, 0, 0.02);
  --r-table-divider: rgba(0, 0, 0, 0.06);

  /* Code blocks */
  --r-code-bg: #F3F4F6;
  --r-code-border: rgba(0, 0, 0, 0.08);

  /* Accordion header hover */
  --r-accordion-hover: rgba(0, 0, 0, 0.03);
}

/* --- Print theme (always light, for PDF export) --- */
html[data-theme="print"] {
  /* Core Surfaces */
  --r-bg: #FFFFFF;
  --r-surface-1: #FFFFFF;
  --r-surface-2: #F9FAFB;
  --r-border: rgba(0, 0, 0, 0.12);
  --r-shadow: none;

  /* Text */
  --r-text: #111827;
  --r-text-muted: #4B5563;
  --r-text-faint: #6B7280;

  /* Severity Accents */
  --r-good: #16A34A;
  --r-warn: #D97706;
  --r-bad: #DC2626;
  --r-info: #2563EB;

  /* Dial / Ring */
  --r-dial-track: #E5E7EB;
  --r-dial-glow: none;

  /* Table */
  --r-table-row-alt: #F9FAFB;
  --r-table-divider: #E5E7EB;

  /* Code blocks */
  --r-code-bg: #F3F4F6;
  --r-code-border: #E5E7EB;

  /* Accordion header hover */
  --r-accordion-hover: transparent;

  /* Force light-mode legacy tokens for print */
  --bg-base: #ffffff;
  --bg-elevated: #f9fafb;
  --bg-card: #ffffff;
  --bg-input: #f3f4f6;
  --color-primary: #dd3838;
  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-strong: rgba(0, 0, 0, 0.2);
}

/* --- Report surfaces: explicit dark/light tokens on report elements --- */

/* Dark mode reports (default) — explicit so caching/inheritance can't cause white flash */
.report-shell,
.report-scope {
  --r-bg: #0B0D10;
  --r-surface-1: #161A1F;
  --r-surface-2: #1C2128;
  --r-border: rgba(255, 255, 255, 0.10);
  --r-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  --r-text: #F1F5F9;
  --r-text-muted: #94A3B8;
  --r-text-faint: #64748B;
  --r-good: #22C55E;
  --r-warn: #F59E0B;
  --r-bad: #EF4444;
  --r-info: #3B82F6;
  --r-dial-track: rgba(255, 255, 255, 0.14);
  --r-dial-glow: none;
  --r-table-row-alt: rgba(255, 255, 255, 0.03);
  --r-table-divider: rgba(255, 255, 255, 0.08);
  --r-code-bg: #111418;
  --r-code-border: rgba(255, 255, 255, 0.08);
  --r-accordion-hover: rgba(255, 255, 255, 0.04);
}

/* Light mode reports (white-theme or data-theme="light" or print) */
body.white-theme .report-shell,
body.white-theme .report-scope,
html[data-theme="light"] .report-shell,
html[data-theme="light"] .report-scope,
html[data-theme="print"] .report-shell,
html[data-theme="print"] .report-scope {
  --r-bg: #FFFFFF;
  --r-surface-1: #FFFFFF;
  --r-surface-2: #F8FAFC;
  --r-border: rgba(0, 0, 0, 0.08);
  --r-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --r-text: #111827;
  --r-text-muted: #6B7280;
  --r-text-faint: #9CA3AF;
  --r-good: #16A34A;
  --r-warn: #D97706;
  --r-bad: #DC2626;
  --r-info: #2563EB;
  --r-dial-track: rgba(0, 0, 0, 0.10);
  --r-dial-glow: none;
  --r-table-row-alt: rgba(0, 0, 0, 0.02);
  --r-table-divider: rgba(0, 0, 0, 0.06);
  --r-code-bg: #F3F4F6;
  --r-code-border: rgba(0, 0, 0, 0.08);
  --r-accordion-hover: rgba(0, 0, 0, 0.03);

  /* Legacy token overrides — light */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F3F5;
  --bg-hover: #E9ECEF;
  --bg-input: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #F8F9FA;
  --bg-base: #FFFFFF;
  --bg-overlay: rgba(255, 255, 255, 0.95);
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #6B7280;
  --text-muted: #9CA3AF;
  --text-body: #374151;
  --text-heading: #111827;
  --text-label: #6B7280;
  --color-white: #111827;
  --color-text: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --border-primary: #DEE2E6;
  --border-secondary: #CED4DA;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-strong: rgba(0, 0, 0, 0.2);
  --border-color-subtle: rgba(0, 0, 0, 0.05);
  --surface-bg: rgba(0, 0, 0, 0.02);
  --card-border: rgba(0, 0, 0, 0.08);
  --donut-track: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Light-mode report container styling */
body.white-theme .report-scope,
html[data-theme="light"] .report-scope,
html[data-theme="print"] .report-scope {
  background: var(--r-surface-2, #F8FAFC);
  color: var(--r-text, #111827);
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

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

/* ========================================
   FONT LOADING
   ======================================== */

/* Inter Font Family */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

/* JetBrains Mono (existing) */
/* Already loaded in styles.css - no need to duplicate */

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin-left: 0;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  text-align: left;
}

/* Card Base */
.card {
  background: transparent;
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

/* Responsive Grid */
@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-12 {
    grid-template-columns: 1fr;
  }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Typography Utilities */
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }

.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); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Color Utilities */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

/* Glow Effects */
.glow-primary { box-shadow: var(--glow-primary); }
.glow-secondary { box-shadow: var(--glow-secondary); }

/* Focus States */
.focus-ring:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}
