/* ═══════════════════════════════════════════════════════
   DeckView AI — Design System Tokens
   ═══════════════════════════════════════════════════════ */
:root {
    /* Brand Colors */
    --color-primary: #10b981;
    --color-primary-hover: #059669;
    --color-primary-dark: #047857;
    --color-primary-light: #d1fae5;
    --color-primary-50: #ecfdf5;
    --color-primary-100: #d1fae5;
    --color-primary-600: #059669;
    --color-primary-700: #047857;
    --color-primary-glow: rgba(16, 185, 129, 0.15);

    /* Neutrals (light mode) */
    --color-bg: #fafafa;
    --color-bg-alt: #f5f5f5;
    --color-surface: #ffffff;
    --color-surface-hover: #f9fafb;
    --color-surface-active: #f3f4f6;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-border-hover: #d1d5db;

    /* Text */
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-text-inverse: #ffffff;

    /* Semantic */
    --color-error: #ef4444;
    --color-error-light: #fef2f2;
    --color-error-border: #fecaca;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-success: #10b981;
    --color-success-light: #ecfdf5;
    --color-info: #3b82f6;
    --color-info-light: #eff6ff;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --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: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */

    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;

    /* Spacing */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-w-sm: 24rem;
    --max-w-md: 28rem;
    --max-w-lg: 32rem;
    --max-w-xl: 36rem;
    --max-w-2xl: 42rem;
    --max-w-4xl: 56rem;
    --max-w-6xl: 72rem;
    --max-w-7xl: 80rem;

    /* Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 300ms;
}

/* ── Global Reset / Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: var(--leading-normal);
    font-size: var(--text-base);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* ── Utility Classes ── */
.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;
}

/* ── Backward Compatibility with Old Variable Names ── */
/* These map old dark-mode var names to new light-mode tokens
   so existing pages (profile, etc.) still work. */
:root {
    --bg-dark: var(--color-bg-alt);
    --bg-card: var(--color-surface);
    --bg-elevated: var(--color-surface-hover);
    --text-white: var(--color-text);
    --text-grey: var(--color-text-secondary);
    --text-muted: var(--color-text-muted);
    --primary-blue: var(--color-primary);
    --primary-blue-hover: var(--color-primary-hover);
    --primary-green: var(--color-primary);
    --success-green: var(--color-success);
    --danger-red: var(--color-error);
    --border-color: var(--color-border);
    --border-subtle: var(--color-border-light);
    --accent-glow: var(--color-primary-glow);
    --green-glow: var(--color-primary-glow);
    --error-red: var(--color-error);
}
