/* EarlyPlot design tokens. Source: DESIGN.md. Canonical copy: brand/kit/tokens.css.
   site/public/css/tokens.css and app/web/src/tokens.css are copies made by brand/kit/sync-tokens.sh;
   edit this file, then run the script. Contrast figures are WCAG ratios on white unless stated. */
:root {
  /* Brand */
  --navy: #0B1F3A;          /* text, mark body, dark surfaces. 16.4:1 */
  --navy-2: #13294B;        /* hover on navy */
  --saffron-1: #D94F00;     /* gradient start; also flat one-colour saffron */
  --saffron-2: #FFB703;     /* gradient end */
  --saffron: var(--saffron-1); /* graphic only, 4.1:1 */
  --saffron-deep: #B54200;  /* links and "New" labels on light surfaces. 5.6:1 */
  --saffron-ping: #FF9A1A;  /* radar ping halo around a new signal */
  --saffron-grad: linear-gradient(90deg, var(--saffron-1), var(--saffron-2));

  /* Neutral ramp, navy-tinted. Text steps pass AA on white, cloud and tint. */
  --slate: #4A5468;         /* secondary text. 7.6:1, 7.0 on cloud */
  --steel: #5B6779;         /* tertiary text, captions, placeholders. 5.7:1, 4.9 on tint */
  --pewter: #7D8A9C;        /* control borders, inactive markers. 3.5:1 (non-text) */
  --haze: #9AA7B9;          /* chart bars that are not the winner, decorative only */
  --mist: #AEBBCD;          /* secondary text on navy. 8.5:1 on navy */
  --line-strong: #C5D0DE;   /* dividers that must show on cloud, map dots */
  --line: #E3E7ED;          /* card borders, table rules */
  --tint: #E9EEF6;          /* selected fills, hero edge, map card ground */
  --cloud: #F4F6F9;         /* page background, table heads */
  --white: #FFFFFF;

  /* State. Never saffron: saffron only means "coming up / new signal". */
  --ok: #1B6B45;            /* 6.5:1 */
  --err: #B3261E;           /* 6.5:1 */

  /* Semantic aliases */
  --text: var(--navy);
  --text-2: var(--slate);
  --text-3: var(--steel);
  --text-on-dark: var(--white);
  --text-2-on-dark: var(--mist);
  --link: var(--saffron-deep);
  --surface: var(--white);
  --surface-2: var(--cloud);
  --surface-dark: var(--navy);
  --rule-on-dark: rgba(174, 187, 205, .35);
  --rule-on-dark-soft: rgba(174, 187, 205, .18);
  --focus: var(--navy);
  --focus-on-dark: var(--white);

  /* Map: approval-type slots (Okabe-Ito based, no orange or yellow). Always pair with the shape. */
  --cat-1: #0B1F3A;         /* circle */
  --cat-2: #0072B2;         /* square */
  --cat-3: #009E73;         /* triangle */
  --cat-4: #CC79A7;         /* diamond */
  --cat-5: #6B4FA3;         /* hexagon */
  --cat-6: #4A5468;         /* cross */

  /* Type */
  --font-sans: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --mono: var(--font-mono);
  /* Site (marketing) scale */
  --fs-display: clamp(2.4rem, 4.3vw, 3.7rem);
  --fs-h1: clamp(2.2rem, 5vw, 3.6rem);
  --fs-h2: clamp(1.9rem, 3.6vw, 2.75rem);
  --fs-h3: clamp(1.55rem, 2.6vw, 2.1rem);
  --fs-title: 1.08rem;
  --fs-lede: 1.1rem;
  --fs-body: 1.0625rem;
  --fs-small: .95rem;
  --fs-caption: .85rem;
  --fs-micro: .75rem;
  /* App (dense UI) scale, px so tables and panels stay put */
  --fs-app-title: 24px;
  --fs-app-heading: 18px;
  --fs-app-body: 14px;
  --fs-app-small: 12px;
  --fs-app-micro: 11px;     /* floor: nothing smaller, mono data only */
  --track-tight: -.04em;    /* headings */
  --track-display: -.055em;
  --track-title: -.015em;

  /* Space: 8px base, named as multiples (matches Tailwind --spacing: 8px in app/web) */
  --space-0_5: 4px;
  --space-1: 8px;
  --space-1_5: 12px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  /* Shape */
  --r-xs: 4px;              /* focus rings, tags */
  --r-sm: 8px;              /* buttons, inputs, chips */
  --r-md: 12px;             /* cards, panels, tables */
  --r-lg: 18px;             /* map cards, media */
  --r-pill: 999px;
  --shadow-float: 0 18px 36px -22px rgba(11, 31, 58, .45); /* only for cards floating over a map */

  /* Size */
  --tap: 44px;              /* minimum hit area */
  --control-h: 48px;        /* text inputs and form buttons */
  --header-h: 4.25rem;
  --wrap: 74rem;
  --gutter: 1.5rem;         /* 1rem below 720px */

  /* Motion. Honour prefers-reduced-motion everywhere. */
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --dur-fast: .2s;
  --dur-med: .35s;
  --dur-slow: 1.3s;
  --dur-ping: 1.6s;
}
