/**
 * patient-tokens.css - The patient pages' colours, fonts and aliases (the --ps-* tokens).
 *
 * Split out of patient-shell.css so a page that is not the patient shell can use the
 * patient components with the same look: the short-link pages (Support, Book, Pay) load
 * aci-patient.css and the Support tab's styles, which read these tokens, but must not
 * load patient-shell.css, whose body rules fix the page to the window. Load this file
 * before any stylesheet that reads the tokens. The colour values live in colour-tokens.css,
 * which every template loads first.
 */

:root {
  /* Colours point at the shared Evergreen set (colour-tokens.css, experience review 2026-11-15).
     The names stay so every existing rule keeps working; new CSS reads --color-* directly. */
  --ps-bg: var(--color-page);
  --ps-surface: var(--color-card);
  --ps-surface-soft: var(--color-panel);
  --ps-text: var(--color-text);
  /* One muted step (was .72 and .48 see-through teal; .48 was 2.7:1). */
  --ps-text-soft: var(--color-muted);
  --ps-text-dim: var(--color-muted);
  /* Cards keep a light hairline, never a dark border (owner ruling 2026-11-14). */
  --ps-border: var(--color-line);
  --ps-border-soft: var(--color-line-soft);
  /* --ps-accent fills the main button and draws selected marks: forest (decision 2). */
  --ps-accent: var(--color-main);
  --ps-accent-dim: var(--color-selected-row);
  --ps-accent-text: var(--color-link);
  --ps-red: #dc2626;
  --ps-amber: var(--color-warn);  /* was #d97706 (3.2:1) */
  --ps-green: var(--color-done);  /* done words, was #059669 (3.8:1) */
  --ps-blue: #596b78;
  --ps-teal: #0d9488;
  --ps-grey: #6b7280;
  --ps-red-bg: #fef2f2;
  --ps-amber-bg: #fffbeb;
  --ps-green-bg: #ecfdf5;
  --ps-blue-bg: #eef2f4;
  --ps-teal-bg: #f0fdfa;
  --ps-grey-bg: #f9fafb;

  /* Brand palette (NeuroClarity branding guidelines). Vellum is the warm
     off-white card field, ink the dark neutral used for text/outlines, and
     parchment the near-white used for text that sits on top of ink fills
     (e.g. action buttons on hover). Introduced for the welcome banner. */
  --ps-brand-vellum: #F4F1DE;
  --ps-brand-ink: #3A3C41;
  --ps-brand-parchment: #FEF9F0;

  /* Backward-compatible aliases consumed by ACI patient components. */
  --home-border: var(--ps-border);
  --home-ink: var(--ps-text);
  --home-ink-dim: var(--ps-text-dim);
  --home-accent: var(--ps-accent);
  --home-blue: var(--ps-blue);
  --home-green: var(--ps-green);
  --home-red: var(--ps-red);

  /* Patient-shell bridge for the shared settings overlay stylesheet. */
  --atlas-bg: var(--ps-surface);
  --atlas-bg-warm: var(--ps-surface-soft);
  --atlas-surface: var(--color-panel);
  --atlas-surface-b: var(--ps-border);
  --atlas-text: var(--ps-text);
  --atlas-text-soft: var(--ps-text-soft);
  --atlas-text-dim: var(--ps-text-dim);
  --atlas-accent: var(--ps-accent);
  --atlas-accent-text: var(--ps-accent-text);
  --atlas-overlay: rgba(21, 37, 30, 0.32);
  --atlas-shadow-lg: 0 24px 80px rgba(21, 37, 30, 0.18);
  --atlas-sev-severe: var(--ps-red);

  /* Type scale (UI polish 2026-11-11, wiki/ui-standards.md). Same sizes as the
     clinician side plus 15 and 17, which the patient set uses. Weights
     400/500/600/700 only (Inter is loaded to 700). Nothing under 12px here. */
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-17: 17px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-26: 26px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-title: 1.25;
  --lh-body: 1.5;

  /* Patient roles: page title 24/700, card title 17/600, section label 12/600
     caps, body 15/400 lh 1.5, secondary 13/400, buttons 15/600 (main 48px tall,
     secondary 44px), inputs 16/400 48px, field labels 13/600. */
  --fs-page-title: var(--fs-24);
  --fs-card-title: var(--fs-17);
  --fs-section-label: var(--fs-12);
  --fs-body: var(--fs-15);
  --fs-secondary: var(--fs-13);
  --fs-button: var(--fs-15);
  --fs-input: var(--fs-16);
  --fs-label: var(--fs-13);
  --btn-h-main: 48px;
  --btn-h: 44px;
  --input-h: 48px;

  /* UiDialog sizes on patient pages (ui-dialog.css). */
  --ui-title-fs: var(--fs-17);
  --ui-body-fs: var(--fs-15);
  --ui-btn-fs: var(--fs-15);
  --ui-btn-weight: var(--fw-semibold);
  --ui-btn-h: 44px;
  --ui-btn-main-h: 48px;
  --ui-btn-pad: 18px;
  --ui-x-size: 44px;
  --ui-dialog-radius: 18px;
  --ui-input-h: 48px;
  --ui-input-fs: var(--fs-16);
  --ui-label-fs: var(--fs-13);

  /* Shared components (ui-components.css, ui-components-nav.css) at patient size. Every
     control is at least 44 px tall at every width (not only on phones). */
  --ui-input-radius: 10px;
  --ui-placeholder: var(--ps-text-soft);
  --ui-link-h: 44px;
  --ui-link-fs: var(--fs-15);
  --ui-icon-fs: var(--fs-16);
  --ui-search-h: 44px;
  --ui-tab-h: 44px;
  --ui-tab-px: 12px;
  --ui-tab-fs: var(--fs-15);
  --ui-switch-h: 44px;
  --ui-switch-px: 18px;
  --ui-switch-fs: var(--fs-15);
  --ui-chip-fs: var(--fs-13);
  --ui-chip-lh: 20px;
  --ui-chip-px: 10px;
  --ui-new-fs: var(--fs-12);
  --ui-new-lh: 18px;
  --ui-card-radius: 8px;
  --ui-card-pad: 18px;
  --ui-subhead-fs: var(--fs-17);
  --ui-head-min-h: 56px;
  --ui-head-px: 18px;
  --ui-head-title-fs: var(--fs-14);
  --ui-head-sum-fs: var(--fs-13);
  --ui-empty-fs: var(--fs-15);
  --ui-error-fs: var(--fs-14);
}
