/* Design tokens: the palette, in one file. Loaded first as a render-blocking <link> so a page's own
   <style> can override a token and the theme does not flash. The light block matches both
   `:root.theme-light` and `body.theme-light` (boot script writes <html>, the toggle writes <body>).
   index.html and login.html do not load it. Contrast ratios are against --panel-2; re-measure on change. */
  :root{
    /* ---------- TYPE: THE APPLICATION FONT ----------
       The only place the font is defined. Ten choices are `:root[data-app-font="<id>"]` blocks at the foot
       of this file; option one (JS/core/app-font.js, 'system') is the bare declaration below: with no choice
       the app is in the device's own face (owner, 2026-11-13; DS-59). The boot script stamps <html> from
       `pma_font` before paint. Each stack names an iOS face, an Android face, then a generic. */
    --emoji-font:'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji'; /* colour emoji after every stack (pasted emoji draw in colour) */
    --app-font:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, var(--emoji-font);
    --app-font-display:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, var(--emoji-font);
    /* The wordmark is the brand's lockup, not text: it keeps its face under every choice (DS-65). */
    --app-brand-font:'Space Grotesk', system-ui, sans-serif;
    /* An email is drawn on white in both themes (what the recipient sees), so these never switch. */
    --email-paper:#ffffff;
    --email-ink:#1f2328;
    --email-ink-dim:#6b7687;

    /* ---------- STACKING ----------
       One scale; the newest layer wins. Every fixed layer takes its z-index from a token here.
       A layer opened from another is raised at runtime by JS/core/layers.js. Do not add a literal
       z-index to a new fixed layer. */
    --z-sticky:20;         /* pinned headers, sticky toolbars — inside the page */
    --z-float:60;          /* popovers and pickers anchored to a control */
    --z-panel:190;         /* side panels and their backdrop */
    --z-dialog:300;        /* modal dialogs: the ordinary case */
    --z-alert:400;         /* dialogs that must outrank an ordinary one on their own */
    --z-boot:9999;         /* the session-boot curtain, above everything by definition */
    /* layers.js assigns raised layers --z-dialog + N*--z-step; the gap to --z-alert allows for nesting. */
    --z-step:10;

    /* ---------- MOTION ----------
       Five durations and three curves; a literal duration in a component is drift. --ease-out
       enters and settles (exit is faster); --dur-micro is hover/state response. Raise
       --stagger-max, not --stagger-step. JS/core/motion.js reads these. */
    --dur-micro:140ms;      /* hover, chevron, badge, selected state — response, not motion */
    --dur-quick:460ms;      /* disclosure, panel reveal, flyout */
    --dur-surface:530ms;    /* a detail surface arriving */
    --dur-exit:430ms;       /* the same surface leaving — shorter than the arrival */
    --dur-progress:800ms;   /* a value filling to where it actually is */
    --ease-out:cubic-bezier(.22,.7,.28,1);   /* enter, and anything that settles */
    --ease-in:cubic-bezier(.4,.0,1,1);       /* exit — leaves faster than it came */
    --ease-move:cubic-bezier(.3,.7,.4,1);    /* small transforms already in flight */
    /* Stagger step and cap for a group revealing in order; read by JS/core/motion.js. */
    --stagger-step:65ms;
    --stagger-max:8;

    /* ---------- THE PHONE IS SLOWER ON PURPOSE ----------
       On a small screen the reveal is the page arriving, so travel and stagger are longer.
       mobile.html aliases --stagger-step to the phone step (motionStaggerMs() reads it off the
       root). It does not alias --dur-quick: a :root override reaches every consumer on the page. */
    --dur-phone-reveal:900ms;    /* the shell and the cards arriving */
    --stagger-step-phone:110ms;  /* the gap between one card and the next */
    /* A longer tail than --ease-out; reads as smooth. */
    --ease-phone:cubic-bezier(.16,.84,.24,1);

    /* ---------- ATTENTION AND MECHANISM CLOCKS ----------
       THEY ARE NOT PART OF THE VOCABULARY: each belongs to one existing piece of machinery, kept
       here so every duration is findable. A new control must not reuse them. Curves live with
       the thing; only the duration is shared. */

    /* Working indicator dots: one pulse cycle, and the offset between dots. */
    --dur-dots:1.15s;
    --dur-dots-step:.16s;
    /* The boot overlay's joke fading in, once. */
    --dur-quip:.45s;
    /* "Just changed" flash on a field or row. */
    --dur-flash:1.1s;
    /* The note-refresh spinner's rotation, and a Momentum message landing. */
    --dur-spin:.8s;
    --dur-land:.7s;
    /* The funky clock's marker drift; slow decoration. */
    --dur-drift:4s;
    /* Analogue clock hands. Hour and minute share one movement; the second hand differs per style
       (its overshoot curve is declared beside each style). Durations only. */
    --dur-hand-hour:.3s;
    --dur-hand-min:.25s;
    --dur-hand-sec:.2s;
    --dur-hand-sec-traditional:.12s;
    --dur-hand-sec-modern:.18s;
    --dur-hand-sec-retro:.22s;
    --dur-hand-sec-funky:.2s;

    /* HCA Tech Solutions dark palette: deep navy, matching the marketing site. */
    --bg:#0a1628;
    --panel:#101f36;
    --panel-2:#16283f;
    /* Three border tiers by what the edge does: --border-strong is the 3:1 tier for control edges
       only; --border separates rows and cards; --border-soft is a quiet inner divider. Do not raise
       --border to 3:1 "for consistency". */
    --border-strong:#4e71a5;              /* 3.00 */
    --border:#395379;                     /* 1.91 — was #24344c at 1.19 */
    --border-soft:#294263;                /* 1.46 — was #1c2d44 at 1.07 */
    --text:#f4f6fb;                       /* 13.78 */
    --text-dim:#a9b6cc;                   /*  7.27 */
    --text-faint:#8390a5;                 /*  4.61 — was #6b7a94 at 3.43 */
    /* Accent roles: --accent for edges/rings/dots, --accent-fill under white text, --accent-text
       for accent-coloured text. */
    --accent:#3b82f6;
    --accent-fill:#1e6ff5;                /* white on it: 4.52 */
    --accent-text:#70a4f8;                /* 5.93 on panel-2, 4.54 on its own wash */
    --accent-soft:rgba(59,130,246,.20);
    /* In-scope washes for filter-driven surfaces (OKR area/quarter matrix): two strengths for
       "included" vs "narrowed to". Cell text keeps --text. */
    --scope-soft:rgba(59,130,246,.15);
    --scope-strong:rgba(59,130,246,.30);
    --focus-ring:#3b82f6;                 /* >=4.05 on every surface — see §18 */
    --red:#d13438;
    --red-text:#e07577;                   /* 4.95 — was --red at 3.02 */
    --red-soft:rgba(209,52,56,.16);
    --green:#107c41;
    --green-text:#17b35e;                 /* 5.43 — was --green at 2.82, the worst in the app */
    --green-soft:rgba(16,124,65,.20);
    --yellow:#ffb900;
    --yellow-soft:rgba(255,185,0,.16);
    /* Warning text on a --yellow-soft wash; separate from --yellow because the themes need opposite ends. */
    --warn-text:#ffcf4d;
    --orange:#ca5010;
    --orange-text:#ef7636;                /* 5.19 — was --orange at 3.31 */
    --orange-soft:rgba(202,80,16,.18);
    /* Tokenised so .pill.st-monitor and classic_team_board.html stop drifting. */
    --purple:#8764b8;
    --purple-text:#aa92cd;                /* 5.46 — was #8764b8 at 3.22 */
    --purple-soft:rgba(135,100,184,.18);
    --gray-soft:rgba(200,198,196,.14);
    --radius:10px;
    --radius-sm:7px;
    /* THE WIDTH OF A RESIZE GRIP, AND THEREFORE THE GUTTER A PANE OWES IT (the grip is absolutely
       positioned over the pane edge); the two numbers must be one number. */
    --rail-grip-w:9px;
    /* Padding a rail gives its content; must be >= --rail-grip-w (asserted in
       _docs/tests/focused-fixes-2026-08-31.test.js). */
    --rail-pad:14px;

    /* OKR health as aliases of the palette, so they follow --red/--green/... into the light block.
       That requires the light class on :root: applyTheme() sets it on <html> AND <body>; do not
       reduce it to one. Red is losing time, orange slipping, green on track, blue ahead, purple
       finished, grey not begun. */
    /* `behind` is not an alias: on navy the problem is chroma, and --red (the danger colour) must not
       change, so saturation is reduced instead (pinned by _docs/tests/okr-behind-red.test.js). The
       light block re-declares all three. */
    --okr-behind:#ac5d63;                 /* 3.19 on --panel-2 — was --red #d13438 at 3.02 */
    --okr-behind-text:#c68b8f;            /* 5.31, and 4.80 on its own wash — was --red-text #e07577 at 4.95 / 4.51 */
    --okr-behind-soft:rgba(172,93,99,.12);/* was --red-soft rgba(209,52,56,.16) */
    --okr-slightly:var(--orange);
    --okr-slightly-text:var(--orange-text);
    --okr-slightly-soft:var(--orange-soft);
    --okr-ontrack:var(--green-text);      /* a graphic, not text: --green is 2.82 on --panel-2 in dark, --green-text 5.43 */
    --okr-ontrack-text:var(--green-text);
    --okr-ontrack-soft:var(--green-soft);
    --okr-ahead:var(--accent);
    --okr-ahead-text:var(--accent-text);
    --okr-ahead-soft:var(--accent-soft);
    --okr-done:var(--purple);
    --okr-done-text:var(--purple-text);
    --okr-done-soft:var(--purple-soft);
    --okr-idle:var(--border-strong);
    --okr-idle-text:var(--text-faint);
    --okr-idle-soft:var(--gray-soft);
    /* Quiet key-result states take no colour of their own; aliased onto the neutral text ramp.
       `strong` (completed) is told apart from idle. */
    --okr-quiet:var(--text-faint);
    --okr-quiet-strong:var(--text-dim);
  }

  :root.theme-light, body.theme-light{
    /* This block is also the contract for the team custom theme: JS/core/theme-custom.js derives a
       palette from one colour as inline properties over one of these two bases. The tokens redeclared
       here are its THEME_CUSTOM_TOKENS list (pinned by _docs/tests/theme-custom-contrast.test.js);
       add a token to both or neither. Surfaces sit ~5% below pure white to avoid glare. */
    --bg:#e7ebf2;
    --panel:#f1f4f9;
    --panel-2:#dee4ee;
    --border-strong:#6b84a6;              /* 3.00 */
    --border:#96a7c0;                     /* 1.91 — was #c8d1de at 1.21 */
    --border-soft:#b2bfd5;                /* 1.45 — was #d7dee9 at 1.06 */
    --text:#26303f;                       /* 10.42 */
    /* Dim goes darker to open a real gap between the text tiers; faint clears the AA floor. */
    --text-dim:#3d4a5c;                   /*  7.05 — was #556780 at 4.52 */
    --text-faint:#596578;                 /*  4.62 — was #616e82 at 4.05 */
    --accent:#2560c8;
    --accent-fill:#2560c8;                /* white on it: 5.86 — already fine in light */
    --accent-text:#2257b6;                /* 5.29 */
    /* Light-mode accent wash (the dark blue was copied here by mistake once). */
    --accent-soft:rgba(37,96,200,.12);
    /* Light-mode pair; lower alphas because the wash reads stronger on a light panel. */
    --scope-soft:rgba(37,96,200,.14);
    --scope-strong:rgba(37,96,200,.26);
    --focus-ring:#2560c8;                 /* >=4.58 on every surface */
    --red:#c62828;
    --red-text:#ad2323;                   /* 5.40 */
    --red-soft:rgba(198,40,40,.12);
    --green:#157a3d;
    --green-text:#126935;                 /* 5.31 */
    --green-soft:rgba(21,122,61,.12);
    --yellow:#836008;                     /* 4.51 — was #a6790a at 3.07 */
    --yellow-soft:rgba(166,121,10,.16);
    --warn-text:#6d4e00;   /* 5.8:1 on the wash; #e0b04a was 1.7:1 */
    --orange:#a8480f;
    --orange-text:#95400d;                /* 5.45 */
    --orange-soft:rgba(168,72,15,.14);
    --purple:#6b4894;
    --purple-text:#6b4894;                /* 5.52 — light purple already passes */
    --purple-soft:rgba(107,72,148,.14);
    --gray-soft:rgba(70,66,62,.08);

    /* OKR `behind` back to the palette: the dark value on :root would otherwise paint dark red on a
       pale panel. Aliases so a custom light theme moves them too. */
    --okr-behind:var(--red);
    --okr-behind-text:var(--red-text);
    --okr-behind-soft:var(--red-soft);
    /* The same for `on track`: :root carries a dark-tuned --green-text, which an alias
       inherits as a resolved value when the class lands on <body> alone. */
    --okr-ontrack:var(--green);
  }

/* ================= THE TEN APPLICATION FONTS =================
   One block per option; option one ('system') is the bare :root declaration above. Ids match APP_FONTS
   in JS/core/app-font.js (application-font.test.js). Only 'hca' pairs a display face. Each
   block notes what a phone gets; on Android only the category survives (sans stays sans). */

/* Modern. Inter for text, Space Grotesk for headings: the default until 2026-11-13, now a choice.
   Its id keeps the old spelling so the accounts that picked it keep it. */
:root[data-app-font="hca"]{
  --app-font:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif, var(--emoji-font);
  --app-font-display:'Space Grotesk', system-ui, sans-serif, var(--emoji-font);
}
/* Clean. Helvetica Neue on Apple, Roboto on Android (named explicitly, not via aliasing). */
:root[data-app-font="neo"]{
  --app-font:'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', Roboto, 'Noto Sans', sans-serif, var(--emoji-font);
  --app-font-display:'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', Roboto, 'Noto Sans', sans-serif, var(--emoji-font);
}
/* Modern. Humanist faces on each platform keep it recognisable. */
:root[data-app-font="humanist"]{
  --app-font:'Segoe UI', Candara, Corbel, 'Trebuchet MS', 'Lucida Grande', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
  --app-font-display:'Segoe UI', Candara, Corbel, 'Trebuchet MS', 'Lucida Grande', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
}
/* Traditional, and the widest option; check dense rows against it. Android aliases Verdana to Roboto. */
:root[data-app-font="wide"]{
  --app-font:Verdana, Tahoma, 'DejaVu Sans', Geneva, 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
  --app-font-display:Verdana, Tahoma, 'DejaVu Sans', Geneva, 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
}
/* Modern, geometric, lowest x-height. Names after system-ui cover engines too old to know it. */
:root[data-app-font="geometric"]{
  --app-font:'Avenir Next', Avenir, 'Century Gothic', Futura, 'URW Gothic', system-ui, Roboto, 'Noto Sans', sans-serif, var(--emoji-font);
  --app-font-display:'Avenir Next', Avenir, 'Century Gothic', Futura, 'URW Gothic', system-ui, Roboto, 'Noto Sans', sans-serif, var(--emoji-font);
}
/* Expressive. Space Grotesk is a webfont (mobile.html fetches none), so Futura stands in on Apple
   and Noto Sans on Android, keeping it distinct from the options that land on Roboto. */
:root[data-app-font="grotesk"]{
  --app-font:'Space Grotesk', Futura, 'Trebuchet MS', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
  --app-font-display:'Space Grotesk', Futura, 'Trebuchet MS', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
}
/* Elegant. Optima on Apple, Candara or Gill Sans on Windows, Noto Sans on Android. */
:root[data-app-font="elegant"]{
  --app-font:Optima, Candara, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
  --app-font-display:Optima, Candara, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', 'Noto Sans', Roboto, sans-serif, var(--emoji-font);
}
/* Elegant, and a serif; check tables against it. Georgia is the broad middle. */
:root[data-app-font="book"]{
  --app-font:'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Noto Serif', 'Times New Roman', serif, var(--emoji-font);
  --app-font-display:'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Noto Serif', 'Times New Roman', serif, var(--emoji-font);
}
/* Traditional serif built for screens: larger x-height, sturdier strokes. */
:root[data-app-font="screen"]{
  --app-font:Georgia, Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Liberation Serif', 'Noto Serif', serif, var(--emoji-font);
  --app-font-display:Georgia, Charter, 'Bitstream Charter', 'Sitka Text', Cambria, 'Liberation Serif', 'Noto Serif', serif, var(--emoji-font);
}

/* The design specification's fixed scales, defined for EVERY page that loads this file (mobile.html loads no
   alt-tokens.css). alt-tokens.css re-binds the ladder for the Suite (narrow bump); these are the base values. */
:root{
  --a-fs-11:11px; --a-fs-12:12px; --a-fs-13:13px; --a-fs-14:14px; --a-fs-16:16px; --a-fs-18:18px;
  --a-fs-21:21px; --a-fs-24:24px; --a-fs-28:28px; --a-fs-ctl:13px; --a-fs-ctl-sm:12px; --a-fw-ctl:600;
  --a-lh-tight:1.25; --a-lh-ui:1.45; --a-lh-body:1.6; --a-lh-ctl:1;
  --a-r-sm:6px; --a-r:9px; --a-r-lg:14px; --a-r-pill:999px;
  --a-ctl-sm:26px; --a-ctl:32px; --a-ctl-lg:36px;
  --a-scrim:rgba(4,10,20,.58);
  /* Fixed control sizes the specification names outside the ladder (chip, panel tab, checkbox, glyph, hit area). */
  --a-chip-h:24px; --a-tab-h:34px; --a-check:16px; --a-hit-min:24px; --a-touch:44px; --a-rte-min:120px;
  --a-glyph:15px; --a-glyph-lg:18px; --a-glyph-sm:12px; --a-glyph-xs:11px; --a-dot:9px;
  --a-on-fill:#fff; /* text on an accent or status fill, both themes */
}
body.theme-light{ --a-scrim:rgba(19,32,54,.34); }
