/* Appearance tokens (spec 0106 D-23): the day/night theme x style colours and fonts,
   shared by the dashboard (index.html) and the profile (profile/index.html), so a style looks
   the same on every page. Component rules of one page stay in that page. */
/* Hover menus and pop-up windows: a shade off the panels in every style and theme (spec 0106 D-6). */
:root { --popup-bg: color-mix(in srgb, var(--surface) 92%, var(--text) 8%); }
:root {
  --bg: #070a0f; --surface: #0d1117; --elevated: #131922; --border: #1e2d3d; --border-hover: #2a3f56;
  --text: #e8ecf1; --text-secondary: #8b9db8; --text-muted: #6e85a3;
  --accent-green: #00d084; --accent-green-dim: rgba(0,208,132,0.12);
  --accent-red: #ff4757; --accent-red-dim: rgba(255,71,87,0.12);
  --accent-blue: #4facfe; --accent-blue-dim: rgba(79,172,254,0.12);
  --accent-yellow: #ffa502; --accent-purple: #a855f7; --accent-cyan: #22d3ee;
  --font-sans: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace;
}

/* ---------- Appearance: day/night theme × style (spec 0106) ----------
   Theme sets the neutrals and accent colours for a dark or white background.
   Style sets fonts, shape and accent hues. "Neon" (dark) is the original look. */
:root {
  color-scheme: dark;
  --accent-blue-line: rgba(79,172,254,0.28);
  --accent-yellow-dim: rgba(255,165,2,0.12);
  --accent-purple-dim: rgba(168,85,247,0.14);
  --mon-orange: #ff9f43;
  --on-green: #000;
  --line-sel: #b18cff; --on-line-sel: #12002e;
  --tag-bg: rgba(19,25,34,0.72);
  --font-display: var(--font-sans);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6; --surface: #ffffff; --elevated: #eceff3; --border: #d6dbe2; --border-hover: #b3bdc9;
  --text: #111821; --text-secondary: #4a5566; --text-muted: #626c7b;
  --accent-green: #067a4a; --accent-green-dim: rgba(6,122,74,0.11);
  --accent-red: #bd2433; --accent-red-dim: rgba(189,36,51,0.10);
  --accent-blue: #1d6ae5; --accent-blue-dim: rgba(29,106,229,0.10); --accent-blue-line: rgba(29,106,229,0.30);
  --accent-yellow: #a96500; --accent-yellow-dim: rgba(169,101,0,0.12);
  --accent-purple: #7c3aed; --accent-purple-dim: rgba(124,58,237,0.12); --accent-cyan: #0e7490;
  --on-green: #fff;
  --line-sel: #6d28d9; --on-line-sel: #fff;
  --tag-bg: rgba(255,255,255,0.88);
  --mon-orange: #c2620a;
}

/* Terminal: financial-terminal feel. IBM Plex, square corners, amber as the
   primary accent, flat surfaces, no glow. */
:root[data-style="terminal"] {
  --font-sans: 'IBM Plex Sans', sans-serif; --font-mono: 'IBM Plex Mono', monospace; --font-display: 'IBM Plex Sans', sans-serif;
  --bg: #0a0b0d; --surface: #111317; --elevated: #181b20; --border: #262a31; --border-hover: #3b414b;
  --text: #d9dce1; --text-secondary: #9aa2ad; --text-muted: #7d8590;
  --accent-green: #3fb950; --accent-green-dim: rgba(63,185,80,0.12);
  --accent-red: #f0524f; --accent-red-dim: rgba(240,82,79,0.12);
  --accent-blue: #e9a23b; --accent-blue-dim: rgba(233,162,59,0.12); --accent-blue-line: rgba(233,162,59,0.35);
  --accent-yellow: #e9a23b; --accent-purple: #b392f0; --accent-cyan: #56b6c2;
}
:root[data-style="terminal"][data-theme="light"] {
  --bg: #f2f0eb; --surface: #fbfaf7; --elevated: #ebe8e1; --border: #d7d2c7; --border-hover: #b5ae9f;
  --text: #1c1b19; --text-secondary: #55524b; --text-muted: #6a6762;
  --accent-green: #1a7f37; --accent-green-dim: rgba(26,127,55,0.11);
  --accent-red: #c62828; --accent-red-dim: rgba(198,40,40,0.10);
  --accent-blue: #a35d00; --accent-blue-dim: rgba(163,93,0,0.11); --accent-blue-line: rgba(163,93,0,0.35);
  --accent-yellow: #a35d00;
}
:root[data-style="terminal"] body { font-size: 12.5px; }
:root[data-style="terminal"] *:not(.status-dot):not(.spinner) { border-radius: 2px !important; }

/* Poster: neo-brutalist. Thick ink outlines, hard offset shadows, a solid colour
   strip per panel, extra-bold Archivo with Space Mono numbers, buttons that press
   in. Cream paper by day, near-black by night. Buy/sell stay plainly green/red. */
:root[data-style="poster"] {
  --font-sans: 'Archivo', sans-serif; --font-mono: 'Space Mono', monospace; --font-display: 'Archivo', sans-serif;
  --bg: #121212; --surface: #1b1b1b; --elevated: #262626; --border: #efe9dc; --border-hover: #ffffff;
  --text: #f6f1e5; --text-secondary: #d3ccbd; --text-muted: #a39b8a;
  --ink: #efe9dc;
  --accent-green: #2ee86b; --accent-green-dim: rgba(46,232,107,0.18);
  --accent-red: #ff4d6d; --accent-red-dim: rgba(255,77,109,0.18);
  --accent-blue: #ffd60a; --accent-blue-dim: rgba(255,214,10,0.16); --accent-blue-line: #ffd60a;
  --accent-yellow: #ffd60a; --accent-purple: #c49bff; --accent-cyan: #3de0ff;
  --strip-header: #ffd60a; --strip-markets: #ff5fa2; --strip-detail: #3de0ff; --strip-trade: #a3f75b; --strip-account: #c49bff;
  --on-strip: #111; --on-green: #111;
  --tag-bg: rgba(18,18,18,0.92);
}
:root[data-style="poster"][data-theme="light"] {
  --bg: #fff3d6; --surface: #fffcf2; --elevated: #ffeab3; --border: #111; --border-hover: #000;
  --text: #111; --text-secondary: #333; --text-muted: #5e5747;
  --ink: #111;
  --accent-green: #007f3d; --accent-green-dim: rgba(0,127,61,0.14);
  --accent-red: #c8102e; --accent-red-dim: rgba(200,16,46,0.12);
  --accent-blue: #2742ff; --accent-blue-dim: rgba(39,66,255,0.12); --accent-blue-line: #2742ff;
  --accent-yellow: #b38600; --accent-purple: #7b2ff7; --accent-cyan: #0091b3;
  --strip-header: #ffd60a; --strip-markets: #ff7eb6; --strip-detail: #5ce1ff; --strip-trade: #b6f36b; --strip-account: #d5b8ff;
  --on-green: #fff;  /* white on the darker green: readable at button size */
  --tag-bg: rgba(255,252,242,0.95);
}
:root[data-style="poster"] body { font-weight: 500; }
:root[data-style="poster"] *:not(.status-dot):not(.spinner) { border-radius: 0 !important; }

/* Header size (spec 0106 D-26): the same height and button size on every page; Large in Settings. */
:root { --hdr-h: 28px; --hdr-btn-h: 20px; --hdr-btn-font: 10px; --hdr-btn-pad: 8px; --hdr-logo: 20px; --hdr-logo-font: 15px; }
:root[data-header="large"] { --hdr-h: 40px; --hdr-btn-h: 28px; --hdr-btn-font: 13px; --hdr-btn-pad: 12px; --hdr-logo: 22px; --hdr-logo-font: 17px; }
