/* Applyready design tokens. Single source for colour, type, spacing, motion. */

:root {
  /* Painted for one scheme. Undeclared, a dark system repaints the page after the first frame. */
  color-scheme: light;

  /* Ink */
  --ink-900: #0e1116;
  --ink-800: #1b2129;
  --ink-700: #343b44;
  --ink-500: #5c6570;
  --ink-400: #666e79;

  /* Surfaces and lines */
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef1f5;
  --line-200: #e4e7ec;
  --line-100: #f0f2f5;

  /* Brand action */
  --accent-700: #1f31a8;
  --accent-600: #2a3fd4;
  --accent-300: #a9b2ee;
  --accent-100: #e8eafb;

  /* Entity colours: match, gap, blocker, people */
  --ok-700: #0a6341;
  --ok-600: #0e7a4f;
  --ok-100: #e3f4ec;
  --warn-700: #8a5200;
  --warn-600: #a96400;
  --warn-100: #fbf0dc;
  --stop-700: #931f18;
  --stop-600: #b3261e;
  --stop-100: #fbe9e7;
  --people-700: #0b586f;
  --people-600: #0f6e8c;
  --people-100: #e2f1f6;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Consolas", "SF Mono", monospace;

  --fs-display: 3rem;      /* 48 */
  --fs-h1: 2.25rem;        /* 36 */
  --fs-h2: 1.75rem;        /* 28 */
  --fs-h3: 1.25rem;        /* 20 */
  --fs-lead: 1.125rem;     /* 18 */
  --fs-body: 1rem;         /* 16 */
  --fs-small: 0.875rem;    /* 14 */
  --fs-micro: 0.8125rem;   /* 13 - floor for interface text */
  --fs-h4: 1.0625rem;      /* 17 - the row heading a table falls back to on a phone */

  /* Four weights, and nothing between them. Ten were in use - 520, 600, 640, 650, 660 among
     them - which is what tuning by eye leaves behind rather than a scale. */
  --fw-medium: 560;
  --fw-semibold: 620;
  --fw-strong: 680;
  --fw-bold: 700;

  --lh-tight: 1.12;
  --lh-heading: 1.24;
  --lh-body: 1.55;

  /* Space */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Shape */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(14, 17, 22, 0.06);
  --shadow-2: 0 6px 20px rgba(14, 17, 22, 0.08);
  --shadow-3: 0 18px 48px rgba(14, 17, 22, 0.12);

  /* Layout */
  --container: 1120px;
  --container-narrow: 760px;
  /* ch is the width of the digit zero, which is wider than the average letter: 68ch came
     out at 87 characters a line on the legal pages. */
  --measure: 54ch;
  --panel-w: 400px;

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 380ms;
  --dur-4: 620ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 1ms;
    --dur-2: 1ms;
    --dur-3: 1ms;
    --dur-4: 1ms;
  }
}
