/**
 * Easy themes for insider-intel UI.
 * Add a theme: copy a [data-theme="…"] block, set --* vars, add option in index.html.
 * Switcher stores choice in localStorage (key: insider-intel-theme).
 *
 * Lookalike themes use system font stacks only (no webfonts) — aimed at the
 * sites named in the option list, not pixel-perfect clones.
 */

:root,
[data-theme="signal"] {
  --ink: #1a2420;
  --muted: #5a6b63;
  --paper: #e8eee9;
  --panel: rgba(244, 248, 245, 0.88);
  --line: rgba(26, 36, 32, 0.12);
  --signal: #c45c26;
  --signal-soft: rgba(196, 92, 38, 0.14);
  --accent: #1f6f63;
  --accent-soft: rgba(31, 111, 99, 0.12);
  --focus: #2a8f7f;
  --btn-fg: #f4f8f5;
  --input-bg: rgba(255, 255, 255, 0.7);
  --side-bg: rgba(255, 255, 255, 0.25);
  --hover: rgba(31, 111, 99, 0.06);
  --brand-glow: transparent;
  --atmosphere:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(31, 111, 99, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(196, 92, 38, 0.12), transparent 50%),
    linear-gradient(165deg, #dfe8e2 0%, #edf2ee 45%, #e4ebe6 100%);
  --scanlines: none;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Georgia, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: -0.03em;
  --brand-transform: none;
  --headline-weight: 600;
  --headline-tracking: -0.01em;
  --headline-transform: none;
  --top-bg: transparent;
  --top-ink: var(--ink);
  --top-muted: var(--muted);
  --top-line: var(--line);
  --top-input-bg: var(--input-bg);
  --top-field-bg: #ffffff;
  --top-field-ink: #1a2420;
  --top-btn-bg: var(--accent);
  --masthead: transparent;
  --masthead-height: 0;
  --radius: 2px;
}

[data-theme="matrix"] {
  --ink: #b6ffb0;
  --muted: #3d8f45;
  --paper: #020805;
  --panel: rgba(0, 20, 8, 0.92);
  --line: rgba(0, 255, 65, 0.18);
  --signal: #39ff14;
  --signal-soft: rgba(57, 255, 20, 0.12);
  --accent: #00ff41;
  --accent-soft: rgba(0, 255, 65, 0.1);
  --focus: #00ff41;
  --btn-fg: #020805;
  --input-bg: rgba(0, 30, 10, 0.85);
  --side-bg: rgba(0, 18, 6, 0.55);
  --hover: rgba(0, 255, 65, 0.08);
  --brand-glow: 0 0 18px rgba(0, 255, 65, 0.35);
  --atmosphere:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(0, 255, 65, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 10%, rgba(0, 180, 40, 0.08), transparent 50%),
    linear-gradient(180deg, #010604 0%, #020805 50%, #000000 100%);
  --scanlines: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  --font-display: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --font-body: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: 0.04em;
  --brand-transform: uppercase;
  --headline-weight: 600;
  --headline-tracking: 0;
  --headline-transform: none;
  --radius: 0;
}

[data-theme="midnight"] {
  --ink: #d8e4f0;
  --muted: #7a8fa3;
  --paper: #0b1220;
  --panel: rgba(14, 24, 40, 0.92);
  --line: rgba(120, 160, 200, 0.16);
  --signal: #5ec8ff;
  --signal-soft: rgba(94, 200, 255, 0.14);
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.14);
  --focus: #5ec8ff;
  --btn-fg: #0b1220;
  --input-bg: rgba(18, 30, 48, 0.9);
  --side-bg: rgba(12, 20, 34, 0.6);
  --hover: rgba(79, 140, 255, 0.1);
  --brand-glow: 0 0 16px rgba(94, 200, 255, 0.25);
  --atmosphere:
    radial-gradient(ellipse 70% 45% at 20% -5%, rgba(79, 140, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 5%, rgba(94, 200, 255, 0.1), transparent 50%),
    linear-gradient(165deg, #0a101c 0%, #0d1524 50%, #080e18 100%);
  --scanlines: none;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: "Segoe UI", Tahoma, Geneva, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: -0.03em;
  --brand-transform: none;
  --headline-weight: 600;
  --headline-tracking: -0.01em;
  --headline-transform: none;
  --radius: 2px;
}

[data-theme="phosphor"] {
  --ink: #ffd27a;
  --muted: #a67c3a;
  --paper: #0c0904;
  --panel: rgba(22, 14, 4, 0.92);
  --line: rgba(255, 176, 0, 0.18);
  --signal: #ffb000;
  --signal-soft: rgba(255, 176, 0, 0.12);
  --accent: #ffcc33;
  --accent-soft: rgba(255, 204, 51, 0.1);
  --focus: #ffb000;
  --btn-fg: #0c0904;
  --input-bg: rgba(28, 18, 4, 0.9);
  --side-bg: rgba(18, 12, 4, 0.55);
  --hover: rgba(255, 176, 0, 0.08);
  --brand-glow: 0 0 16px rgba(255, 176, 0, 0.3);
  --atmosphere:
    radial-gradient(ellipse 65% 40% at 12% 0%, rgba(255, 176, 0, 0.1), transparent 55%),
    linear-gradient(180deg, #100a03 0%, #0c0904 60%, #050402 100%);
  --scanlines: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.2) 2px,
    rgba(0, 0, 0, 0.2) 4px
  );
  --font-display: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --font-body: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: 0.06em;
  --brand-transform: uppercase;
  --headline-weight: 600;
  --headline-tracking: 0;
  --headline-transform: none;
  --radius: 0;
}

/* lite.cnn.com — white page, CNN red, serif headlines, sparse chrome */
[data-theme="cnn-lite"] {
  --ink: #0c0c0c;
  --muted: #555555;
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #cccccc;
  --signal: #cc0000;
  --signal-soft: rgba(204, 0, 0, 0.08);
  --accent: #cc0000;
  --accent-soft: rgba(204, 0, 0, 0.08);
  --focus: #990000;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #f7f7f7;
  --hover: rgba(0, 0, 0, 0.04);
  --brand-glow: transparent;
  --atmosphere: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  --scanlines: none;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Georgia, "Times New Roman", Times, serif;
  --font-mono: "Courier New", Courier, monospace;
  --brand-weight: 700;
  --brand-tracking: -0.02em;
  --brand-transform: none;
  --headline-weight: 700;
  --headline-tracking: -0.015em;
  --headline-transform: none;
  --radius: 0;
}

/* old.reddit.com — blue header band is the real .top, not a viewport strip */
[data-theme="old-reddit"] {
  --ink: #000000;
  --muted: #888888;
  --paper: #edf1f3;
  --panel: #fafafa;
  --line: #c0cbd4;
  --signal: #ff4500;
  --signal-soft: rgba(255, 69, 0, 0.12);
  --accent: #336699;
  --accent-soft: rgba(51, 102, 153, 0.12);
  --focus: #ff4500;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #f0f3f5;
  --hover: rgba(51, 102, 153, 0.08);
  --brand-glow: transparent;
  --atmosphere: #edf1f3;
  --scanlines: none;
  --font-display: Verdana, Geneva, Tahoma, sans-serif;
  --font-body: Verdana, Geneva, Tahoma, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --brand-weight: 700;
  --brand-tracking: 0;
  --brand-transform: none;
  --headline-weight: 700;
  --headline-tracking: 0;
  --headline-transform: none;
  --top-bg: #cee3f8;
  --top-ink: #000000;
  --top-muted: #369;
  --top-line: #5f99cf;
  --top-input-bg: #ffffff;
  --masthead: transparent;
  --masthead-height: 0;
  --radius: 3px;
}

/* feedly.com — cool gray reader, leaf green, soft product UI sans */
[data-theme="feedly"] {
  --ink: #1a1d23;
  --muted: #6b7280;
  --paper: #f0f1f4;
  --panel: #ffffff;
  --line: #e3e5ea;
  --signal: #2bb24c;
  --signal-soft: rgba(43, 178, 76, 0.12);
  --accent: #2bb24c;
  --accent-soft: rgba(43, 178, 76, 0.1);
  --focus: #1f9a3d;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #e8eaef;
  --hover: rgba(43, 178, 76, 0.07);
  --brand-glow: transparent;
  --atmosphere:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(43, 178, 76, 0.07), transparent 55%),
    linear-gradient(180deg, #e9ebf0 0%, #f0f1f4 45%, #e6e8ed 100%);
  --scanlines: none;
  --font-display: "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --brand-weight: 600;
  --brand-tracking: -0.04em;
  --brand-transform: none;
  --headline-weight: 600;
  --headline-tracking: -0.02em;
  --headline-transform: none;
  --radius: 10px;
}

/* finance.yahoo.com — purple nav is the header itself */
[data-theme="yahoo-finance"] {
  --ink: #1b1c1d;
  --muted: #5b616b;
  --paper: #f2f3f5;
  --panel: #ffffff;
  --line: #d8dce3;
  --signal: #6001d2;
  --signal-soft: rgba(96, 1, 210, 0.1);
  --accent: #6001d2;
  --accent-soft: rgba(96, 1, 210, 0.1);
  --focus: #4600a0;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #e9ebef;
  --hover: rgba(96, 1, 210, 0.06);
  --brand-glow: transparent;
  --atmosphere: linear-gradient(180deg, #f2f3f5 0%, #eaecf0 100%);
  --scanlines: none;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
  --brand-weight: 700;
  --brand-tracking: -0.045em;
  --brand-transform: none;
  --headline-weight: 700;
  --headline-tracking: -0.02em;
  --headline-transform: none;
  --top-bg: #6001d2;
  --top-ink: #ffffff;
  --top-muted: rgba(255, 255, 255, 0.78);
  --top-line: rgba(255, 255, 255, 0.35);
  --top-input-bg: rgba(255, 255, 255, 0.14);
  --top-field-bg: #ffffff;
  --top-field-ink: #1b1c1d;
  --top-btn-bg: #ffffff;
  --top-btn-fg: #6001d2;
  --top-pill-active-bg: rgba(255, 255, 255, 0.18);
  --top-pill-active-border: #ffffff;
  --top-pill-active-fg: #ffffff;
  --masthead: transparent;
  --masthead-height: 0;
  --radius: 4px;
}

/* voya.com — navy header band + tangerine accents */
[data-theme="voya"] {
  --ink: #0a1c2e;
  --muted: #5a6f82;
  --paper: #f3f1ec;
  --panel: #fffcf8;
  --line: #d0cbc2;
  --signal: #ff6200;
  --signal-soft: rgba(255, 98, 0, 0.12);
  --accent: #ff6200;
  --accent-soft: rgba(255, 98, 0, 0.1);
  --focus: #c44d00;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #e8e4db;
  --hover: rgba(255, 98, 0, 0.07);
  --brand-glow: transparent;
  --atmosphere: linear-gradient(180deg, #f3f1ec 0%, #ebe6dc 100%);
  --scanlines: none;
  --font-display: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", Calibri, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: 0.01em;
  --brand-transform: none;
  --headline-weight: 700;
  --headline-tracking: 0;
  --headline-transform: none;
  --top-bg: #0a1c2e;
  --top-ink: #ffffff;
  --top-muted: rgba(255, 255, 255, 0.72);
  --top-line: rgba(255, 98, 0, 0.55);
  --top-input-bg: rgba(255, 255, 255, 0.1);
  --top-field-bg: #ffffff;
  --top-field-ink: #0a1c2e;
  --top-btn-bg: #ff6200;
  --top-btn-fg: #ffffff;
  --top-pill-active-bg: rgba(255, 98, 0, 0.22);
  --top-pill-active-border: #ff6200;
  --top-pill-active-fg: #ffb380;
  --masthead: transparent;
  --masthead-height: 0;
  --radius: 2px;
}

/* Dracula palette — editor charcoal, pink/purple accents, mono brand */
[data-theme="dracula"] {
  --ink: #f8f8f2;
  --muted: #6272a4;
  --paper: #282a36;
  --panel: rgba(40, 42, 54, 0.96);
  --line: rgba(98, 114, 164, 0.35);
  --signal: #ff79c6;
  --signal-soft: rgba(255, 121, 198, 0.14);
  --accent: #bd93f9;
  --accent-soft: rgba(189, 147, 249, 0.14);
  --focus: #8be9fd;
  --btn-fg: #282a36;
  --input-bg: rgba(68, 71, 90, 0.85);
  --side-bg: rgba(33, 34, 44, 0.75);
  --hover: rgba(189, 147, 249, 0.1);
  --brand-glow: 0 0 14px rgba(189, 147, 249, 0.28);
  --atmosphere:
    radial-gradient(ellipse 65% 40% at 15% 0%, rgba(189, 147, 249, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 8%, rgba(255, 121, 198, 0.1), transparent 50%),
    linear-gradient(180deg, #21222c 0%, #282a36 50%, #191a21 100%);
  --scanlines: none;
  --font-display: "Cascadia Code", "Fira Mono", "Consolas", "Courier New", monospace;
  --font-body: "Segoe UI", Tahoma, Geneva, sans-serif;
  --font-mono: "Cascadia Code", "Fira Mono", Consolas, monospace;
  --brand-weight: 700;
  --brand-tracking: 0.02em;
  --brand-transform: none;
  --headline-weight: 600;
  --headline-tracking: 0;
  --headline-transform: none;
  --radius: 4px;
}

/* foxnews.com — thin red accent on the real header edge */
[data-theme="fox-news"] {
  --ink: #151515;
  --muted: #5c5c5c;
  --paper: #ffffff;
  --panel: #ffffff;
  --line: #d0d0d0;
  --signal: #e31c23;
  --signal-soft: rgba(227, 28, 35, 0.1);
  --accent: #e31c23;
  --accent-soft: rgba(227, 28, 35, 0.1);
  --focus: #b01016;
  --btn-fg: #ffffff;
  --input-bg: #ffffff;
  --side-bg: #f0f0f0;
  --hover: rgba(227, 28, 35, 0.06);
  --brand-glow: transparent;
  --atmosphere: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
  --scanlines: none;
  --font-display: "Franklin Gothic Medium", "Arial Narrow", Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --font-mono: Consolas, "Courier New", monospace;
  --brand-weight: 800;
  --brand-tracking: 0.06em;
  --brand-transform: uppercase;
  --headline-weight: 700;
  --headline-tracking: 0.01em;
  --headline-transform: none;
  --top-bg: #ffffff;
  --top-ink: #151515;
  --top-muted: #5c5c5c;
  --top-line: #d0d0d0;
  --top-input-bg: #ffffff;
  --masthead: #e31c23;
  --masthead-height: 6px;
  --radius: 0;
}
