/* Copied from app/src/main/frontend/styles/app.css (branch feat/hybrid-phase-a), 2026-11-22: the :root and
   :root[data-theme='light'] token blocks only, unchanged, so the account web wears the app's design system.
   Re-copy them when that file's tokens change; nothing else of app.css belongs here. */

:root,
:root[data-theme='dark'] {
  color-scheme: dark;

  /* --- ground ------------------------------------------------------------------------------- */
  --bg: #08090c;
  --panel: #0e1015;
  --panel-2: #14171e;
  --rule: #2b3040;
  --rule-soft: #1d212b;

  /* --- type -------------------------------------------------------------------------------- */
  --text: #edeff3;
  --dim: #b3bac9;
  --mute: #8d95a6;

  /* --- accent: links, focus, pressed controls, the brand. Blue, and NEVER a direction --------- */
  --accent: #4c8dff;
  --accent-deep: #1b4fd8;
  --accent-wash: rgba(76, 141, 255, 0.16);

  /* --- signal (market colours, classic default): green = up, red = down -------------------------
     The colour-blind scheme overrides these below (:root[data-market='colourblind']). */
  --up: #26a65b;
  --up-deep: #1a7f45;
  --up-wash: rgba(38, 166, 91, 0.16);
  --down: #f2555a;
  --down-deep: #c8232c;
  --down-wash: rgba(242, 85, 90, 0.16);

  /* --- danger: errors, refusals, destructive buttons, the brand's red. Theme-only, NEVER a direction,
     so an error never depends on the market-colour setting. Starts at the down red's value. --------- */
  --danger: #f2555a;
  --danger-deep: #c8232c;
  --danger-wash: rgba(242, 85, 90, 0.16);
  --white: #ffffff;

  --warn: #e0a03a;
  --warn-rule: #6b4d16;

  /* Identity accents (NOT direction): held = violet, watching reuses the amber --warn. Never a market colour. */
  --held-accent: #9b8cff;
  /* Quote freshness is a STATE, not a direction. This was var(--up) until 2026-08-19, which
     painted the live dot in the exact token meaning "up" -- both measured rgb(76,141,255) -- so a
     falling symbol showed an up-blue dot beside its own --down red figure. Ink, because the
     palette is deliberately closed (the market pair, the accent, ink/paper plus one amber) and a
     state must never borrow a direction colour. The other two states already avoid direction: stale = --warn, closed = --mute,
     and `live` additionally pulses, so hue is not the only channel separating the three. */
  --live-accent: #edeff3;
  --warn-wash: rgba(224, 160, 58, 0.14);

  --scrim: rgba(0, 0, 0, 0.6);
  --thumb: #2b3040;
  --thumb-hover: #3a4152;
  --rule-hover: #3a4152;
  --panel-3: #1b1f28;

  /* --- geometry ---------------------------------------------------------------------------- */
  --r: 4px;
  --r-lg: 6px;
  --sidebar-w: 148px;
  --sidebar-w-collapsed: 56px;
  --tape-h: 34px;

  /* --- faces ------------------------------------------------------------------------------- */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- reading measure (W2; see the cap comment near .micro) ------------------------------------ */
  /* `ch` is the advance of the "0" glyph AS RENDERED, and Linux's hinting rounds it up at small sizes: at .micro's
     11.2 px a bare 62ch was 391 px on Windows and 434 px on the CI runner (92 measured characters, over the
     wide floor's 90). The em ceiling is 62ch in IBM Plex Sans ("0" = 0.5625em, 62ch = 34.9em), so where `ch` renders
     true the measure is unchanged and where it is inflated the ceiling holds. Every running-text cap uses these
     two tokens, never a bare `ch` (styles/measure.test.ts). `.mono` re-sets both (below, at its own rule): IBM Plex
     Mono's "0" is 0.6em, so 62ch there is 37.2em and the sans ceiling would cut a mono line to ~58 characters. */
  --measure: min(62ch, 35em);
  --measure-feed: min(60ch, 34em);
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg: #ffffff;
  --panel: #f8f9fb;
  --panel-2: #eef0f4;
  --rule: #d5dae3;
  --rule-soft: #e7eaf0;

  --text: #0d1017;
  --dim: #4a5262;
  --mute: #626a7c; /* 4.75:1 on --panel-2 (L8; was #666e80 at 4.48:1); styles/contrast.test.ts holds the floor */

  --accent: #1550c8;
  --accent-deep: #1550c8;
  --accent-wash: rgba(21, 80, 200, 0.1);

  /* Both signals darken for white ground — the green/red (classic) pairing is unchanged. */
  --up: #117738;
  --up-deep: #117738;
  --up-wash: rgba(17, 119, 56, 0.1);
  /* #c81f26 since 2026-11-16 (was #cf2027): 4.60:1 over its own wash on --panel, where #cf2027 measured 4.37. A
     contrast correction, the same red in both market schemes. */
  --down: #c81f26;
  --down-deep: #c81f26;
  --down-wash: rgba(200, 31, 38, 0.1);
  --danger: #c81f26;
  --danger-deep: #c81f26;
  --danger-wash: rgba(200, 31, 38, 0.1);
  --white: #ffffff;

  --warn: #8a5a0c;
  --warn-rule: #d8b878;
  --held-accent: #6b57d6;
  --live-accent: #0d1017;
  --warn-wash: rgba(224, 160, 58, 0.16);

  --scrim: rgba(13, 16, 23, 0.4);
  --thumb: #c8cedb;
  --thumb-hover: #a9b2c2;
  --rule-hover: #b6bece;
  --panel-3: #e4e7ee;
}
