/* posintel explorer: design tokens.
   Every colour, size, space and duration in the app comes from here. Components use
   these names, never raw values. Light theme only for now (see docs/design-system.md). */

:root {
  color-scheme: light;

  /* Surfaces */
  --canvas: #f5f6f4;          /* app background, cool light grey */
  --paper: #ffffff;           /* panels, tables, inputs */
  --paper-sunk: #fafbfa;      /* table header, quiet wells */

  /* Ink (text). All pass 4.5:1 on canvas and paper. */
  --ink: #18211c;             /* primary text, figures */
  --ink-2: #4d5751;           /* secondary text, labels */
  --ink-3: #646e68;           /* muted: notes, sources, axis text */
  --ink-on-accent: #ffffff;

  /* Lines */
  --line: #e2e5e1;            /* hairlines between rows and panels */
  --line-strong: #c9cfca;     /* control borders */
  --line-ink: #8d968f;        /* chart axes and marks that must clear 3:1 */

  /* The one accent: bottle green. Used for the current selection, primary actions,
     links and single-series chart marks. Never for decoration. */
  --accent: #1e5b43;
  --accent-hover: #17483a;
  --accent-weak: #e7f0ea;     /* selected row, active chip */
  --accent-mid: #a9c9b6;      /* range bands in charts */

  /* Outlet types: categorical slots 1-3 of the validated chart palette
     (all-pairs colour-blind safe). Always shown with a text label, never colour alone. */
  --type-store: #2a78d6;
  --type-restaurant: #eb6834;
  --type-cafe: #1baf7a;

  /* Status: fixed, never reused for series. Always with an icon and a word. */
  --good: #0ca30c;      --good-ink: #006300;
  --warning: #fab219;   --warning-ink: #8a5a00;
  --serious: #ec835a;
  --critical: #d03b3b;  --critical-ink: #b42318;

  /* Type: one family. Tabular figures wherever numbers line up. */
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;     /* 12px: axis ticks, footnotes */
  --fs-sm: 0.8125rem;   /* 13px: table cells, labels */
  --fs-md: 0.875rem;    /* 14px: body */
  --fs-lg: 1rem;        /* 16px: panel titles */
  --fs-xl: 1.25rem;     /* 20px: page titles */
  --fs-2xl: 1.75rem;    /* 28px: the key figure of a selection */
  --lh-tight: 1.2;
  --lh-body: 1.45;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --tracking-title: -0.012em;

  /* Space: 4px grid */
  --s-1: 2px; --s-2: 4px; --s-3: 8px; --s-4: 12px; --s-5: 16px;
  --s-6: 24px; --s-7: 32px; --s-8: 48px;

  /* Shape: small radius for controls, larger for panels. Nothing else is rounded. */
  --r-control: 4px;
  --r-panel: 8px;
  --border: 1px solid var(--line);

  /* Elevation: only things that float above the page get a shadow. */
  --shadow-float: 0 1px 2px rgba(24, 33, 28, 0.08), 0 8px 24px rgba(24, 33, 28, 0.12);

  /* Motion: answers to a click, nothing ambient. */
  --t-fast: 120ms;
  --t-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --header-h: 52px;
  --detail-w: minmax(380px, 42%);
  --content-max: 1440px;
}

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