/* ═══════════════════════════════════════════════════════════════════
   AITOOLS design system — shared by every page (components/theme_head).

   Dark is the original look; light is layered on top through
   html[data-theme="light"]. Selectors are wrapped in :where(html[…]) so
   light rules keep the specificity of the rule they replace:
     · shared components (.glass-card…) → same weight as the page's own
       definition, and this file loads after the page <style>, so it wins;
     · Tailwind utilities → "body .utility" (0,1,1): beats the base
       utility, still loses to hover:/focus: variants, like Tailwind does.
   Sections 4–6, and the "Light theme (generated …)" blocks in page
   <style> tags, come from scripts/theme/build_theme.py — re-run it after
   adding dark colours instead of editing those parts by hand.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ──────────────────────────────────────────────────── */
:root {
  --ui-bg: #05070d;
  --ui-surface: rgba(15, 23, 42, 0.6);
  --ui-surface-solid: #0d1322;
  --ui-elevated: #0f1729;
  --ui-border: rgba(148, 163, 184, 0.12);
  --ui-border-strong: rgba(148, 163, 184, 0.22);
  --ui-text: #e5e7eb;
  --ui-text-muted: #94a3b8;
  --ui-accent: #3b82f6;
  --ui-accent-2: #8b5cf6;
  --ui-ring: rgba(59, 130, 246, 0.55);
  --ui-shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px -20px rgba(0, 0, 0, 0.8);
  --ui-shadow-pop: 0 20px 48px -12px rgba(0, 0, 0, 0.7);
  --ui-scroll: rgba(148, 163, 184, 0.22);
  --ui-scroll-hover: rgba(148, 163, 184, 0.38);
}

:root[data-theme="light"] {
  --ui-bg: #f4f6fb;
  --ui-surface: #ffffff;
  --ui-surface-solid: #ffffff;
  --ui-elevated: #ffffff;
  --ui-border: #e4e7ee;
  --ui-border-strong: #d3d8e2;
  --ui-text: #0f172a;
  --ui-text-muted: #64748b;
  --ui-accent: #2563eb;
  --ui-accent-2: #7c3aed;
  --ui-ring: rgba(37, 99, 235, 0.45);
  --ui-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --ui-shadow-pop: 0 16px 40px -12px rgba(16, 24, 40, 0.22), 0 2px 6px rgba(16, 24, 40, 0.06);
  --ui-scroll: rgba(15, 23, 42, 0.16);
  --ui-scroll-hover: rgba(15, 23, 42, 0.3);
}

/* No colour animations while the theme flips — avoids a slow cross-fade. */
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after { transition: none !important; }

/* ── 2. Base ────────────────────────────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
h1, h2, h3 { letter-spacing: -0.015em; }

:where(html[data-theme="light"]) body {
  background: var(--ui-bg);
  color: #1e293b;
}

/* Background layer used by every dashboard page. The old version animated a
   full-screen grid forever; a static, masked grid looks the same and costs
   nothing to composite. */
.bg-pattern {
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(139, 92, 246, 0.08), transparent 55%),
    linear-gradient(180deg, #05070d 0%, #090e1a 55%, #0b1120 100%);
}
.grid-bg {
  animation: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(1100px 640px at 50% 0%, #000 25%, transparent 100%);
  mask-image: radial-gradient(1100px 640px at 50% 0%, #000 25%, transparent 100%);
}
:where(html[data-theme="light"]) .bg-pattern {
  background:
    radial-gradient(1100px 520px at 10% -12%, rgba(59, 130, 246, 0.07), transparent 60%),
    radial-gradient(900px 480px at 100% -6%, rgba(139, 92, 246, 0.06), transparent 55%),
    var(--ui-bg);
}
:where(html[data-theme="light"]) .grid-bg {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

::selection { background: rgba(59, 130, 246, 0.35); }
:where(html[data-theme="light"]) ::selection { background: rgba(37, 99, 235, 0.18); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--ui-scroll) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ui-scroll);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ui-scroll-hover); background-clip: padding-box; }

/* Keyboard focus — visible on every interactive element, invisible on click. */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ui-ring);
  outline-offset: 2px;
}

/* Native controls follow the theme (date pickers, selects, checkboxes). */
select option, select optgroup { background: #0f172a; color: #e5e7eb; }
:where(html[data-theme="light"]) select option,
:where(html[data-theme="light"]) select optgroup { background: #ffffff; color: #0f172a; }
:where(html[data-theme="light"]) input[type="date"],
:where(html[data-theme="light"]) input[type="time"],
:where(html[data-theme="light"]) input[type="datetime-local"],
:where(html[data-theme="light"]) input[type="month"] { color-scheme: light; }
:where(html[data-theme="light"]) input::placeholder,
:where(html[data-theme="light"]) textarea::placeholder { color: #94a3b8; }
:where(html[data-theme="light"]) input:-webkit-autofill {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

/* ── 3. Shared components ───────────────────────────────────────── */
.glass-card {
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow-card);
}
a.glass-card { transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
a.glass-card:hover { transform: translateY(-2px); }

:where(html[data-theme="light"]) .glass-card {
  background: var(--ui-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
:where(html[data-theme="light"]) a.glass-card:hover {
  box-shadow: 0 10px 28px -14px rgba(16, 24, 40, 0.22), 0 1px 3px rgba(16, 24, 40, 0.06);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -8px rgba(59, 130, 246, 0.7);
  transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 24px -10px rgba(99, 102, 241, 0.8); }
:where(html[data-theme="light"]) .btn-primary { color: #fff; }

:where(html[data-theme="light"]) .gradient-text {
  background: linear-gradient(135deg, #2563eb, #7c3aed 60%, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Section eyebrow / page header helpers (new markup) */
.ui-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ui-text-muted);
}
.ui-divider { height: 1px; background: var(--ui-border); border: 0; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.app-nav {
  background: rgba(7, 10, 18, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
:where(html[data-theme="light"]) .app-nav {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: var(--ui-border);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
}
.app-nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .7rem; border-radius: .6rem;
  font-size: 13.5px; font-weight: 500;
  color: rgba(226, 232, 240, 0.68);
  transition: color .15s ease, background-color .15s ease;
}
.app-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.app-nav-link[aria-current="page"] { color: #fff; background: rgba(59, 130, 246, 0.14); }
:where(html[data-theme="light"]) .app-nav-link { color: #475569; }
:where(html[data-theme="light"]) .app-nav-link:hover { color: #0f172a; background: rgba(15, 23, 42, 0.05); }
:where(html[data-theme="light"]) .app-nav-link[aria-current="page"] { color: #1d4ed8; background: rgba(37, 99, 235, 0.08); }

.app-menu {
  background: rgba(12, 17, 29, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--ui-shadow-pop);
}
:where(html[data-theme="light"]) .app-menu {
  background: #ffffff;
  border-color: var(--ui-border);
}

.logo-on-light { display: none; }
:where(html[data-theme="light"]) .logo-on-dark { display: none; }
:where(html[data-theme="light"]) .logo-on-light { display: block; }

/* Theme switch: icon button (desktop) and 3-way segmented control (menus). */
.theme-toggle .theme-icon-moon { display: none; }
:where(html[data-theme="light"]) .theme-toggle .theme-icon-sun { display: none; }
:where(html[data-theme="light"]) .theme-toggle .theme-icon-moon { display: block; }
.theme-toggle svg { transition: transform .35s cubic-bezier(.4, 0, .2, 1); }
.theme-toggle:hover svg { transform: rotate(-20deg); }

.theme-seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px;
  border-radius: .7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.theme-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .4rem .5rem; border-radius: .5rem;
  font-size: 12px; font-weight: 600;
  color: rgba(226, 232, 240, 0.6);
  transition: color .15s ease, background-color .15s ease;
}
.theme-seg button:hover { color: #fff; }
.theme-seg button[aria-pressed="true"] { color: #fff; background: rgba(59, 130, 246, 0.2); }
:where(html[data-theme="light"]) .theme-seg { background: #f1f5f9; border-color: var(--ui-border); }
:where(html[data-theme="light"]) .theme-seg button { color: #64748b; }
:where(html[data-theme="light"]) .theme-seg button:hover { color: #0f172a; }
:where(html[data-theme="light"]) .theme-seg button[aria-pressed="true"] {
  color: #0f172a; background: #ffffff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

/* Things that stay dark in both themes (media viewers, video overlays). */
:where(html[data-theme="light"]) #media-lightbox { color: #fff; }

/* The AI helper panel sits off-canvas when closed; don't let its shadow bleed in. */
#helperai-panel.translate-x-full { box-shadow: none; }

/* ── 4. Tailwind utilities → light (generated) ─────────────────────── */
:where(html[data-theme="light"]) body .disabled\:text-gray-600:disabled { color: #94a3b8; }
:where(html[data-theme="light"]) body .focus\:text-white:focus { color: #0f172a; }
:where(html[data-theme="light"]) body .group:hover .group-hover\:text-blue-300 { color: #1d4ed8; }
:where(html[data-theme="light"]) body .hover\:text-blue-200:hover { color: #1d4ed8; }
:where(html[data-theme="light"]) body .hover\:text-blue-300:hover { color: #1d4ed8; }
:where(html[data-theme="light"]) body .hover\:text-blue-400:hover { color: #2563eb; }
:where(html[data-theme="light"]) body .hover\:text-emerald-200:hover { color: #047857; }
:where(html[data-theme="light"]) body .hover\:text-gray-200:hover { color: #1e293b; }
:where(html[data-theme="light"]) body .hover\:text-gray-300:hover { color: #1e293b; }
:where(html[data-theme="light"]) body .hover\:text-indigo-200:hover { color: #4338ca; }
:where(html[data-theme="light"]) body .hover\:text-pink-200:hover { color: #be185d; }
:where(html[data-theme="light"]) body .hover\:text-pink-300:hover { color: #be185d; }
:where(html[data-theme="light"]) body .hover\:text-purple-400:hover { color: #9333ea; }
:where(html[data-theme="light"]) body .hover\:text-red-200:hover { color: #b91c1c; }
:where(html[data-theme="light"]) body .hover\:text-red-300:hover { color: #b91c1c; }
:where(html[data-theme="light"]) body .hover\:text-red-400:hover { color: #dc2626; }
:where(html[data-theme="light"]) body .hover\:text-sky-300:hover { color: #0369a1; }
:where(html[data-theme="light"]) body .hover\:text-white:hover { color: #0f172a; }
:where(html[data-theme="light"]) body .hover\:text-white\/80:hover { color: #334155; }
:where(html[data-theme="light"]) body .text-amber-100 { color: #b45309; }
:where(html[data-theme="light"]) body .text-amber-100\/90 { color: rgba(180,83,9,0.9); }
:where(html[data-theme="light"]) body .text-amber-200 { color: #b45309; }
:where(html[data-theme="light"]) body .text-amber-200\/70 { color: rgba(180,83,9,0.7); }
:where(html[data-theme="light"]) body .text-amber-200\/90 { color: rgba(180,83,9,0.9); }
:where(html[data-theme="light"]) body .text-amber-300 { color: #b45309; }
:where(html[data-theme="light"]) body .text-amber-300\/80 { color: rgba(180,83,9,0.8); }
:where(html[data-theme="light"]) body .text-amber-300\/90 { color: rgba(180,83,9,0.9); }
:where(html[data-theme="light"]) body .text-amber-400 { color: #d97706; }
:where(html[data-theme="light"]) body .text-amber-400\/60 { color: rgba(217,119,6,0.6); }
:where(html[data-theme="light"]) body .text-amber-400\/70 { color: rgba(217,119,6,0.7); }
:where(html[data-theme="light"]) body .text-blue-100 { color: #1d4ed8; }
:where(html[data-theme="light"]) body .text-blue-100\/80 { color: rgba(29,78,216,0.8); }
:where(html[data-theme="light"]) body .text-blue-200 { color: #1d4ed8; }
:where(html[data-theme="light"]) body .text-blue-200\/80 { color: rgba(29,78,216,0.8); }
:where(html[data-theme="light"]) body .text-blue-300 { color: #1d4ed8; }
:where(html[data-theme="light"]) body .text-blue-300\/70 { color: rgba(29,78,216,0.7); }
:where(html[data-theme="light"]) body .text-blue-400 { color: #2563eb; }
:where(html[data-theme="light"]) body .text-blue-400\/60 { color: rgba(37,99,235,0.6); }
:where(html[data-theme="light"]) body .text-blue-400\/70 { color: rgba(37,99,235,0.7); }
:where(html[data-theme="light"]) body .text-cyan-100 { color: #0e7490; }
:where(html[data-theme="light"]) body .text-cyan-200 { color: #0e7490; }
:where(html[data-theme="light"]) body .text-cyan-300 { color: #0e7490; }
:where(html[data-theme="light"]) body .text-cyan-400 { color: #0891b2; }
:where(html[data-theme="light"]) body .text-cyan-400\/60 { color: rgba(8,145,178,0.6); }
:where(html[data-theme="light"]) body .text-emerald-100 { color: #047857; }
:where(html[data-theme="light"]) body .text-emerald-200 { color: #047857; }
:where(html[data-theme="light"]) body .text-emerald-300 { color: #047857; }
:where(html[data-theme="light"]) body .text-emerald-300\/70 { color: rgba(4,120,87,0.7); }
:where(html[data-theme="light"]) body .text-emerald-300\/90 { color: rgba(4,120,87,0.9); }
:where(html[data-theme="light"]) body .text-emerald-400 { color: #059669; }
:where(html[data-theme="light"]) body .text-emerald-400\/60 { color: rgba(5,150,105,0.6); }
:where(html[data-theme="light"]) body .text-fuchsia-200 { color: #a21caf; }
:where(html[data-theme="light"]) body .text-fuchsia-300 { color: #a21caf; }
:where(html[data-theme="light"]) body .text-fuchsia-400\/60 { color: rgba(192,38,211,0.6); }
:where(html[data-theme="light"]) body .text-gray-100 { color: #0f172a; }
:where(html[data-theme="light"]) body .text-gray-200 { color: #1e293b; }
:where(html[data-theme="light"]) body .text-gray-300 { color: #1e293b; }
:where(html[data-theme="light"]) body .text-gray-400 { color: #475569; }
:where(html[data-theme="light"]) body .text-gray-500 { color: #64748b; }
:where(html[data-theme="light"]) body .text-gray-600 { color: #94a3b8; }
:where(html[data-theme="light"]) body .text-gray-700 { color: #94a3b8; }
:where(html[data-theme="light"]) body .text-green-200 { color: #15803d; }
:where(html[data-theme="light"]) body .text-green-300 { color: #15803d; }
:where(html[data-theme="light"]) body .text-green-300\/90 { color: rgba(21,128,61,0.9); }
:where(html[data-theme="light"]) body .text-green-400 { color: #16a34a; }
:where(html[data-theme="light"]) body .text-green-400\/60 { color: rgba(22,163,74,0.6); }
:where(html[data-theme="light"]) body .text-indigo-200 { color: #4338ca; }
:where(html[data-theme="light"]) body .text-indigo-300 { color: #4338ca; }
:where(html[data-theme="light"]) body .text-indigo-300\/80 { color: rgba(67,56,202,0.8); }
:where(html[data-theme="light"]) body .text-indigo-400 { color: #4f46e5; }
:where(html[data-theme="light"]) body .text-indigo-400\/60 { color: rgba(79,70,229,0.6); }
:where(html[data-theme="light"]) body .text-indigo-400\/70 { color: rgba(79,70,229,0.7); }
:where(html[data-theme="light"]) body .text-lime-300 { color: #4d7c0f; }
:where(html[data-theme="light"]) body .text-orange-200 { color: #c2410c; }
:where(html[data-theme="light"]) body .text-orange-300 { color: #c2410c; }
:where(html[data-theme="light"]) body .text-orange-400 { color: #ea580c; }
:where(html[data-theme="light"]) body .text-pink-100\/90 { color: rgba(190,24,93,0.9); }
:where(html[data-theme="light"]) body .text-pink-200 { color: #be185d; }
:where(html[data-theme="light"]) body .text-pink-300 { color: #be185d; }
:where(html[data-theme="light"]) body .text-pink-400 { color: #db2777; }
:where(html[data-theme="light"]) body .text-pink-400\/60 { color: rgba(219,39,119,0.6); }
:where(html[data-theme="light"]) body .text-pink-400\/70 { color: rgba(219,39,119,0.7); }
:where(html[data-theme="light"]) body .text-purple-100 { color: #7e22ce; }
:where(html[data-theme="light"]) body .text-purple-200 { color: #7e22ce; }
:where(html[data-theme="light"]) body .text-purple-200\/80 { color: rgba(126,34,206,0.8); }
:where(html[data-theme="light"]) body .text-purple-300 { color: #7e22ce; }
:where(html[data-theme="light"]) body .text-purple-300\/70 { color: rgba(126,34,206,0.7); }
:where(html[data-theme="light"]) body .text-purple-400 { color: #9333ea; }
:where(html[data-theme="light"]) body .text-purple-400\/60 { color: rgba(147,51,234,0.6); }
:where(html[data-theme="light"]) body .text-purple-400\/70 { color: rgba(147,51,234,0.7); }
:where(html[data-theme="light"]) body .text-red-200 { color: #b91c1c; }
:where(html[data-theme="light"]) body .text-red-300 { color: #b91c1c; }
:where(html[data-theme="light"]) body .text-red-400 { color: #dc2626; }
:where(html[data-theme="light"]) body .text-red-400\/70 { color: rgba(220,38,38,0.7); }
:where(html[data-theme="light"]) body .text-red-400\/80 { color: rgba(220,38,38,0.8); }
:where(html[data-theme="light"]) body .text-red-500\/60 { color: rgba(220,38,38,0.6); }
:where(html[data-theme="light"]) body .text-rose-300 { color: #be123c; }
:where(html[data-theme="light"]) body .text-sky-100\/90 { color: rgba(3,105,161,0.9); }
:where(html[data-theme="light"]) body .text-sky-200 { color: #0369a1; }
:where(html[data-theme="light"]) body .text-sky-300 { color: #0369a1; }
:where(html[data-theme="light"]) body .text-sky-400 { color: #0284c7; }
:where(html[data-theme="light"]) body .text-slate-300 { color: #1e293b; }
:where(html[data-theme="light"]) body .text-slate-400 { color: #475569; }
:where(html[data-theme="light"]) body .text-slate-600 { color: #94a3b8; }
:where(html[data-theme="light"]) body .text-teal-300 { color: #0f766e; }
:where(html[data-theme="light"]) body .text-teal-400 { color: #0d9488; }
:where(html[data-theme="light"]) body .text-violet-200 { color: #6d28d9; }
:where(html[data-theme="light"]) body .text-violet-300 { color: #6d28d9; }
:where(html[data-theme="light"]) body .text-violet-300\/80 { color: rgba(109,40,217,0.8); }
:where(html[data-theme="light"]) body .text-violet-400 { color: #7c3aed; }
:where(html[data-theme="light"]) body .text-violet-400\/60 { color: rgba(124,58,237,0.6); }
:where(html[data-theme="light"]) body .text-white { color: #0f172a; }
:where(html[data-theme="light"]) body .text-white\/30 { color: #94a3b8; }
:where(html[data-theme="light"]) body .text-white\/40 { color: #64748b; }
:where(html[data-theme="light"]) body .text-white\/50 { color: #64748b; }
:where(html[data-theme="light"]) body .text-white\/60 { color: #475569; }
:where(html[data-theme="light"]) body .text-white\/70 { color: #334155; }
:where(html[data-theme="light"]) body .text-white\/80 { color: #334155; }
:where(html[data-theme="light"]) body .text-white\/90 { color: #1e293b; }
:where(html[data-theme="light"]) body .text-yellow-200 { color: #a16207; }
:where(html[data-theme="light"]) body .text-yellow-300 { color: #a16207; }
:where(html[data-theme="light"]) body .text-yellow-400 { color: #ca8a04; }
:where(html[data-theme="light"]) body .placeholder-gray-500::placeholder { color: #64748b; }
:where(html[data-theme="light"]) body .placeholder-gray-600::placeholder { color: #94a3b8; }
:where(html[data-theme="light"]) body .placeholder-white\/30::placeholder { color: #94a3b8; }
:where(html[data-theme="light"]) body .bg-\[\#0b0f19\] { background-color: #ffffff; }
:where(html[data-theme="light"]) body .bg-black { background-color: #ffffff; }
:where(html[data-theme="light"]) body .bg-black\/20 { background-color: rgba(15,23,42,0.046); }
:where(html[data-theme="light"]) body .bg-black\/25 { background-color: rgba(15,23,42,0.05); }
:where(html[data-theme="light"]) body .bg-black\/30 { background-color: rgba(15,23,42,0.054); }
:where(html[data-theme="light"]) body .bg-black\/40 { background-color: rgba(15,23,42,0.22); }
:where(html[data-theme="light"]) body .bg-black\/50 { background-color: rgba(15,23,42,0.275); }
:where(html[data-theme="light"]) body .bg-black\/60 { background-color: rgba(15,23,42,0.33); }
:where(html[data-theme="light"]) body .bg-black\/70 { background-color: rgba(15,23,42,0.385); }
:where(html[data-theme="light"]) body .bg-black\/75 { background-color: rgba(15,23,42,0.413); }
:where(html[data-theme="light"]) body .bg-black\/85 { background-color: rgba(15,23,42,0.468); }
:where(html[data-theme="light"]) body .bg-blue-900\/30 { background-color: rgba(234,238,250,0.68); }
:where(html[data-theme="light"]) body .bg-emerald-600 { background-color: #e7fef7; }
:where(html[data-theme="light"]) body .bg-gray-500 { background-color: #94a3b8; }
:where(html[data-theme="light"]) body .bg-gray-600 { background-color: #cbd5e1; }
:where(html[data-theme="light"]) body .bg-gray-700 { background-color: #e2e8f0; }
:where(html[data-theme="light"]) body .bg-gray-700\/40 { background-color: rgba(15,23,42,0.1); }
:where(html[data-theme="light"]) body .bg-gray-700\/50 { background-color: rgba(226,232,240,0.5); }
:where(html[data-theme="light"]) body .bg-gray-800 { background-color: #f1f5f9; }
:where(html[data-theme="light"]) body .bg-gray-800\/20 { background-color: rgba(15,23,42,0.046); }
:where(html[data-theme="light"]) body .bg-gray-800\/30 { background-color: rgba(15,23,42,0.054); }
:where(html[data-theme="light"]) body .bg-gray-800\/40 { background-color: rgba(15,23,42,0.062); }
:where(html[data-theme="light"]) body .bg-gray-800\/50 { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .bg-gray-800\/60 { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .bg-gray-800\/70 { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .bg-gray-800\/80 { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .bg-gray-900 { background-color: #ffffff; }
:where(html[data-theme="light"]) body .bg-gray-900\/20 { background-color: rgba(15,23,42,0.046); }
:where(html[data-theme="light"]) body .bg-gray-900\/30 { background-color: rgba(15,23,42,0.054); }
:where(html[data-theme="light"]) body .bg-gray-900\/40 { background-color: rgba(15,23,42,0.062); }
:where(html[data-theme="light"]) body .bg-gray-900\/50 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-gray-900\/60 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-gray-900\/70 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-gray-900\/80 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-green-900\/40 { background-color: rgba(234,250,241,0.84); }
:where(html[data-theme="light"]) body .bg-pink-900\/40 { background-color: rgba(251,233,241,0.84); }
:where(html[data-theme="light"]) body .bg-red-900\/40 { background-color: rgba(250,234,234,0.84); }
:where(html[data-theme="light"]) body .bg-slate-700 { background-color: #e2e8f0; }
:where(html[data-theme="light"]) body .bg-slate-700\/50 { background-color: rgba(226,232,240,0.5); }
:where(html[data-theme="light"]) body .bg-slate-800 { background-color: #f1f5f9; }
:where(html[data-theme="light"]) body .bg-slate-800\/80 { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .bg-slate-900\/50 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-900\/60 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-900\/70 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-900\/80 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-900\/95 { background-color: rgba(255,255,255,0.95); }
:where(html[data-theme="light"]) body .bg-slate-950\/60 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-950\/90 { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .bg-slate-950\/95 { background-color: rgba(255,255,255,0.95); }
:where(html[data-theme="light"]) body .bg-slate-950\/97 { background-color: rgba(255,255,255,0.97); }
:where(html[data-theme="light"]) body .bg-white\/10 { background-color: rgba(15,23,42,0.075); }
:where(html[data-theme="light"]) body .bg-white\/5 { background-color: rgba(15,23,42,0.038); }
:where(html[data-theme="light"]) body .bg-white\/\[\.03\] { background-color: rgba(15,23,42,0.022); }
:where(html[data-theme="light"]) body .bg-white\/\[0\.02\] { background-color: rgba(15,23,42,0.02); }
:where(html[data-theme="light"]) body .bg-white\/\[0\.03\] { background-color: rgba(15,23,42,0.022); }
:where(html[data-theme="light"]) body .bg-white\/\[0\.04\] { background-color: rgba(15,23,42,0.03); }
:where(html[data-theme="light"]) body .bg-white\/\[0\.08\] { background-color: rgba(15,23,42,0.06); }
:where(html[data-theme="light"]) body .hover\:bg-gray-700:hover { background-color: #e2e8f0; }
:where(html[data-theme="light"]) body .hover\:bg-gray-700\/60:hover { background-color: rgba(226,232,240,0.6); }
:where(html[data-theme="light"]) body .hover\:bg-gray-700\/70:hover { background-color: rgba(226,232,240,0.7); }
:where(html[data-theme="light"]) body .hover\:bg-gray-800\/50:hover { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .hover\:bg-gray-800\/70:hover { background-color: rgba(241,245,249,0.92); }
:where(html[data-theme="light"]) body .hover\:bg-gray-900\/80:hover { background-color: rgba(255,255,255,0.92); }
:where(html[data-theme="light"]) body .hover\:bg-green-700:hover { background-color: #e9fbf0; }
:where(html[data-theme="light"]) body .hover\:bg-white\/10:hover { background-color: rgba(15,23,42,0.075); }
:where(html[data-theme="light"]) body .hover\:bg-white\/20:hover { background-color: rgba(15,23,42,0.15); }
:where(html[data-theme="light"]) body .hover\:bg-white\/5:hover { background-color: rgba(15,23,42,0.038); }
:where(html[data-theme="light"]) body .hover\:bg-white\/\[0\.02\]:hover { background-color: rgba(15,23,42,0.02); }
:where(html[data-theme="light"]) body .hover\:bg-white\/\[0\.05\]:hover { background-color: rgba(15,23,42,0.038); }
:where(html[data-theme="light"]) body .hover\:bg-white\/\[0\.06\]:hover { background-color: rgba(15,23,42,0.045); }
:where(html[data-theme="light"]) body .hover\:bg-white\/\[0\.08\]:hover { background-color: rgba(15,23,42,0.06); }
:where(html[data-theme="light"]) body .hover\:bg-white\/\[0\.14\]:hover { background-color: rgba(15,23,42,0.105); }
:where(html[data-theme="light"]) body .border-\[\#0a0a0f\] { border-color: #e9edf3; }
:where(html[data-theme="light"]) body .border-gray-500\/20 { border-color: rgba(148,163,184,0.5); }
:where(html[data-theme="light"]) body .border-gray-500\/30 { border-color: #94a3b8; }
:where(html[data-theme="light"]) body .border-gray-600 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-gray-600\/30 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-gray-600\/40 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-gray-600\/50 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-gray-600\/60 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-gray-700 { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .border-gray-700\/50 { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .border-gray-700\/60 { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .border-gray-700\/70 { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .border-gray-800 { border-color: #e9edf3; }
:where(html[data-theme="light"]) body .border-gray-800\/60 { border-color: #e9edf3; }
:where(html[data-theme="light"]) body .border-pink-900\/10 { border-color: rgba(243,190,212,0.5); }
:where(html[data-theme="light"]) body .border-pink-900\/20 { border-color: rgba(243,190,212,0.7); }
:where(html[data-theme="light"]) body .border-pink-900\/30 { border-color: rgba(243,190,212,0.9); }
:where(html[data-theme="light"]) body .border-pink-900\/40 { border-color: #f3bed4; }
:where(html[data-theme="light"]) body .border-slate-500\/20 { border-color: rgba(148,163,184,0.5); }
:where(html[data-theme="light"]) body .border-slate-600\/40 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-slate-600\/50 { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .border-slate-700 { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .border-white\/10 { border-color: rgba(15,23,42,0.11); }
:where(html[data-theme="light"]) body .border-white\/20 { border-color: rgba(15,23,42,0.17); }
:where(html[data-theme="light"]) body .border-white\/30 { border-color: rgba(15,23,42,0.2); }
:where(html[data-theme="light"]) body .border-white\/40 { border-color: rgba(15,23,42,0.2); }
:where(html[data-theme="light"]) body .border-white\/5 { border-color: rgba(15,23,42,0.08); }
:where(html[data-theme="light"]) body .border-white\/\[\.05\] { border-color: rgba(15,23,42,0.08); }
:where(html[data-theme="light"]) body .border-white\/\[\.06\] { border-color: rgba(15,23,42,0.086); }
:where(html[data-theme="light"]) body .border-white\/\[\.07\] { border-color: rgba(15,23,42,0.092); }
:where(html[data-theme="light"]) body .border-white\/\[0\.05\] { border-color: rgba(15,23,42,0.08); }
:where(html[data-theme="light"]) body .border-white\/\[0\.06\] { border-color: rgba(15,23,42,0.086); }
:where(html[data-theme="light"]) body .border-white\/\[0\.07\] { border-color: rgba(15,23,42,0.092); }
:where(html[data-theme="light"]) body .border-white\/\[0\.08\] { border-color: rgba(15,23,42,0.098); }
:where(html[data-theme="light"]) body .hover\:border-gray-500:hover { border-color: #94a3b8; }
:where(html[data-theme="light"]) body .hover\:border-gray-600:hover { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .hover\:border-gray-600\/50:hover { border-color: #cbd5e1; }
:where(html[data-theme="light"]) body .hover\:border-gray-700\/50:hover { border-color: #e2e8f0; }
:where(html[data-theme="light"]) body .divide-white\/5 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(15,23,42,0.08); }
:where(html[data-theme="light"]) body .divide-white\/\[0\.05\] > :not([hidden]) ~ :not([hidden]) { border-color: rgba(15,23,42,0.08); }
:where(html[data-theme="light"]) body .divide-white\/\[0\.06\] > :not([hidden]) ~ :not([hidden]) { border-color: rgba(15,23,42,0.086); }
:where(html[data-theme="light"]) body .ring-slate-700 { --tw-ring-color: #e2e8f0; }

/* ── 5. Exceptions ──────────────────────────────────────────────── */
/* White text stays white on solid / gradient fills (buttons, badges). */
:where(html[data-theme="light"]) body :is(.bg-\[\#1877F2\], .bg-blue-500, .bg-blue-600, .bg-emerald-500, .bg-emerald-600, .bg-green-600, .bg-red-500, .bg-red-600, .bg-violet-500, .btn-primary, .btn-pink, .btn-blue, .analytics-cta, [class*="bg-gradient-to-"])[class*="text-white"],
:where(html[data-theme="light"]) body :is(.bg-\[\#1877F2\], .bg-blue-500, .bg-blue-600, .bg-emerald-500, .bg-emerald-600, .bg-green-600, .bg-red-500, .bg-red-600, .bg-violet-500, .btn-primary, .btn-pink, .btn-blue, .analytics-cta, [class*="bg-gradient-to-"]) [class*="text-white"] { color: #fff; }
:where(html[data-theme="light"]) body .hover\:bg-blue-500:hover[class*="hover:text-white"],
:where(html[data-theme="light"]) body .hover\:bg-blue-700:hover[class*="hover:text-white"],
:where(html[data-theme="light"]) body .hover\:bg-emerald-500:hover[class*="hover:text-white"],
:where(html[data-theme="light"]) body .hover\:bg-green-700:hover[class*="hover:text-white"],
:where(html[data-theme="light"]) body .hover\:bg-red-700:hover[class*="hover:text-white"] { color: #fff; }

/* ── 6. Inline style="" colours from templates & JS (generated) ──── */
:where(html[data-theme="light"]) [style*="background:#0f172a"] { background: #ffffff !important; }
:where(html[data-theme="light"]) [style*="background:rgba(0,0,0,.2)"] { background: rgba(15,23,42,0.046) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(0,0,0,.7)"] { background: rgba(15,23,42,0.385) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(10,15,30,.97)"] { background: rgba(255,255,255,0.97) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(10,15,30,.98)"] { background: rgba(255,255,255,0.98) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(15,23,42,.5)"] { background: rgba(255,255,255,0.92) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(15,23,42,.7)"] { background: rgba(255,255,255,0.92) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(15,23,42,.8)"] { background: rgba(255,255,255,0.92) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(255,255,255,.03)"] { background: rgba(15,23,42,0.022) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(255,255,255,.04)"] { background: rgba(15,23,42,0.03) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(255,255,255,.05)"] { background: rgba(15,23,42,0.038) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(255,255,255,.06)"] { background: rgba(15,23,42,0.045) !important; }
:where(html[data-theme="light"]) [style*="background:rgba(255,255,255,.08)"] { background: rgba(15,23,42,0.06) !important; }
:where(html[data-theme="light"]) [style*="border:1px dashed rgba(255,255,255,.12)"] { border: 1px dashed rgba(15,23,42,0.122) !important; }
:where(html[data-theme="light"]) [style*="border:1px solid rgba(255,255,255,.06)"] { border: 1px solid rgba(15,23,42,0.086) !important; }
:where(html[data-theme="light"]) [style*="border:1px solid rgba(255,255,255,.08)"] { border: 1px solid rgba(15,23,42,0.098) !important; }
:where(html[data-theme="light"]) [style*="border:1px solid rgba(255,255,255,.1)"] { border: 1px solid rgba(15,23,42,0.11) !important; }
:where(html[data-theme="light"]) [style*="border:2px solid rgba(10,15,30,.9)"] { border: 2px solid #e9edf3 !important; }
:where(html[data-theme="light"]) [style^="color:#4b5563"], :where(html[data-theme="light"]) [style*=";color:#4b5563"], :where(html[data-theme="light"]) [style*="; color:#4b5563"] { color: #94a3b8 !important; }
:where(html[data-theme="light"]) [style^="color:#60a5fa"], :where(html[data-theme="light"]) [style*=";color:#60a5fa"], :where(html[data-theme="light"]) [style*="; color:#60a5fa"] { color: #2563eb !important; }
:where(html[data-theme="light"]) [style^="color:#6b7280"], :where(html[data-theme="light"]) [style*=";color:#6b7280"], :where(html[data-theme="light"]) [style*="; color:#6b7280"] { color: #64748b !important; }
:where(html[data-theme="light"]) [style^="color:#6ee7a8"], :where(html[data-theme="light"]) [style*=";color:#6ee7a8"], :where(html[data-theme="light"]) [style*="; color:#6ee7a8"] { color: #047857 !important; }
:where(html[data-theme="light"]) [style^="color:#6ee7b7"], :where(html[data-theme="light"]) [style*=";color:#6ee7b7"], :where(html[data-theme="light"]) [style*="; color:#6ee7b7"] { color: #047857 !important; }
:where(html[data-theme="light"]) [style^="color:#818cf8"], :where(html[data-theme="light"]) [style*=";color:#818cf8"], :where(html[data-theme="light"]) [style*="; color:#818cf8"] { color: #4f46e5 !important; }
:where(html[data-theme="light"]) [style^="color:#93c5fd"], :where(html[data-theme="light"]) [style*=";color:#93c5fd"], :where(html[data-theme="light"]) [style*="; color:#93c5fd"] { color: #1d4ed8 !important; }
:where(html[data-theme="light"]) [style^="color:#94a3b8"], :where(html[data-theme="light"]) [style*=";color:#94a3b8"], :where(html[data-theme="light"]) [style*="; color:#94a3b8"] { color: #475569 !important; }
:where(html[data-theme="light"]) [style^="color:#9ca3af"], :where(html[data-theme="light"]) [style*=";color:#9ca3af"], :where(html[data-theme="light"]) [style*="; color:#9ca3af"] { color: #475569 !important; }
:where(html[data-theme="light"]) [style^="color:#9dbaff"], :where(html[data-theme="light"]) [style*=";color:#9dbaff"], :where(html[data-theme="light"]) [style*="; color:#9dbaff"] { color: #4338ca !important; }
:where(html[data-theme="light"]) [style^="color:#a78bfa"], :where(html[data-theme="light"]) [style*=";color:#a78bfa"], :where(html[data-theme="light"]) [style*="; color:#a78bfa"] { color: #7c3aed !important; }
:where(html[data-theme="light"]) [style^="color:#cbd5e1"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#cbd5e1"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#cbd5e1"]:not([style*="background"]) { color: #1e293b !important; }
:where(html[data-theme="light"]) [style^="color:#d1d5db"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#d1d5db"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#d1d5db"]:not([style*="background"]) { color: #1e293b !important; }
:where(html[data-theme="light"]) [style^="color:#e2e8f0"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#e2e8f0"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#e2e8f0"]:not([style*="background"]) { color: #1e293b !important; }
:where(html[data-theme="light"]) [style^="color:#e5e5e5"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#e5e5e5"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#e5e5e5"]:not([style*="background"]) { color: #1e293b !important; }
:where(html[data-theme="light"]) [style^="color:#f1f5f9"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#f1f5f9"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#f1f5f9"]:not([style*="background"]) { color: #0f172a !important; }
:where(html[data-theme="light"]) [style^="color:#f87171"], :where(html[data-theme="light"]) [style*=";color:#f87171"], :where(html[data-theme="light"]) [style*="; color:#f87171"] { color: #dc2626 !important; }
:where(html[data-theme="light"]) [style^="color:#fca5a5"], :where(html[data-theme="light"]) [style*=";color:#fca5a5"], :where(html[data-theme="light"]) [style*="; color:#fca5a5"] { color: #b91c1c !important; }
:where(html[data-theme="light"]) [style^="color:#fff"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#fff"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#fff"]:not([style*="background"]) { color: #0f172a !important; }
:where(html[data-theme="light"]) [style^="color:#fff` :"]:not([style*="background"]), :where(html[data-theme="light"]) [style*=";color:#fff` :"]:not([style*="background"]), :where(html[data-theme="light"]) [style*="; color:#fff` :"]:not([style*="background"]) { color: #0f172a` : !important; }
