/* Covered for Therapy design tokens
   GENERATED by brand/tools/build_tokens.py from brand/tokens.json. Do not edit by hand;
   change tokens.json and rerun the script. Source of the values: brand/BRAND_DECISION.md.
   Light values live on :root. [data-theme="dark"] overrides them; the prefers-color-scheme
   block applies the same dark set when no theme is forced. Every text pairing clears
   WCAG 2.2 AA (4.5:1) and every border pairing clears 3:1 on the surfaces named in the
   decision document. Never use an em dash in copy. */

:root {
  color-scheme: light;

  /* Colour */
  --tc-ink: #141A2A;
  --tc-primary: #141A2A;
  --tc-on-primary: #FFFFFF;
  --tc-primary-dark: #0B0F1B;
  --tc-accent: #234BCF;
  --tc-accent-light: #9DB4FF;
  --tc-accent-wash: #EEF2FF;
  --tc-on-accent: #FFFFFF;
  --tc-muted: #565A66;
  --tc-on-dark: #FFFFFF;
  --tc-surface: #FFFFFF;
  --tc-surface-alt: #F4F3EF;
  --tc-surface-card: #FFFFFF;
  --tc-surface-dark: #0B0F1B;
  --tc-border: #777B86;
  --tc-hairline: #E3E4E5;
  --tc-focus: #234BCF;
  --tc-success: #17784A;
  --tc-success-tint: #E6F4EC;
  --tc-warning: #955600;
  --tc-warning-tint: #FBF1DF;
  --tc-danger: #AE2A22;
  --tc-danger-tint: #FBE9E7;
  --tc-unknown: #565A66;
  --tc-unknown-tint: #F4F3EF;
  --tc-unknown-border: #777B86;
  --tc-text: var(--tc-ink);
  --tc-text-muted: var(--tc-muted);
  --tc-text-on-dark: var(--tc-on-dark);

  /* Fonts */
  --tc-font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --tc-font-body: "Public Sans", Inter, system-ui, sans-serif;
  --tc-font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Type scale */
  --tc-text-display: 64px;
  --tc-text-display-phone: 44px;
  --tc-text-h1: 48px;
  --tc-text-h1-phone: 36px;
  --tc-text-h2: 32px;
  --tc-text-h2-phone: 28px;
  --tc-text-h3: 22px;
  --tc-text-h3-phone: 20px;
  --tc-text-body: 17px;           /* marketing site */
  --tc-text-body-ui: 16px;        /* portal and widget */
  --tc-text-body-min: 15px;       /* widget floor */
  --tc-text-small: 14px;
  --tc-text-caption: 12px;
  --tc-text-figure: 24px;         /* dollar figures, 1.5 x UI body */
  --tc-text-figure-hero: 40px;
  --tc-text-mono: 14px;
  --tc-text-button: 16px;

  --tc-leading-display: 1.05;
  --tc-leading-h1: 1.1;
  --tc-leading-h2: 1.2;
  --tc-leading-h3: 1.3;
  --tc-leading-body: 1.55;
  --tc-leading-ui: 1.5;
  --tc-leading-small: 1.45;
  --tc-leading-caption: 1.4;
  --tc-leading-figure: 1.2;
  --tc-leading-mono: 1.5;
  --tc-leading-button: 1;

  --tc-tracking-display: -0.015em;
  --tc-tracking-heading: -0.01em;
  --tc-tracking-figure: -0.01em;
  --tc-tracking-caption: 0.01em;

  --tc-weight-display: 500;
  --tc-weight-regular: 400;
  --tc-weight-medium: 500;
  --tc-weight-semibold: 600;

  --tc-prose-max: 66ch;

  /* Spacing, 8px grid with a 4px half-step */
  --tc-space-1: 4px;
  --tc-space-2: 8px;
  --tc-space-3: 12px;
  --tc-space-4: 16px;
  --tc-space-5: 24px;
  --tc-space-6: 32px;
  --tc-space-7: 48px;
  --tc-space-8: 64px;
  --tc-space-9: 96px;
  --tc-gutter: 24px;
  --tc-gutter-min: 16px;
  --tc-section: 96px;
  --tc-section-phone: 56px;
  --tc-card-pad: 32px;
  --tc-card-pad-phone: 24px;
  --tc-card-max: 560px;
  --tc-widget-pad: 24px;

  /* Radius */
  --tc-radius-sm: 4px;
  --tc-radius-md: 8px;
  --tc-radius-lg: 12px;
  --tc-radius-pill: 999px;
  --tc-radius-app-icon: 22%;

  /* Strokes */
  --tc-stroke-hairline: 1px;
  --tc-stroke-border: 1px;
  --tc-stroke-focus: 2px;
  --tc-stroke-focus-halo: 5px;
  --tc-stroke-rule: 2px;
  --tc-stroke-icon: 1.5px;

  /* Motion */
  --tc-motion-draw: 200ms;
}

/* Dark mode: ink paper turned over. No new brand colour. */
:root[data-theme="dark"],
[data-theme="dark"] {
  color-scheme: dark;

  --tc-ink: #FFFFFF;
  --tc-primary: #F4F3EF;
  --tc-on-primary: #141A2A;
  --tc-primary-dark: #0B0F1B;
  --tc-accent: #9DB4FF;
  --tc-accent-light: #9DB4FF;
  --tc-accent-wash: #182653;
  --tc-on-accent: #141A2A;
  --tc-muted: #A5A8B3;
  --tc-on-dark: #FFFFFF;
  --tc-surface: #141A2A;
  --tc-surface-alt: #0B0F1B;
  --tc-surface-card: #222837;
  --tc-surface-dark: #0B0F1B;
  --tc-border: #767C8E;
  --tc-hairline: #303544;
  --tc-focus: #9DB4FF;
  --tc-success: #4FBF86;
  --tc-success-tint: #1F383B;
  --tc-warning: #E0A24A;
  --tc-warning-tint: #393230;
  --tc-danger: #F28B82;
  --tc-danger-tint: #3C2E3A;
  --tc-unknown: #A5A8B3;
  --tc-unknown-tint: #2C313F;
  --tc-unknown-border: #767C8E;
  --tc-text: var(--tc-ink);
  --tc-text-muted: var(--tc-muted);
  --tc-text-on-dark: var(--tc-on-dark);
}

/* Same dark set when the viewer's system prefers dark and no theme is forced. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --tc-ink: #FFFFFF;
    --tc-primary: #F4F3EF;
    --tc-on-primary: #141A2A;
    --tc-primary-dark: #0B0F1B;
    --tc-accent: #9DB4FF;
    --tc-accent-light: #9DB4FF;
    --tc-accent-wash: #182653;
    --tc-on-accent: #141A2A;
    --tc-muted: #A5A8B3;
    --tc-on-dark: #FFFFFF;
    --tc-surface: #141A2A;
    --tc-surface-alt: #0B0F1B;
    --tc-surface-card: #222837;
    --tc-surface-dark: #0B0F1B;
    --tc-border: #767C8E;
    --tc-hairline: #303544;
    --tc-focus: #9DB4FF;
    --tc-success: #4FBF86;
    --tc-success-tint: #1F383B;
    --tc-warning: #E0A24A;
    --tc-warning-tint: #393230;
    --tc-danger: #F28B82;
    --tc-danger-tint: #3C2E3A;
    --tc-unknown: #A5A8B3;
    --tc-unknown-tint: #2C313F;
    --tc-unknown-border: #767C8E;
    --tc-text: var(--tc-ink);
    --tc-text-muted: var(--tc-muted);
    --tc-text-on-dark: var(--tc-on-dark);
  }
}

/* Token-level guard: a status element can never show the brand accent. */
[data-status] {
  --tc-accent: var(--tc-ink);
  --tc-accent-light: var(--tc-ink);
  --tc-focus: var(--tc-ink);
}

/* Base application of the tokens. */
body {
  background: var(--tc-surface);
  color: var(--tc-text);
  font-family: var(--tc-font-body);
  font-size: var(--tc-text-body-ui);
  line-height: var(--tc-leading-ui);
}
h1, h2, .tc-display {
  font-family: var(--tc-font-display);
  font-optical-sizing: auto;
  font-weight: var(--tc-weight-display);
  letter-spacing: var(--tc-tracking-heading);
}
