/* AP Predictions Terminal — theme tokens (09-26, auditor pass 09-27). ONE palette for every page: the dark values are the colours the
   pages carried before 09-26 (dark is the original look — the only deliberate dark changes are the live game-state chip on the board,
   whose old white-on-red pill fill was a 2:1 pair, and a handful of near-identical greys / alpha merges listed in the commit), the light
   values are the light theme. theme.js sets <html data-theme="dark|light"> before the page's own stylesheet loads (auto = sunrise →
   sunset of the browser's time zone). Roles, not colours: a page never writes a hex. Each page repeats the dark block at zero
   specificity (:where(:root), regenerated by scripts/theme-fallback.js) so a page copied without this file still has colours. */
:root, :root[data-theme="dark"] {
  /* surfaces */
  --bg:#0a0e14; --panel:#11161f; --panel2:#151c28; --panel3:#0d1219; --card:#0b1526; --row:#0e131c; --row2:#161d2a;
  --border:#222b3a; --border2:#334155; --btn:#1e293b; --btn2:#0f172a;
  --hover:rgba(148,163,184,.10); --hover2:rgba(148,163,184,.07); --hover3:rgba(148,163,184,.14);
  --overlay:rgba(4,6,10,.7); --shadow:rgba(0,0,0,.6); --shadow2:rgba(0,0,0,.8); --panel-a:rgba(17,22,31,.93); --bg-a:rgba(10,14,20,.95);
  /* text */
  --text:#e6edf3; --text-bright:#f1f5f9; --muted:#8b9bb4; --dim:#5c6b84; --dim2:#3c485e; --on-color:#fff;
  /* accent (amber) */
  --accent:#F59E0B; --accent-soft:#7c2d12; --accent-soft2:#92400e; --accent-deep:#78350f; --hl-amber:#7c2d12;
  --accent-text1:#fde68a; --accent-text2:#fcd34d; --accent-text3:#fbbf24;
  --accent-bg:rgba(245,158,11,.20); --accent-bg2:#451a03; --accent-line:rgba(245,158,11,.35); --dry-bg:#7c5c0b; --dry-text:#ffe9be;
  --accent-fill:#F59E0B; --on-accent-fill:#0a0e14;
  /* green (positive / YES / bid / won) */
  --green:#22c55e; --green2:#34d399; --green-soft:#14532d; --green-soft2:#0f5132; --green-bg:rgba(34,197,94,.15); --green-panel:#0a1a12; --fill-ok:#14532d;
  /* red (negative / NO / ask / lost / danger) */
  --red:#ef4444; --red-soft:#7f1d1d; --red-text2:#fca5a5; --red-text3:#f87171; --red-text-soft:rgba(252,165,165,.75);
  --red-bg:rgba(239,68,68,.10); --red-bg2:rgba(239,68,68,.18); --red-bg3:rgba(239,68,68,.12); --live-bg:rgba(239,68,68,.16);
  --fill-bad:#7f1d1d; --fill-neutral:#374151;
  /* blue (positions / info) */
  --blue:#60a5fa; --blue2:#3b82f6; --blue-soft:#1e3a8a; --blue-text1:#dbeafe; --blue-text2:#93c5fd; --blue-bg:rgba(59,130,246,.14); --blue-bg2:rgba(59,130,246,.09);
  /* purple (Poly US) */
  --purple:#c084fc; --purple-text2:#a78bfa; --purple-text3:#c4b5fd; --purple-dim:#8b7bb8; --purple-soft:#4c1d95; --purple-bg:rgba(167,139,250,.16); --purple-bg2:rgba(167,139,250,.10); --purple-panel:#120e22;
  --yellow:#eab308; --cyan:#0e7490; --cyan-text:#22d3ee;
  /* depth bars behind the order-book ladders */
  --depth-bid:#22c55e; --depth-ask:#ef4444; --depth-op:.13;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:#f1f4f8; --panel:#ffffff; --panel2:#e9edf3; --panel3:#f6f8fb; --card:#ffffff; --row:#f8fafc; --row2:#e4e9f0;
  --border:#d3dae4; --border2:#c3ccd8; --btn:#e2e8f0; --btn2:#eef2f7;
  --hover:rgba(15,23,42,.06); --hover2:rgba(15,23,42,.04); --hover3:rgba(15,23,42,.09);
  --overlay:rgba(15,23,42,.42); --shadow:rgba(15,23,42,.18); --shadow2:rgba(15,23,42,.28); --panel-a:rgba(255,255,255,.94); --bg-a:rgba(238,241,245,.96);
  --text:#0f172a; --text-bright:#020617; --muted:#4a5a72; --dim:#74829a; --dim2:#aeb8c6; --on-color:#fff;
  --accent:#8f5500; --accent-soft:#fcd34d; --accent-soft2:#f59e0b; --accent-deep:#fde68a; --hl-amber:#f59e0b;
  --accent-text1:#78350f; --accent-text2:#7a4700; --accent-text3:#8f5500;
  --accent-bg:rgba(245,158,11,.18); --accent-bg2:#fef3c7; --accent-line:rgba(180,83,9,.45); --dry-bg:#fde68a; --dry-text:#78350f;
  --accent-fill:#f59e0b; --on-accent-fill:#1a1000;   /* an amber FILL stays amber in light; dark text on it (8.7:1) */
  --green:#12753a; --green2:#047857; --green-soft:#86efac; --green-soft2:#6ee7b7; --green-bg:rgba(22,101,52,.12); --green-panel:#ecfdf5; --fill-ok:#166534;
  --red:#b91c1c; --red-soft:#fca5a5; --red-text2:#b91c1c; --red-text3:#b91c1c; --red-text-soft:#b91c1c;
  --red-bg:rgba(220,38,38,.08); --red-bg2:rgba(220,38,38,.14); --red-bg3:rgba(220,38,38,.10); --live-bg:rgba(220,38,38,.12);
  --fill-bad:#b91c1c; --fill-neutral:#64748b;
  --blue:#1d4ed8; --blue2:#1d4ed8; --blue-soft:#93c5fd; --blue-text1:#1e3a8a; --blue-text2:#1e40af; --blue-bg:rgba(37,99,235,.10); --blue-bg2:rgba(37,99,235,.07);
  --purple:#7e22ce; --purple-text2:#6d28d9; --purple-text3:#6d28d9; --purple-dim:#6d28d9; --purple-soft:#c4b5fd; --purple-bg:rgba(109,40,217,.10); --purple-bg2:rgba(109,40,217,.07); --purple-panel:#f4f0fc;
  --yellow:#854d0e; --cyan:#5fb3c6; --cyan-text:#0e7490;
  --depth-bid:#16a34a; --depth-ask:#dc2626; --depth-op:.18;
}
/* rules that were written for a dark surface */
:root[data-theme="light"] .gs .gs-btn:hover, :root[data-theme="light"] .submitbtn:hover, :root[data-theme="light"] .mbtn:hover { filter:brightness(.94); }
:root[data-theme="light"] .game, :root[data-theme="light"] .mbox, :root[data-theme="light"] .hcard { box-shadow:0 1px 2px rgba(15,23,42,.06); }
:root[data-theme="light"] .hcard { background:var(--panel); }              /* the panel2 → panel gradient reads inverted on white */
:root[data-theme="light"] #dpos { background:var(--panel3); }              /* the drawer's position strip: a lighter band, not a grey one */
:root[data-theme="light"] .pin.near { opacity:.8; }                        /* faded amber fades further on white — keep the pins readable */
:root[data-theme="light"] .pin-u { opacity:.9; }
:root[data-theme="light"] .pin.stale { opacity:.65; }
:root[data-theme="light"] .submitbtn:disabled { opacity:.6; }
/* the theme control (theme.js renders it into every .themectl): Auto ☾ · ☀ · ☾ — the Auto glyph shows what auto resolves to right now */
.themectl { display:inline-flex; align-items:center; }
.tseg { display:inline-flex; border:1px solid var(--border); border-radius:999px; overflow:hidden; background:var(--panel); }
.tseg button { background:transparent; color:var(--muted); border:0; padding:4px 10px; min-width:30px; cursor:pointer; font:inherit; font-size:12px; line-height:1.3; }
.tseg button + button { border-left:1px solid var(--border); }
.tseg button:hover { color:var(--text); background:var(--hover); }
.tseg button[aria-pressed="true"] { background:var(--btn); color:var(--text); font-weight:700; box-shadow:inset 0 0 0 1px var(--border2); }
.tseg .tglyph { display:inline-block; width:1.15em; text-align:center; }
.tseg button[aria-pressed="false"] .tglyph { opacity:.55; }
