/* Atode design tokens
   Source: Figma "Designs-for-Rapid-Ideation", section 156:1955, updated
   from 169:867 and 160:1956 (red help button, flat yellow buttons) (Dashboard,
   Review Notes, Review Note steps). This replaced the warm brown palette
   from the first hi-fi (69:2274) on 3 Nov 2026.

   Two layers:
   1. Palette: raw colours, named for what they are. Change a colour here.
   2. Roles: what each colour is used for. Components only use roles,
      so a restyle is usually a change to this file alone.

   See design-system.html for every token and component on one page. */

:root {
  /* 1. Palette */
  --ink-900: #1a1a1a;     /* text, outlines, selected fill */
  --ink-800: #292929;
  --ink-600: #555550;     /* body copy */
  --ink-500: #55505f;     /* small labels on tinted cards */
  --grey-500: #767676;    /* not in Figma: input borders need 3:1 (Figma #d0d0d0 is 1.5:1) */
  --grey-200: #e8e8e8;    /* dividers */
  --paper-50: #fafaf7;    /* page */
  --white: #ffffff;
  --yellow-400: #ffbe00;  /* primary button, topic chip (Figma 169:867) */
  --amber-500: #f5a623;   /* topic chip */
  --lilac-50: #f6f2fa;    /* "Thought note" card */
  --stone-100: #eee9df;   /* "Review note time" card */
  --red-700: #b00020;
  --red-help: #c1121f;    /* "I need help now" (Figma 169:867): white text on it is 6.2:1 */

  /* Onboarding palette (Figma 160:1956, 3 Nov 2026): white page, lilac
     surfaces, violet accent. Used by the .onb screens only for now. */
  --onb-ink: #101010;
  --onb-muted: #686270;       /* 5.9:1 on white */
  --onb-muted-strong: #5e5866; /* not in Figma: ticket meta, #686270 is 4.3:1 on lilac */
  --onb-yellow: #ffbe00;
  --onb-violet: #7854e8;      /* white text on it is 5.0:1 */
  --onb-lilac-50: #f5f2fa;    /* pill, safety note, secondary buttons */
  --onb-lilac-200: #e2d6ff;   /* ticket, step 3 number */
  --onb-line: #e6e0ef;        /* card edges (decorative) */
  --onb-line-control: #8a8396; /* not in Figma: tiles, options and inputs need 3:1 (Figma #e6e0ef is 1.3:1) */

  /* Sticky-note colours, used in turn on the Review Notes stack */
  --note-yellow: #fff1b0;
  --note-pink: #fadde4;
  --note-blue: #dfeffb;
  --note-lilac: #ede2fd;

  /* 2. Roles: surfaces */
  --color-page: var(--paper-50);
  --color-surface: var(--white);
  --color-surface-warm: var(--stone-100);
  --color-surface-cool: var(--lilac-50);
  --color-hero: var(--note-yellow);

  /* Roles: text */
  --color-text-heading: var(--ink-900);
  --color-text: var(--ink-900);
  --color-text-body: var(--ink-600);
  --color-text-muted: var(--ink-500);
  --color-text-on-primary: var(--ink-900);
  --color-text-on-selected: var(--white);
  --color-text-on-danger: var(--white);
  --color-error: var(--red-700);

  /* Roles: lines */
  --color-border: var(--grey-200);
  --color-border-warm: var(--grey-200);
  --color-border-input: var(--grey-500);
  --color-border-hero: var(--ink-900);
  --color-border-strong: var(--ink-900);

  /* Roles: actions */
  --color-primary: var(--yellow-400);
  --color-primary-border: var(--yellow-400);  /* no outline since 169:867 */
  --color-primary-pressed: #f0b400;
  --color-danger: var(--ink-900);
  --color-selected: var(--ink-900);
  --color-selected-border: var(--ink-900);
  --color-chip: var(--yellow-400);
  --color-help: var(--red-help);
  --color-text-on-help: var(--white);
  --color-focus: var(--ink-900);

  /* Type: Inter for headings and copy, Work Sans for controls
     (back link, step label, chips, choice pills), as in Figma. */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ui: "Work Sans", var(--font);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  --text-time: 40px;     /* 18:00 on Home */
  --text-hero: 36px;     /* "Thought Note" */
  --text-display: 30px;  /* page titles */
  --text-h1: 28px;       /* note titles, big questions */
  --text-question: 26px;
  --text-h2: 18px;
  --text-lg: 16px;       /* buttons, section headings */
  --text-md: 15px;       /* controls */
  --text-sm: 14px;       /* smallest allowed size (Figma uses 12 and 13 in places) */
  --text-onb-hero: 28px; /* onboarding: Welcome, How it works */
  --text-onb-title: 26px; /* onboarding: other titles, ticket time */

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-body: 1.55;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;  /* tablet side margins */
  --gutter: var(--space-6);

  /* Shape */
  --radius-sm: 12px;     /* buttons, inputs, tiles */
  --radius-md: 12px;
  --radius-lg: 20px;     /* illustration boxes */
  --radius-xl: 24px;     /* cards */
  --radius-note: 28px;   /* sticky notes */
  --radius-pill: 999px;  /* choice pills, chips, help pill */

  --shadow-card: none;
  --shadow-illustration: none;
  --shadow-note: 0 10px 15px rgba(0, 0, 0, 0.13);
  --shadow-field: 0 4px 16px rgba(0, 0, 0, 0.04);

  /* Sizes */
  --tap-min: 48px;
  --button-height: 53px;

  /* Motion. Soft and small. With "reduce motion", screens only fade. */
  --motion-fast: 150ms;     /* presses, selections */
  --motion-leave: 180ms;    /* old screen fading out (keep in step with LEAVE_MS in app.js) */
  --motion-page: 480ms;     /* new screen easing in */
  --motion-slow: 420ms;     /* the ticket arriving */
  --motion-distance: 12px;  /* how far a screen slides in */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
}
