/* WiScanner theme tokens + light theme.
   Dark token defaults are byte-identical to the original literals, so the dark
   theme is unchanged. Light theme overrides tokens + base variables.
   Token names are referenced by the inline <style> blocks in every page; do not
   rename them. Generated initially by scripts/theme_tokenize.py, now maintained
   here directly. */
:root {
  /* Base design variables (dark defaults). Site pages also define these in their
     own :root with identical values; here they also cover pages that don't (e.g.
     the legal pages), so var(--text-primary) etc. always resolve. */
  --bg: #050816;
  --bg-soft: #0b1020;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --accent-strong: #6366f1;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --border-subtle: #1f2937;
  --danger: #f97373;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.65);
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.45);

  --tbd-10: rgba(31, 41, 55, 0.9);
  --tbd-11: rgba(55, 65, 81, 0.9);
  --tbd-12: rgba(55, 65, 81, 0.95);
  --tbd-13: rgba(15, 23, 42, 0.9);
  --tbd-14: #000;
  --tbd-1: rgba(148, 163, 184, 0.4);
  --tbd-2: rgba(31, 41, 55, 0.95);
  --tbd-3: #1f2937;
  --tbd-4: rgba(148, 163, 184, 0.5);
  --tbd-5: rgba(148, 163, 184, 0.9);
  --tbd-6: rgba(148, 163, 184, 0.6);
  --tbd-7: rgba(30, 64, 175, 0.7);
  --tbd-8: rgba(156, 163, 175, 0.8);
  --tbd-9: rgba(148, 163, 184, 0.7);
  --tbg-10: rgba(31, 41, 55, 0.5);
  --tbg-11: rgba(31, 41, 55, 0.4);
  --tbg-12: #fff;
  --tbg-13: rgba(15, 23, 42, 0.8);
  --tbg-14: rgba(15, 23, 42, 0.7);
  --tbg-15: rgba(31, 41, 55, 0.95);
  --tbg-16: rgba(148, 163, 184, 0.6);
  --tbg-17: rgba(15, 23, 42, 0.85);
  --tbg-18: rgba(17, 24, 39, 0.9);
  --tbg-19: #e5e7eb;
  --tbg-1: #020617;
  --tbg-20: #6b7280;
  --tbg-21: rgba(30, 64, 175, 0.35);
  --tbg-22: rgba(55, 65, 81, 0.9);
  --tbg-23: rgba(30, 64, 175, 0.4);
  --tbg-2: #111827;
  --tbg-3: #000000;
  --tbg-4: rgba(15, 23, 42, 0.9);
  --tbg-5: rgba(15, 23, 42, 0.98);
  --tbg-6: rgba(15, 23, 42, 0.95);
  --tbg-7: rgba(2, 6, 23, 0.9);
  --tbg-8: #0f172a;
  --tbg-9: rgba(31, 41, 55, 0.8);
  --tsh-1: rgba(15, 23, 42, 0.85);
  --tsh-2: rgba(15, 23, 42, 0.8);
  --tsh-3: rgba(15, 23, 42, 0.5);
  --tsh-4: rgba(15, 23, 42, 0.9);
  --ttx-10: #9ca3af;
  --ttx-11: rgba(209, 213, 219, 0.85);
  --ttx-12: rgba(209, 213, 219, 0.9);
  --ttx-13: rgba(148, 163, 184, 0.9);
  --ttx-14: rgba(156, 163, 175, 0.95);
  --ttx-15: rgba(229, 231, 235, 0.98);
  --ttx-16: rgba(156, 163, 175, 0.98);
  --ttx-17: rgba(229, 231, 235, 0.96);
  --ttx-18: rgba(148, 163, 184, 0.98);
  --ttx-19: rgba(209, 213, 219, 0.96);
  --ttx-1: rgba(148, 163, 184, 0.85);
  --ttx-20: #222;
  --ttx-21: #111;
  --ttx-22: #666;
  --ttx-23: #000;
  --ttx-2: #e5e7eb;
  --ttx-3: rgba(209, 213, 219, 0.95);
  --ttx-4: rgba(209, 213, 219, 0.92);
  --ttx-5: #f9fafb;
  --ttx-6: rgba(148, 163, 184, 0.95);
  --ttx-7: rgba(209, 213, 219, 0.98);
  --ttx-8: rgba(148, 163, 184, 0.8);
  --ttx-9: #e2e8f0;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f7;
  --bg-soft: #ffffff;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.10);
  --accent-strong: #4338ca;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-subtle: #e2e8f0;
  --danger: #dc2626;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.18);
  --tbd-10: #e2e8f0;
  --tbd-11: #e2e8f0;
  --tbd-12: #e2e8f0;
  --tbd-13: #e2e8f0;
  --tbd-1: #dbe3ec;
  --tbd-2: #e2e8f0;
  --tbd-3: #e2e8f0;
  --tbd-4: #cbd5e1;
  --tbd-5: #b8c4d4;
  --tbd-6: #cbd5e1;
  --tbd-8: #cbd5e1;
  --tbd-9: #cbd5e1;
  --tbg-10: rgba(15, 23, 42, 0.04);
  --tbg-11: rgba(15, 23, 42, 0.03);
  --tbg-13: rgba(255, 255, 255, 0.88);
  --tbg-14: rgba(15, 23, 42, 0.04);
  --tbg-15: rgba(15, 23, 42, 0.05);
  --tbg-17: rgba(255, 255, 255, 0.92);
  --tbg-18: rgba(255, 255, 255, 0.94);
  --tbg-1: #eef2f7;
  --tbg-22: rgba(15, 23, 42, 0.05);
  --tbg-2: #f8fafc;
  --tbg-3: #ffffff;
  --tbg-4: rgba(255, 255, 255, 0.96);
  --tbg-5: #ffffff;
  --tbg-6: #ffffff;
  --tbg-7: rgba(255, 255, 255, 0.94);
  --tbg-8: #ffffff;
  --tbg-9: rgba(15, 23, 42, 0.05);
  --tsh-1: rgba(15, 23, 42, 0.12);
  --tsh-2: rgba(15, 23, 42, 0.12);
  --tsh-3: rgba(15, 23, 42, 0.10);
  --tsh-4: rgba(15, 23, 42, 0.14);
  --ttx-10: #64748b;
  --ttx-11: #3b4a5e;
  --ttx-12: #334155;
  --ttx-13: #475569;
  --ttx-14: #64748b;
  --ttx-15: #1e293b;
  --ttx-16: #64748b;
  --ttx-17: #1e293b;
  --ttx-18: #475569;
  --ttx-19: #334155;
  --ttx-1: #52617a;
  --ttx-2: #1e293b;
  --ttx-3: #334155;
  --ttx-4: #334155;
  --ttx-5: #0f172a;
  --ttx-6: #475569;
  --ttx-7: #334155;
  --ttx-8: #52617a;
  --ttx-9: #1e293b;
}

/* Logo: swap to the dark-wordmark variant in light theme (path is relative to
   this stylesheet in assets/, so it works for every page depth). */
html[data-theme="light"] .logo-img,
html[data-theme="light"] .site-logo__img { content: url("logo-light.png"); }

/* Cookie consent popup (site-wide via theme.js) */
.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.cookie-consent.is-visible {
  opacity: 1;
  visibility: visible;
}

.cookie-consent__dialog {
  width: min(100%, 420px);
  pointer-events: auto;
  padding: 22px 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s ease;
}

.cookie-consent.is-visible .cookie-consent__dialog {
  transform: translateY(0) scale(1);
}

.cookie-consent__text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary, #cbd5e1);
}

.cookie-consent__text a {
  color: var(--accent-strong, #818cf8);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-consent__reject,
.cookie-consent__accept {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent__reject {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-primary, #e2e8f0);
}

.cookie-consent__reject:hover {
  background: rgba(148, 163, 184, 0.22);
}

.cookie-consent__accept {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.cookie-consent__accept:hover {
  filter: brightness(1.06);
}

html[data-theme="light"] .cookie-consent__dialog {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .cookie-consent__text {
  color: #475569;
}

html[data-theme="light"] .cookie-consent__text a {
  color: #4338ca;
}

html[data-theme="light"] .cookie-consent__reject {
  background: #f1f5f9;
  color: #334155;
}

html[data-theme="light"] .cookie-consent__reject:hover {
  background: #e2e8f0;
}

/* Language dropdown (its base styles are injected by i18n.js with dark colors). */
html[data-theme="light"] .wis-lang__btn { background: #ffffff; color: #1e293b; border-color: #cbd5e1; }
html[data-theme="light"] .wis-lang__btn:hover { background: #f1f5f9; border-color: var(--accent); }
html[data-theme="light"] .wis-lang__menu { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .wis-lang__item { color: #334155; }
html[data-theme="light"] .wis-lang__item:hover { background: rgba(79, 70, 229, 0.10); color: #0f172a; }
html[data-theme="light"] .wis-lang__item.is-active { background: rgba(79, 70, 229, 0.14); color: #4338ca; }
