/* tradox's own palette.
 *
 * Dark-first, and not as a style preference: this is a screen people keep open
 * while markets are moving, and a page that glares at 3am gets closed.
 *
 * The accent is one colour and it means one thing - "a measurement stands
 * behind this". It is never used for decoration, so when it appears it carries
 * information rather than mood. `--up` was moved to a lime-green in the 2026-09
 * redesign because the old up-green sat beside the teal and a measured number
 * read as a price rise.
 *
 * The old names (--ink-dim, --ink-faint, --accent-dim, --bg-raised) are kept
 * as var() aliases of the new ones, so the pre-redesign stylesheets reskin
 * without edits and can never drift from the token they stand for; new code
 * uses the new names. The three card elevations are --bg-card, --bg-hover
 * (raised) and --bg-pop; --bg-raised is the legacy alias of --bg-card. */
:root {
  --bg:         #07090B;
  --bg-card:    #0E1216;
  --bg-raised:  var(--bg-card);
  --bg-inset:   #0B0E11;
  --bg-hover:   #151A1F;
  --bg-pop:     #1C2228;

  --line:       #252D35;
  --line-soft:  rgba(255, 255, 255, 0.06);

  --ink:        #EEF2F5;
  --ink-2:      #A6B2BD;
  --ink-3:      #7A8894;
  --ink-dim:    var(--ink-2);
  --ink-faint:  var(--ink-3);
  /* A stale card's inks (app.css, aria-busy): each one step down, ink-3 the
   * floor. Resolved here, at the root, so a stale card that redefines
   * --ink-2 still reads the real ink-2 for its --ink. */
  --ink-stale:   var(--ink-2);
  --ink-2-stale: var(--ink-3);

  --accent:      #52E3CE;
  --accent-deep: #1FA894;
  --accent-dim:  var(--accent-deep);
  --accent-soft: rgba(82, 227, 206, 0.10);
  --accent-line: rgba(82, 227, 206, 0.35);
  --accent-glow: rgba(82, 227, 206, 0.55);
  /* The near-black ink printed ON the accent: the primary button's label,
   * the avatar's letter, a pressed section's tick. One value, so every
   * accent surface keeps the same contrast. */
  --ink-on-accent: #04110F;

  --up:        #7ED957;
  --up-soft:   rgba(126, 217, 87, 0.10);
  --down:      #FF5C6C;
  --down-soft: rgba(255, 92, 108, 0.10);
  --warn:      #F5B544;
  --warn-soft: rgba(245, 181, 68, 0.12);

  /* STATUS (spec 2026-09-27 §2): an emergency, a caution, all clear, off or
   * unknown. The red, amber and green ARE the direction colours, by
   * reference, so the palette stays small; the two roles are told apart by
   * form - a status is always a badge or dot with a word (.st,
   * TRX.status.badge), a direction a signed number, an arrow, a candle. */
  --st-ok:   var(--up);
  --st-warn: var(--warn);
  --st-bad:  var(--down);
  --st-off:  var(--ink-3);
  --st-ok-soft:   var(--up-soft);
  --st-warn-soft: var(--warn-soft);
  --st-bad-soft:  var(--down-soft);
  --st-off-soft:  rgba(122,136,148,.12);

  /* CATEGORY (§4): what kind of thing it is, never whether it is good. Six
   * quiet hues, each at least 15 degrees of hue from green, red, amber and
   * teal (designsystem.test.js), keyed by TRX.hues and used only through
   * .hue and [data-hue]. */
  --c-rates:   #5DB4FF;
  --c-fx:      #8B93FF;
  --c-metals:  #C3A2FF;
  --c-energy:  #FF86B7;
  --c-indices: #4E86FF;
  --c-crypto:  #E28BFF;

  /* PAGE HUE (§5, chrome only): which page you are on. The shell sets
   * --page-hue from <html data-page>; Overview keeps the brand teal. */
  --p-overview: var(--accent);
  --p-deep:     #8B93FF;
  --p-cot:      #C3A2FF;
  --p-calendar: #5DB4FF;
  --p-macro:    #4E86FF;
  --p-guard:    #FF86B7;
  --p-method:   #E28BFF;
  --page-hue:   var(--accent);
  /* A LASER is a thin bright line in the page hue with a soft bloom. These
   * resolve on <html>, where the page tag sets --page-hue, so they follow
   * the page; only the chrome designsystem.test.js names reads them. */
  --laser-bloom: 0 0 8px color-mix(in srgb, var(--page-hue) 45%, transparent);
  --laser-glow:  0 0 12px color-mix(in srgb, var(--page-hue) 35%, transparent);

  --zone-support:    rgba(126, 217, 87, 0.09);
  --zone-resistance: rgba(255, 92, 108, 0.09);
  --zone-range:      rgba(166, 178, 189, 0.08);
  --zone-broken:     rgba(166, 178, 189, 0.05);

  --font:  "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  --ease:    cubic-bezier(.2, .8, .2, 1);
  --spring:  cubic-bezier(.34, 1.4, .64, 1);
  --t-fast:   120ms;
  --t-ui:     200ms;
  --t-panel:  320ms;
  --t-reveal: 600ms;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  --hl: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
