/* Harvester · Tailwind v4 palette tokens
   Paste this @theme block into tailwind.config.ts (or app.css with @import "tailwindcss"; @theme { ... }).
   Mood: brutalist desert-night HUD — copper on charcoal. Dark theme only.
   Severity ladder is sacred: never recolor on hover, never gradient. */

@theme {
  /* ─── Surface tiers ──────────────────────────────────────────────
     Layered by weight, not borders. Each step ~+4% lightness in OKLCH. */
  --color-bg-base:        #0a0a0b; /* App background, behind everything */
  --color-bg-sunken:      #070708; /* Scrollable body of tables/lists */
  --color-bg-panel:       #131211; /* Sidebar, DetailsRail, drawers */
  --color-bg-elevated:    #1a1815; /* Sticky table header, status bar, toolbars */
  --color-bg-row-hover:   #1d1b17; /* Row hover — barely-there warm shift */
  --color-bg-row-selected:#2a2318; /* Selected row tint (warm copper wash) */

  /* ─── Borders ─────────────────────────────────────────────────────
     Almost-invisible. Real separation comes from surface weight. */
  --color-border-subtle:  #1f1d1a; /* Default row separator, panel edges */
  --color-border-default: #2a2724; /* Inputs, buttons, capability badges */
  --color-border-strong:  #3a3530; /* Focus outlines, active controls */

  /* ─── Text ────────────────────────────────────────────────────────
     Warm-bone, never pure white. Mono inherits same colors. */
  --color-fg-primary:     #e8e3d8; /* Body text, table data, headings */
  --color-fg-secondary:   #9a9388; /* Column headers, helper text */
  --color-fg-muted:       #5e574d; /* Timestamps, evidence_id, metadata */
  --color-fg-faint:       #3a352e; /* Disabled, placeholder */

  /* ─── Accent (copper / охра) ──────────────────────────────────────
     The one "working" color. Buttons, links, selected tab, MITRE pills. */
  --color-accent:         #a8763a; /* Primary action, focus ring base */
  --color-accent-hover:   #c0884a; /* Hover/pressed on accent */
  --color-accent-muted:   #6b4d28; /* Subdued accent — pill backgrounds */
  --color-accent-bg:      #2a1d10; /* Accent-tinted surface, selected pills */

  /* ─── Severity ladder (1→5) ───────────────────────────────────────
     One color per level. Never blend, never animate. */
  --color-sev-info:       #7a7163; /* sev=1 · informational, dim sand */
  --color-sev-low:        #c9a86a; /* sev=2 · low, sand-yellow */
  --color-sev-medium:     #d4922c; /* sev=3 · medium, amber */
  --color-sev-high:       #e26a25; /* sev=4 · high, harvester-beacon orange */
  --color-sev-critical:   #c4334a; /* sev=5 · critical, siren red */

  /* ─── Status ──────────────────────────────────────────────────────
     For capability badges, MCP heartbeat, ingest progress. */
  --color-ok:             #5a8266; /* Capability ON, MCP healthy — muted swamp */
  --color-warn:           #d4922c; /* aliases sev-medium */
  --color-danger:         #c4334a; /* aliases sev-critical — capability OFF */

  /* ─── Type ────────────────────────────────────────────────────────
     mono = data. sans = chrome. Tabular numerics on both. */
  --font-sans: "Inter", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Cascadia Code", ui-monospace, monospace;

  /* ─── Density ─────────────────────────────────────────────────────
     Operator tool — rows ≤28px. */
  --row-h: 28px;
  --row-h-dense: 24px;
  --radius-sm: 2px;  /* Pills, capability badges */
  --radius-md: 3px;  /* Buttons, inputs */
  --radius-lg: 4px;  /* Cards, panels — that's the maximum */
}

/* ─── Plain-CSS aliases ────────────────────────────────────────────
   Tailwind v4 @theme generates utilities like `bg-bg-base` from the
   --color-* names above, but raw CSS (`var(--bg-base)`) needs the
   un-prefixed token. Mirror everything at :root for hand-written CSS. */
:root {
  --bg-base:         #0a0a0b;
  --bg-sunken:       #070708;
  --bg-panel:        #131211;
  --bg-elevated:     #1a1815;
  --bg-row-hover:    #1d1b17;
  --bg-row-selected: #2a2318;
  --bg-row-pivot:    #1d1b17;

  --border-subtle:   #1f1d1a;
  --border-default:  #2a2724;
  --border-strong:   #3a3530;

  --fg-primary:      #e8e3d8;
  --fg-secondary:    #9a9388;
  --fg-muted:        #5e574d;
  --fg-faint:        #3a352e;

  --accent:          #a8763a;
  --accent-hover:    #c0884a;
  --accent-muted:    #6b4d28;
  --accent-bg:       #2a1d10;

  --sev-info:        #7a7163;
  --sev-low:         #c9a86a;
  --sev-medium:      #d4922c;
  --sev-high:        #e26a25;
  --sev-critical:    #c4334a;

  --sev-info-bg:     #1a1814;
  --sev-low-bg:      #2a2317;
  --sev-medium-bg:   #2e2210;
  --sev-high-bg:     #2e1a0c;
  --sev-critical-bg: #2a0e12;

  --ok:              #5a8266;
  --warn:            #d4922c;
  --danger:          #c4334a;

  --font-sans: "Inter", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Cascadia Code", ui-monospace, monospace;

  --row-h: 28px;
  --row-h-dense: 24px;

  /* Chrome heights — keep identical across every screen */
  --h-app: 42px;   /* app header */
  --h-tabs: 36px;  /* tab strip */
  --h-foot: 22px;  /* status footer */
}

/* ─── Accessibility floor ──────────────────────────────────────────
   Keyboard-driven tool: focus MUST be visible on every interactive
   element. Copper ring, 1px offset, never removed. */
:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
button:focus-visible,[role="button"]:focus-visible{outline-offset:0}

/* ─── Links ────────────────────────────────────────────────────────
   Defined even where the design has none yet — undefined links render
   browser-default blue and break the palette. */
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-hover);text-decoration:underline}
