/* =========================================================================
   Churchill — color system
   Dark is the default (operators run this beside terminals). Light is a peer.
   Lockdown is a posture, not a modal — the whole console shifts amber.

   Surfaces are WARM GRAPHITE, not pure black. The accent is a calm SAGE
   green. Semantic hues are desaturated on purpose: state, never alarm.
   ========================================================================= */

:root {
  /* ---- Parent-brand (Westgate Data Science) ---- */
  --westgate-navy:   #002060;   /* the avatar / mark color */
  --westgate-navy-2: #0a2f7a;

  /* ---- Surfaces — warm graphite ramp ---- */
  --bg-0: #1a1c22;          /* app background */
  --bg-1: #1f2229;          /* chrome: topbar, sidebar, table head */
  --bg-2: #25282f;          /* insets, chips, hover wells */
  --surface:          #22252c;
  --surface-elevated: #2a2e36;
  --surface-sunken:   #181a1f;

  /* ---- Borders — low contrast, the workhorse separator ---- */
  --border-1: #2c3038;      /* hairline within a surface */
  --border-2: #383d47;      /* card / control edge */
  --border-3: #4a5060;      /* strong / focus-adjacent edge */

  /* ---- Foreground ramp ---- */
  --fg-1: #ebedf1;          /* primary text */
  --fg-2: #bcc1cb;          /* secondary text */
  --fg-3: #8a909c;          /* tertiary / labels / eyebrows */
  --fg-4: #626874;          /* placeholder / disabled / faint */

  /* ---- Neutral ink ramp (charts, fills, pips) ---- */
  --ink-1: #21252c;
  --ink-2: #2c313a;
  --ink-3: #3a404b;
  --ink-4: #4b525e;
  --ink-5: #5d6471;
  --ink-6: #707783;
  --ink-7: #848a96;

  /* ---- Semantic states — fg / bg / border / solid-9 each ----
     9 = the solid dot/line/fill color. fg = text on tinted bg. */
  --critical-9:  #c95c5c;  --critical-fg: #eb9595;  --critical-bg: #2c1c1e;  --critical-bd: #4a2a2d;
  --warning-9:   #c19354;  --warning-fg:  #dcb27c;  --warning-bg:  #28221b;  --warning-bd:  #423a2c;
  --success-9:   #5a9a7e;  --success-fg:  #84bda0;  --success-bg:  #1c2825;  --success-bd:  #2c4a3f;
  --info-9:      #6a8dc0;  --info-fg:     #95b2dc;  --info-bg:     #1c2330;  --info-bd:     #324058;
  --lockdown-9:  #b0763a;  --lockdown-fg: #d8a56b;  --lockdown-bg: #2a1f12;  --lockdown-bd: #4a3520;
  --unknown-9:   #6b7180;  --unknown-fg:  #8c92a0;  --unknown-bg:  #20232a;  --unknown-bd:  var(--border-2);
  --neutral-fg:  var(--fg-1); --neutral-bg: var(--bg-2); --neutral-bd: var(--border-2);

  /* ---- Accent — sage. Selection, focus, primary action, live signal. ---- */
  --accent:        #84bda0;
  --accent-strong: #6aaf8d;
  --accent-ink:    #0d1815;   /* text that sits ON the accent */
  --selection:     #2e4d42;
  --focus:         var(--accent);
}

/* ---- Lockdown posture — ambient amber wash over the dark surfaces.
   Apply to .app root: <div class="app posture-lockdown"> or [data-posture]. ---- */
.posture-lockdown,
[data-posture="lockdown"] {
  --bg-0: #1a1612;
  --bg-1: #1f1a14;
  --bg-2: #241d15;
  --surface: #1f1b15;
  --border-3: var(--lockdown-bd);
  --focus: var(--lockdown-9);
  --selection: rgba(176, 118, 58, 0.24);
}

/* ---- Light theme — a designed peer, not an afterthought ----
   Apply to root: [data-theme="light"]. Warm paper, same sage accent. */
[data-theme="light"] {
  color-scheme: light;

  --bg-0: #f4f5f2;
  --bg-1: #ffffff;
  --bg-2: #ebece8;
  --surface: #ffffff;
  --surface-elevated: #f7f8f5;
  --surface-sunken: #eceded;

  --border-1: #e3e4df;
  --border-2: #d3d5cd;
  --border-3: #b9bcb2;

  --fg-1: #1c1f25;
  --fg-2: #444a54;
  --fg-3: #6a7080;
  --fg-4: #969ba7;

  --ink-1: #e7e8e3;
  --ink-2: #d9dad4;
  --ink-3: #c4c6bf;
  --ink-4: #a9aca3;
  --ink-5: #8d9188;
  --ink-6: #72766d;
  --ink-7: #585c54;

  --critical-9:  #bf4d4d;  --critical-fg: #8c2f2f;  --critical-bg: #faecec;  --critical-bd: #e9c4c4;
  --warning-9:   #a87a2e;  --warning-fg:  #7a5616;  --warning-bg:  #f7efde;  --warning-bd:  #e6d4ab;
  --success-9:   #4d8a6c;  --success-fg:  #2c5e47;  --success-bg:  #e6f1ea;  --success-bd:  #bcd9c9;
  --info-9:      #4f74ac;  --info-fg:     #2d4f7d;  --info-bg:     #e8eef7;  --info-bd:     #c2d2e8;
  --lockdown-9:  #a8682c;  --lockdown-fg: #7d4a15;  --lockdown-bg: #f6ecdc;  --lockdown-bd: #e3cba6;
  --unknown-9:   #8b909a;  --unknown-fg:  #6a7080;  --unknown-bg:  #eceded;  --unknown-bd:  var(--border-2);
  --neutral-fg:  var(--fg-1); --neutral-bg: var(--bg-2); --neutral-bd: var(--border-2);

  --accent:        #4d8a6c;
  --accent-strong: #3f7a5d;
  --accent-ink:    #ffffff;
  --selection:     #cfe6da;
  --focus:         var(--accent);
}
