/* Palette primitives + semantic aliases. Values are lifted verbatim from
   PI_DesignSystem/wwwroot/css/site.scss (the shipped implementation) and the
   Figma "Primitives" / "Tokens" collections. Do not round or re-derive. */
:root,[data-mode=light]{
  /* --- neutral ramp --- */
  --black:#212121;
  --black-hover:#373737;
  --white:#FFFFFF;
  --grey-dark:#717171;
  --grey-medium:#CECECE;
  --grey-light:#EBEBEB;
  --grey-dark-bluish:#7D85AB;
  --grey-medium-bluish:#BEC4D5;
  --grey-light-bluish:#DDE0E9;
  --cotton-cloud:#F8F5F5;
  --cotton-ball:#F0F3FF;
  --midnight-charcoal:#121A37;
  --charcoal-blue:#132050;

  /* --- brand accents --- */
  --pharma-blue:#006CA6;          /* Amspensan brand blue (logo wordmark) */
  --pharma-blue-hover:#005B8C;
  --pharma-blue-light:#E6F1F7;
  --pharma-blue-light-hover:#DBE7ED;
  --pharma-blue-lighter:#F4F9FC;
  --midnight-onyx:#343330;        /* Amspensan logo mark charcoal */
  --crimson-blaze:#EF3340;
  --crimson-blaze-hover:#dc2f3b;
  /* Accessible crimson: #EF3340 is 4.02:1 both as white-on-fill and as ink on
     white, so it fails the 4.5 floor in every text role. This darkened on-hue
     variant is 4.66:1 in both directions. The original stays for fills and
     chart series, where contrast does not apply. */
  --crimson-blaze-accessible:#E71221;
  --whispering-blush:#FFF0F0;
  --whispering-blush-hover:#F5E7E7;
  --success-blue:#525DFF;
  --success-blue-hover:#4C56EB;
  --success-blue-light:#E9EBFF;
  --success-blue-light-hover:#dfe1f5;
  --success-blue-light-gradient:linear-gradient(251.02deg,#F6F7FF 56.81%,#E9EBFF 119.93%); /* @kind color */
  --olive-green:#A4B465;
  --olive-green-hover:#93a15a;
  --olive-green-light:#f4f9db;
  --olive-green-light-hover:#ebf0d3;
  --olive-green-lighter:#fafcf2;
  --plum-purple:#53354A;
  --midnight-blue:#28293D;
  --midnight-blue-hover:#191a26;
  --yellow-color:#E8DD00;

  /* --- extended / data accents --- */
  --red-bud:#AB2E56;
  --red-bud-hover:#b44367;
  --crown-jewels:#966BAA;
  --tanzine:#7580E0;
  --magenta-crayon:#FF55A3;
  --magenta-crayon-v2:#FF77B5;
  --jade-green:#75AEA0;
  --green-tea:#92AA6B;
  --sea-serpant:#4CC5CD;
  --sea-serpant-v2:#67CED5;
  --exotic-intense:#B87171;
  --buttery-salmon:#FFAF9E;
  --chanterelles:#FFC56F;
  --chanterelles-v2:#FFD18C;
  --queen-blue:#436995;
  --ayame-iris:#763A6C;
  --vibrant-purple:#9A62F7;
  --vibrant-purple-light:#DDCCF9;
  --vibrant-purple-lighter:#ECE1FE;
  --horizon-blue-light:#A6E0F8;
  --horizon-blue-lighter:#D2F0FD;
  --aqua-ambition-light:#AFF4F4;
  --emerald-green:#18DE7E;
  --emerald-green-light:#B6EED3;
  --emerald-green-dark:#1B8C55;
  --rose-pink:#FF80C9;
  --rose-pink-light:#FAD8EC;
  --rose-pink-dark:#E653A8;
  --rose-pink-dark-hover:#E864B1;
  --mustard-yellow:#FFD455;
  --mustard-yellow-light:#FFEBAF;
  --mustard-yellow-dark:#F5B702;
  --avatar-basic:#F0F3FF;

  /* --- interaction washes --- */
  --rgba-hover-light:rgba(0,0,0,0.08);
  --rgba-hover-lighter:rgba(0,0,0,0.04);
  --rgb-black:33,33,33; /* @kind color */
  --rgb-crimson-blaze:239,51,64; /* @kind color */
  --rgb-success-blue:82,93,255; /* @kind color */
  --rgb-olive-green:164,180,101; /* @kind color */
  --rgb-pharma-blue:0,108,166; /* @kind color */
  --rgb-grey-light-bluish:221,224,233; /* @kind color */
  --rgb-os-bg:0,0,0; /* @kind color */

  /* --- semantic aliases (tenant-swappable layer) --- */
  --theme-color:var(--pharma-blue);
  --text-color-main:var(--black);
  --text-color-subdued:var(--grey-dark);
  --background-color-body:var(--cotton-cloud);
  --menu-selected-color:var(--pharma-blue-light);
  --menu-selected-color-hover:var(--pharma-blue-light-hover);
  --primary-color:var(--pharma-blue);
  --primary-color-hover:var(--pharma-blue-hover);
  --primary-color-rgb:var(--rgb-pharma-blue);
  --secondary-color:var(--midnight-onyx);
  --secondary-color-hover:var(--black-hover);
  --secondary-color-rgb:52,51,48;
  --danger-color:var(--crimson-blaze-accessible);
  --danger-color-hover:#C90E1C;
  /* Text colour for a --primary-color fill. White on every theme except the
     two whose accent is too light to carry it — see tokens/themes.css. */
  --primary-ink:var(--white);
  /* The accent used AS TEXT on a white surface (.btn-secondary, .color-theme,
     .label-theme). This is a separate channel from --primary-color because an
     accent light enough to need dark ink on its own fill is simultaneously too
     light to be legible as ink on white: green is 2.26:1, yellow 1.42:1.
     Defaults to the accent itself where it already clears 4.5:1. */
  --accent-ink:var(--primary-color);
  --color-grey-dark:var(--grey-dark);
  --color-grey-medium:var(--grey-medium);
  --color-grey-light:var(--grey-light);
  /* #1E90FF was 3.24:1 on white. #1871C7 (the source's own hover shade) is
     4.97:1, so the resting state takes it and hover darkens further to 6.03:1. */
  --link-color:#1871C7;
  --link-color-hover:#1564B0;

  /* --- status semantics (badge / label system) ---
     Three tokens per state, and they are not interchangeable:
       --status-<n>      chromatic identity, for FILLS only (progress bars,
                         chart series). Never for text or a meaningful icon.
       --status-<n>-ink  text and icon colour. >=4.5:1 on its own tint AND on
                         white, and carries white text when used as a fill.
       --status-<n>-bg   the tint --status-<n>-ink is designed to sit on.
     The ink values are measured, not picked: warning ink on warning tint is
     4.63:1, success 4.58:1, error 4.51:1, info 4.95:1, neutral 4.61:1. Do not
     substitute the chromatic token for the ink token — #F5B702 on #FFEBAF is
     1.52:1, which is the failure this split exists to prevent. */
  --status-success:var(--emerald-green-dark);
  --status-success-ink:#167245;
  --status-success-bg:var(--emerald-green-light);
  --status-warning:var(--mustard-yellow-dark);
  --status-warning-ink:#866401;
  --status-warning-bg:var(--mustard-yellow-light);
  --status-error:var(--crimson-blaze);
  --status-error-ink:#DE1120;  --status-error-bg:var(--whispering-blush);
  --status-info:var(--pharma-blue);
  --status-info-ink:var(--pharma-blue);
  --status-info-bg:var(--pharma-blue-light);
  --status-neutral:var(--grey-dark);
  --status-neutral-ink:#696969;
  --status-neutral-bg:var(--grey-light);

  /* --- label backgrounds that carry white text ---
     Eleven of the 33 label colourways failed 4.5:1 with white ink. Six were
     pale enough to keep their exact source background and switch to dark ink
     (see css/labels.css) — that preserves the kit's hue exactly. The five
     below are too saturated for dark ink and too light for white, so the
     background is darkened on-hue instead. Measured white-on-colour:
     4.66 · 4.55 · 4.64 · 4.57. --label-danger-bg matches the same correction
     applied to the ColorPicker tenant swatch. */
  --label-danger-bg:var(--crimson-blaze-accessible);  /* from --crimson-blaze #EF3340, 4.02:1 */
  --label-crown-bg:#9165A6;       /* from --crown-jewels  #966BAA, 4.22:1 */
  --label-exotic-bg:#AE5D5D;      /* from --exotic-intense #B87171, 3.72:1 */
  --label-purple-bg:#8E4FF6;      /* from --vibrant-purple #9A62F7, 3.84:1 */

  /* --- code token colours (text editor / audit log) --- */
  --token-tag:#990055;
  --attribute-value:#0077aa;
  --token-funtion:#dd4a68;
}
