/**
 * Friendly TOEIC — forced dark mode (always on, ignores OS preference)
 */

html.dark-site {
  color-scheme: dark;
}

html.dark-site,
html.dark-site body {
  background-color: #0f172a !important;
  color: #e2e8f0;
}

html.dark-site main {
  background-color: #0f172a;
}

/* ─── Surfaces ─── */
html.dark-site .bg-white {
  background-color: #1e293b !important;
}

html.dark-site .bg-slate-50 {
  background-color: #0f172a !important;
}

html.dark-site .bg-slate-100 {
  background-color: #334155 !important;
}

html.dark-site .bg-slate-200 {
  background-color: #475569 !important;
}

html.dark-site .bg-indigo-50 {
  background-color: rgba(49, 46, 129, 0.35) !important;
}

html.dark-site .bg-indigo-100 {
  background-color: rgba(67, 56, 202, 0.45) !important;
}

html.dark-site .bg-emerald-50 {
  background-color: rgba(6, 78, 59, 0.35) !important;
}

html.dark-site .bg-emerald-100 {
  background-color: rgba(6, 95, 70, 0.45) !important;
}

html.dark-site .bg-amber-50 {
  background-color: rgba(120, 53, 15, 0.35) !important;
}

html.dark-site .bg-amber-100 {
  background-color: rgba(146, 64, 14, 0.45) !important;
}

html.dark-site .bg-rose-50 {
  background-color: rgba(136, 19, 55, 0.3) !important;
}

html.dark-site .bg-rose-100 {
  background-color: rgba(159, 18, 57, 0.4) !important;
}

html.dark-site .bg-violet-50 {
  background-color: rgba(76, 29, 149, 0.35) !important;
}

html.dark-site .bg-violet-100 {
  background-color: rgba(91, 33, 182, 0.45) !important;
}

html.dark-site .bg-purple-50 {
  background-color: rgba(88, 28, 135, 0.35) !important;
}

html.dark-site .bg-purple-100 {
  background-color: rgba(107, 33, 168, 0.45) !important;
}

html.dark-site .bg-cyan-50 {
  background-color: rgba(14, 116, 144, 0.3) !important;
}

html.dark-site .bg-teal-50 {
  background-color: rgba(15, 118, 110, 0.3) !important;
}

html.dark-site .bg-sky-50 {
  background-color: rgba(12, 74, 110, 0.35) !important;
}

html.dark-site .bg-sky-100 {
  background-color: rgba(14, 116, 144, 0.4) !important;
}

html.dark-site .bg-blue-50 {
  background-color: rgba(30, 58, 138, 0.35) !important;
}

html.dark-site .bg-yellow-50 {
  background-color: rgba(113, 63, 18, 0.35) !important;
}

html.dark-site .bg-orange-50 {
  background-color: rgba(124, 45, 18, 0.35) !important;
}

html.dark-site .bg-fuchsia-50 {
  background-color: rgba(112, 26, 117, 0.3) !important;
}

/* ─── Text ─── */
html.dark-site .text-slate-900,
html.dark-site .text-slate-800 {
  color: #f1f5f9 !important;
}

html.dark-site .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark-site .text-slate-600 {
  color: #cbd5e1 !important;
}

html.dark-site .text-slate-500 {
  color: #a8b8cc !important;
}

html.dark-site .text-slate-400 {
  color: #b8c5d6 !important;
}

html.dark-site .text-indigo-950 {
  color: #e0e7ff !important;
}

html.dark-site .text-indigo-900 {
  color: #c7d2fe !important;
}

html.dark-site .text-indigo-800 {
  color: #a5b4fc !important;
}

html.dark-site .text-indigo-700 {
  color: #a5b4fc !important;
}

html.dark-site .text-emerald-900,
html.dark-site .text-emerald-800 {
  color: #6ee7b7 !important;
}

html.dark-site .text-emerald-700 {
  color: #34d399 !important;
}

html.dark-site .text-amber-800,
html.dark-site .text-amber-700 {
  color: #fcd34d !important;
}

html.dark-site .text-rose-800,
html.dark-site .text-rose-700 {
  color: #fda4af !important;
}

html.dark-site .text-violet-800,
html.dark-site .text-violet-700 {
  color: #c4b5fd !important;
}

html.dark-site .text-purple-800,
html.dark-site .text-purple-700 {
  color: #d8b4fe !important;
}

html.dark-site .text-cyan-800,
html.dark-site .text-cyan-700,
html.dark-site .text-cyan-600 {
  color: #67e8f9 !important;
}

html.dark-site .text-teal-800,
html.dark-site .text-teal-700 {
  color: #5eead4 !important;
}

html.dark-site .text-sky-800,
html.dark-site .text-sky-700 {
  color: #7dd3fc !important;
}

/* ─── Borders ─── */
html.dark-site .border-slate-50,
html.dark-site .border-slate-100 {
  border-color: #334155 !important;
}

html.dark-site .border-slate-200 {
  border-color: #475569 !important;
}

html.dark-site .border-indigo-100 {
  border-color: rgba(99, 102, 241, 0.35) !important;
}

html.dark-site .border-emerald-100 {
  border-color: rgba(52, 211, 153, 0.3) !important;
}

html.dark-site .border-amber-100 {
  border-color: rgba(251, 191, 36, 0.3) !important;
}

html.dark-site .border-rose-100 {
  border-color: rgba(251, 113, 133, 0.3) !important;
}

html.dark-site .border-violet-100 {
  border-color: rgba(167, 139, 250, 0.3) !important;
}

html.dark-site .border-cyan-100,
html.dark-site .border-sky-100 {
  border-color: rgba(34, 211, 238, 0.3) !important;
}

html.dark-site .border-teal-100 {
  border-color: rgba(45, 212, 191, 0.3) !important;
}

html.dark-site .border-purple-100,
html.dark-site .border-purple-200 {
  border-color: rgba(192, 132, 252, 0.35) !important;
}

html.dark-site .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #334155 !important;
}

/* ─── Hover / active surfaces ─── */
html.dark-site .hover\:bg-slate-50:hover {
  background-color: #334155 !important;
}

html.dark-site .hover\:bg-slate-100:hover {
  background-color: #475569 !important;
}

html.dark-site .hover\:bg-slate-200:hover {
  background-color: #64748b !important;
}

html.dark-site .hover\:bg-indigo-50:hover {
  background-color: rgba(49, 46, 129, 0.5) !important;
}

html.dark-site .hover\:bg-indigo-100:hover {
  background-color: rgba(67, 56, 202, 0.55) !important;
}

html.dark-site .hover\:bg-emerald-50:hover {
  background-color: rgba(6, 78, 59, 0.45) !important;
}

html.dark-site .hover\:bg-white:hover {
  background-color: #334155 !important;
}

html.dark-site .hover\:border-indigo-200:hover {
  border-color: rgba(129, 140, 248, 0.5) !important;
}

html.dark-site .hover\:border-emerald-200:hover {
  border-color: rgba(52, 211, 153, 0.45) !important;
}

html.dark-site .hover\:border-amber-200:hover {
  border-color: rgba(251, 191, 36, 0.45) !important;
}

html.dark-site .hover\:text-indigo-800:hover {
  color: #c7d2fe !important;
}

/* ─── Dashboard CTA buttons (white bg) ─── */
html.dark-site .bg-white.text-indigo-700 {
  background-color: #eef2ff !important;
  color: #4338ca !important;
}

html.dark-site .bg-white.text-indigo-700:hover,
html.dark-site .hover\:bg-slate-100.bg-white:hover {
  background-color: #e0e7ff !important;
}

/* ─── Gradients (flashcards, cards) ─── */
html.dark-site .from-indigo-50 {
  --tw-gradient-from: #312e81 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(49 46 129 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-purple-50 {
  --tw-gradient-from: #3b0764 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(59 7 100 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .to-white {
  --tw-gradient-to: #1e293b var(--tw-gradient-to-position) !important;
}

html.dark-site .bg-gradient-to-br.from-indigo-50.to-white,
html.dark-site .bg-gradient-to-br.from-purple-50.to-white {
  background-image: linear-gradient(to bottom right, #312e81, #1e293b) !important;
}

/* ─── Form controls ─── */
html.dark-site input,
html.dark-site select,
html.dark-site textarea {
  background-color: #0f172a !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

html.dark-site input::placeholder,
html.dark-site textarea::placeholder {
  color: #64748b !important;
}

html.dark-site select option {
  background-color: #1e293b;
  color: #f1f5f9;
}

/* ─── Shadows (soften on dark) ─── */
html.dark-site .shadow-sm,
html.dark-site .shadow,
html.dark-site .shadow-lg {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

html.dark-site .shadow-inner {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

/* ─── Loading & modals ─── */
html.dark-site #app-loading {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html.dark-site #custom-notification {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

/* ─── Lesson prose (inline overrides in index.html) ─── */
html.dark-site .lesson-explanation-card {
  border-color: #854d0e !important;
  background: linear-gradient(135deg, #422006 0%, #1e293b 100%) !important;
  color: #fde68a !important;
}

/* ─── Tables in lessons ─── */
html.dark-site table {
  color: #e2e8f0;
}

html.dark-site table td,
html.dark-site table th {
  border-color: #334155 !important;
}

/* ─── Images on cards ─── */
html.dark-site #card-image-wrap,
html.dark-site #card-image {
  background-color: #0f172a !important;
}

html.dark-site img.bg-white {
  background-color: #0f172a !important;
}

/* ─── Scrollbar ─── */
html.dark-site ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html.dark-site ::-webkit-scrollbar-track {
  background: #0f172a;
}

html.dark-site ::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

html.dark-site ::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ═══════════════════════════════════════════════════════════
   CONTRAST FIXES — light bg + light text, opacity variants
   ═══════════════════════════════════════════════════════════ */

/* Muted labels — readable on dark surfaces */
html.dark-site .text-slate-400 {
  color: #b8c5d6 !important;
}

html.dark-site .text-slate-500 {
  color: #a8b8cc !important;
}

html.dark-site .text-slate-300 {
  color: #cbd5e1 !important;
}
html.dark-site .text-emerald-600 {
  color: #4ade80 !important;
}

html.dark-site .text-emerald-950 {
  color: #a7f3d0 !important;
}

html.dark-site .text-emerald-900 {
  color: #6ee7b7 !important;
}

html.dark-site .text-indigo-600 {
  color: #818cf8 !important;
}

html.dark-site .text-indigo-500 {
  color: #a5b4fc !important;
}

html.dark-site .text-amber-600 {
  color: #fbbf24 !important;
}

html.dark-site .text-amber-500 {
  color: #fcd34d !important;
}

html.dark-site .text-purple-500,
html.dark-site .text-purple-600 {
  color: #c4b5fd !important;
}

html.dark-site .text-violet-600 {
  color: #a78bfa !important;
}

html.dark-site .text-cyan-500 {
  color: #67e8f9 !important;
}

html.dark-site .text-teal-600 {
  color: #2dd4bf !important;
}

html.dark-site .text-sky-600 {
  color: #38bdf8 !important;
}

html.dark-site .text-blue-600 {
  color: #60a5fa !important;
}

html.dark-site .text-rose-600 {
  color: #fb7185 !important;
}

html.dark-site .text-pink-700 {
  color: #f9a8d4 !important;
}

html.dark-site .text-pink-600 {
  color: #f472b6 !important;
}

html.dark-site .text-sky-700 {
  color: #7dd3fc !important;
}

html.dark-site .text-lime-700 {
  color: #bef264 !important;
}

html.dark-site .text-yellow-700 {
  color: #fde047 !important;
}

html.dark-site .text-orange-700,
html.dark-site .text-orange-800 {
  color: #fdba74 !important;
}

/* Opacity / slash variants — bg-emerald-50/70 etc. */
html.dark-site [class*="bg-emerald-50"] {
  background-color: rgba(6, 78, 59, 0.55) !important;
}

html.dark-site [class*="bg-indigo-50"] {
  background-color: rgba(49, 46, 129, 0.55) !important;
}

html.dark-site [class*="bg-amber-50"] {
  background-color: rgba(120, 53, 15, 0.55) !important;
}

html.dark-site [class*="bg-orange-50"] {
  background-color: rgba(124, 45, 18, 0.5) !important;
}

html.dark-site [class*="bg-yellow-50"] {
  background-color: rgba(113, 63, 18, 0.5) !important;
}

html.dark-site [class*="bg-rose-50"] {
  background-color: rgba(136, 19, 55, 0.45) !important;
}

html.dark-site [class*="bg-pink-50"] {
  background-color: rgba(131, 24, 67, 0.45) !important;
}

html.dark-site [class*="bg-violet-50"] {
  background-color: rgba(76, 29, 149, 0.5) !important;
}

html.dark-site [class*="bg-purple-50"] {
  background-color: rgba(88, 28, 135, 0.5) !important;
}

html.dark-site [class*="bg-cyan-50"] {
  background-color: rgba(14, 116, 144, 0.45) !important;
}

html.dark-site [class*="bg-teal-50"] {
  background-color: rgba(15, 118, 110, 0.45) !important;
}

html.dark-site [class*="bg-sky-50"] {
  background-color: rgba(12, 74, 110, 0.5) !important;
}

html.dark-site [class*="bg-blue-50"] {
  background-color: rgba(30, 58, 138, 0.5) !important;
}

html.dark-site [class*="bg-lime-50"] {
  background-color: rgba(54, 83, 20, 0.5) !important;
}

html.dark-site [class*="bg-fuchsia-50"] {
  background-color: rgba(112, 26, 117, 0.45) !important;
}

html.dark-site [class*="bg-pink-100"] {
  background-color: rgba(131, 24, 67, 0.55) !important;
}

html.dark-site [class*="bg-sky-100"] {
  background-color: rgba(12, 74, 110, 0.55) !important;
}

html.dark-site [class*="bg-white/"] {
  background-color: rgba(30, 41, 59, 0.92) !important;
}

/* Gradient stops — warm-up, strategy scenes, placeholders */
html.dark-site .from-amber-50 {
  --tw-gradient-from: #451a03 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-orange-50 {
  --tw-gradient-from: #431407 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(67 20 7 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-yellow-50 {
  --tw-gradient-from: #422006 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(66 32 6 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-rose-50 {
  --tw-gradient-from: #4c0519 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(76 5 25 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-pink-50 {
  --tw-gradient-from: #500724 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-lime-50 {
  --tw-gradient-from: #1a2e05 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(26 46 5 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-slate-50 {
  --tw-gradient-from: #1e293b var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(30 41 59 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-emerald-50 {
  --tw-gradient-from: #064e3b var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(6 78 59 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-teal-50 {
  --tw-gradient-from: #134e4a var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(19 78 74 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-cyan-50 {
  --tw-gradient-from: #164e63 var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(22 78 99 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-sky-50 {
  --tw-gradient-from: #0c4a6e var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(12 74 110 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site .from-blue-50 {
  --tw-gradient-from: #1e3a8a var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(30 58 138 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.dark-site [class*="to-orange-50"],
html.dark-site [class*="to-yellow-50"],
html.dark-site [class*="to-amber-50"],
html.dark-site [class*="to-rose-50"],
html.dark-site [class*="to-pink-50"],
html.dark-site [class*="to-lime-50"],
html.dark-site [class*="to-emerald-50"],
html.dark-site [class*="to-teal-50"],
html.dark-site [class*="to-cyan-50"],
html.dark-site [class*="to-sky-50"],
html.dark-site [class*="to-blue-50"],
html.dark-site [class*="to-indigo-50"],
html.dark-site [class*="to-purple-50"],
html.dark-site [class*="to-violet-50"],
html.dark-site [class*="to-slate-50"] {
  --tw-gradient-to: #1e293b var(--tw-gradient-to-position) !important;
}

/* Force dark gradients on common lesson boxes */
html.dark-site .bg-gradient-to-br.from-amber-50,
html.dark-site [class*="from-amber-50"][class*="bg-gradient-to-br"] {
  background-image: linear-gradient(to bottom right, #451a03, #1c1917) !important;
}

html.dark-site [class*="from-orange-50"][class*="bg-gradient-to-br"],
html.dark-site [class*="from-amber-50"][class*="to-orange"] {
  background-image: linear-gradient(to bottom right, #451a03, #1c1917) !important;
}

html.dark-site [class*="bg-gradient-to-br"][class*="from-slate-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-indigo-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-emerald-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-blue-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-sky-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-amber-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-rose-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-lime-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-purple-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-cyan-50"],
html.dark-site [class*="bg-gradient-to-br"][class*="from-teal-50"] {
  background-image: linear-gradient(to bottom right, #1e293b, #0f172a) !important;
}

/* Part 3/4 talk blocks: from-teal-50/80 or from-cyan-50/80 → to-white */
html.dark-site [class*="from-cyan-50/80"][class*="bg-gradient-to-br"],
html.dark-site [class*="from-cyan-50"][class*="to-white"][class*="bg-gradient-to-br"] {
  background-image: linear-gradient(to bottom right, #164e63, #0f172a) !important;
}

html.dark-site [class*="from-teal-50/80"][class*="bg-gradient-to-br"],
html.dark-site [class*="from-teal-50"][class*="to-white"][class*="bg-gradient-to-br"] {
  background-image: linear-gradient(to bottom right, #134e4a, #0f172a) !important;
}

html.dark-site [class*="from-indigo-50/80"] {
  background-image: linear-gradient(to bottom right, rgba(49, 46, 129, 0.65), #1e293b) !important;
}

/* Text inside Part 3/4 gradient talk boxes */
html.dark-site [class*="from-teal-50"][class*="bg-gradient-to-br"] .text-slate-800,
html.dark-site [class*="from-teal-50"][class*="bg-gradient-to-br"] .text-slate-700,
html.dark-site [class*="from-teal-50"][class*="bg-gradient-to-br"] .text-slate-500,
html.dark-site [class*="from-teal-50"][class*="bg-gradient-to-br"] .text-slate-600,
html.dark-site [class*="from-teal-50"][class*="bg-gradient-to-br"] p,
html.dark-site [class*="from-cyan-50"][class*="bg-gradient-to-br"] .text-slate-800,
html.dark-site [class*="from-cyan-50"][class*="bg-gradient-to-br"] .text-slate-700,
html.dark-site [class*="from-cyan-50"][class*="bg-gradient-to-br"] .text-slate-500,
html.dark-site [class*="from-cyan-50"][class*="bg-gradient-to-br"] .text-slate-600,
html.dark-site [class*="from-cyan-50"][class*="bg-gradient-to-br"] p {
  color: #e2e8f0 !important;
}

html.dark-site [class*="from-teal-50"] [class*="text-teal-700"],
html.dark-site [class*="from-cyan-50"] [class*="text-cyan-700"] {
  color: #5eead4 !important;
}

html.dark-site [class*="from-teal-50"] [class*="text-teal-600"],
html.dark-site [class*="from-cyan-50"] [class*="text-cyan-600"] {
  color: #2dd4bf !important;
}

/* Lesson prose — always readable on dark tinted panels */
html.dark-site .lesson-prose,
html.dark-site .lesson-prose p,
html.dark-site .lesson-prose li,
html.dark-site .lesson-prose .text-slate-700,
html.dark-site .lesson-prose .text-slate-600 {
  color: #e2e8f0 !important;
}

html.dark-site .lesson-prose .lesson-keyword {
  color: #c7d2fe !important;
  background: linear-gradient(to bottom, transparent 55%, rgba(79, 70, 229, 0.45) 55%) !important;
}

html.dark-site .lesson-prose .lesson-emphasis {
  color: #6ee7b7 !important;
}

html.dark-site .lesson-prose .lesson-translation {
  color: #94a3b8 !important;
}

/* Strategy tip pills — text inside colored boxes */
html.dark-site [class*="bg-emerald-50"] .text-slate-700,
html.dark-site [class*="bg-indigo-50"] .text-slate-700,
html.dark-site [class*="bg-amber-50"] .text-slate-700,
html.dark-site [class*="bg-blue-50"] .text-slate-700,
html.dark-site [class*="bg-violet-50"] .text-slate-700,
html.dark-site [class*="bg-cyan-50"] .text-slate-700,
html.dark-site [class*="bg-teal-50"] .text-slate-700,
html.dark-site [class*="bg-rose-50"] .text-slate-700,
html.dark-site [class*="bg-orange-50"] .text-slate-700 {
  color: #f1f5f9 !important;
}

html.dark-site [class*="bg-emerald-50"] [class*="text-emerald-"],
html.dark-site [class*="bg-indigo-50"] [class*="text-indigo-"],
html.dark-site [class*="bg-amber-50"] [class*="text-amber-"],
html.dark-site [class*="bg-blue-50"] [class*="text-blue-"],
html.dark-site [class*="bg-violet-50"] [class*="text-violet-"],
html.dark-site [class*="bg-cyan-50"] [class*="text-cyan-"],
html.dark-site [class*="bg-teal-50"] [class*="text-teal-"] {
  color: #f1f5f9 !important;
  font-weight: 800;
}

/* Warm-up chips */
html.dark-site [class*="border-amber-200"][class*="text-amber-800"] {
  background-color: #422006 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

html.dark-site [class*="border-amber-200"][class*="text-amber-800"]:hover {
  background-color: #78350f !important;
}

/* Part 1 placeholder emoji circles */
html.dark-site [class*="bg-white/90"] {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: #475569 !important;
}

/* Teacher panel gradient box */
html.dark-site .bg-gradient-to-br.from-indigo-50.to-white,
html.dark-site [class*="from-indigo-50"][class*="to-white"][class*="bg-gradient-to-br"] {
  background-image: linear-gradient(to bottom right, #312e81, #1e293b) !important;
}

html.dark-site .border-indigo-100.bg-gradient-to-br p,
html.dark-site .border-indigo-100.bg-gradient-to-br span {
  color: #e2e8f0 !important;
}

/* Reference Graphic monospace box */
html.dark-site [class*="border-cyan-100"][class*="bg-cyan-50"] {
  background-color: rgba(14, 116, 144, 0.35) !important;
  border-color: rgba(34, 211, 238, 0.35) !important;
  color: #e2e8f0 !important;
}

html.dark-site [class*="border-cyan-100"][class*="bg-cyan-50"] .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark-site [class*="text-cyan-700"][class*="bg-cyan-100"] {
  background-color: rgba(14, 116, 144, 0.5) !important;
  color: #67e8f9 !important;
}

/* —— Dashboard layout v2 —— */
.dash-hero-continue {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.dash-hero-continue--emerald {
  box-shadow: 0 12px 48px rgba(16, 185, 129, 0.12), 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dash-hero-continue--violet {
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.14), 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dash-hero-continue--cyan {
  box-shadow: 0 12px 48px rgba(34, 211, 238, 0.12), 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dash-hero-cta {
  letter-spacing: 0.02em;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  animation: dash-cta-glow 2.8s ease-in-out infinite;
}

.dash-hero-cta--emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 45%, #34d399 100%) !important;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.4),
    0 8px 28px rgba(16, 185, 129, 0.55),
    0 0 32px rgba(16, 185, 129, 0.35);
}

.dash-hero-cta--emerald:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%) !important;
  box-shadow:
    0 0 0 1px rgba(110, 231, 183, 0.55),
    0 12px 36px rgba(16, 185, 129, 0.65),
    0 0 40px rgba(16, 185, 129, 0.45);
}

.dash-hero-cta--violet {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 42%, #a855f7 100%) !important;
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.45),
    0 8px 28px rgba(124, 58, 237, 0.55),
    0 0 32px rgba(139, 92, 246, 0.38);
}

.dash-hero-cta--violet:hover {
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 42%, #9333ea 100%) !important;
  box-shadow:
    0 0 0 1px rgba(196, 181, 253, 0.55),
    0 12px 36px rgba(124, 58, 237, 0.65),
    0 0 44px rgba(139, 92, 246, 0.48);
}

.dash-hero-cta--cyan {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 45%, #22d3ee 100%) !important;
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.4),
    0 8px 28px rgba(6, 182, 212, 0.5),
    0 0 32px rgba(34, 211, 238, 0.32);
}

.dash-hero-cta--cyan:hover {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 45%, #06b6d4 100%) !important;
  box-shadow:
    0 0 0 1px rgba(165, 243, 252, 0.55),
    0 12px 36px rgba(6, 182, 212, 0.62),
    0 0 40px rgba(34, 211, 238, 0.42);
}

@keyframes dash-cta-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.dash-mission-scroll {
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
}

.dash-journey-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-stat-card {
  min-height: 0;
}

.dash-badge--locked {
  border-color: #334155 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  color: #64748b !important;
  opacity: 0.55;
  filter: grayscale(1);
}

.dash-badge--locked .dash-badge-icon {
  background: #1e293b !important;
  color: #475569 !important;
}

.dash-badge--unlocked {
  border-color: rgba(168, 85, 247, 0.45) !important;
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.35), rgba(30, 27, 75, 0.5)) !important;
  color: #e9d5ff !important;
  animation: dash-badge-glow 3s ease-in-out infinite;
}

.dash-badge--unlocked .dash-badge-icon {
  background: linear-gradient(135deg, #9333ea, #6366f1) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.55);
  animation: dash-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes dash-badge-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(168, 85, 247, 0); }
  50% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.25); }
}

@keyframes dash-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ─── Vocab flashcard: prominent start CTA ─── */
.vocab-start-cta-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-width: min(100%, 280px);
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.38);
  animation: vocab-cta-glow 2.4s ease-in-out infinite;
}

.vocab-start-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 48%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.22) 52%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: vocab-cta-shimmer 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.vocab-start-cta-btn > * {
  position: relative;
  z-index: 2;
}

.vocab-start-cta-btn:hover {
  box-shadow: 0 12px 36px rgba(79, 70, 229, 0.48);
}

@keyframes vocab-cta-shimmer {
  0%, 100% { transform: translateX(-120%); }
  45%, 55% { transform: translateX(120%); }
}

@keyframes vocab-cta-glow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.32), 0 0 0 0 rgba(129, 140, 248, 0.35);
  }
  50% {
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.48), 0 0 0 6px rgba(129, 140, 248, 0);
  }
}

html.dark-site .vocab-start-cta-btn {
  background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

html.dark-site .vocab-start-cta-btn:hover {
  background: linear-gradient(135deg, #818cf8, #8b5cf6) !important;
}

/* —— Phase B: Dashboard neon + Learning Map —— */
.dash-neon-hero {
  animation: dash-neon-hero-pulse 3.2s ease-in-out infinite;
}

@keyframes dash-neon-hero-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}

.dash-neon-card {
  position: relative;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.dash-neon-card--emerald {
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.18),
    0 8px 32px rgba(16, 185, 129, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-neon-card--violet {
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.2),
    0 8px 32px rgba(124, 58, 237, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-neon-card--cyan {
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.18),
    0 8px 32px rgba(6, 182, 212, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dash-neon-card--indigo {
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.22),
    0 8px 28px rgba(99, 102, 241, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dash-neon-indigo 3.5s ease-in-out infinite;
}

.dash-neon-card--amber {
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.28),
    0 8px 32px rgba(245, 158, 11, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: dash-neon-amber 3s ease-in-out infinite;
}

@keyframes dash-neon-indigo {
  0%, 100% { box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.18), 0 8px 28px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
  50% { box-shadow: 0 0 0 1px rgba(165, 180, 252, 0.35), 0 10px 36px rgba(99, 102, 241, 0.22), 0 0 24px rgba(129, 140, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
}

@keyframes dash-neon-amber {
  0%, 100% { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.22), 0 8px 32px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
  50% { box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.4), 0 10px 40px rgba(245, 158, 11, 0.24), 0 0 28px rgba(251, 191, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
}

.dash-learning-map-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
}

.dash-map-card {
  flex: 1 1 0;
  min-width: 5.5rem;
  max-width: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.dash-map-card:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 116, 139, 0.9);
}

.dash-map-card-day {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.dash-map-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(51, 65, 85, 0.6);
  color: #94a3b8;
}

.dash-map-card-title {
  font-size: 0.6rem;
  line-height: 1.25;
  color: #64748b;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dash-map-card-badge {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  color: #94a3b8;
}

.dash-map-card--done {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(6, 78, 59, 0.25);
}

.dash-map-card--done .dash-map-card-icon {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.dash-map-card--done .dash-map-card-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.dash-map-card--upcoming .dash-map-card-icon {
  background: rgba(71, 85, 105, 0.45);
  color: #cbd5e1;
}

.dash-map-card--locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.dash-map-card--locked .dash-map-card-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.dash-map-card--active {
  transform: scale(1.03);
  z-index: 1;
}

.dash-map-card--active.dash-map-card--emerald {
  border-color: rgba(52, 211, 153, 0.65);
  background: linear-gradient(160deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.8));
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.35),
    0 0 24px rgba(16, 185, 129, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.35);
  animation: dash-map-glow-emerald 2.6s ease-in-out infinite;
}

.dash-map-card--active.dash-map-card--violet {
  border-color: rgba(167, 139, 250, 0.65);
  background: linear-gradient(160deg, rgba(76, 29, 149, 0.4), rgba(15, 23, 42, 0.8));
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.35),
    0 0 24px rgba(139, 92, 246, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.35);
  animation: dash-map-glow-violet 2.6s ease-in-out infinite;
}

.dash-map-card--active.dash-map-card--cyan {
  border-color: rgba(103, 232, 249, 0.65);
  background: linear-gradient(160deg, rgba(14, 116, 144, 0.4), rgba(15, 23, 42, 0.8));
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.35),
    0 0 24px rgba(34, 211, 238, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.35);
  animation: dash-map-glow-cyan 2.6s ease-in-out infinite;
}

.dash-map-card--active .dash-map-card-day {
  color: #e2e8f0;
}

.dash-map-card--active .dash-map-card-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dash-map-card--active .dash-map-card-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@keyframes dash-map-glow-emerald {
  0%, 100% { box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.3), 0 0 18px rgba(16, 185, 129, 0.28), 0 8px 24px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.5), 0 0 32px rgba(16, 185, 129, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35); }
}

@keyframes dash-map-glow-violet {
  0%, 100% { box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.3), 0 0 18px rgba(139, 92, 246, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.5), 0 0 32px rgba(139, 92, 246, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35); }
}

@keyframes dash-map-glow-cyan {
  0%, 100% { box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.3), 0 0 18px rgba(34, 211, 238, 0.28), 0 8px 24px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(165, 243, 252, 0.5), 0 0 32px rgba(34, 211, 238, 0.42), 0 8px 24px rgba(0, 0, 0, 0.35); }
}

.dash-learning-map-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.dash-learning-map-bar--emerald { background: linear-gradient(90deg, #059669, #34d399); }
.dash-learning-map-bar--violet { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.dash-learning-map-bar--cyan { background: linear-gradient(90deg, #0891b2, #22d3ee); }

.dash-today-goal .h-1\.5.bg-indigo-500,
.dash-today-goal div.bg-indigo-500 {
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.45);
}

/* Teacher dashboard — stat values readable on dark bg */
html.dark-site #tab-teacher .teacher-stat-value,
html.dark-site #teacher-class-size {
  color: #f1f5f9 !important;
}

html.dark-site #tab-teacher .text-purple-950 {
  color: #e9d5ff !important;
}

html.dark-site #tab-teacher #teacher-student-sort,
html.dark-site #tab-teacher #teacher-student-search {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark-site #tab-teacher #teacher-student-sort option {
  background-color: #0f172a;
  color: #e2e8f0;
}