/* Small additions on top of Tailwind */
[x-cloak] { display: none !important; }
textarea { font-family: inherit; }

/* Landing page */
.font-display { font-family: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif; }
.text-yellow-glow {
  background: linear-gradient(100deg, #fde047 0%, #facc15 45%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(250, 204, 21, 0.25);
}
.hero-grid {
  background-image:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.35), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

/* Purchase calculator states (toggled by pricing.js) */
[data-tier-card].is-active { border-color: #2563eb; box-shadow: 0 0 0 4px #eff6ff; }
[data-preset].is-active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
#credits-input.is-invalid { border-color: #fca5a5; }

/* Shared sun/moon switch, including the landing and authentication pages. */
.theme-control.theme-switch { position: relative; display: inline-flex; align-items: center; justify-content: space-between; flex: 0 0 76px; width: 76px; height: 40px; padding: 0 11px; border: 1px solid #cbd5e1; border-radius: 999px; background: #e2e8f0; color: #64748b; cursor: pointer; isolation: isolate; }
.theme-control svg { position: relative; z-index: 1; display: block; width: 16px; height: 16px; flex: 0 0 16px; pointer-events: none; }
.theme-switch-thumb { position: absolute; left: 3px; top: 3px; width: 32px; height: 32px; border-radius: 50%; background: white; box-shadow: 0 1px 4px #0002; transition: transform .2s; pointer-events: none; }
.theme-switch:focus-visible { outline: 3px solid #3390ec; outline-offset: 4px; }
.theme-sun { color: #d97706; }
.hero-grid .theme-control { color: #cbd5e1; }

/* Telegram-inspired palette. These utility overrides also cover dynamically
   created results, alerts and pricing states without changing stored content. */
html[data-theme="dark"] { color-scheme: dark; background: #17212b; }
html[data-theme="dark"] body { background: #17212b; color: #e6edf3; }
html[data-theme="dark"] .bg-white { background-color: #212d3b; }
html[data-theme="dark"] .bg-slate-50 { background-color: #192531; }
html[data-theme="dark"] .bg-slate-100 { background-color: #29394a; }
html[data-theme="dark"] .bg-slate-900 { background-color: #101b26; }
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800 { color: #e6edf3; }
html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-600 { color: #b8c7d5; }
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 { color: #95a9bc; }
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300 { border-color: #354657; }
html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #354657; }
html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-slate-100:hover { background-color: #2b3e50; }
html[data-theme="dark"] .hover\:text-slate-800:hover,
html[data-theme="dark"] .hover\:text-slate-900:hover { color: #fff; }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background-color: #17232f; color: #e6edf3; border-color: #405366; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #8b9eb0; }
html[data-theme="dark"] .bg-primary-50 { background-color: #203e55; }
html[data-theme="dark"] .bg-primary-600 { background-color: #3390ec; }
html[data-theme="dark"] .hover\:bg-primary-700:hover { background-color: #257fda; }
html[data-theme="dark"] .text-primary-600,
html[data-theme="dark"] .text-primary-700 { color: #6ab3f3; }
html[data-theme="dark"] .border-primary-100 { border-color: #2e5778; }
html[data-theme="dark"] .focus\:ring-primary-100:focus { --tw-ring-color: #3390ec40; }
html[data-theme="dark"] .bg-emerald-50 { background-color: #193e35; }
html[data-theme="dark"] .text-emerald-700,
html[data-theme="dark"] .text-emerald-800 { color: #7ed8b4; }
html[data-theme="dark"] .border-emerald-200 { border-color: #326653; }
html[data-theme="dark"] .bg-red-50 { background-color: #422c36; }
html[data-theme="dark"] .text-red-600,
html[data-theme="dark"] .text-red-700,
html[data-theme="dark"] .text-red-800 { color: #ff9b9b; }
html[data-theme="dark"] .border-red-200 { border-color: #74424c; }
html[data-theme="dark"] .bg-yellow-50,
html[data-theme="dark"] .bg-amber-50 { background-color: #403a25; }
html[data-theme="dark"] .text-yellow-800,
html[data-theme="dark"] .text-amber-800 { color: #f5d27b; }
html[data-theme="dark"] .bg-blue-50 { background-color: #203e55; }
html[data-theme="dark"] .text-blue-800 { color: #9acdf9; }
html[data-theme="dark"] .border-blue-200 { border-color: #365e80; }
html[data-theme="dark"] [data-tier-card].is-active { border-color: #6ab3f3; box-shadow: 0 0 0 4px #3390ec26; }
html[data-theme="dark"] [data-preset].is-active { border-color: #6ab3f3; background: #203e55; color: #9acdf9; }
html[data-theme="dark"] .theme-control { color: #8399ad; }
html[data-theme="dark"] .theme-control.theme-switch { background: #17232f; border-color: #405366; }
html[data-theme="dark"] .theme-switch-thumb { background: #315779; transform: translateX(36px); }
html[data-theme="dark"] .theme-moon { color: #8dc8ff; }
html[data-theme="dark"] .theme-sun { color: #8399ad; }
@media (prefers-reduced-motion: reduce) {
  .theme-switch-thumb { transition: none; }
}
