/* ──────────────────────────────────────────────────────────────────────────
   theme.css — Single source of truth for the PUBLIC pages' light/dark theme
   (home, legal, and — when wired — login/suspended). Loaded BEFORE each page's
   own stylesheet. The admin panel keeps its own dedicated, richer theme.

   Also hosts the shared site footer component, so the footer is byte-identical
   across all public pages and can never drift (it is injected by the same
   renderSiteFooter() on every page).

   NOTE on tokens: the public pages already shared these core values; the only
   divergent one (--accent) was unused in home, so it is unified to the indigo
   used by login with zero visual change.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --background: #f7f9fc;
  --surface: #ffffff;
  --surface-inner: #f8fafc;
  --card-bg: #ffffff;
  --border: rgba(20, 33, 61, 0.08);
  --border-solid: #e6eaf2;
  --input-bg: #f3f6fa;
  --muted: #667085;
  --foreground: #14213d;
  --primary: #4c6fff;
  --secondary: #3f5ef5;
  --accent: #4c6fff;
  --accent-hover: #3f5ef5;
  --ok: #18b67a;
  --danger: #ef4444;
  --hover: #f3f6fa;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #0d1117;
  --surface: #161b27;
  --surface-inner: rgba(11, 14, 23, 0.4);
  --card-bg: #161b27;
  --border: #2d3448;
  --border-solid: #3e4a61;
  --input-bg: rgba(255, 255, 255, 0.04);
  --muted: #8892a4;
  --foreground: #e6eaf3;
  --hover: rgba(255, 255, 255, 0.04);
}

/* ── Shared site footer (identical on every public page) ─────────────────── */
footer.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  margin-top: 80px;
  gap: 14px;
}
.lang-selector,
.theme-selector {
  display: inline-flex;
  gap: 6px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 20px;
}
:is(.lang-selector, .theme-selector) a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: transparent;
}
:is(.lang-selector, .theme-selector) a.active {
  color: var(--foreground);
  background: var(--border);
}
:is(.lang-selector, .theme-selector) a:hover:not(.active) {
  color: var(--foreground);
}
.footer-ident {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 640px;
}
.footer-ident strong {
  color: var(--foreground);
  font-weight: 600;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* Allows a manual line break between links: insert <br> in footer-links and it
   forces the following items onto a new row (a bare <br> only adds a gap in a
   flex row). */
.footer-links br {
  flex-basis: 100%;
  width: 0;
  height: 0;
  margin: 0;
}
.footer-links a:hover {
  color: var(--foreground);
}
.footer p {
  margin: 0;
  font-size: 13px;
}
/* Robust against each page's own body typography (e.g. legal's underlined
   links / larger paragraph font / italic .pending): the footer stays uniform. */
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer .pending {
  font-weight: 400;
  font-style: normal;
  color: var(--muted);
}
