/* GENERATED — the canonical Innovoot Design System tokens, and nothing else.
   Source: src/design-system/tokens.css. Regenerate: node scripts/sync-design-system-css.mjs. Do not edit.
   Served for surfaces that render HTML outside this repository (the Healthcare public-page renderer in
   api-innovlist links it). Unlike design-system.css it carries no legacy stylesheet and no legacy aliases;
   --ifds-color-primary appears only because tokens.css itself keeps that one runtime bridge. */
/* ═════════════════════════════════════════════════════════════════════════
   1. Raw palette — referenced only by the semantic tokens below.
      Components must never read these directly.
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  /* Neutral — admin's gray scale is THE neutral scale. 450 is the first step >= 3:1 on white (WCAG 1.4.11). */
  --palette-neutral-0: #ffffff;
  --palette-neutral-25: #fcfcfd;
  --palette-neutral-50: #f9fafb;
  --palette-neutral-100: #f2f4f7;
  --palette-neutral-200: #e4e7ec;
  --palette-neutral-300: #d0d5dd;
  --palette-neutral-400: #98a2b3;
  --palette-neutral-450: #838ea1;
  --palette-neutral-500: #667085;
  --palette-neutral-600: #475467;
  --palette-neutral-700: #344054;
  --palette-neutral-800: #1d2939;
  --palette-neutral-900: #101828;
  --palette-neutral-950: #0c111d;
  --palette-neutral-dark: #1a2231; /* dark-mode card surface */

  /* Page surface. Deliberately NOT a step on the neutral ramp: that ramp is blue-tinted
     (210-216 deg) and this is violet (252 deg), so putting it at neutral-50 would break the
     ramp's hue and — because --bg-hover reads the same step — repaint every hover state in
     the app shell. A named surface keeps both scales honest.
     The exact value is contrast-led: #f5f4f8 was asked for, but brand-as-text lands at
     4.42:1 on it, under the AA floor for the links and ghost buttons that sit on this
     surface. This is the same hue, light enough to keep 4.54:1 (see tokens.contrast). */
  --palette-surface-page: #f8f7fc;

  /* Platform brand scale (Innovoot's own UI). Tenants override --primary, never these. */
  --palette-brand-25: #f2f7ff;
  --palette-brand-50: #ecf3ff;
  --palette-brand-100: #dde9ff;
  --palette-brand-200: #c2d6ff;
  --palette-brand-300: #9cb9ff;
  --palette-brand-400: #7592ff;
  --palette-brand-500: #465fff;
  --palette-brand-600: #3641f5;
  --palette-brand-700: #2a31d8;
  --palette-brand-800: #252dae;
  --palette-brand-900: #262e89;
  --palette-brand-950: #161950;

  /* Status families */
  --palette-success-25: #f6fef9;
  --palette-success-50: #ecfdf3;
  --palette-success-100: #d1fadf;
  --palette-success-200: #a6f4c5;
  --palette-success-300: #6ce9a6;
  --palette-success-400: #32d583;
  --palette-success-500: #12b76a;
  --palette-success-600: #039855;
  --palette-success-700: #027a48;
  --palette-success-800: #05603a;
  --palette-success-900: #054f31;
  --palette-success-950: #053321;
  --palette-error-25: #fffbfa;
  --palette-error-50: #fef3f2;
  --palette-error-100: #fee4e2;
  --palette-error-200: #fecdca;
  --palette-error-300: #fda29b;
  --palette-error-400: #f97066;
  --palette-error-500: #f04438;
  --palette-error-600: #d92d20; /* solid fills carrying white text (4.8:1) */
  --palette-error-700: #b42318;
  --palette-error-800: #912018;
  --palette-error-900: #7a271a;
  --palette-error-950: #55160c;
  --palette-warning-25: #fffcf5;
  --palette-warning-50: #fffaeb;
  --palette-warning-100: #fef0c7;
  --palette-warning-200: #fedf89;
  --palette-warning-300: #fec84b;
  --palette-warning-400: #fdb022;
  --palette-warning-500: #f79009;
  --palette-warning-600: #dc6803;
  --palette-warning-700: #b54708;
  --palette-warning-800: #93370d;
  --palette-warning-900: #7a2e0e;
  --palette-warning-950: #4e1d09;

  /* Extended accent / data-visualization palette (charts, badges in dashboards) */
  --palette-blue-light-25: #f5fbff;
  --palette-blue-light-50: #f0f9ff;
  --palette-blue-light-100: #e0f2fe;
  --palette-blue-light-200: #b9e6fe;
  --palette-blue-light-300: #7cd4fd;
  --palette-blue-light-400: #36bffa;
  --palette-blue-light-500: #0ba5ec;
  --palette-blue-light-600: #0086c9;
  --palette-blue-light-700: #026aa2;
  --palette-blue-light-800: #065986;
  --palette-blue-light-900: #0b4a6f;
  --palette-blue-light-950: #062c41;
  --palette-orange-25: #fffaf5;
  --palette-orange-50: #fff6ed;
  --palette-orange-100: #ffead5;
  --palette-orange-200: #fddcab;
  --palette-orange-300: #feb273;
  --palette-orange-400: #fd853a;
  --palette-orange-500: #fb6514;
  --palette-orange-600: #ec4a0a;
  --palette-orange-700: #c4320a;
  --palette-orange-800: #9c2a10;
  --palette-orange-900: #7e2410;
  --palette-orange-950: #511c10;
  --palette-pink-500: #ee46bc;
  --palette-purple-500: #7a5af8;
  /* accent-tint steps (Strategy §3.12, 2026-10-18) — the same family as the scales above; they feed --accent-* only */
  --palette-purple-50: #f4f3ff;
  --palette-purple-300: #bdb4fe;
  --palette-purple-400: #9b8afb;
  --palette-purple-600: #6938ef;
  --palette-purple-700: #5925dc;
  --palette-pink-50: #fdf2fa;
  --palette-pink-300: #faa7e0;
  --palette-pink-400: #f670c7;
  --palette-pink-600: #dd2590;
  --palette-pink-700: #c11574;
  --palette-teal-50: #f0fdf9;
  --palette-teal-300: #5fe9d0;
  --palette-teal-400: #2ed3b7;
  --palette-teal-500: #15b79e;
  --palette-teal-600: #0e9384;
  --palette-teal-700: #107569;
  /* Innovoot chrome (Strategy §3.15, 2026-10-20) — Innovoot's own bar, never a tenant surface; feed --chrome-* and --glow-* only */
  --palette-night-900: #0c0a1d;
  --palette-glow-violet: #7c5cff;
  --palette-glow-magenta: #e04ad6;
  --palette-glow-peach: #ff9d7e;
  --palette-glow-indigo: #6a4cf0;
  --palette-glow-plum: #c026b8;

  /* Elevation ladder (dashboard density). Component ROLES (--shadow-soft/-elevated/-cta) are separate. */
  --elevation-xs: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
  --elevation-sm: 0px 1px 3px 0px rgba(16, 24, 40, 0.1), 0px 1px 2px 0px rgba(16, 24, 40, 0.06);
  --elevation-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
  --elevation-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
  --elevation-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
}

/* ═════════════════════════════════════════════════════════════════════════
   1b. Innovoot chrome (Strategy §3.15) — the bar across the top of Admin and OPS, and its one glow button.
       FIXED: the same in light and dark, and applyBrand() never writes these. No tenant surface, page,
       widget or chart may use a --chrome-* or --glow-* token (test-enforced in the consumers).
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  --chrome-bg:
    radial-gradient(45% 260% at 100% 0%, rgb(224 74 214 / 0.55), transparent 65%),
    radial-gradient(45% 240% at 72% 100%, rgb(124 92 255 / 0.5), transparent 70%),
    radial-gradient(30% 220% at 48% 0%, rgb(70 95 255 / 0.22), transparent 70%),
    var(--palette-night-900);
  --chrome-ground: var(--palette-night-900);        /* the frame round the panel */
  --chrome-fg: #ffffff;                             /* >= 7:1 on the brightest blend; 17:1 on night */
  --chrome-line: rgb(255 255 255 / 0.14);
  --chrome-control-bg: rgb(255 255 255 / 0.08);
  --chrome-control-bg-hover: rgb(255 255 255 / 0.16);
  --chrome-control-ring: rgb(255 255 255 / 0.18);
  --chrome-height: 56px;
  --chrome-control-size: 36px;
  --chrome-text-size: 13.5px;
  --chrome-text-weight: 500;
  --chrome-logo-height: 17px;
  --chrome-logo-height-phone: 15px;
  --chrome-panel-radius: var(--radius-lg);
  --chrome-gutter: var(--space-2);

  /* the glow button — every stop under its text holds white >= 4.5:1 (#465fff 4.8, indigo 5.4, plum 5.0); peach only in the glow */
  /* two identical periods, so a 200%-wide layer sliding -50% loops without a seam */
  --glow-gradient: linear-gradient(100deg, var(--palette-brand-500), var(--palette-glow-indigo) 12.5%, var(--palette-glow-plum) 25%,
    var(--palette-glow-indigo) 37.5%, var(--palette-brand-500) 50%, var(--palette-glow-indigo) 62.5%, var(--palette-glow-plum) 75%,
    var(--palette-glow-indigo) 87.5%, var(--palette-brand-500));
  --glow-shadow: 0 6px 20px -8px rgb(124 92 255 / 0.75);
  --glow-shadow-hover: 0 10px 28px -8px rgb(224 74 214 / 0.7);
  --glow-ring-width: 1.5px;
  --glow-ring-bg: rgb(255 255 255 / 0.22);
  --glow-ring-light: conic-gradient(from 0deg, transparent 0 62%, var(--palette-glow-peach) 78%, #ffffff 88%, transparent 96%);
  --duration-glow-flow: 8s;
  --duration-ring-run: 3s;
  --anim-glow-flow: ds-glow-flow;   /* the fill layer slides; compositor-only */
  --anim-ring-run: ds-spin;         /* the light behind the ring turns */
}

/* ═════════════════════════════════════════════════════════════════════════
   2. Brand — the only tenant-overridable input is --primary.
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  --primary: var(--palette-brand-500); /* platform default #465fff, Strategy §3.1 — the ONE tenant-overridable input */
}

/* ═════════════════════════════════════════════════════════════════════════
   3. Semantic color — LIGHT (default)
   ═════════════════════════════════════════════════════════════════════════ */
:root,
[data-ds-theme='light'] {
  color-scheme: light;
  --ring-strength: 16%;
  --dark-weight: 0%; /* 0 = light surfaces, 100 = dark: selects which accessible brand-as-text color applies */
  --info-darken: 25%;

  /* text */
  --text-primary: var(--palette-neutral-900);
  --text-secondary: var(--palette-neutral-700);
  --text-muted: var(--palette-neutral-500);
  --text-placeholder: var(--palette-neutral-500);
  --text-disabled: var(--palette-neutral-400);
  --text-on-primary: #ffffff;
  --text-on-error: #ffffff;

  /* surfaces */
  --bg-page: var(--palette-surface-page);
  --bg-card: var(--palette-neutral-0);
  --bg-muted: var(--palette-neutral-100);
  --bg-input: var(--palette-neutral-0);
  --bg-disabled: var(--palette-neutral-100);
  --bg-hover: var(--palette-neutral-50);
  --bg-overlay: color-mix(in srgb, var(--palette-neutral-900) 50%, transparent);

  /* borders */
  --border-default: var(--palette-neutral-200);
  --border-input: var(--palette-neutral-450); /* controls: >=3:1 (WCAG 1.4.11) */
  --border-input-hover: var(--palette-neutral-500);
  --border-strong: var(--border-input);

  /* status — fill/icon color, and a text-safe variant (AA on the card surface) */
  --success: var(--palette-success-500);
  --success-text: var(--palette-success-700);
  --success-solid: var(--palette-success-700); /* fill carrying white text (5.4:1) */
  --skeleton-base: var(--palette-neutral-100);
  --skeleton-shine: var(--palette-neutral-0);
  --warning: var(--palette-warning-500);
  --warning-text: var(--palette-warning-700);
  --error: var(--palette-error-500);
  --error-text: var(--palette-error-700);
  --error-solid: var(--palette-error-600);
  /* toast styles (Strategy §3.12(d)) — the inverse surface (a dark toast on a light page) and a white-text warning fill */
  --bg-inverse: var(--palette-neutral-900);
  --text-inverse: var(--palette-neutral-0);
  --success-text-inverse: var(--palette-success-400);
  --warning-text-inverse: var(--palette-warning-400);
  --error-text-inverse: var(--palette-error-400);
  --warning-solid: var(--palette-warning-700); /* fill carrying white text (5.4:1) */
  --bg-warm: #f4f0eb; /* hospitality forms shell */
  --bg-warm-deep: #e8e0d4;

  /* elevation (Strategy §3.5: soft / elevated / cta roles) */
  --shadow-soft: 0 1px 3px rgba(16, 24, 40, 0.04), 0 4px 14px -4px rgba(16, 24, 40, 0.07);
  --shadow-card-hover: 0 6px 20px -6px rgba(16, 24, 40, 0.08), 0 2px 6px -2px rgba(16, 24, 40, 0.04);
  --shadow-elevated: 0 8px 28px -8px rgba(16, 24, 40, 0.1), 0 2px 8px -2px rgba(16, 24, 40, 0.05);

  /* identity tints (Strategy §4.21) — a person's avatar, never a state.
     Deliberately NOT the status hues: green, amber and red already mean done,
     waiting and failed, and brand blue means primary, so an avatar in any of
     them reads as a state rather than as a person. Five is enough to separate
     adjacent rows; the tint is a scanning aid and never the only signal, because
     the initials and the name carry the identity — which is why these sit at
     near-equal lightness (an avatar that is much darker than its neighbours
     looks emphasised) rather than on a lightness ladder. Initials on every tint
     are >= 6.5:1. */
  --identity-1-bg: #ede9fe;  --identity-1-text: #5b21b6;
  --identity-2-bg: #ccfbf1;  --identity-2-text: #115e59;
  --identity-3-bg: #fae8ff;  --identity-3-text: #86198f;
  --identity-4-bg: #e0f2fe;  --identity-4-text: #075985;
  --identity-5-bg: #ecebe8;  --identity-5-text: #4d4b46;

  /* accent tints (Strategy §3.12) — a CATEGORY (an area, a source, a chart series), never a state and never a
     person. bg = soft surface, fg = icon/text on it (>= 5.1:1), solid = chart mark / dot (>= 3.7:1 on a card). */
  --accent-violet-bg: var(--palette-purple-50);     --accent-violet-fg: var(--palette-purple-700);     --accent-violet-solid: var(--palette-purple-600);
  --accent-sky-bg: var(--palette-blue-light-50);    --accent-sky-fg: var(--palette-blue-light-700);    --accent-sky-solid: var(--palette-blue-light-600);
  --accent-pink-bg: var(--palette-pink-50);         --accent-pink-fg: var(--palette-pink-700);         --accent-pink-solid: var(--palette-pink-600);
  --accent-teal-bg: var(--palette-teal-50);         --accent-teal-fg: var(--palette-teal-700);         --accent-teal-solid: var(--palette-teal-600);
  --accent-orange-bg: var(--palette-orange-50);     --accent-orange-fg: var(--palette-orange-700);     --accent-orange-solid: var(--palette-orange-600);
}

/* ═════════════════════════════════════════════════════════════════════════
   4. Semantic color — DARK. Same token names, different values. Dark neutrals
      are admin-dashboard's existing dark palette (gray-900/dark/800/700/600).
   ═════════════════════════════════════════════════════════════════════════ */
[data-ds-theme='dark'] {
  color-scheme: dark;
  --ring-strength: 32%;
  --dark-weight: 100%;
  --info-darken: 0%;

  --text-primary: var(--palette-neutral-100);
  --text-secondary: var(--palette-neutral-300);
  --text-muted: var(--palette-neutral-400);
  --text-placeholder: var(--palette-neutral-400);
  --text-disabled: var(--palette-neutral-500);
  --text-on-primary: #ffffff;
  --text-on-error: #ffffff;

  --bg-page: var(--palette-neutral-900);
  --bg-card: var(--palette-neutral-dark);
  --bg-muted: var(--palette-neutral-800);
  --bg-input: var(--palette-neutral-900);
  --bg-disabled: var(--palette-neutral-800);
  --bg-hover: color-mix(in srgb, var(--palette-neutral-0) 5%, transparent);
  --bg-overlay: color-mix(in srgb, #000000 60%, transparent);

  --border-default: var(--palette-neutral-700);
  --border-input: var(--palette-neutral-500);
  --border-input-hover: var(--palette-neutral-400);
  --border-strong: var(--border-input);

  --success: var(--palette-success-500);
  --success-text: var(--palette-success-400);
  --success-solid: var(--palette-success-700);
  --skeleton-base: var(--palette-neutral-800);
  --skeleton-shine: var(--palette-neutral-700);
  --warning: var(--palette-warning-500);
  --warning-text: var(--palette-warning-400);
  --error: var(--palette-error-500);
  --error-text: var(--palette-error-400);
  --error-solid: var(--palette-error-600);
  /* toast styles (Strategy §3.12(d)) — in dark mode the inverse surface is light */
  --bg-inverse: var(--palette-neutral-100);
  --text-inverse: var(--palette-neutral-900);
  --success-text-inverse: var(--palette-success-700);
  --warning-text-inverse: var(--palette-warning-700);
  --error-text-inverse: var(--palette-error-700);
  --warning-solid: var(--palette-warning-700);
  --bg-warm: var(--palette-neutral-dark);
  --bg-warm-deep: var(--palette-neutral-800);

  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 6px 20px -6px rgba(0, 0, 0, 0.55), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 28px -8px rgba(0, 0, 0, 0.6), 0 2px 8px -2px rgba(0, 0, 0, 0.4);

  /* identity tints — dark counterparts, same names (Strategy §4.21). >= 9.6:1. */
  --identity-1-bg: #2e1065;  --identity-1-text: #ddd6fe;
  --identity-2-bg: #042f2e;  --identity-2-text: #99f6e4;
  --identity-3-bg: #4a044e;  --identity-3-text: #f5d0fe;
  --identity-4-bg: #082f49;  --identity-4-text: #bae6fd;
  --identity-5-bg: #2b2a27;  --identity-5-text: #d6d3d1;

  /* accent tints — dark counterparts, same names (Strategy §3.12). fg >= 7.1:1 on its bg, solid >= 5.6:1 on a card. */
  --accent-violet-bg: color-mix(in srgb, var(--palette-purple-500) 16%, var(--palette-neutral-dark));     --accent-violet-fg: var(--palette-purple-300);     --accent-violet-solid: var(--palette-purple-400);
  --accent-sky-bg: color-mix(in srgb, var(--palette-blue-light-500) 16%, var(--palette-neutral-dark));    --accent-sky-fg: var(--palette-blue-light-300);    --accent-sky-solid: var(--palette-blue-light-400);
  --accent-pink-bg: color-mix(in srgb, var(--palette-pink-500) 16%, var(--palette-neutral-dark));         --accent-pink-fg: var(--palette-pink-300);         --accent-pink-solid: var(--palette-pink-400);
  --accent-teal-bg: color-mix(in srgb, var(--palette-teal-500) 16%, var(--palette-neutral-dark));         --accent-teal-fg: var(--palette-teal-300);         --accent-teal-solid: var(--palette-teal-400);
  --accent-orange-bg: color-mix(in srgb, var(--palette-orange-500) 16%, var(--palette-neutral-dark));     --accent-orange-fg: var(--palette-orange-300);     --accent-orange-solid: var(--palette-orange-400);
}

/* ═════════════════════════════════════════════════════════════════════════
   5. Derived tokens — computed from the tokens above. Declared on every element
      that can change an input (root, a theme scope, or a tenant --primary override)
      so custom-property inheritance never freezes a stale value.
   ═════════════════════════════════════════════════════════════════════════ */
:root,
[data-ds-theme],
[style*='--primary:'] {
  /* Accessible brand companions (Strategy §3.9). For the platform brand they equal/derive from --primary;
     for a tenant, applyBrand() (design-system/tokens.js) overrides them inline so text-bearing roles always pass AA.
       --primary-solid   fill that carries white text AND brand-as-text on light surfaces (>= 4.5:1)
       --primary-on-dark brand-as-text / focus on dark surfaces (>= 4.5:1)                          */
  --primary-solid: var(--primary);
  /* the hero surface (Strategy §3.12) — one per page at most; follows the tenant brand; all text on it is --hero-fg at full strength */
  --hero-bg: var(--primary-solid);
  --hero-fg: var(--text-on-primary);
  --hero-glow: color-mix(in srgb, var(--text-on-primary) 12%, transparent);
  --primary-on-dark: color-mix(in srgb, var(--primary) 62%, white);

  /* brand states (Strategy §4.1) — derived from the accessible fill, not the raw brand */
  --primary-hover: color-mix(in srgb, var(--primary-solid) 90%, black);
  --primary-active: color-mix(in srgb, var(--primary-solid) 80%, black);
  --primary-dark: color-mix(in srgb, var(--primary) 72%, black);
  --primary-subtle: color-mix(in srgb, var(--primary) 5%, transparent);
  --primary-tint: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-ring: color-mix(in srgb, var(--primary) var(--ring-strength), transparent);
  --primary-border: color-mix(in srgb, var(--primary) 40%, transparent);
  --primary-light: color-mix(in srgb, var(--primary) 12%, white);
  /* brand used AS TEXT (ghost buttons, links, focus): light → solid, dark → on-dark */
  --primary-text: color-mix(in srgb, var(--primary-on-dark) var(--dark-weight), var(--primary-solid));

  /* status washes */
  --success-bg: color-mix(in srgb, var(--success) 10%, var(--bg-card));
  --success-border: color-mix(in srgb, var(--success) 40%, var(--border-default));
  --warning-bg: color-mix(in srgb, var(--warning) 10%, var(--bg-card));
  --warning-border: color-mix(in srgb, var(--warning) 40%, var(--border-default));
  --error-bg: color-mix(in srgb, var(--error) 10%, var(--bg-card));
  --error-border: color-mix(in srgb, var(--error) 40%, var(--border-default));
  --error-hover: color-mix(in srgb, var(--error-solid) 88%, black);
  --error-active: color-mix(in srgb, var(--error-solid) 76%, black);

  /* focus (Strategy §4.2): components draw a SOLID `--focus-width` outline in --focus-color, offset
     `--focus-offset` — >=3:1 against every surface in both modes (WCAG 2.4.7 / 1.4.11), survives
     Windows forced-colors. --focus-ring is the same indicator as a box-shadow pair, for elements
     that cannot take an outline. */
  --focus-color: var(--primary-text);
  --focus-ring: 0 0 0 var(--focus-width) var(--bg-card), 0 0 0 calc(var(--focus-width) * 2) var(--focus-color);

  /* info status family (brand-coupled) */
  --info: var(--primary);
  --info-bg: color-mix(in srgb, var(--primary) 10%, var(--bg-card));
  --info-border: color-mix(in srgb, var(--primary) 40%, var(--border-default));
  --info-text: color-mix(in srgb, var(--primary-text) calc(100% - var(--info-darken)), black);
  /* info on the inverse surface (Strategy §3.12(d)): light page → dark toast → on-dark brand; dark page → light toast → darkened solid */
  --info-text-inverse: color-mix(in srgb, color-mix(in srgb, var(--primary-solid) 75%, black) var(--dark-weight), var(--primary-on-dark));

  /* cta glow, colored by the button's own fill */
  --shadow-cta: 0 4px 14px -3px color-mix(in srgb, var(--primary) 40%, transparent);
  --shadow-cta-hover: 0 6px 20px -4px color-mix(in srgb, var(--primary) 50%, transparent);
}

/* ═════════════════════════════════════════════════════════════════════════
   6. Non-color scales — identical in light and dark.
   ═════════════════════════════════════════════════════════════════════════ */
:root {
  /* typography (Strategy §3.1 / §3.2) */
  --font-outfit: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family: var(--font-outfit);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 24px; /* dashboard / page headings */
  --font-size-3xl: 30px; /* dashboard display headings */
  --font-size-4xl: 44px; /* display headings — any surface whose hierarchy calls for this level */
  /* The 10-foot scale — a waiting-room display read from across a room (Strategy §3.18, board queue-display, 2026-10-30).
     Authored at a 1920 x 1080 frame; a larger or smaller screen scales the whole page by one factor. */
  --font-size-tv-sm: 28px;  /* column heads, the clock, the status footer */
  --font-size-tv-md: 40px;  /* doctor name, status word */
  --font-size-tv-lg: 64px;  /* room */
  --font-size-tv-xl: 96px;  /* the token / appointment number */

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-snug: 1.4;
  --line-height-normal: 1.5;

  --tracking-tight: -0.02em; /* titles */
  --tracking-label: 0.01em; /* field labels */
  --tracking-eyebrow: 0.04em; /* uppercase eyebrows/labels (§3.2: 0.02–0.04em) */

  /* spacing — 4px base (Strategy §3.3): 4 / 8 / 12 / 16 / 20 / 24 / 32 / 40 */
  --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; /* layout rhythm only */
  --space-16: 64px;

  /* form rhythm — the ONLY spacing a form/field composition may use (Strategy §4.7) */
  --form-gap: var(--space-4); /* between fields */
  --form-section-gap: var(--space-6); /* between field groups / sections */
  --field-label-gap: var(--space-2); /* label -> control */
  --field-caption-gap: var(--space-2); /* control -> helper/error/success */
  --choice-gap: var(--space-1); /* between radio/checkbox rows */
  --choice-card-gap: var(--space-2); /* between choice CARDS (§4.23) — a card is an object with its own edge, so it needs more air than a row of dots does; rows keep --choice-gap, and every other surface keeps its rhythm */
  --label-font-size: var(--font-size-sm); /* a field label (§4.25). A surface may set this to --font-size-xs or --font-size-md on its own root; those three are the whole range */
  /* a FORM's question size (§4.25, decided by Senthil 2026-10-27): the three a business picks in Look › Question size.
     Only the form widget and its Admin preview set --label-font-size to these; every other label keeps the line above. */
  --question-size-small: 0.85rem;
  --question-size-medium: 1rem;
  --question-size-large: 1.2rem;

  /* radius (Strategy §3.4) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px; /* modals */
  --radius-pill: 999px; /* badges */
  --radius-input: var(--radius-md);
  --radius-button: var(--radius-md);
  --radius-card: var(--radius-lg);
  --radius-modal: var(--radius-xl);

  /* ── motion (Strategy §3.6 / §3.10) — EVERY duration, easing, distance, scale and opacity used by any
        component comes from here. Components never write a raw ms/s value or cubic-bezier. ── */
  --duration-instant: 80ms;  /* micro feedback: press, toggle tick */
  --duration-fast: 150ms;    /* field chrome, hover, focus */
  --duration-normal: 220ms;  /* enter/exit of small surfaces: toast, alert, step, caption */
  --duration-slow: 300ms;    /* larger surfaces only: modal, page/route, success check (360 → 300, UX §0.8, 2026-11-09) */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);   /* state changes within the screen */
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);   /* expressive: success pop, toast */
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);        /* decelerate — things arriving */
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);         /* accelerate — things leaving */
  --transition-fast: var(--duration-fast) var(--ease-standard);
  --transition-base: var(--duration-normal) var(--ease-standard);

  --motion-distance: 8px;     /* subtle movement for enters (page, step, toast) */
  --motion-distance-sm: 4px;  /* captions, alerts, validation reveal */
  --motion-lift: -1px;        /* primary button hover lift */
  --nudge-distance: 3px;      /* invalid-field nudge (one small cycle, never a shake) */
  --scale-press: 0.98;        /* interaction scale: press */
  --scale-enter: 0.98;        /* surface scale-in: modal, toast */
  --scale-pop-from: 0.6;      /* success check pop start */
  /* visual-upgrade motion (Strategy §3.12, §4.10a — 2026-10-18) */
  --duration-page: 280ms;     /* route / page-content entrance */
  --duration-count: 600ms;    /* count-up of a real number (read at runtime) */
  --motion-stagger: 40ms;     /* delay between siblings in a reveal */
  --stagger-max: 8;           /* items after the eighth start with the eighth */
  --motion-distance-lg: 16px; /* page entrance, drawer and sheet travel */
  --motion-lift-card: -2px;   /* clickable card hover (buttons keep --motion-lift) */
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1); /* indicators, press release, pop-ins — a small overshoot, never a bounce */
  --opacity-hidden: 0;
  --opacity-loading: 0.55;    /* content that is reloading in place */
  --opacity-busy-overlay: 0.7;/* dimming of a blocked region (kept light: never a black-out) */

  --spinner-duration: 700ms;
  --spinner-size: 1em;
  --pulse-duration: 1600ms;
  --ambient-duration: 3200ms; /* the one ambient loop (Strategy §3.10, the ambient exception) — calmer than a live pulse */
  --progress-transition: var(--duration-normal) var(--ease-standard); /* determinate value change */
  --progress-indeterminate-duration: 1400ms;
  --progress-indeterminate-width: 40%;
  --progress-indeterminate-opacity: 1;
  --progress-height: 8px;
  --skeleton-duration: 1500ms;

  /* behavioural timing (read by src/design-system/motion.js via getComputedStyle; not animation) */
  --loading-delay: 200ms;      /* never flash a loader for work that finishes faster than this */
  --loading-slow-after: 4000ms;/* after this, ADD context (message/retry) — the outcome never changes */
  --toast-duration: 5000ms;    /* auto-dismiss for success/info; errors and loading persist */
  --resend-cooldown: 30s;      /* OTP resend countdown (presentational; server rules unchanged) */

  /* which keyframes run — names resolve to the global @keyframes at the bottom of this file, so reduced motion
     can swap any of them for `none` in ONE place. Components write: animation: var(--anim-rise) … */
  --anim-spin: ds-spin;
  --anim-pulse: ds-pulse;
  --anim-shimmer: ds-shimmer;
  --anim-indeterminate: ds-indeterminate;
  --anim-rise: ds-rise;       /* fade + subtle rise (enter) */
  --anim-fade: ds-fade;       /* opacity only */
  --anim-scale-in: ds-scale-in;
  --anim-pop: ds-pop;         /* success check */
  --anim-nudge: ds-nudge;     /* invalid-field feedback */
  --anim-enter-page: ds-enter-page; /* page content: rise --motion-distance-lg + fade */
  --anim-slide-left: ds-slide-left;   /* drawer from the left */
  --anim-slide-right: ds-slide-right; /* sheet from the right */
  --anim-slide-up: ds-slide-up;       /* bottom sheet on phones */
  --anim-exit: ds-exit;       /* closing surfaces: fade + scale, --duration-fast, never blocks (§4.10a) */
  --anim-ambient: ds-spin;    /* the ambient exception (§3.10): an entry point's slow light; none under reduce, unlike --anim-spin */
  /* the completion moment (Strategy §4.10c, board FC-14): plays once on a thank-you; all three none under reduce */
  --anim-ripple: ds-ripple;   /* a ring grows to --ripple-scale and fades */
  --anim-burst: ds-burst;     /* small dots travel --burst-distance outward and fade */
  --anim-draw: ds-draw;       /* the tick draws itself — the one paint animation, on a 24px glyph */
  --ripple-scale: 2.4;
  --ripple-opacity: 0.6;
  --burst-distance: 56px;
  /* the shine on the screen's one primary call to action (Strategy §4.10d): two sweeps, done inside five seconds */
  --anim-shine: ds-shine;
  --shine-duration: 2.4s;
  --shine-delay: 0.6s;
  --shine-count: 2;
  --anim-motion-state: running; /* skeleton / pulse play state */
  --skeleton-shine-opacity: 1;

  /* controls & touch targets (Strategy §4.1: 44px floor, 48px default) */
  --touch-target-min: 44px;
  /* the phone's safe areas (Strategy §3.8a, 2026-10-26): what a bar fixed to a screen edge adds to its padding so it
     clears the home indicator, the notch and side bars. 0 everywhere else; needs viewport-fit=cover on the page. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --control-height-sm: 44px;
  --control-height-md: 48px;
  --control-height-lg: 56px;
  --control-padding-x: 14px;
  --focus-width: 2px;
  --focus-offset: 2px;

  /* app-shell layout */
  --layout-sidebar-width: 248px;
  --layout-topbar-height: 56px;
  --layout-content-max: 1200px;
  /* one column of reading or cards (Strategy §3.14; the app's measure, board business-app-tablet v2, Mobile-App-UX-Foundation §2A) */
  --layout-prose-max: 720px;
  /* tablet layout (Strategy §3.16, board business-app-tablet v1, 2026-10-28): the navigation rail and the list pane
     beside an open item. The mobile app is the first consumer. */
  --layout-rail: 80px;
  --layout-pane-list: 400px;

  /* Layering (Strategy §3.11). ONE ordered scale for every surface — app shell, dashboards and embedded widgets on host
     pages (portaled layers are fixed-position, so they must clear arbitrary host content; hence the high floor).
     Order, low → high:  sticky UI < docked window < modal < blocking overlay < dropdown < popover < tooltip < toast.
     Dropdown/popover sit ABOVE modal so a menu opened inside a dialog is visible; tooltip above both; toast above all. */
  --z-local: 1;          /* stacking WITHIN one component (a dot over its connector) — never cross-component */
  --z-sticky: 10;        /* sticky headers, in-page bars */
  --z-docked: 100000;    /* a window docked over the page, not a dialog: above the page, under modal and every floating layer */
  --z-modal: 100100;     /* dialog + its backdrop */
  --z-blocking: 100200;  /* blocking overlay (page/action) */
  --z-dropdown: 100300;  /* dropdown menu */
  --z-popover: 100400;   /* popover panel */
  --z-tooltip: 100500;   /* tooltip */
  --z-toast: 100600;     /* toast viewport */

  /* icons (Lucide only) — sizes 16 / 20 / 24; stroke weight per size so 24px icons do not look heavy */
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --icon-stroke: 2;
  --icon-stroke-lg: 1.75;

  /* avatars */
  /* how many identity tints exist (Strategy §4.21); consumers pick one by
     hashing a stable key, so this is the modulus. Not a colour, so it is
     defined once rather than per mode. */
  --identity-count: 5;

  --avatar-xs: 24px;
  --avatar-sm: 32px;
  --avatar-md: 40px;
  --avatar-lg: 48px;
  --avatar-xl: 64px;
  /* a person's own photo on their own profile, the one place the photo is the subject of the screen
     (Strategy §4.12; named 2026-10-13, added 2026-10-17) */
  --avatar-2xl: 96px;

  /* floating surfaces */
  --menu-min-width: 12rem;
  --popover-max-width: 22rem;
  --tooltip-max-width: 16rem;
  --tooltip-delay: 400ms; /* behavioural: hover intent before a tooltip shows (focus shows immediately) */

  /* an embedded form that frames itself (Strategy §4.24) — a container that
     spans a 1400px host page is a band, not a card. The dialog's measure, so
     the system holds one value for "a panel of content" rather than two that
     disagree. */
  --form-card-max-width: 32rem;
  --form-card-wide-max-width: 45rem; /* the step with the open calendar, times beside it, where the host gives room (Strategy §3.17) */
}

[data-ds-surface='admin'] {
  --font-family: var(--font-inter);
}

/* ═════════════════════════════════════════════════════════════════════════
   7. Single retained runtime alias.
      src/lib/embedPrimaryColor.js (and its tests) set --ifds-color-primary on containers, so that one
      name is kept and points at --primary. No other legacy token name exists anywhere; a test enforces it.
   ═════════════════════════════════════════════════════════════════════════ */
:root,
[data-ds-theme],
[style*='--primary:'] {
  --ifds-color-primary: var(--primary);
}

/* ═════════════════════════════════════════════════════════════════════════
   8. Motion primitives — the ONLY @keyframes in the system. Every value is a token, and only `transform`
      and `opacity` are animated (compositor-only; no layout, no paint of large regions).
   ═════════════════════════════════════════════════════════════════════════ */
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-pulse { 50% { opacity: var(--opacity-loading); } }
@keyframes ds-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ds-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes ds-rise { from { opacity: var(--opacity-hidden); transform: translateY(var(--motion-distance-sm)); } to { opacity: 1; transform: none; } }
@keyframes ds-fade { from { opacity: var(--opacity-hidden); } to { opacity: 1; } }
@keyframes ds-scale-in { from { opacity: var(--opacity-hidden); transform: translateY(var(--motion-distance)) scale(var(--scale-enter)); } to { opacity: 1; transform: none; } }
@keyframes ds-pop { from { opacity: var(--opacity-hidden); transform: scale(var(--scale-pop-from)); } to { opacity: 1; transform: none; } }
@keyframes ds-nudge { 25% { transform: translateX(calc(var(--nudge-distance) * -1)); } 75% { transform: translateX(var(--nudge-distance)); } }
@keyframes ds-enter-page { from { opacity: var(--opacity-hidden); transform: translateY(var(--motion-distance-lg)); } to { opacity: 1; transform: none; } }
@keyframes ds-slide-left { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes ds-slide-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes ds-slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ds-glow-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ds-exit { from { opacity: 1; transform: none; } to { opacity: var(--opacity-hidden); transform: scale(var(--scale-enter)); } }
/* §4.10c — the completion moment. ds-burst reads the dot's own angle from --burst-angle. ds-draw is the one exception to
   "transform and opacity only": stroke-dashoffset on a single 24px tick (pathLength="24"), approved with board FC-14. */
@keyframes ds-ripple { from { opacity: var(--ripple-opacity); transform: scale(1); } to { opacity: var(--opacity-hidden); transform: scale(var(--ripple-scale)); } }
@keyframes ds-burst { from { opacity: 1; transform: rotate(var(--burst-angle, 0deg)) translateY(0) scale(0.4); } to { opacity: var(--opacity-hidden); transform: rotate(var(--burst-angle, 0deg)) translateY(calc(var(--burst-distance) * -1)) scale(1); } }
@keyframes ds-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
/* §4.10d — one highlight band crosses in the first 45% of the run, then rests (transform only). */
@keyframes ds-shine { 0% { transform: translateX(-100%); } 45% { transform: translateX(100%); } 100% { transform: translateX(100%); } }

/* ═════════════════════════════════════════════════════════════════════════
   9. Reduced motion (WCAG 2.3.3) — the OS setting OR an explicit data-ds-motion="reduce" (used by the showcase
      preview and by apps that expose their own toggle). Both blocks below MUST stay identical (test-enforced).
      Rules: no decorative movement, transitions ~instant, state changes still visible (colors, text, roles),
      loading still communicated — the spinner keeps turning slowly, indeterminate progress becomes a full-width
      pulsing bar, skeletons become static blocks.
   ═════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  :root, [data-ds-theme], [data-ds-motion] {
    --duration-instant: 0.01ms;
    --duration-fast: 0.01ms;
    --duration-normal: 0.01ms;
    --duration-slow: 0.01ms;
    --motion-distance: 0px;
    --motion-distance-sm: 0px;
    --motion-lift: 0px;
    --nudge-distance: 0px;
    --scale-press: 1;
    --scale-enter: 1;
    --scale-pop-from: 1;
    --spinner-duration: 1800ms;
    --progress-indeterminate-duration: 2400ms;
    --progress-indeterminate-width: 100%;
    --progress-indeterminate-opacity: 0.7;
    --skeleton-shine-opacity: 0;
    --anim-shimmer: none;
    --anim-indeterminate: ds-pulse;
    --anim-rise: none;
    --anim-fade: none;
    --anim-scale-in: none;
    --anim-pop: none;
    --anim-nudge: none;
    --anim-ambient: none;
    --duration-page: 0.01ms;
    --duration-count: 0.01ms;
    --motion-stagger: 0ms;
    --motion-distance-lg: 0px;
    --motion-lift-card: 0px;
    --ease-spring: var(--ease-standard);
    --anim-enter-page: none;
    --anim-slide-left: none;
    --anim-slide-right: none;
    --anim-slide-up: none;
    --anim-exit: none;
    --anim-glow-flow: none;
    --anim-ring-run: none;
    --anim-ripple: none;
    --anim-burst: none;
    --anim-draw: none;
    --anim-shine: none;
  }
}
[data-ds-motion='reduce'] {
  --duration-instant: 0.01ms;
  --duration-fast: 0.01ms;
  --duration-normal: 0.01ms;
  --duration-slow: 0.01ms;
  --motion-distance: 0px;
  --motion-distance-sm: 0px;
  --motion-lift: 0px;
  --nudge-distance: 0px;
  --scale-press: 1;
  --scale-enter: 1;
  --scale-pop-from: 1;
  --spinner-duration: 1800ms;
  --progress-indeterminate-duration: 2400ms;
  --progress-indeterminate-width: 100%;
  --progress-indeterminate-opacity: 0.7;
  --skeleton-shine-opacity: 0;
  --anim-shimmer: none;
  --anim-indeterminate: ds-pulse;
  --anim-rise: none;
  --anim-fade: none;
  --anim-scale-in: none;
  --anim-pop: none;
  --anim-nudge: none;
  --anim-ambient: none;
  --duration-page: 0.01ms;
  --duration-count: 0.01ms;
  --motion-stagger: 0ms;
  --motion-distance-lg: 0px;
  --motion-lift-card: 0px;
  --ease-spring: var(--ease-standard);
  --anim-enter-page: none;
  --anim-slide-left: none;
  --anim-slide-right: none;
  --anim-slide-up: none;
  --anim-exit: none;
  --anim-glow-flow: none;
  --anim-ring-run: none;
  --anim-ripple: none;
  --anim-burst: none;
  --anim-draw: none;
  --anim-shine: none;
}
