/* Both palettes for every page. theme.js sets data-theme on <html> before
   first paint: the saved choice, else the OS preference. Without JS the page
   stays dark.

   Light is tuned for projectors, which wash out mid-greys and pale tints:
   near-black text, a muted grey that stays readable, borders dark enough to
   survive the throw, and market candles as solid green/red with white arrows. */
:root{
  color-scheme: dark;
  --bg:#08090b; --panel:#0e1013; --panel-2:#12151a; --line:#1c2026; --chip:#151920;
  --fg:#e6e9ee; --soft:#7d8697; --lede:#aab3c0;
  --up:#3ddc84; --down:#ff5f56; --warn:#ffcc66; --acc:#6aa9ff;

  /* tint = chip background, soft = pill background, edge = border,
     solid = the market's own candle */
  --up-tint:rgba(61,220,132,.08);  --up-soft:rgba(61,220,132,.17);  --up-edge:rgba(61,220,132,.45);
  --up-solid:rgba(61,220,132,.28); --up-solid-edge:rgba(61,220,132,.6); --up-solid-fg:#bdf5d6;
  --down-tint:rgba(255,95,86,.08); --down-soft:rgba(255,95,86,.15); --down-edge:rgba(255,95,86,.42);
  --down-solid:rgba(255,95,86,.26); --down-solid-edge:rgba(255,95,86,.6); --down-solid-fg:#ffd2cf;
  --warn-tint:rgba(255,204,102,.04); --warn-soft:rgba(255,204,102,.14); --warn-edge:rgba(255,204,102,.4);
  --warn-hover:rgba(255,204,102,.1); --warn-chip:rgba(255,204,102,.08);
  --acc-tint:rgba(106,169,255,.08); --acc-edge:rgba(106,169,255,.35);
  --chip-up-edge:rgba(61,220,132,.35); --chip-down-edge:rgba(255,95,86,.35); --chip-warn-edge:rgba(255,204,102,.35);
  --bar-up:rgba(61,220,132,.55); --bar-down:rgba(255,95,86,.5);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

:root[data-theme="light"]{
  color-scheme: light;
  --bg:#f3f2ee; --panel:#ffffff; --panel-2:#eceae4; --line:#b9bec7; --chip:#eef0f3;
  --fg:#0b0d10; --soft:#3f4756; --lede:#262c36;
  --up:#067a36; --down:#c4241c; --warn:#8a4b00; --acc:#1446c4;

  --up-tint:#e3f5ea;  --up-soft:#d2f0dd;  --up-edge:#067a36;
  --up-solid:#0b8a3f; --up-solid-edge:#066b30; --up-solid-fg:#ffffff;
  --down-tint:#fbe6e4; --down-soft:#f9d8d5; --down-edge:#c4241c;
  --down-solid:#d42a21; --down-solid-edge:#a51b14; --down-solid-fg:#ffffff;
  --warn-tint:#fdf3dc; --warn-soft:#fde7b0; --warn-edge:#b8700a;
  --warn-hover:#fbe3a6; --warn-chip:#fdf0cf;
  --acc-tint:#e5ecfb; --acc-edge:#1446c4;
  --chip-up-edge:#067a36; --chip-down-edge:#c4241c; --chip-warn-edge:#b8700a;
  --bar-up:#0b8a3f; --bar-down:#d42a21;
}

.theme-toggle{font:inherit;font-size:12px;color:var(--soft);background:transparent;border:1px solid var(--line);
  border-radius:7px;padding:4px 9px;cursor:pointer;line-height:1.3}
.theme-toggle:hover{color:var(--fg);border-color:var(--soft)}
