/* ── Campaign colour palette ─────────────────────────────────────────────────
   LACJA        Plum 500        #AF52A7
   Camp Lejeune Aquamarine 500  #2285A0
   Roundup      Goldenrod 500   #C59F4A
   AFFF         Raspberry 500   #B54154
   Paraquat     Sage 500        #6CA681

   Signal palette (MOIC / sentiment)
   Sage 100 / 500 / 700   #D1E8DB / #6CA681 / #326949
   Goldenrod 100 / 700    #F7EFC6 / #7D522B
   Raspberry 100 / 700    #F0D1D3 / #852C40
── */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #f7f9fc;
  color: #1D293D;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.dark { background: #0f1117; color: #e2e8f0; }

/* ── Nav bar ──────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 32px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
body.dark .nav { background: #0d1018; border-color: #1e2535; }
.nav a { font-size: 12px; color: #4299e1; text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.page-title { font-size: 24px; line-height: 32px; font-weight: 600; color: #1D293D; letter-spacing: -0.01em; }
body.dark .page-title { color: #e2e8f0; }

.header-right { display: flex; align-items: center; gap: 16px; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #718096; }
.breadcrumb a { color: #4299e1; text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #cbd5e0; }
.breadcrumb .crumb-active { color: #1a202c; font-weight: 600; }
body.dark .breadcrumb .crumb-active { color: #e2e8f0; }
body.dark .breadcrumb .sep { color: #4a5568; }

/* Theme toggle */
.theme-btn {
  display: flex; align-items: center; gap: 6px;
  background: #f0f4f8; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 6px 12px; cursor: pointer; font-size: 12px; font-weight: 600;
  color: #4a5568; transition: all 0.15s; white-space: nowrap;
}
.theme-btn:hover { background: #e2e8f0; }
.theme-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
body.dark .theme-btn { background: #1a1d2e; border-color: #2d3748; color: #a0aec0; }
body.dark .theme-btn:hover { background: #2d3748; }

/* ── Page body ────────────────────────────────────────────────────────────── */
.page { padding: 28px 32px; max-width: 2000px; margin: 0 auto; }

.section { margin-bottom: 32px; }
.section-label { font-size: 20px; line-height: 30px; font-weight: 500; color: #1D293D; margin-bottom: 14px; }
body.dark .section-label { color: #e2e8f0; }

/* ── KPI strip ────────────────────────────────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px;
}
@media (max-width: 1400px) { .kpi-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .kpi-strip { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 24px;
}
body.dark .kpi-card { background: #1a1d2e; border-color: #2d3748; }

.kpi-label {
  font-size: 14px; line-height: 20px; font-weight: 500;
  color: #62748E; margin-bottom: 6px;
}
.kpi-value          { font-size: 30px; line-height: 38px; font-weight: 700; color: #1D293D; }
.kpi-value.neg      { color: #B54154; }
.kpi-value.sage     { color: #6CA681; }
.kpi-value.goldenrod{ color: #C59F4A; }
.kpi-value.raspberry{ color: #B54154; }
.kpi-sub { font-size: 14px; line-height: 20px; font-weight: 400; color: #62748E; margin-top: 4px; }
body.dark .kpi-value            { color: #e2e8f0; }
body.dark .kpi-value.neg        { color: #fc8181; }
body.dark .kpi-value.sage       { color: #6CA681; }
body.dark .kpi-value.goldenrod  { color: #C59F4A; }
body.dark .kpi-value.raspberry  { color: #B54154; }

/* ── Chart row & panel ────────────────────────────────────────────────────── */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .chart-row { grid-template-columns: 1fr; } }

.chart-panel {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px;
}
body.dark .chart-panel { background: #1a1d2e; border-color: #2d3748; }

.chart-title {
  font-size: 20px !important; line-height: 28px !important; font-weight: 500 !important;
  color: #1D293D !important; margin-bottom: 2px !important;
}
body.dark .chart-title { color: #e2e8f0 !important; }
