/* Light/dark theme. Dark = each page's own :root; light overrides below. Toggle: theme.js */
html[data-theme="light"]{color-scheme:light;--bg:#f8fafc;--card:#ffffff;--card2:#f1f5f9;--border:#cbd5e1;--text:#0f172a;--muted:#475569;--accent:#b91c1c;--accent2:#b45309;--accent3:#1d4ed8;--accent4:#047857;--accent5:#6d28d9;--glow:rgba(220,38,38,.08);--chart-grid:#e2e8f0}
html[data-theme="light"]{--body:#334155;--rk-green:#047857;--rk-green2:#15803d;--rk-amber:#92400e;--rk-orange:#c2410c;--rk-red:#b91c1c;--rk-yellow:#854d0e;--rk-blue:#1d4ed8}
html[data-theme="dark"]{color-scheme:dark;--muted:#8b9bb1;--accent3:#60a5fa}
html[data-theme="dark"] .cta:not(.cta-red),html[data-theme="dark"] .cf-btn,html[data-theme="dark"] .newsletter-form button{background:#2563eb;color:#fff}
html[data-theme="dark"] .cta-red{background:#dc2626;color:#fff}
html[data-theme="light"] a:hover{color:#1e3a8a}
html[data-theme="light"] h2{color:var(--text)}
html[data-theme="light"] h3{color:#1e293b}
html[data-theme="light"] code,html[data-theme="light"] pre{color:#4338ca}
html[data-theme="light"] .tag-green{color:#047857}
html[data-theme="light"] .tag-yellow{color:#92400e}
html[data-theme="light"] .tag-red{color:#b91c1c}
html[data-theme="light"] .cta,html[data-theme="light"] .cta:hover{color:#fff}
html[data-theme="light"] .cta{background:#1d4ed8}
html[data-theme="light"] .cta-red{background:#dc2626}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{color:var(--text)}
html[data-theme="light"] ::placeholder{color:#64748b}
/* toggle button */
.theme-toggle{position:fixed;bottom:1rem;right:1rem;z-index:1000;width:40px;height:40px;border-radius:50%;border:1px solid var(--border,#cbd5e1);background:var(--card,#fff);color:var(--text,#111);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:1.15rem;line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.theme-toggle:hover{border-color:var(--accent3,#3b82f6)}
.theme-toggle:focus-visible{outline:2px solid var(--accent3,#3b82f6);outline-offset:2px}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .i-sun{display:none}
html[data-theme="light"] .theme-toggle .i-moon{display:none}
html[data-theme="light"] .theme-toggle .i-sun{display:block}
html[data-theme="dark"] .theme-toggle .i-sun{display:none}
html[data-theme="dark"] .tag-retail{color:#a78bfa}
/* inline SVG text (Global Impact map) */
html[data-theme="light"] svg text[fill="#10b981"]{fill:#047857}
html[data-theme="light"] svg text[fill="#3b82f6"]{fill:#1d4ed8}
html[data-theme="light"] svg text[fill="#64748b"]{fill:#475569}
html[data-theme="light"] svg text[fill="#8b5cf6"]{fill:#6d28d9}
html[data-theme="light"] svg text[fill="#ef4444"]{fill:#b91c1c}
html[data-theme="light"] svg text[fill="#f59e0b"]{fill:#92400e}
html[data-theme="dark"] svg text[fill="#64748b"]{fill:#8b9bb1}
html[data-theme="dark"] .email-form button{background:#2563eb;color:#fff}
html[data-theme="dark"] .email-form button:hover{background:#1d4ed8}
/* a11y: input border >=3:1 on light (WCAG 1.4.11) */
html[data-theme="light"] .email-form input,html[data-theme="light"] input[type="email"],html[data-theme="light"] input[type="text"],html[data-theme="light"] textarea,html[data-theme="light"] select{border-color:#64748b}
html[data-theme="light"] .email-form input:focus{border-color:var(--accent3)}
