/* GovGreed display modes: light theme, comfortable text size, .gg-keep-dark, entry-path targets.
   Imported by theme.css; loaded directly by api/politician-render.mjs. See theme.css for the dark tokens. */

/* ── Light theme (PLAN-ASK-GOVGREED-2026-11.md 1.1) ──
   Set by gg-prefs.js on entry-path pages only (<html data-theme="light">). Contrast on
   --bg #f6f7f9: text 13.6:1, text-dim 7.1:1, every accent >= 4.8:1 (and white on the
   accent >= 5.4:1, so filled buttons use --on-accent #fff here). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:       #f6f7f9;
  --surface:  #ffffff;
  --surface2: #eef1f5;
  --border:   #cfd8e3;

  --green:        #086b3d;
  --green-dim:    rgba(8, 107, 61, 0.08);
  --green-border: rgba(8, 107, 61, 0.30);
  --red:    #c0163f;
  --blue:   #005fa8;
  --amber:  #8a5a00;
  --orange: #a84b00;
  --purple: #7a2fc7;
  --cyan:   #00727e;

  --text:        #1f2a37;
  --text-dim:    #4a5565;
  --text-bright: #0b1520;

  --fg-rgb:       11,21,32;
  --bg-rgb:       246,247,249;
  --surface-rgb:  255,255,255;
  --surface2-rgb: 238,241,245;
  --text-rgb:     31,42,55;
  --border-rgb:   207,216,227;
  --green-rgb:    8,107,61;
  --blue-rgb:     0,95,168;
  --red-rgb:      192,22,63;
  --amber-rgb:    138,90,0;
  --purple-rgb:   122,47,199;
  --orange-rgb:   168,75,0;
  --on-accent:    #ffffff;
  --shade-rgb:    226,231,238;

  --shadow-sm: 0 1px 2px rgba(11,21,32,0.08);
  --shadow-md: 0 4px 12px rgba(11,21,32,0.08), 0 1px 3px rgba(11,21,32,0.06);
  --shadow-lg: 0 8px 24px rgba(11,21,32,0.10), 0 4px 8px rgba(11,21,32,0.06);
  --glow-green: none; --glow-blue: none; --glow-cyan: none; --glow-purple: none; --glow-amber: none;

  --tier-S-fg:  var(--green);
  --tier-A-fg:  #6b21a8;
  --tier-F-fg:  var(--text-dim);
  --hairline:   1px solid rgba(207, 216, 227, 0.9);
  --comparison-baseline: rgba(31, 42, 55, 0.05);
}
:root[data-theme="light"] {
  /* Off-palette shades from scripts/entry_path_tokenize.py (LIGHT map). */
  --lt-f87171: #c0163f;
  --lt-ff6b8a: #c0163f;
  --lt-ff5c7c: #c0163f;
  --lt-ef4444: #b91c1c;
  --lt-ff4477: #c0163f;
  --lt-ff8ca3: #c0163f;
  --lt-ffb3c4: #9f1239;
  --lt-e02040: #b0122f;
  --lt-60a5fa: #005fa8;
  --lt-0099ff: #005fa8;
  --lt-3b82f6: #1d4ed8;
  --lt-2a9fff: #005fa8;
  --lt-00d4ff: #00727e;
  --lt-a78bfa: #6b21a8;
  --lt-c084fc: #6b21a8;
  --lt-6e40c9: #5b21b6;
  --lt-34d399: #0a7a45;
  --lt-22c55e: #0a7a45;
  --lt-00ff8a: #0a7a45;
  --lt-00e88a: #0a7a45;
  --lt-00ff88: #0a7a45;
  --lt-00ff99: #0a7a45;
  --lt-00b85e: #086a3c;
  --lt-f59e0b: #8a5a00;
  --lt-fcd34d: #8a5a00;
  --lt-f5bf24: #8a5a00;
  --lt-f97316: #a84b00;
  --lt-e09a6a: #9a4a12;
  --lt-4a6070: #4a5565;
  --lt-3a5068: #4a5565;
  --lt-2a3a4a: #4a5565;
  --lt-2a3f56: #4a5565;
  --lt-5a7080: #4a5565;
  --lt-a0b4c8: #3e4a59;
  --lt-cdd9e6: #1f2a37;
  --lt-e6edf5: #0b1520;
  --lt-e7e9ea: #1f2a37;
  --lt-d0dde9: #1f2a37;
  --lt-0b1119: #ffffff;
  --lt-0a0d12: #ffffff;
  --lt-06080c: #f6f7f9;
  --lt-0a1018: #ffffff;
  --lt-0a1220: #ffffff;
  --lt-16181c: #eef1f5;
  --lt-0f1724: #ffffff;
}
/* Dark theme on the entry path: the old design's dim greys (2.2-3:1 on --bg) are lifted to
   --text-dim (4.6:1). Only entry-path pages carry data-theme, so other pages are unchanged. */
:root[data-theme="dark"] {
  --lt-4a6070: #8ba0b0; --lt-3a5068: #8ba0b0; --lt-2a3a4a: #8ba0b0; --lt-2a3f56: #8ba0b0; --lt-5a7080: #8ba0b0;
}
/* Sections drawn on a dark photograph keep the dark tokens in the light theme. */
:root[data-theme="light"] .gg-keep-dark {
  color-scheme: dark;
  --bg: #060a0f; --surface: #0d1520; --surface2: #121e2d; --border: #1e3352;
  --green: #00d672; --red: #ff3366; --blue: #00aaff; --amber: #fbbf24; --orange: #ff8c00; --purple: #a855f7; --cyan: #18ffff;
  --green-dim: rgba(0,214,114,0.08); --green-border: rgba(0,214,114,0.20);
  --text: #c8d8e8; --text-dim: #8ba0b0; --text-bright: #eef4fa;
  --fg-rgb: 255,255,255; --bg-rgb: 6,10,15; --surface-rgb: 13,21,32; --surface2-rgb: 18,30,45; --text-rgb: 200,216,232;
  --border-rgb: 30,51,82; --green-rgb: 0,214,114; --blue-rgb: 0,170,255; --red-rgb: 255,51,102; --amber-rgb: 251,191,36;
  --purple-rgb: 168,85,247; --orange-rgb: 255,140,0; --on-accent: #000; --shade-rgb: 0,0,0;
  color: var(--text);
}
/* The ticker ribbon tier pills take their colours from JS literals tuned for dark. */
:root[data-theme="light"] .gg-ribbon-tier-pill { filter: brightness(0.5) saturate(1.4); }
:root[data-theme="light"] body {
  background-image: radial-gradient(circle, rgba(11,21,32,0.05) 1px, transparent 1px);
}
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #9aa8b8; }

/* ── Comfortable size (1.2): 18px body, 1.6 line height, nothing under 14px ── */
:root[data-size="large"] {
  --fs-min:  14px;
  --fs-body: 18px;
  --lh-body: 1.6;
}
:root[data-size="large"] body { font-size: var(--fs-body); line-height: var(--lh-body); }


/* ── Entry-path targets (1.5): every button and field at least 44px tall.
   data-size is only ever set on entry-path pages (gg-prefs.js). ── */
:root[data-size] :is(button, select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"])) {
  min-height: 44px;
}
:root[data-size] :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Entry path, both themes: sub-labels the dark design dimmed to 55% opacity fail 4.5:1. */
:root[data-theme] .stat-cell .stat-sub, :root[data-theme] .tr-prop-credit { opacity: 1; }
:root[data-theme] .gg-pw-banner-cta span { opacity: 1 !important; }

/* Phones, entry path (1.5 done-when: no sideways scroll at 320px). Wide tables scroll inside
   their own box instead of the page; chip rows wrap. */
@media (max-width: 600px) {
  :root[data-theme] .tr-table { display: block; max-width: 100%; overflow-x: auto; }
  :root[data-theme] .cw-tablewrap { overflow-x: auto; }
  :root[data-theme] .tr-table-wrap { overflow-x: auto; max-width: 100%; }
  :root[data-theme] .related-grid { grid-template-columns: 1fr !important; }
  :root[data-theme] .related-card { min-width: 0; max-width: 100%; }
  :root[data-theme] .cw-fgroup, :root[data-theme] .chat-mode-toggle { flex-wrap: wrap; }
  :root[data-theme] .chat-mode-btn { flex: 1 1 auto; }
}

/* The pricing island on the homepage has no background of its own (it sat on the dark page), so in
   the light theme its free-standing text (the comparison line under the cards) fell on the light
   page as light-on-light (fix list item 7, 2026-11-14). Give the island its own dark ground. */
:root[data-theme="light"] .pricing-section.gg-keep-dark { background: var(--bg); border-radius: 20px; }
