/* emuu design tokens v1.0 (proposal, 2026-11-18). Dark and light, ROCK style, Core Aspect brand.
   Follows the system setting by default. Force with <html data-theme="dark"> or "light".
   Every colour pair used for text or UI is measured; see index.html section 3. */
:root {
  --ground: #0E0D2A;
  --surface: #17163F;
  --raised: #211F55;
  --line: #3A3878;
  --line-strong: #8583C9;
  --ink: #FFFFFF;
  --muted: #B9B8DE;
  --accent: #3A33E0;
  --on-accent: #FFFFFF;
  --accent-text: #B3AFFF;
  --accent-soft: #221F63;
  --pop: #FFE14A;
  --on-pop: #17163F;
  --pop-edge: #FFE14A;
  --focus: #FFE14A;
  --success: #3AD29F;
  --success-soft: #0A302D;
  --warning: #FFB547;
  --warning-soft: #3A290B;
  --danger: #FF9A8C;
  --danger-soft: #43151F;
  --urgent: #A82019;
  --urgent-edge: #FFB4AA;
  --on-urgent: #FFFFFF;
  --info: #8CC0FF;
  --info-soft: #152C55;
  --dots: #22205A;
  --scrim: #0E0D2A;
  --chart-1: #8F9BFF;
  --chart-2: #E8A33D;
  --chart-3: #2FD68A;
  --chart-4: #F0587E;
  --chart-5: #3DB9B1;
  --chart-6: #F2E6C8;
  --chart-7: #C9E84A;
  --chart-8: #B9B8DE;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* type scale (px) */
  --text-display: 48px; --text-h1: 36px; --text-h2: 28px; --text-h3: 22px;
  --text-body: 18px; --text-small: 16px; --text-caption: 14px; --text-stat: 44px;
  --leading-tight: 1.1; --leading-body: 1.5;
  --weight-heading: 800; --weight-strong: 700; --weight-body: 500;
  /* spacing (4px base; 32 = ROCK screen margin) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 40px; --space-8: 48px; --space-9: 64px;
  /* radii */
  --radius-tile: 28px; --radius-panel: 20px; --radius-control: 14px; --radius-chip: 999px; --radius-round: 50%;
  /* borders and elevation: borders do the work, shadow only in light mode */
  --border-width: 2px; --border-width-strong: 3px;
  /* touch */
  --touch-min: 44px; --touch-control: 56px; --touch-primary: 64px; --row-height: 56px;
  /* motion: still at rest */
  --motion-fast: 120ms; --motion-state: 180ms; --motion-ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
  --shadow-raised: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F5F5FA;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --line: #DAD9EA;
    --line-strong: #6B6A97;
    --ink: #17163F;
    --muted: #4A4970;
    --accent: #3A33E0;
    --on-accent: #FFFFFF;
    --accent-text: #2E27C4;
    --accent-soft: #E6E5FB;
    --pop: #FFE14A;
    --on-pop: #17163F;
    --pop-edge: #17163F;
    --focus: #3A33E0;
    --success: #095628;
    --success-soft: #E3F5EA;
    --warning: #6F4200;
    --warning-soft: #FFEBC2;
    --danger: #951B10;
    --danger-soft: #FCE8E5;
    --urgent: #A31F14;
    --urgent-edge: #A31F14;
    --on-urgent: #FFFFFF;
    --info: #0A4883;
    --info-soft: #E3EFFB;
    --dots: #E4E3F2;
    --scrim: #17163F;
    --chart-1: #3A33E0;
    --chart-2: #B1780C;
    --chart-3: #2A6B34;
    --chart-4: #CD0262;
    --chart-5: #1690B4;
    --chart-6: #8E5AE0;
    --chart-7: #5F4800;
    --chart-8: #5A5985;
    color-scheme: light;
    --shadow-raised: 0 10px 28px rgba(23,22,63,.16);
  }
}
:root[data-theme="dark"] {
  --ground: #0E0D2A;
  --surface: #17163F;
  --raised: #211F55;
  --line: #3A3878;
  --line-strong: #8583C9;
  --ink: #FFFFFF;
  --muted: #B9B8DE;
  --accent: #3A33E0;
  --on-accent: #FFFFFF;
  --accent-text: #B3AFFF;
  --accent-soft: #221F63;
  --pop: #FFE14A;
  --on-pop: #17163F;
  --pop-edge: #FFE14A;
  --focus: #FFE14A;
  --success: #3AD29F;
  --success-soft: #0A302D;
  --warning: #FFB547;
  --warning-soft: #3A290B;
  --danger: #FF9A8C;
  --danger-soft: #43151F;
  --urgent: #A82019;
  --urgent-edge: #FFB4AA;
  --on-urgent: #FFFFFF;
  --info: #8CC0FF;
  --info-soft: #152C55;
  --dots: #22205A;
  --scrim: #0E0D2A;
  --chart-1: #8F9BFF;
  --chart-2: #E8A33D;
  --chart-3: #2FD68A;
  --chart-4: #F0587E;
  --chart-5: #3DB9B1;
  --chart-6: #F2E6C8;
  --chart-7: #C9E84A;
  --chart-8: #B9B8DE;
  color-scheme: dark;
  --shadow-raised: none;
}
:root[data-theme="light"] {
  --ground: #F5F5FA;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --line: #DAD9EA;
  --line-strong: #6B6A97;
  --ink: #17163F;
  --muted: #4A4970;
  --accent: #3A33E0;
  --on-accent: #FFFFFF;
  --accent-text: #2E27C4;
  --accent-soft: #E6E5FB;
  --pop: #FFE14A;
  --on-pop: #17163F;
  --pop-edge: #17163F;
  --focus: #3A33E0;
  --success: #095628;
  --success-soft: #E3F5EA;
  --warning: #6F4200;
  --warning-soft: #FFEBC2;
  --danger: #951B10;
  --danger-soft: #FCE8E5;
  --urgent: #A31F14;
  --urgent-edge: #A31F14;
  --on-urgent: #FFFFFF;
  --info: #0A4883;
  --info-soft: #E3EFFB;
  --dots: #E4E3F2;
  --scrim: #17163F;
  --chart-1: #3A33E0;
  --chart-2: #B1780C;
  --chart-3: #2A6B34;
  --chart-4: #CD0262;
  --chart-5: #1690B4;
  --chart-6: #8E5AE0;
  --chart-7: #5F4800;
  --chart-8: #5A5985;
  color-scheme: light;
  --shadow-raised: 0 10px 28px rgba(23,22,63,.16);
}
@media (prefers-reduced-motion: reduce) { :root { --motion-fast: 0ms; --motion-state: 0ms; } }

/* ---- Legacy aliases: old emuu names -> new tokens (optional, remove after migration).
   Note: brand-900 was "dark text"; it now follows ink so it flips in dark mode. */
:root {
  --color-brand-50: var(--ground);  --color-brand-100: var(--accent-soft);
  --color-brand-200: var(--line);   --color-brand-300: var(--line-strong);
  --color-brand-400: var(--muted);  --color-brand-500: var(--muted);  --color-brand-600: var(--muted);
  --color-brand-700: var(--accent); --color-brand-800: var(--surface); --color-brand-900: var(--ink);
  --color-success-500: var(--success); --color-warning-500: var(--warning); --color-danger-500: var(--danger);
}
