/* LankFit design tokens · v0.4 · generated from the design guidelines canvas (section 18).
   Dark is the default. The app is dark-only on purpose (see CLAUDE.md), so the design system's light theme block was left out here; it lives in the v0.4 package if ever wanted.
   Drop-in replacement for brand-tokens.css v1. See MIGRATION.md for every changed or removed token. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100,400;100,500;100,600;100,700;125,800&family=IBM+Plex+Mono:wght@500;600&display=swap");

:root {
  /* Fixed constants (do not theme) */
  --th-ink: #101820;
  --th-chalk: #F4F2EC;
  --th-pace-deep: #D24E14; /* logo dot on light backgrounds */

  /* Neutrals */
  --th-bg: #101820;  /* Page background */
  --th-surface: #18222D;  /* Cards, panels, sidebar */
  --th-surface-2: #212D3A;  /* Raised: inputs, menus, selected rows */
  --th-surface-3: #2A3847;  /* Hover on raised, active segment */
  --th-line: #2E3B4A;  /* Hairlines, card borders, grid */
  --th-line-strong: #465567;  /* Input borders, focus-adjacent, dividers that must read */
  --th-text: #F4F2EC;  /* Primary text, headings, numbers */
  --th-text-2: #C9CED6;  /* Secondary text, body copy on dense screens */
  --th-text-muted: #9AA3B2;  /* Labels, captions, axis text */
  --th-text-disabled: #5E6978;  /* Disabled controls only */

  /* Brand */
  --th-pace: #FF6B1F;  /* The brand. CTAs, logo dot, focus ring, active nav, 'you, now' in charts */
  --th-pace-hover: #FF8A4C;  /* Primary button hover */
  --th-pace-pressed: #E85A10;  /* Primary button pressed */
  --th-pace-text: #FF6B1F;  /* Orange text and links */
  --th-pace-soft: rgba(255,107,31,.14);  /* Tinted fills: selected chips, focus halo */
  --th-on-pace: #101820;  /* Text on orange */

  /* Disciplines */
  --th-swim: #3D8BFF;  /* Swim, everywhere */
  --th-bike: #9F8CFF;  /* Bike, everywhere */
  --th-run: #C8F03C;  /* Run, everywhere */
  --th-strength: #2DD4BF;  /* Strength and other gym work */
  --th-transition: #9AA3B2;  /* T1, T2, 'other' activities */

  /* Status */
  --th-positive: #3FD08A;  /* Ahead, improved, confirmed, success */
  --th-negative: #FF5A5F;  /* Behind, to find, errors, destructive */
  --th-warning: #FFC857;  /* Needs attention, review, draft */
  --th-gold: #FFC857;  /* PBs and records only */

  /* Data ramps */
  --th-z1: #A3A9B3;  /* Heart-rate / power zone 1 · warm-up */
  --th-z2: #2E9BF0;  /* Zone 2 · easy */
  --th-z3: #48C75A;  /* Zone 3 · aerobic */
  --th-z4: #FF9A1F;  /* Zone 4 · threshold */
  --th-z5: #F0413C;  /* Zone 5 · maximum */
  --th-heat-1: #5A4A2A;  /* Heatmap quartile 1 (lightest trained days) */
  --th-heat-2: #B88A2E;  /* Heatmap quartile 2 */
  --th-heat-3: #FF9A1F;  /* Heatmap quartile 3 */
  --th-heat-4: #F0413C;  /* Heatmap quartile 4 (biggest days) */
  --th-sleep-deep: #2A5FD9;  /* Sleep stage: deep */
  --th-sleep-light: #5CB4F5;  /* Sleep stage: light */
  --th-sleep-rem: #C060E6;  /* Sleep stage: REM */
  --th-sleep-awake: #F59AC4;  /* Sleep stage: awake */

  /* Semantic aliases kept from v1 */
  --th-accent: var(--th-pace);
  --th-on-accent: var(--th-on-pace);

  /* Type */
  --th-font-display: "Archivo", "Arial Black", system-ui, sans-serif; /* weight 800, font-stretch 125% */
  --th-font-ui: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --th-font-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; /* every number; tabular-nums */
  --th-text-xs: 12px; --th-text-sm: 14px; --th-text-md: 16px; --th-text-lg: 18px; --th-text-xl: 20px; --th-text-2xl: 24px; --th-text-3xl: 34px; --th-text-4xl: 48px; --th-text-5xl: 64px;

  /* Space (4px base), radius */
  --th-space-1: 4px; --th-space-2: 8px; --th-space-3: 12px; --th-space-4: 16px; --th-space-5: 24px; --th-space-6: 32px; --th-space-7: 48px; --th-space-8: 64px; --th-space-9: 96px; --th-space-10: 128px;
  --th-radius-sm: 6px; --th-radius-md: 10px; --th-radius-lg: 16px; --th-radius-xl: 20px; --th-radius-full: 999px;

  /* Motion */
  --th-ease: cubic-bezier(.6, 0, .2, 1);
  --th-ease-out: cubic-bezier(.2, 0, 0, 1);
  --th-dur-fast: 150ms; --th-dur-base: 250ms; --th-dur-slow: 400ms; --th-dur-draw: 900ms; --th-dur-ring: 1300ms;

  /* Focus */
  --th-focus-ring: 2px solid var(--th-pace);
  --th-focus-offset: 3px;
}

/* Retired in v0.3. Temporary aliases so nothing renders blank mid-migration.
   Delete this block once `scripts/audit-colours.sh` reports zero hits. */
:root {
  --th-rose: var(--th-negative);   /* illness → negative; fatigue lines → text-muted */
  --th-teal: var(--th-strength);   /* strength only; other uses → chalk or text-muted */
  --th-violet: var(--th-text-muted); /* NOT bike: violet used to mean sleep/recovery/other. Re-map each use */
}

.th-display { font-family: var(--th-font-display); font-weight: 800; font-stretch: 125%; letter-spacing: -0.02em; line-height: 0.95; }
.th-metric  { font-family: var(--th-font-data); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
:focus-visible { outline: var(--th-focus-ring); outline-offset: var(--th-focus-offset); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
