/* NewSpace RFP design tokens — Plasma palette, mission-control system (PRMD R79-R87).
   Single source for site chrome, charts, and (via design/tokens.json) the app and OG cards.
   Palette found by OKLCH search against the CVD validator: five calendar kinds separate at
   all-pairs ΔE 8.0 dark / 11.5 light. Contrast values in comments are WCAG ratios vs --base. */

:root {
  color-scheme: dark;

  /* surfaces: cool graphite, not navy */
  --base:      #101216;
  --panel:     #171a20;
  --panel2:    #1e222a;
  --rule:      #2a2f3a;
  --rule-soft: #21252d;

  /* ink */
  --ink:       #e6e8ee;   /* 15.3:1 */
  --ink-dim:   #98a0b0;   /*  7.1:1 */
  --ink-faint: #6c7484;   /*  4.0:1 — decorative and large text only */

  /* brand: --accent fills and borders, --accent-ink is the text-safe step.
     The raw accent is 3.2:1 on --base, which is below AA for body text. */
  --accent:     #7b3edd;
  --accent-ink: #a78bfa;  /*  6.9:1 */
  --accent-dim: #3a2360;

  /* status: functional only, never a categorical kind */
  --go:      #3fbf7a;   /* 8.0:1 */
  --caution: #d8c022;   /* 10.3:1 */
  --alarm:   #e05252;   /* 4.9:1 */

  /* calendar kinds */
  --k-launch:  #7b3edd;
  --k-test:    #cf5b94;
  --k-event:   #2887e7;
  --k-hearing: #ad3928;
  --k-rfp:     #b27a2a;
  /* kind text steps, lightened to clear AA on --base */
  --k-launch-ink:  #a78bfa;
  --k-test-ink:    #e78fb8;
  --k-event-ink:   #6aaef0;
  --k-hearing-ink: #e0806f;
  --k-rfp-ink:     #d8a656;

  /* Text colour to sit ON a kind fill (chips), chosen per kind so every pairing
     clears AA 4.5:1 while the CVD-validated fills stay untouched. Forcing white
     everywhere would require darkening the fills, which collapses the lightness
     spread the colour-blind separation depends on. Same choice in both themes. */
  --k-launch-on:  #ffffff;
  --k-test-on:    #12151a;
  --k-event-on:   #12151a;
  --k-hearing-on: #ffffff;
  --k-rfp-on:     #12151a;

  /* type */
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* geometry: consoles are squarer than magazines */
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;

  /* motion */
  --t-fast: .12s;
  --t-med: .2s;
}

:root[data-theme="light"] {
  color-scheme: light;
  --base:      #f5f6f8;
  --panel:     #ffffff;
  --panel2:    #eceef2;
  --rule:      #d6dae1;
  --rule-soft: #e4e7ec;

  --ink:       #161a20;   /* 16.2:1 */
  --ink-dim:   #5b6478;   /*  5.5:1 */
  --ink-faint: #808898;   /*  3.2:1 — decorative and large text only */

  --accent:     #6137ac;
  --accent-ink: #6137ac;  /*  7.3:1 — dark enough for text as-is */
  --accent-dim: #ddd2f2;

  --go:      #12784c;   /* 5.1:1 */
  --caution: #7d6a00;   /* 4.9:1 */
  --alarm:   #b3251f;   /* 6.1:1 */

  --k-launch:  #6137ac;
  --k-test:    #bf5e8c;
  --k-event:   #538fd3;
  --k-hearing: #a03b2c;
  --k-rfp:     #be7e1a;
  --k-launch-ink:  #6137ac;
  --k-test-ink:    #a2416e;
  --k-event-ink:   #2c6ba8;
  --k-hearing-ink: #a03b2c;
  --k-rfp-ink:     #7f5406;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    color-scheme: light;
    --base: #f5f6f8; --panel: #ffffff; --panel2: #eceef2; --rule: #d6dae1; --rule-soft: #e4e7ec;
    --ink: #161a20; --ink-dim: #5b6478; --ink-faint: #808898;
    --accent: #6137ac; --accent-ink: #6137ac; --accent-dim: #ddd2f2;
    --go: #12784c; --caution: #7d6a00; --alarm: #b3251f;
    --k-launch: #6137ac; --k-test: #bf5e8c; --k-event: #538fd3; --k-hearing: #a03b2c; --k-rfp: #be7e1a;
    --k-launch-ink: #6137ac; --k-test-ink: #a2416e; --k-event-ink: #2c6ba8;
    --k-hearing-ink: #a03b2c; --k-rfp-ink: #7f5406;
  }
}

/* self-hosted, latin subset (PRMD R81) */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/plex-sans-var.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
