/* ============================================================================
   URGENTFLEX EXCLUSIVE — colors and type
   Source of truth: _source/tokens.css (verbatim brand tokens), then the type and
   spacing scales as measured in _source/site.css and _source/workspace.css.

   One brand, three surfaces:
     public site  · patient portal · clinician workspace
   The tokens are identical across all three. The DIFFERENCE is motion, density
   and palette temperature — not colour values. Do not fork these values per
   surface.
   ============================================================================ */

/* ---------- Fonts ------------------------------------------------------------
   The product ships a SYSTEM stack on purpose: SF Pro cannot be self-hosted, and
   the workspace must render offline on chamber-side tablets.
   -apple-system resolves to SF Pro on Apple hardware; on Windows it falls to
   Helvetica Neue / Arial, which is the documented fallback, not an accident.
   IBM Plex Mono IS self-hosted (it is open source) — files in fonts/.
   --------------------------------------------------------------------------- */
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/IBMPlexMono-Medium.woff2') format('woff2'); }
@font-face { font-family:'IBM Plex Mono'; font-style:normal; font-weight:600; font-display:swap;
  src:url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); }

:root{
  /* ==========================================================================
     1. BASE COLOR — neutral "soft mist" system
     Cool-neutral, never pure grey: every neutral carries a faint aqueous cast
     (hue ~205). Backgrounds are never #f7f7f7; they are mist (#f4f7f9).
     ======================================================================== */
  --uf-white:#ffffff;
  --uf-mist:#f4f7f9;          /* app canvas, table headers, inset wells     */
  --uf-mist-2:#eaf0f4;        /* segmented-control track, second-level well */
  --uf-line:#dde5eb;          /* every card border, every table rule         */
  --uf-line-strong:#c6d2db;   /* input borders, "ghost" button inset ring    */
  --uf-ink:#0c2233;           /* primary text — 15.9:1 on white              */
  --uf-ink-2:#3b5263;         /* secondary text — 7.9:1 on white             */
  --uf-ink-3:#5e7383;         /* tertiary/meta — 4.9:1 on white (AA body)    */

  /* ==========================================================================
     2. BASE COLOR — aquatic blue (the brand hue)
     ======================================================================== */
  --uf-aqua-50:#eef7fb;
  --uf-aqua-100:#d6edf7;
  --uf-aqua-300:#7fc4e3;
  --uf-aqua-500:#1f8fc4;
  --uf-aqua-600:#0f74a6;      /* THE interactive colour: links + buttons, 4.9:1 */
  --uf-aqua-700:#0a5b85;
  --uf-deep:#06324d;          /* the dark surface: audit band, clinician tile   */

  /* ==========================================================================
     3. BASE COLOR — warm accents (secondary, used sparingly)
     Warm is the "patient" temperature and the "unsigned / needs attention" tag.
     It is NEVER a primary action colour.
     ======================================================================== */
  --uf-warm-50:#fff4ec;
  --uf-warm-200:#ffd7bd;
  --uf-warm-400:#f59c63;
  --uf-warm-600:#c4622a;      /* 4.6:1 on white — text-safe warm            */

  /* ==========================================================================
     4. BASE COLOR — clinical state (workspace only)
     Every state is a pair: solid text + tinted background. The pair is the unit;
     never use the solid as a fill and never use the tint as text.
     ======================================================================== */
  --uf-ok:#13795b;   --uf-ok-bg:#e5f4ee;
  --uf-warn:#9a5b00; --uf-warn-bg:#fff3dc;
  --uf-stop:#b42318; --uf-stop-bg:#fdecea;
  --uf-info:#0f74a6; --uf-info-bg:#e6f3fa;

  /* ==========================================================================
     5. SEMANTIC COLOR
     ======================================================================== */
  --uf-fg1:var(--uf-ink);
  --uf-fg2:var(--uf-ink-2);
  --uf-fg3:var(--uf-ink-3);
  --uf-bg:var(--uf-white);
  --uf-bg-inset:var(--uf-mist);
  --uf-border:var(--uf-line);
  --uf-border-input:var(--uf-line-strong);
  --uf-accent:var(--uf-aqua-600);
  --uf-accent-hover:var(--uf-aqua-700);
  --uf-focus:var(--uf-aqua-500);

  /* glass — public site + portal only. Never in the workspace. */
  --uf-glass:rgba(255,255,255,.62);
  --uf-glass-strong:rgba(255,255,255,.82);
  --uf-glass-line:rgba(255,255,255,.7);

  /* ==========================================================================
     6. TYPE
     One family for the whole product. The face is a SYSTEM stack, so hierarchy
     is built from SIZE, WEIGHT (450 / 500 / 520 / 560 / 620 / 650 / 680 / 700)
     and LETTER-SPACING — never from a second typeface.
     Body copy in the workspace sits at 13–14px; on the public site at 17px.
     ======================================================================== */
  --uf-font:-apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --uf-mono:"IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* size scale (public site → workspace shares the low end) */
  --uf-text-2xs:10px;   /* SYNTHETIC badge, mono chips, table eyebrows   */
  --uf-text-xs:11px;    /* chip text, table headers, side-nav section    */
  --uf-text-sm:12.5px;  /* captions, citations, meta, product mock copy  */
  --uf-text-md:14px;    /* workspace body, nav items, buttons            */
  --uf-text-lg:17px;    /* public body copy                              */
  --uf-text-xl:22px;    /* card titles, sign-in heading, site .h3        */
  --uf-text-2xl:28px;   /* workspace h2, site h3 ceiling                 */
  --uf-text-3xl:48px;   /* inner-page display floor (.pp / .pc-h path)   */
  --uf-text-4xl:68px;   /* section headline ceiling (h2 clamp)           */
  --uf-text-5xl:104px;  /* hero display ceiling (clamp 46→104)           */

  /* tracking — negative on anything ≥ 20px, positive on uppercase eyebrows */
  --uf-track-display:-.045em;  /* 104px hero        */
  --uf-track-tight:-.035em;    /* 68px section head */
  --uf-track-snug:-.025em;     /* 28px, h1/h2/h3    */
  --uf-track-base:-.01em;      /* 15–22px UI labels */
  --uf-track-eyebrow:.08em;    /* UPPERCASE eyebrows + mono meta */

  /* line height */
  --uf-leading-display:.98;    /* hero                               */
  --uf-leading-head:1.02;      /* section headline                   */
  --uf-leading-title:1.15;     /* h3 / card title                    */
  --uf-leading-body:1.5;       /* lede                               */
  --uf-leading-prose:1.6;      /* .body paragraph, site + portal     */
  --uf-leading-ui:1.25;        /* dense workspace rows               */

  /* ==========================================================================
     7. SPACING — 4px grid. The product uses a lot of 14px; keep it.
     ======================================================================== */
  --uf-sp-1:4px;   --uf-sp-2:6px;   --uf-sp-3:8px;   --uf-sp-4:10px;
  --uf-sp-5:12px;  --uf-sp-6:14px;  --uf-sp-7:16px;  --uf-sp-8:18px;
  --uf-sp-9:22px;  --uf-sp-10:26px; --uf-sp-11:32px; --uf-sp-12:40px;
  --uf-sp-13:56px; --uf-sp-14:72px; --uf-sp-15:96px; --uf-sp-16:140px;

  /* ==========================================================================
     8. RADIUS — a deliberate, wide ladder. Small controls are tight (8–10),
     content panels are 14, site cards are 22–24, hero shells are 32, and pills
     are 999. Mixing 10 and 14 in one screen is normal; 999 is reserved for
     buttons, chips and the glass nav.
     ======================================================================== */
  --uf-r-xs:5px;  --uf-r-sm:8px;  --uf-r-md:14px; --uf-r-lg:22px; --uf-r-xl:32px;
  --uf-r-ctl:10px;      /* workspace buttons + inputs                      */
  --uf-r-pill:999px;    /* site buttons, chips, segmented control, glass nav */

  /* ==========================================================================
     9. ELEVATION — two levels, both very soft and cool-tinted (rgba of --uf-ink).
     There is no "level 3". The workspace uses NO shadow at all: panels are
     separated by 1px borders and mist fill instead.
     ======================================================================== */
  --uf-shadow-1:0 1px 2px rgba(12,34,51,.06), 0 2px 8px rgba(12,34,51,.05);
  --uf-shadow-2:0 2px 6px rgba(12,34,51,.06), 0 18px 48px -12px rgba(12,34,51,.18);

  /* ==========================================================================
     10. MOTION — two completely different regimes (see README)
     Site: long, organic, eased (.2,.7,.2,1), 700ms route changes, scroll reveals.
     Workspace: state feedback only, < 150ms. No decorative motion, ever.
     ======================================================================== */
  --uf-ease-out:cubic-bezier(.2,.7,.2,1);      /* site: the house curve       */
  --uf-ease-in:cubic-bezier(.4,0,1,1);         /* site: route exit            */
  --uf-dur-fast:120ms;    /* workspace toast, hover tint                   */
  --uf-dur-ui:200ms;      /* workspace hover, segmented control            */
  --uf-dur-route:700ms;   /* site route in                                 */
  --uf-dur-route-out:320ms;

  /* ==========================================================================
     11. LAYOUT
     ======================================================================== */
  --uf-wrap:1180px;        /* single public-site container                  */
  --uf-nav-h:60px;         /* workspace top bar                             */
  --uf-side-w:232px;       /* workspace side rail                           */
  --uf-tap:44px;           /* minimum touch target; 52px in tablet mode     */
  --uf-stroke:1px;         /* there is exactly one border width in this UI  */
}

/* ============================================================================
   SEMANTIC ELEMENT STYLES
   These are what a design should reach for. The raw tokens above are for
   building new components.
   ========================================================================= */

.uf-display{           /* hero. clamp 46→104px, .98 leading, tight tracking */
  font-family:var(--uf-font); font-size:clamp(46px,7.2vw,104px);
  line-height:.98; letter-spacing:-.045em; font-weight:700;
  margin:0; text-wrap:balance; color:var(--uf-fg1);
}
.uf-h1{                /* inner-page headline (portal, request access)       */
  font-size:clamp(44px,6vw,88px); line-height:1.02; letter-spacing:-.04em;
  font-weight:700; margin:0; text-wrap:balance;
}
.uf-h2{                /* section headline. clamp 36→68px                    */
  font-size:clamp(36px,5vw,68px); line-height:1.02; letter-spacing:-.035em;
  font-weight:680; margin:0; text-wrap:balance;
}
.uf-h3{                /* card / feature title. clamp 22→28px                */
  font-size:clamp(22px,2.2vw,28px); line-height:1.15;
  letter-spacing:-.025em; font-weight:680; margin:0;
}
.uf-h4{                /* workspace panel header: 14px / 650                  */
  font-size:14px; line-height:1.25; letter-spacing:-.01em;
  font-weight:650; margin:0;
}
.uf-lede{              /* the one paragraph under a headline. max 640px       */
  font-size:clamp(18px,1.6vw,22px); line-height:1.5; letter-spacing:0;
  color:var(--uf-fg2); text-wrap:pretty; max-width:640px; margin:0;
  font-weight:400;
}
.uf-body{              /* public site / portal prose: 17px                   */
  font-size:17px; line-height:1.6; color:var(--uf-fg2);
  text-wrap:pretty; margin:0;
}
.uf-ui{                /* dense workspace copy: 13–14px                      */
  font-size:14px; line-height:1.25; color:var(--uf-fg1); margin:0;
}
.uf-label{             /* form + field labels: 12–13px / 600                 */
  font-size:13px; font-weight:600; color:var(--uf-fg2); letter-spacing:0;
}
.uf-eyebrow{           /* UPPERCASE section kicker, aqua                   */
  font-size:13px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--uf-aqua-600);
}
.uf-eyebrow-warm{ color:var(--uf-warm-600); }
.uf-side-label{        /* workspace rail section label                      */
  font-size:11px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:var(--uf-fg3);
}
.uf-cite{              /* the authority line under a claim. always present  */
  font-size:11.5px; line-height:1.45; color:var(--uf-fg3);
}
.uf-mono{              /* MRNs, IDs, hashes, X12, code lists               */
  font-family:var(--uf-mono); font-size:11.5px; letter-spacing:0;
  font-variant-numeric:tabular-nums;
}
.uf-stat{              /* the big number on a workspace stat                */
  font-size:24px; font-weight:680; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums; line-height:1.1;
}
.uf-num{               /* huge simulator readout                            */
  font-size:64px; font-weight:700; letter-spacing:-.04em;
  font-variant-numeric:tabular-nums; line-height:1;
}
