/* SBMCB — design tokens
   The single source of truth for colour, type, space and motion.
   No other stylesheet in this project hard-codes a colour; checks/03-css.cjs
   fails the build if one starts to.

   The system is white, grey and black, with a single deep indigo carrying
   every interactive meaning, and green/amber/red reserved strictly for
   state. Nothing here is decorative. */

:root {
  /* ---- Surfaces ------------------------------------------------------ */
  --app-bg:        #f5f5f5;  /* the ground the console sits on */
  --surface:       #ffffff;  /* working surfaces: cards, tables, panels */
  --surface-2:     #f8f8f8;  /* secondary zones inside a surface */
  --surface-3:     #eeeeee;  /* table heads, tracks, inactive fills */
  --surface-inset: #fafafa;  /* recessed strips */

  /* ---- Ink ----------------------------------------------------------- */
  --ink:        #111111;  /* primary text */
  --ink-2:      #666666;  /* secondary information */
  --ink-3:      #8a8a8a;  /* muted metadata, timestamps, units */
  --ink-invert: #ffffff;

  /* ---- Lines --------------------------------------------------------- */
  --line:        #e5e5e5;  /* the default hairline, everywhere */
  --line-strong: #d6d6d6;  /* structural division */
  --line-faint:  #efefef;  /* grid lines inside charts */

  /* ---- Accent -------------------------------------------------------- */
  /* Navigation, actions, links, selection. One colour, one meaning. */
  --accent:      #4f46e5;
  --accent-ink:  #3730a3;  /* accent as text on white, passes contrast */
  --accent-wash: #eef2ff;
  --accent-line: #c7d2fe;

  /* ---- Semantic state ------------------------------------------------ */
  /* Amber for attention, red only for genuinely critical, green for
     healthy or done. Never for emphasis, never for decoration. */
  --pos:       #16803c;
  --pos-wash:  #eaf5ee;
  --warn:      #b7791f;
  --warn-wash: #fdf6e7;
  --neg:       #c0392b;
  --neg-wash:  #fbeceb;

  /* ---- Data series --------------------------------------------------- */
  --series-1:     #4f46e5;
  --series-2:     #111111;
  --series-3:     #8a8a8a;
  --series-ghost: #d6d6d6;

  /* ---- Type ---------------------------------------------------------- */
  --font-ui: "Inter", "Inter var", system-ui, -apple-system, BlinkMacSystemFont,
             "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --fs-micro: 10px;
  --fs-tiny:  11px;
  --fs-xs:    12px;
  --fs-sm:    13px;
  --fs-base:  14px;
  --fs-md:    16px;
  --fs-lg:    19px;
  --fs-xl:    24px;
  --fs-2xl:   30px;

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.55;

  /* ---- Space (4px base) ---------------------------------------------- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;

  /* ---- Shell geometry ------------------------------------------------ */
  --sidebar-w:           232px;
  --sidebar-w-collapsed:  60px;
  --header-h:             56px;
  --subheader-h:          46px;
  --radius:                6px;
  --radius-sm:             4px;

  /* ---- Motion -------------------------------------------------------- */
  --dur-fast: 90ms;
  --dur:      160ms;
  --ease:     cubic-bezier(0.2, 0, 0.13, 1);

  /* ---- Depth --------------------------------------------------------- */
  /* Surface contrast does the work. This exists for the one thing that
     genuinely floats above the page: the patient drawer. */
  --shadow-pop: 0 1px 2px rgba(17, 17, 17, 0.06), 0 8px 24px rgba(17, 17, 17, 0.1);
}

/* Compact density, from Settings. Squeezes the vertical rhythm without
   changing type size, which is what a practitioner scanning a full day
   actually wants. */
:root[data-density="compact"] {
  --s3: 10px; --s4: 12px; --s5: 16px; --s6: 18px; --s7: 24px;
  --header-h: 48px;
  --subheader-h: 40px;
}

/* The console is a daylight instrument by design. It paints its own light
   ground explicitly rather than inheriting whatever the host prefers. */
