/* HELIOS design tokens — black & gold. Shared by all concepts. */
:root {
  /* Surfaces — graphite/black (elevation 0 → 3) */
  --bg-0: #0b0c0e;          /* app canvas */
  --bg-1: #121317;          /* panels */
  --bg-2: #191b20;          /* cards / inputs */
  --bg-3: #23262c;          /* hover, popovers */
  --border-1: #23252b;      /* hairline dividers */
  --border-2: #31343b;      /* control outlines */
  --border-gold: rgba(201, 162, 77, 0.40);

  /* Gold — RESTRAINED: brand mark, active state, focus, primary action. Never large fills. */
  --gold-200: #e3c98d;      /* gold text on dark (12.1:1 on bg-0) */
  --gold-400: #c9a24d;      /* primary accent (8.2:1 on bg-0) */
  --gold-600: #8f7232;
  --gold-900: #221c10;      /* selected-state tint */
  --gold-glow: rgba(201, 162, 77, 0.16);

  /* Text */
  --text-1: #e7e6e3;        /* primary   (15.7:1 on bg-0) */
  --text-2: #a3a6ad;        /* secondary (8.0:1 on bg-0, 7.1:1 on bg-2) */
  --text-3: #868a93;        /* labels    (5.7:1 on bg-0, 5.0:1 on bg-2; NOT on bg-3 = 4.4:1) */
  --text-on-gold: #15110a;

  /* Market direction (desaturated so they sit beside gold) */
  --up: #4fb894;   --up-fill: rgba(79, 184, 148, 0.14);   /* 8.0:1 */
  --down: #e8735f; --down-fill: rgba(232, 115, 95, 0.14); /* 6.6:1 */
  --warn: #e0b04f; --info: #7fa7d9;

  /* Evidence status (issue #27). Shape + text always accompany color. */
  --ev-observed: #8fb3e0;     /* fact seen in data            — solid border */
  --ev-projected: #c9a24d;    /* geometric projection          — dashed border */
  --ev-hypothesis: #c49be8;   /* untested idea                 — dotted border */
  --ev-validated: #4fb894;    /* passed a defined test (none yet in prototype) — double border */
  --ev-unknown: #868a93;      /* coverage gap / unverified     — hatched */

  /* Chart palette */
  --chart-grid: #1a1c21;
  --chart-axis: #868a93;
  --chart-future: rgba(201, 162, 77, 0.035);
  /* Wick-level candidates — owner conventions (user-overridable at runtime) */
  --level-monthly: #ffffff;   /* white dotted */
  --level-weekly: #a477ff;    /* purple dotted */
  --level-daily: #ff9a3c;     /* orange dotted */
  --chart-pivot: #cfd2d8;
  --chart-event: #7fa7d9;
  --chart-apex: #e3c98d;
  --chart-el: #c9a24d;

  /* Typography */
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", Georgia, serif;   /* editorial accents (Concept B) */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-16: 16px; --fs-20: 20px; --fs-24: 24px; --fs-32: 32px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-base: 1.45;
  --tracking-caps: 0.08em;

  /* Spacing (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Radii */
  --r-1: 3px; --r-2: 6px; --r-3: 10px; --r-pill: 999px;

  /* Elevation */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.03) inset, 0 1px 2px rgba(0,0,0,0.5);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.55);

  /* Focus */
  --focus-ring: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--gold-400);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --dur-fast: 120ms; --dur: 200ms;
}

/* ---------- Base primitives shared by both concepts ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg-0); color: var(--text-1);
  font-family: var(--font-ui); font-size: var(--fs-13); line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.caps { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--fs-11); font-weight: var(--fw-semibold); color: var(--text-3); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-1); }
button { font: inherit; color: inherit; }

.btn { background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text-2);
  padding: 3px 9px; border-radius: var(--r-1); cursor: pointer; font-size: var(--fs-12);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast), border-color var(--dur-fast); }
.btn:hover { background: var(--bg-3); color: var(--text-1); }
.btn[aria-pressed="true"], .btn.active { background: var(--gold-900); color: var(--gold-200); border-color: var(--border-gold); }
.btn-primary { background: var(--gold-400); color: var(--text-on-gold); border-color: var(--gold-400); font-weight: var(--fw-semibold); }
.btn-primary:hover { background: var(--gold-200); color: var(--text-on-gold); }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r-1); overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; border-right: 1px solid var(--border-1); }
.seg .btn:last-child { border-right: 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text-2); font-size: var(--fs-11); cursor: pointer; }
.chip .sw { width: 10px; height: 2px; border-radius: 1px; }
.chip .sw.dot { height: 0; border-top: 2px dotted; background: none !important; }
.chip[aria-pressed="true"] { color: var(--text-1); border-color: var(--border-gold); background: var(--gold-900); }

.synthetic-badge, .proto-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--warn);
  border: 1px dashed rgba(229,185,78,.55); background: rgba(229,185,78,.07); padding: 1px 6px; border-radius: var(--r-1); white-space: nowrap; }
.synthetic-badge::before, .proto-badge::before { content: "◆"; font-size: 8px; }

.scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }

.proto-badge { color: var(--gold-200); border-color: var(--border-gold); background: var(--gold-900); border-style: solid; }

/* Evidence labels */
.ev { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .06em; padding: 0 6px; height: 17px; border-radius: var(--r-1); border: 1px solid; white-space: nowrap; }
.ev.observed   { color: var(--ev-observed);   border-style: solid; }
.ev.projected  { color: var(--ev-projected);  border-style: dashed; }
.ev.hypothesis { color: var(--ev-hypothesis); border-style: dotted; }
.ev.validated  { color: var(--ev-validated);  border-style: double; border-width: 3px; height: 19px; }
.ev.unknown    { color: var(--ev-unknown); background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(134,138,147,.18) 4px 6px); }
.ev.observed::before { content: "●"; } .ev.projected::before { content: "◇"; } .ev.hypothesis::before { content: "?"; }
.ev.validated::before { content: "✓"; } .ev.unknown::before { content: "∅"; }

select.sel { background: var(--bg-2); color: var(--text-1); border: 1px solid var(--border-2); border-radius: var(--r-1); padding: 3px 6px; font: inherit; font-size: var(--fs-12); }
input[type=color].swatch { width: 14px; height: 14px; padding: 0; border: 1px solid var(--border-2); border-radius: 2px; background: none; cursor: pointer; }
input[type=color].swatch::-webkit-color-swatch-wrapper { padding: 0; } input[type=color].swatch::-webkit-color-swatch { border: 0; }
