/* Dealflow Terminal — THE design tokens (Terminal Identity V1). One file, two skins, every other stylesheet uses var() only.
   Dark = the Terminal identity (V4G design tokens v1.0 verbatim) and the no-JS fallback; light = the Company Deep Dive's
   existing light palette generalised (the family token file declares [data-theme="light"] and asks for measured contrast).
   Colour carries meaning, never decoration: ok = present / confirmed · info = informational / medium · warn = attention /
   derived / stale / high · danger = refused / missing · brand = structure (active nav, focus, bars) · accent = the one
   action colour (amber). Deep Dive names stay as aliases so no Deep Dive selector is renamed.
   --muted / --faint are tuned (not the V4G v1.0 values) so that 10-11 px metadata clears WCAG AA 4.5:1 on every surface of its skin. */
:root {
  color-scheme: dark;
  --bg: #0F1520; --surface: #141C2E; --deep: #0A1018; --raised: #0D1520; --border: #1E2D45;
  --text: #E2E8F0; --text-2: #CBD5E1; --text-3: #94A3B8; --muted: #7F8FA6; --faint: #79879B;
  --brand: #2E75B6; --accent: #E8A020; --accent-ink: #E8A020; --on-accent: #0F1520; --link: #60A5FA; --focus: #60A5FA;
  --ok: #4CAF50; --ok-bg: #0D1A14; --ok-border: #2D5A3F;
  --info: #60A5FA; --info-bg: #14202E; --info-border: #243760;
  --warn: #F59E0B; --warn-bg: #1A1408; --warn-border: #3A2A0A;
  --danger: #EF4444; --danger-bg: #1A0D0D; --danger-border: #5A2A2A;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F7F5; --surface: #FFFFFF; --deep: #EEF1F5; --raised: #F3F6FA; --border: #E2E8F0;
  --text: #0F1520; --text-2: #1E2D45; --text-3: #475569; --muted: #516178; --faint: #5D6777;
  --brand: #1B4F8A; --accent: #E8A020; --accent-ink: #8A5200; --on-accent: #0F1520; --link: #1D4ED8; --focus: #1B4F8A;
  --ok: #1F5F3F; --ok-bg: #EAF3EC; --ok-border: #BFDCC7;
  --info: #1E3A8A; --info-bg: #E6ECF5; --info-border: #C7D4F8;
  --warn: #7A4B00; --warn-bg: #FFF4DD; --warn-border: #F0C36D;
  --danger: #8A1C1C; --danger-bg: #F8E0E0; --danger-border: #F0B4B4;
}
/* Deep Dive aliases (brownfield names, same tokens) */
:root { --hover: var(--raised); --navy-dark: var(--text); --navy: var(--text-2); --amber: var(--accent);
        --fact: var(--text-2); --derived: var(--warn); --missing: var(--danger); --present: var(--ok); --stale: var(--warn); --unknown: var(--muted); }
html { background: var(--bg); color: var(--text); }
/* one visible focus ring for every keyboard user, both skins */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the theme control: a native select (keyboard, touch, screen reader for free), compact, never a primary nav item */
.theme { display: inline-flex; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--muted); }
.theme select { min-height: 32px; padding: 4px 24px 4px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--deep); color: var(--text-3); font: 11px var(--mono); cursor: pointer;
  appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.theme select:hover { color: var(--text); border-color: var(--text-3); }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
