/* Ulti-Care 360 — shared design layer for every portal.
 *
 * Twenty portals each grew their own palette, type scale and elevation, so the product looked like several
 * products: `apps/web` alone carried 46 linear gradients, 9 radial glows, 72 box-shadows, 15 border radii and
 * three font families. The citizen portal was put in order first; this is the layer the rest adopt.
 *
 * It sets brand tokens, a stacking scale, corner radii, a visible focus ring, and removes elevation from cards.
 * It does not restyle layouts - a shared file that reflows twenty screens cannot be verified screen by screen.
 *
 * What was learned building it:
 *   * `:where()` has zero specificity, so the first version did nothing against a portal's own `.card` rule;
 *   * plain selectors still lost to `health-theme.css`, which sets `box-shadow: var(--shadow) !important` and is
 *     injected a second time at runtime, after this sheet;
 *   * so elevation is removed in two places: at the source (`--shadow: none` in health-theme.css) and here, with
 *     `html body` + `!important` for the portals that paint their own card shadow.
 *
 * Load it LAST in each portal's <head>.
 */

:root {
  --uc-navy: #123a4d;
  --uc-navy-deep: #0b2633;
  --uc-teal: #12707c;
  --uc-teal-bright: #1b8b95;
  --uc-amber: #e3a455;
  --uc-mint: #a9c4bc;

  --uc-ink: #0f1d26;
  --uc-body: #4a5a63;
  --uc-line: #dfe6e9;
  --uc-surface: #ffffff;
  --uc-canvas: #f6f9fa;

  --z-dock: 900;
  --z-dock-panel: 950;
  --z-sheet: 980;
  --z-modal: 1000;
  --z-toast: 1100;
}

[data-theme="dark"] {
  --uc-ink: #e6eef0;
  --uc-body: #a3b3ba;
  --uc-line: #223540;
  --uc-surface: #10222c;
  --uc-canvas: #0b1a21;
}

/* Elevation on every card is what makes a dense dashboard read as a template: if everything floats, nothing is
   in front. Grouping is done by borders and background. The `html body` prefix puts this above any single-class
   selector and `!important` above the theme's own, so it holds whatever order the sheets load in. Modals use
   `.modal`, not `.card`, so a dialog that needs to sit above the page is unaffected. */
html body .card, html body .panel, html body .kpi-card, html body .stat-card,
html body .metric-card, html body .tile {
  box-shadow: none !important;
  border-radius: 8px !important;
}

/* Sixteen-pixel corners everywhere is a house style nobody chose. */
html body .btn, html body button.btn, html body .chip, html body .pill,
html body .badge, html body input, html body select, html body textarea {
  border-radius: 6px !important;
}

/* Headlines tracked loosely at display sizes look unset. */
h1, h2, h3 {
  letter-spacing: -0.01em;
}

/* A visible focus ring on every interactive element, in brand teal. Accessibility that is also a design
   decision: the portals mostly had none, or a browser default that vanished against the surface. */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--uc-teal-bright);
  outline-offset: 2px;
}

main a:hover, .main a:hover, .content a:hover, .page a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
