/* Recession.Today — Theme toggle + LIGHT palette (Warm Paper)
   Loaded on all public pages AFTER the page CSS.
   Dark stays the default (charcoal/ivory); light inverts to warm paper. */

/* ── Toggle button ─────────────────────────────────────── */
.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 16px; line-height: 1; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s, transform .2s;
}
.theme-toggle:hover { color: var(--signal); transform: translateY(-1px); }

/* ── Light palette ─────────────────────────────────────── */
[data-theme="light"] {
  --bg: #F5F1E8;
  --bg-2: #EDE8DC;
  --surface: #FFFFFF;
  --surface-2: #FBF9F3;
  --border: rgba(16, 16, 14, 0.14);
  --text: #1B1A16;
  --muted: #6E6A5F;
  --muted2: #8A857A;
  --earth: #26251F;
  --signal: #B35C22;
  --accent: #B35C22;
  --accent2: #C9762F;
  --accent-dim: rgba(179, 92, 34, 0.10);
  --warning: #9A4526;
  --stress: #8A2F2F;
  /* base.css (dashboard) names — keep warm if both loaded */
  --bg-card: #FFFFFF;
  --bg-raised: #FBF9F3;
  --border-dim: #EDE8DC;
  --text-dim: #5F5B52;
  --text-muted: #77736A;
  --green: #2E7D5B;  --green-dim: rgba(46, 125, 91, 0.12);
  --amber: #9A6512;  --amber-dim: rgba(154, 101, 18, 0.12);
  --orange: #B35C22;
  --red: #8A2F2F;    --red-dim: rgba(138, 47, 47, 0.12);
}

[data-theme="light"] body { background: var(--bg); color: var(--text); }

/* landing-concept hardcoded values */
[data-theme="light"] .site-header { background: rgba(245, 241, 232, 0.85); }
[data-theme="light"] .brand-mark { color: #F5F1E8; }
[data-theme="light"] .button.primary { color: #F5F1E8; }
[data-theme="light"] .cc-cta { color: #F5F1E8 !important; }
[data-theme="light"] .plan li small,
[data-theme="light"] .cc-source,
[data-theme="light"] .earth-loading small { color: #8A857A; }
[data-theme="light"] .ana-bar,
[data-theme="light"] .hist-bar { background: rgba(16, 16, 14, 0.08); }
[data-theme="light"] .button.secondary { background: rgba(16, 16, 14, 0.03); }
[data-theme="light"] .regime-track div:hover { background: rgba(16, 16, 14, 0.05); }
[data-theme="light"] .earth-loading { background: rgba(245, 241, 232, 0.7); }
[data-theme="light"] .plan li,
[data-theme="light"] .val-card li { border-color: rgba(16, 16, 14, 0.08); }

/* country card / tooltip: hardcoded dark bg -> light surface */
[data-theme="light"] .country-card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(212, 122, 58, 0.5);
  box-shadow: 0 16px 50px rgba(16, 16, 14, 0.18);
}
[data-theme="light"] .country-tooltip {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(212, 122, 58, 0.45);
  box-shadow: 0 12px 40px rgba(16, 16, 14, 0.18);
}

/* form inputs: hardcoded dark bg -> light surface */
[data-theme="light"] .inp {
  background: #FFFFFF;
  border-color: rgba(16, 16, 14, 0.18);
}
[data-theme="light"] .inp::placeholder { color: #9a948a; }

/* elements whose background is var(--earth)/var(--signal) (dark in light mode) need light text */
[data-theme="light"] .brand-mark,
[data-theme="light"] .nav-cta,
[data-theme="light"] .button.primary,
[data-theme="light"] .cc-cta,
[data-theme="light"] .auth-btn,
[data-theme="light"] .cta-btn,
[data-theme="light"] .plan-badge,
[data-theme="light"] .plan-btn-primary,
[data-theme="light"] .plan-btn-pro { color: #F5F1E8 !important; }
[data-theme="light"] .plan-btn-pro:hover { color: #F5F1E8 !important; }
