/* Phase 3 Batch 23 Patch 6 — unified Atlas theme contract */
.theme-toggle {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 11px;
  border:1px solid var(--line, rgba(255,255,255,.12));border-radius:999px;background:transparent;color:inherit;
  font:inherit;font-size:.82rem;font-weight:750;cursor:pointer;white-space:nowrap;
}
.theme-toggle:hover,.theme-toggle:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(15,143,136,.18)}
.theme-toggle-icon{font-size:1rem;line-height:1}.landing-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* Main/shared application: existing light design remains canonical; dark mode overrides it. */
html[data-theme="dark"] body:not(.landing-body){--ink:#e9f2f7;--muted:#9fb2c3;--teal:#22c8bc;--teal2:#42ddd1;--bg:#07131d;--line:#243746;--card:#0d1d29;--shadow:0 8px 30px rgba(0,0,0,.26);background:var(--bg);color:var(--ink)}
html[data-theme="dark"] body:not(.landing-body) .sidebar,
html[data-theme="dark"] body:not(.landing-body) .topbar,
html[data-theme="dark"] body:not(.landing-body) .bottom-nav{background:#0a1823;border-color:var(--line)}
html[data-theme="dark"] body:not(.landing-body) .card,
html[data-theme="dark"] body:not(.landing-body) .kpi{background:var(--card);border-color:var(--line)}
html[data-theme="dark"] body:not(.landing-body) .sidebar nav a:hover,
html[data-theme="dark"] body:not(.landing-body) .sidebar nav a.active,
html[data-theme="dark"] body:not(.landing-body) .sidebar-card,
html[data-theme="dark"] body:not(.landing-body) .button.ghost,
html[data-theme="dark"] body:not(.landing-body) .kpi .icon,
html[data-theme="dark"] body:not(.landing-body) .context-badge,
html[data-theme="dark"] body:not(.landing-body) .pipeline b{background:#102a31;color:#65ddd5;border-color:#255057}
html[data-theme="dark"] body:not(.landing-body) .market-select,
html[data-theme="dark"] body:not(.landing-body) .searchbox,
html[data-theme="dark"] body:not(.landing-body) select,
html[data-theme="dark"] body:not(.landing-body) input,
html[data-theme="dark"] body:not(.landing-body) textarea{background:#0b1b27;border-color:#2a3f50;color:var(--ink)}
html[data-theme="dark"] body:not(.landing-body) .searchbox input{background:transparent}
html[data-theme="dark"] body:not(.landing-body) .mini-grid>div,
html[data-theme="dark"] body:not(.landing-body) .brief-facts>div,
html[data-theme="dark"] body:not(.landing-body) .redacted-evidence,
html[data-theme="dark"] body:not(.landing-body) .sanitized,
html[data-theme="dark"] body:not(.landing-body) .commercial-preview,
html[data-theme="dark"] body:not(.landing-body) .privacy-callout,
html[data-theme="dark"] body:not(.landing-body) .stats span,
html[data-theme="dark"] body:not(.landing-body) .pill,
html[data-theme="dark"] body:not(.landing-body) .region-card{background:#10212d;border-color:#29404f;color:var(--ink)}
html[data-theme="dark"] body:not(.landing-body) .confidence{background:#10352f;color:#6de0b9}
html[data-theme="dark"] body:not(.landing-body) .scope-pill,
html[data-theme="dark"] body:not(.landing-body) .lang-chip.active{background:rgba(34,200,188,.14);border-color:rgba(34,200,188,.3)}
html[data-theme="dark"] body:not(.landing-body) .lang-chip{border-color:#2b3f4e}
html[data-theme="dark"] body:not(.landing-body) .footer a,
html[data-theme="dark"] body:not(.landing-body) .text-link,
html[data-theme="dark"] body:not(.landing-body) .card-head a{color:#59d9d0}
html[data-theme="dark"] body:not(.landing-body) .leaflet-tooltip.atlas-tip{background:#0d1d29;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] body:not(.landing-body) .theme-toggle{background:#10232f;border-color:#304858;color:var(--ink)}

/* Landing: existing dark design remains canonical; light mode brings it in line with the app. */
html[data-theme="light"] body.landing-body{--bg:#f5f8fb;--panel:rgba(255,255,255,.94);--panel-border:#dfe8ef;--text:#10233e;--muted:#667892;--accent:#087f7a;--accent-soft:#e9f8f7;background:radial-gradient(circle at top right,rgba(15,143,136,.08),transparent 28%),linear-gradient(180deg,#f8fbfd 0%,#eef4f8 100%)}
html[data-theme="light"] .landing-brand .brandmark{background:#e8f8f7;color:#087f7a;box-shadow:0 0 0 1px #bfe9e3 inset}
html[data-theme="light"] .language-switcher a{background:rgba(255,255,255,.7);border-color:#dfe8ef}
html[data-theme="light"] .language-switcher a.active{background:#e9f8f7;border-color:#bfe9e3;color:#087f7a}
html[data-theme="light"] .landing-status-card,
html[data-theme="light"] .summary-card{box-shadow:0 8px 28px rgba(26,57,83,.07)}
html[data-theme="light"] .landing-hero-panel{background:rgba(255,255,255,.7);border-color:#dfe8ef;box-shadow:0 24px 70px rgba(26,57,83,.12)}
html[data-theme="light"] .hero-image{box-shadow:0 16px 42px rgba(26,57,83,.15)}
html[data-theme="light"] .theme-toggle{background:#fff;border-color:#d8e2ea;color:#10233e}

@media(max-width:760px){.theme-toggle-text{display:none}.theme-toggle{width:38px;padding:8px}.landing-controls{width:100%;justify-content:space-between}}

/* Keep support, policies and source credits reachable on small screens. */
.footer{flex-wrap:wrap}
#source-attribution a{text-decoration:underline;text-underline-offset:2px}
@media(max-width:760px){.footer{display:flex;flex-wrap:wrap;gap:12px;padding:16px 12px calc(88px + env(safe-area-inset-bottom))}.footer .legal-links{flex-basis:100%;text-align:center}}

/* Documentary authorship and disclaimers are normal text, not muted hints.
   Use the shared ink token so both light and dark surfaces remain readable. */
.public-document-source{color:var(--ink)}
