/* One neutral grey scale with a slight navy tint, shared by the workspace, sign-in and home screens and the
   product, plan and policy pages. Pick a step instead of a one-off grey: backgrounds 50/100, borders 200,
   field outlines 300, secondary text 600, body text 900. Light by default; dark wherever a dark theme is set.
   Defined on body in the workspace so dialogs outside #appShell share it. */
:root {
  --ui-grey-50: #f6f8fb;
  --ui-grey-100: #eef2f7;
  --ui-grey-200: #e3e9f1;
  --ui-grey-300: #cfd8e4;
  --ui-grey-500: #8a99b1;
  --ui-grey-600: #5b6b85;
  --ui-grey-800: #1b2a44;
  --ui-grey-900: #0f1d33;
  --ui-grey-surface: #ffffff;
}

[data-ui-theme="dark"] {
  --ui-grey-50: #0f1d33;
  --ui-grey-100: #0b1424;
  --ui-grey-200: #2a3a55;
  --ui-grey-300: #3a4b68;
  --ui-grey-500: #7f8fa8;
  --ui-grey-600: #a9b7cc;
  --ui-grey-800: #dbe3ee;
  --ui-grey-900: #eef2f7;
  --ui-grey-surface: #14233b;
}

/* Soft Cards (signed-in workspace only): a light grey canvas under white cards, ink-navy text; in dark, a deep ink
   canvas under slate cards. The selector matches only while the signed-in workspace shows (as the type scale in
   tokens.css), so the home page, sign-in and the public product, plan and policy pages keep the scale above. */
body[data-app-shell]:not(#_):is(.auth-ready,:not(.auth-pending,.auth-loading)):not(.auth-login-pending),
html.auth-known-signed-in body.auth-loading[data-app-shell]:not(#_):not(.auth-login-pending) {
  --ui-grey-50: #f8f9fb;
  --ui-grey-100: #f2f3f7;
  --ui-grey-200: #e9ebf0;
  --ui-grey-300: #dcdfe7;
  --ui-grey-500: #8e94a9;
  --ui-grey-600: #565d74;
  --ui-grey-800: #2a3148;
  --ui-grey-900: #141a2e;
  --ui-grey-surface: #ffffff;
}

body[data-app-shell][data-app-theme="dark"]:not(#_):is(.auth-ready,:not(.auth-pending,.auth-loading)):not(.auth-login-pending),
html.auth-known-signed-in body.auth-loading[data-app-shell][data-app-theme="dark"]:not(#_):not(.auth-login-pending),
#appShell.ui-workspace[data-ui-theme="dark"] {
  --ui-grey-50: #232a3e;
  --ui-grey-100: #0b0e16;
  --ui-grey-200: #2e364c;
  --ui-grey-300: #3a4360;
  --ui-grey-500: #9098af;
  --ui-grey-600: #b3b9cc;
  --ui-grey-800: #d6dae6;
  --ui-grey-900: #eef0f6;
  --ui-grey-surface: #191f2f;
}
