/* ========================================================================= */
/* KINGDOM DAY TRADERS (KDT INSTITUTE) — BRAND STYLESHEET                     */
/* Matched to Manus Design System: Royal Obsidian Purple & Metallic Gold     */
/* ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=Barlow+Semi+Condensed:wght@500;600;700;800&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;0,800;0,900;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Royal Obsidian Purple Palette — Elevated Luxury Tier */
  --kdt-purple-deep: #160a2c;
  --kdt-purple-dark: #110524;
  --kdt-purple-mid: #221246;
  --kdt-purple-card: #1f0f3e;
  --kdt-purple-card-hover: #281450;
  --kdt-purple-border: rgba(201, 168, 76, 0.32);
  --kdt-purple-glow: rgba(65, 28, 122, 0.65);

  /* Metallic & Kingdom Gold Palette */
  --kdt-gold: #C9A84C;
  --kdt-gold-light: #E5C672;
  --kdt-gold-dark: #9E8327;
  --kdt-gold-glow: rgba(201, 168, 76, 0.35);

  /* Terminal Telemetry Accents */
  --bloomberg-orange: #FF6600;
  --terminal-green: #00E676;
  --terminal-red: #FF3B30;

  /* Typography */
  --font-headline: 'Barlow Condensed', sans-serif;
  --font-label: 'Barlow Semi Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & typography */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--kdt-purple-deep);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--kdt-purple-dark);
}
::-webkit-scrollbar-thumb {
  background: #2d1554;
  border-radius: 3px;
  border: 1px solid rgba(201, 168, 76, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--kdt-gold);
}

/* ========================================================================= */
/* BRAND TYPOGRAPHY & BUTTON CLASSES (MATCHED TO MANUS SPEC)                 */
/* ========================================================================= */

.kdt-section-label {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kdt-gold);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.kdt-headline {
  font-family: var(--font-headline);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.kdt-subheading {
  font-family: var(--font-headline);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kdt-gold-line {
  background: linear-gradient(90deg, var(--kdt-gold) 0%, transparent 100%);
  height: 1.5px;
}

.kdt-card {
  background-color: var(--kdt-purple-card);
  border: 1px solid var(--kdt-purple-border);
  box-shadow: 0 8px 24px rgba(10, 3, 20, 0.45);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.kdt-card:hover {
  background-color: var(--kdt-purple-card-hover);
  border-color: var(--kdt-gold);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(201, 168, 76, 0.18);
}

/* Primary Gold Action Button */
.kdt-btn-primary {
  background: linear-gradient(135deg, var(--kdt-gold) 0%, #E8C55A 100%);
  color: var(--kdt-purple-deep);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(201, 168, 76, 0.35);
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.kdt-btn-primary:hover {
  background: linear-gradient(135deg, var(--kdt-gold-light) 0%, #F5D77F 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.55);
  color: var(--kdt-purple-deep);
}

/* Outline Gold Button */
.kdt-btn-outline {
  color: #FFFFFF;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: transparent;
  border: 1px solid rgba(201, 168, 76, 0.5);
  padding: 0.85rem 2.2rem;
  font-family: var(--font-headline);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.kdt-btn-outline:hover {
  border-color: var(--kdt-gold);
  color: var(--kdt-gold);
  background: rgba(201, 168, 76, 0.08);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}

/* ========================================================================= */
/* CORNER BRACKETS (HERO & TERMINAL ACCENTS)                                 */
/* ========================================================================= */
.bracket-frame {
  position: relative;
}

.bracket-tl, .bracket-tr, .bracket-bl, .bracket-br {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--kdt-gold);
  z-index: 20;
  pointer-events: none;
}
.bracket-tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.bracket-tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.bracket-bl { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.bracket-br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }

/* ========================================================================= */
/* TICKER RIBBON (INFINITE CONTINUOUS SCROLL)                                */
/* ========================================================================= */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: #0b0417;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-slide 38s linear infinite;
}

.ticker-move:hover {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ========================================================================= */
/* MANNA SIGNAL CARD COMPONENTS (PIXEL-PERFECT FROM SCREENSHOT)              */
/* ========================================================================= */
.manna-card {
  background: #110724;
  border: 1.5px solid rgba(201, 168, 76, 0.35);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.manna-badge-forex {
  background: rgba(138, 75, 255, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
  font-size: 0.65rem;
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.manna-badge-futures {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 0.65rem;
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.manna-tag-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
}

.manna-conviction-badge {
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: #E5C672;
  font-size: 0.7rem;
  font-family: var(--font-label);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.manna-action-long {
  background: #064e3b;
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.72rem;
  font-family: var(--font-label);
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.manna-action-limit {
  background: #3f1515;
  border: 1px solid #b91c1c;
  color: #f87171;
  font-size: 0.72rem;
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.manna-entry-fill-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid #10b981;
  border-radius: 6px;
  padding: 8px 12px;
}

.manna-distance-pill {
  background: #190f36;
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.manna-live-rr-pill {
  background: #112822;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.manna-btn-footer {
  background: #1a0f33;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
}

.manna-btn-footer:hover {
  border-color: var(--kdt-gold);
  color: #FFFFFF;
}

.manna-btn-rescan {
  background: #172554;
  border: 1px solid #3b82f6;
  color: #93c5fd;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.manna-btn-rescan:hover {
  background: #1e3a8a;
  color: #FFFFFF;
}

/* Interactive Video Demo Canvas */
.video-preview-canvas {
  position: relative;
  background: #090312;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

/* ========================================================================= */
/* MODALS & SLIDERS                                                          */
/* ========================================================================= */
.modal-backdrop {
  transition: opacity 0.2s ease-in-out;
}

.modal-backdrop.flex {
  display: flex;
  animation: fadeIn 0.2s ease-out forwards;
}

.modal-content {
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Custom Gold Range Sliders */
input[type="range"] {
  height: 6px;
  background: #271447;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--kdt-purple-deep);
  background-color: var(--kdt-gold);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.7);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background-color: var(--kdt-gold-light);
}

/* Animated Radar Pulse */
.radar-sweep-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #C9A84C, transparent);
  box-shadow: 0 0 15px #C9A84C;
  animation: radar-sweep 3s ease-in-out infinite;
}

@keyframes radar-sweep {
  0% { left: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Animated Interactive Arrow Pointer */
.animated-pointer {
  position: absolute;
  z-index: 60;
  pointer-events: none;
  transition: top 0.65s cubic-bezier(0.2, 0.9, 0.3, 1), left 0.65s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
  will-change: top, left, opacity;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.85));
}

.animated-pointer .pointer-icon {
  font-size: 1.8rem;
  color: #E8C55A;
  transform: rotate(-35deg);
  display: inline-block;
  animation: pointer-bounce 1.4s infinite alternate ease-in-out;
}

@keyframes pointer-bounce {
  0% { transform: rotate(-35deg) translate(0, 0); }
  100% { transform: rotate(-35deg) translate(-4px, -6px); }
}

.animated-pointer .pointer-label {
  background: #C9A84C;
  color: #140926;
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  display: inline-block;
  margin-left: 8px;
}

/* Glowing Target Box */
.focus-target-glow {
  outline: 2px solid #C9A84C !important;
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.6) !important;
  transition: all 0.3s ease;
}

/* Copy Toast Notification */
.copy-toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #10b981;
  color: #064e3b;
  font-weight: 800;
  font-family: var(--font-headline);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 70;
}
.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Highly Animated "Next Step" Button */
.btn-next-animated {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #C9A84C 0%, #E5C672 50%, #C9A84C 100%);
  color: #140926 !important;
  font-family: var(--font-headline);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.6), 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: next-button-pulse 1.8s infinite ease-in-out;
  transition: all 0.25s ease;
  z-index: 1;
}

.btn-next-animated:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.9), 0 6px 18px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #E5C672 0%, #FFF3B3 50%, #E5C672 100%);
}

.btn-next-animated:active {
  transform: translateY(1px) scale(0.98);
}

/* Pulsing Aura & Scaling */
@keyframes next-button-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.5), 0 0 0 0 rgba(201, 168, 76, 0.6);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.85), 0 0 0 8px rgba(201, 168, 76, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.5), 0 0 0 0 rgba(201, 168, 76, 0);
  }
}

/* Shimmer Sheen Beam sweeping across the button */
.btn-next-animated::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(25deg);
  animation: next-button-sheen 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@keyframes next-button-sheen {
  0% { left: -60%; }
  35% { left: 140%; }
  100% { left: 140%; }
}

/* Animated Arrow sliding inside the button */
.btn-next-arrow {
  display: inline-block;
  animation: arrow-slide 1.2s infinite ease-in-out;
}

@keyframes arrow-slide {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* ========================================================================= */
/* EXECUTIVE PAPER LIGHT THEME (WARM IVORY / LUXURY LINEN & ROYAL GOLD)      */
/* ========================================================================= */

html.theme-light {
  /* Dynamic CSS variable shifts for light mode — Crisp Modern Luminous Palette */
  --kdt-purple-deep: #ffffff;
  --kdt-purple-dark: #f8fafc;
  --kdt-purple-mid: #f1f5f9;
  --kdt-purple-card: #ffffff;
  --kdt-purple-card-hover: #f8fafc;
  --kdt-purple-border: #e2e8f0;
  --kdt-purple-glow: rgba(0, 0, 0, 0.03);

  /* Gold tuned for light background contrast (rich burnished imperial amber/gold: WCAG AAA 7.1:1 on white) */
  --kdt-gold: #854D0E;
  --kdt-gold-light: #92400E;
  --kdt-gold-dark: #78350F;
  --kdt-gold-glow: rgba(180, 83, 9, 0.15);

  /* Telemetry accents tuned for high WCAG contrast on light background */
  --bloomberg-orange: #C2410C;
  --terminal-green: #047857;
  --terminal-red: #B91C1C;
}

html.theme-light,
body.theme-light {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Eradicate Any Dark Ambient Overlays & Radial Gradients in Light Mode */
.theme-light [class*="bg-[radial-gradient"],
.theme-light [class*="radial-gradient(circle"],
.theme-light .pointer-events-none[class*="bg-[radial-gradient"],
.theme-light .dark-only-ambient {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Neutralize blur glows in light mode */
.theme-light .pointer-events-none[class*="blur-3xl"],
.theme-light .pointer-events-none[class*="blur-2xl"] {
  display: none !important;
  opacity: 0 !important;
}

/* ========================================================================= */
/* 1. COMPREHENSIVE TEXT COLOR CLASS AUTO-SWAP MAPPINGS IN LIGHT MODE        */
/* ========================================================================= */

/* Primary & Headings */
.theme-light .text-white {
  color: #0f172a !important;
}

/* Neutral Slate Scale (Darkened for effortless contrast) */
.theme-light .text-slate-100,
.theme-light .text-slate-200 {
  color: #1e293b !important;
}
.theme-light .text-slate-300 {
  color: #334155 !important; /* Slate-700: 9.3:1 contrast on white */
}
.theme-light .text-slate-400 {
  color: #475569 !important; /* Slate-600: 7.0:1 contrast on white */
}
.theme-light .text-slate-500 {
  color: #64748b !important; /* Slate-500 */
}

/* Neutral Scale Darkening for Light Mode (Crucial for high legibility across all components) */
.theme-light .text-neutral-100,
.theme-light .text-neutral-200,
.theme-light .text-neutral-300 {
  color: #1f2937 !important; /* deep charcoal / neutral-800 */
}
.theme-light .text-neutral-400 {
  color: #374151 !important; /* neutral-700 */
}
.theme-light .text-neutral-500 {
  color: #4b5563 !important; /* neutral-600 */
}

/* Gold / Amber / Yellow Accents (Shift from light yellow/pale gold to deep legible royal gold) */
.theme-light .text-\[\#E5C672\],
.theme-light .text-\[\#C9A84C\] {
  color: #854D0E !important; /* Amber-800: 7.1:1 contrast on white */
}
.theme-light .text-\[\#C9A84C\]\/40,
.theme-light .text-\[\#C9A84C\]\/50,
.theme-light .text-\[\#C9A84C\]\/60,
.theme-light .text-\[\#C9A84C\]\/70 {
  color: #92400E !important;
}

/* Eyebrows, Gold Lines & Hero Subtitle Highlights in Light Mode */
.theme-light .kdt-section-label {
  color: #854D0E !important;
  font-weight: 800 !important;
}
.theme-light .h-px.w-10.bg-\[\#C9A84C\],
.theme-light .kdt-gold-line {
  background-color: #b45309 !important;
}
.theme-light h1 span.text-\[\#C9A84C\],
.theme-light .kdt-headline span.text-\[\#C9A84C\] {
  color: #92400E !important; /* Rich imperial amber - 8.2:1 contrast */
  font-weight: 900 !important;
}
.theme-light .text-amber-100,
.theme-light .text-amber-200,
.theme-light .text-amber-200\/90 {
  color: #78350F !important;
}
.theme-light .text-amber-300,
.theme-light .text-amber-300\/80,
.theme-light .text-amber-400 {
  color: #92400E !important;
}
.theme-light .text-yellow-100,
.theme-light .text-yellow-200 {
  color: #713F12 !important;
}
.theme-light .text-yellow-300,
.theme-light .text-yellow-400 {
  color: #854D0E !important;
}

/* Emerald / Green Accents (Darkened from mint/pale green to deep forest emerald) */
.theme-light .text-emerald-100,
.theme-light .text-emerald-200 {
  color: #064E3B !important;
}
.theme-light .text-emerald-300,
.theme-light .text-emerald-300\/80,
.theme-light .text-emerald-400,
.theme-light .text-terminal-green {
  color: #047857 !important;
}

/* Red / Rose Accents (Darkened from pale pink/coral to deep ruby crimson) */
.theme-light .text-red-100,
.theme-light .text-red-200 {
  color: #7F1D1D !important;
}
.theme-light .text-red-300,
.theme-light .text-red-300\/80,
.theme-light .text-red-400,
.theme-light .text-terminal-red {
  color: #B91C1C !important;
}
.theme-light .text-rose-100,
.theme-light .text-rose-200,
.theme-light .text-rose-300,
.theme-light .text-rose-400 {
  color: #9F1239 !important;
}

/* Blue / Cyan / Indigo Accents (Darkened from pale sky blue to deep sapphire & dark navy) */
.theme-light .text-blue-100,
.theme-light .text-blue-200 {
  color: #1E3A8A !important;
}
.theme-light .text-blue-300,
.theme-light .text-blue-400 {
  color: #1D4ED8 !important;
}
.theme-light .text-cyan-100,
.theme-light .text-cyan-200 {
  color: #164E63 !important;
}
.theme-light .text-cyan-300,
.theme-light .text-cyan-400 {
  color: #0E7490 !important;
}
.theme-light .text-indigo-100,
.theme-light .text-indigo-200 {
  color: #312E81 !important;
}
.theme-light .text-indigo-300,
.theme-light .text-indigo-400 {
  color: #3730A3 !important;
}

/* Purple Accents (Darkened from lavender to deep royal violet) */
.theme-light .text-purple-100,
.theme-light .text-purple-200 {
  color: #4C1D95 !important;
}
.theme-light .text-purple-300,
.theme-light .text-purple-400 {
  color: #581C87 !important;
}

/* Bloomberg Orange */
.theme-light .text-bloomberg,
.theme-light .text-\[\#FF6600\] {
  color: #C2410C !important;
}

/* Keep Light Text on Elements with Intentionally Solid Dark or Colored Backgrounds */
.theme-light .bg-red-500 .text-white,
.theme-light .bg-red-600 .text-white,
.theme-light .bg-emerald-500 .text-white,
.theme-light .bg-emerald-600 .text-white,
.theme-light .bg-blue-600 .text-white,
.theme-light .bg-black .text-white,
.theme-light [class*="bg-red-500"] .text-white,
.theme-light [class*="bg-emerald-500"] .text-white {
  color: #FFFFFF !important;
}

/* Preserve Primary Button Contrast */
.theme-light .kdt-btn-primary {
  background: linear-gradient(135deg, #C9A84C 0%, #DFBA58 100%) !important;
  color: #140926 !important;
}
.theme-light .kdt-btn-primary * {
  color: #140926 !important;
}

/* ========================================================================= */
/* 2. COMPREHENSIVE CARD & SURFACE BACKGROUND SWAP IN LIGHT MODE             */
/* ========================================================================= */

.theme-light section,
.theme-light footer {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}

/* Subtle clean alternating background for selected sections to create depth */
.theme-light #ecosystem,
.theme-light #readiness-diagnostic,
.theme-light #macro-desk,
.theme-light #calculator,
.theme-light #value-stack,
.theme-light #ecosystem-bridge {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Neutralize Dark Tailwind Gradients on Sections, Cards, and Containers in Light Mode */
.theme-light section[class*="bg-gradient-"],
.theme-light footer[class*="bg-gradient-"],
.theme-light .kdt-card[class*="bg-gradient-"],
.theme-light .manna-card[class*="bg-gradient-"],
.theme-light [class*="bg-gradient-"][class*="from-\[\#0"],
.theme-light [class*="bg-gradient-"][class*="from-\[\#1"],
.theme-light [class*="bg-gradient-"][class*="from-\[\#2"],
.theme-light [class*="bg-gradient-"][class*="to-\[\#0"],
.theme-light [class*="bg-gradient-"][class*="to-\[\#1"],
.theme-light [class*="bg-gradient-"][class*="to-\[\#2"],
.theme-light [class*="bg-gradient-"][class*="via-\[\#1"],
.theme-light [class*="bg-gradient-"][class*="via-\[\#2"] {
  background-image: none !important;
}

/* Hero Sections: Subtle Luxury Warm Gold Sheen on Ivory in Light Mode */
.theme-light section[class*="from-\[\#140926\]"],
.theme-light section.bg-gradient-to-b:first-of-type,
.theme-light #hero {
  background-color: #ffffff !important;
  background-image: radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.05) 0%, transparent 60%) !important;
  border-color: #e2e8f0 !important;
}

/* All Dark Purple & Black Card Surfaces Swap to Crisp White */
.theme-light .kdt-card,
.theme-light .manna-card,
.theme-light .bg-\[\#140926\],
.theme-light .bg-\[\#140926\]\/95,
.theme-light .bg-\[\#140926\]\/90,
.theme-light .bg-\[\#140926\]\/80,
.theme-light .bg-\[\#160a2c\],
.theme-light .bg-\[\#120722\],
.theme-light .bg-\[\#120724\],
.theme-light .bg-\[\#0e041a\],
.theme-light .bg-\[\#0e041d\],
.theme-light .bg-\[\#0e051e\],
.theme-light .bg-\[\#0c0418\],
.theme-light .bg-\[\#0c0419\],
.theme-light .bg-\[\#0c1824\],
.theme-light .bg-\[\#0e1f18\],
.theme-light .bg-\[\#180b30\],
.theme-light .bg-\[\#180b30\]\/95,
.theme-light .bg-\[\#180b30\]\/90,
.theme-light .bg-\[\#180b30\]\/80,
.theme-light .bg-\[\#1a0c33\],
.theme-light .bg-\[\#1b0c33\],
.theme-light .bg-\[\#1b0d33\],
.theme-light .bg-\[\#1c082b\],
.theme-light .bg-\[\#1c0a36\],
.theme-light .bg-\[\#1c0b36\],
.theme-light .bg-\[\#1c0c38\],
.theme-light .bg-\[\#1c0d36\],
.theme-light .bg-\[\#1c0d38\],
.theme-light .bg-\[\#1d0b30\],
.theme-light .bg-\[\#080212\]\/95,
.theme-light .bg-\[\#080214\],
.theme-light .bg-\[\#0a0214\],
.theme-light .bg-\[\#0a0316\],
.theme-light .bg-\[\#0b0316\],
.theme-light .bg-\[\#0b0416\],
.theme-light .bg-\[\#0b0417\],
.theme-light .bg-\[\#100420\],
.theme-light .bg-\[\#100520\],
.theme-light .bg-\[\#10061e\],
.theme-light .bg-\[\#100624\],
.theme-light .bg-\[\#110524\],
.theme-light .bg-\[\#110724\],
.theme-light .bg-\[\#12051c\],
.theme-light .bg-\[\#120624\],
.theme-light .bg-\[\#120626\],
.theme-light .bg-\[\#130728\],
.theme-light .bg-\[\#140624\],
.theme-light .bg-\[\#16082b\],
.theme-light .bg-\[\#180824\],
.theme-light .bg-\[\#1f0933\],
.theme-light .bg-\[\#1f0d3d\],
.theme-light .bg-\[\#1f0f3d\],
.theme-light .bg-\[\#1f0f3e\],
.theme-light .bg-\[\#200b38\],
.theme-light .bg-\[\#200c3e\],
.theme-light .bg-\[\#200e40\],
.theme-light .bg-\[\#220d45\],
.theme-light .bg-\[\#221246\],
.theme-light .bg-\[\#240e44\],
.theme-light .bg-\[\#241047\],
.theme-light .bg-\[\#25104a\],
.theme-light .bg-\[\#260e4c\],
.theme-light .bg-\[\#260f4a\],
.theme-light .bg-\[\#26104c\],
.theme-light .bg-\[\#280c18\],
.theme-light .bg-\[\#2a104f\],
.theme-light .bg-\[\#2a1050\],
.theme-light .bg-\[\#2a134a\],
.theme-light .bg-\[\#2b1054\],
.theme-light .bg-\[\#0d051c\],
.theme-light .bg-slate-800,
.theme-light .bg-neutral-900 {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

/* Semi-transparent dark card overlays */
.theme-light .bg-black\/40,
.theme-light .bg-black\/30,
.theme-light .bg-black\/20,
.theme-light .bg-black\/75,
.theme-light .bg-black\/80,
.theme-light .bg-black\/85,
.theme-light .bg-black\/90 {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}

/* ========================================================================= */
/* 2B. TARGETED HIGH-CONTRAST CARDS & BANNERS (SCREENSHOTS 1-5 FIXES)        */
/* ========================================================================= */

/* Screenshot 2: Sizing Calculator Target Distance Card */
.theme-light .border-emerald-500\/40[class*="bg-gradient-"],
.theme-light #targetDistanceCard {
  background-color: #ecfdf5 !important;
  background-image: none !important;
  border-color: #10b981 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12) !important;
}
.theme-light .border-emerald-500\/40[class*="bg-gradient-"] span,
.theme-light .border-emerald-500\/40[class*="bg-gradient-"] strong,
.theme-light .border-emerald-500\/40[class*="bg-gradient-"] div,
.theme-light #calcTargetPts,
.theme-light #calcTargetTicks {
  color: #065f46 !important;
}
.theme-light .border-emerald-500\/40[class*="bg-gradient-"] p {
  color: #047857 !important;
}

/* Screenshot 2: Sizing Calculator Max Stop Allowance Card */
.theme-light .border-red-500\/40[class*="bg-gradient-"],
.theme-light #maxStopCard {
  background-color: #fef2f2 !important;
  background-image: none !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12) !important;
}
.theme-light .border-red-500\/40[class*="bg-gradient-"] span,
.theme-light .border-red-500\/40[class*="bg-gradient-"] strong,
.theme-light .border-red-500\/40[class*="bg-gradient-"] div,
.theme-light #calcStopPts,
.theme-light #calcStopTicks {
  color: #991b1b !important;
}
.theme-light .border-red-500\/40[class*="bg-gradient-"] p {
  color: #b91c1c !important;
}

/* Screenshot 2 Bottom: "Hate manual tick counting?" Banner */
.theme-light .border-amber-500\/30[class*="bg-gradient-to-r"],
.theme-light #hateTickCountingBanner {
  background-image: linear-gradient(90deg, #fef9ee 0%, #f9f1e1 100%) !important;
  background-color: #fef9ee !important;
  border-color: #dfba58 !important;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.15) !important;
}
.theme-light .border-amber-500\/30[class*="bg-gradient-to-r"] strong,
.theme-light .border-amber-500\/30[class*="bg-gradient-to-r"] .text-white,
.theme-light #hateTickCountingBanner strong,
.theme-light #hateTickCountingBanner .text-white {
  color: #140926 !important;
}
.theme-light .border-amber-500\/30[class*="bg-gradient-to-r"] .text-slate-300,
.theme-light #hateTickCountingBanner .text-slate-300 {
  color: #3b2c52 !important;
}
.theme-light .border-amber-500\/30[class*="bg-gradient-to-r"] i,
.theme-light #hateTickCountingBanner i {
  color: #8C6E20 !important;
}

/* Screenshot 3: "LIVE REACTIVE COMPOUNDING SHEET" Pill & Banner */
.theme-light .border-2.border-\[\#C9A84C\]\/60[class*="bg-gradient-to-r"],
.theme-light .border-\[\#C9A84C\]\/60[class*="bg-gradient-to-r"],
.theme-light #reactiveCompoundingBanner {
  background-image: linear-gradient(90deg, #fef7e6 0%, #f3faed 100%) !important;
  background-color: #fdfbf7 !important;
  border-color: #C9A84C !important;
  box-shadow: 0 6px 25px rgba(201, 168, 76, 0.16) !important;
}
.theme-light .border-2.border-\[\#C9A84C\]\/60 .text-amber-300,
.theme-light .border-\[\#C9A84C\]\/60 .text-amber-300,
.theme-light #reactiveCompoundingBanner .text-amber-300 {
  color: #92400e !important;
}
.theme-light .border-2.border-\[\#C9A84C\]\/60 .text-slate-200,
.theme-light .border-\[\#C9A84C\]\/60 .text-slate-200,
.theme-light #reactiveCompoundingBanner .text-slate-200 {
  color: #2b1f3d !important;
}

/* Screenshot 4: Trade Journal Day Performance Summary Sub-bar */
.theme-light #journalDaySummaryBar,
.theme-light .journal-day-summary-bar {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  color: #140926 !important;
}
.theme-light #journalDaySummaryBar span,
.theme-light #journalDaySummaryBar div {
  color: #4a3a60 !important;
}
.theme-light #summaryBarDate,
.theme-light #summaryBarWinRate {
  color: #140926 !important;
  font-weight: 800 !important;
}
.theme-light #summaryBarPnl {
  color: #047857 !important;
  font-weight: 800 !important;
}
.theme-light #summaryBarTrades {
  color: #0e7490 !important;
  font-weight: 800 !important;
}
.theme-light #summaryBarDiscipline {
  color: #8c6e20 !important;
  font-weight: 800 !important;
}
.theme-light thead.bg-\[\#100520\],
.theme-light thead.bg-\[\#120724\] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
.theme-light thead.bg-\[\#100520\] th,
.theme-light thead.bg-\[\#120724\] th {
  color: #140926 !important;
  font-weight: 700 !important;
}
.theme-light #journalTableBody tr.bg-\[\#180b30\] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
.theme-light #journalTableBody tr.bg-\[\#180b30\] * {
  color: #140926 !important;
}

/* Screenshot 5: Module 06 Strategic Ecosystem Bridges Section & Cards */
.theme-light #ecosystem-bridge {
  background-color: #f8fafc !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}
.theme-light #ecosystem-bridge h2.text-white {
  color: #140926 !important;
}
.theme-light #ecosystem-bridge p.text-slate-300 {
  color: #2b1f3d !important;
}
.theme-light #ecosystem-bridge .kdt-card,
.theme-light #bridgeMannaCard,
.theme-light #bridgeLiveFloorCard {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
}
.theme-light #ecosystem-bridge .kdt-card.border-amber-400,
.theme-light #bridgeKwfCard {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.15) !important;
}
.theme-light #ecosystem-bridge .kdt-card h3.text-white,
.theme-light #bridgeKwfCard h3,
.theme-light #bridgeMannaCard h3,
.theme-light #bridgeLiveFloorCard h3 {
  color: #140926 !important;
}
.theme-light #ecosystem-bridge .kdt-card p.text-slate-300,
.theme-light #bridgeKwfCard p,
.theme-light #bridgeMannaCard p,
.theme-light #bridgeLiveFloorCard p {
  color: #2b1f3d !important;
}

/* Quick Jump Anchors in Hero */
.theme-light a[href="#calculator"] {
  background-color: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}
.theme-light a[href="#roadmap"] {
  background-color: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
}
.theme-light a[href="#flipbook"] {
  background-color: #f3e8ff !important;
  border-color: #c084fc !important;
  color: #6b21a8 !important;
}
.theme-light a[href="#journal"] {
  background-color: #dcfce7 !important;
  border-color: #4ade80 !important;
  color: #15803d !important;
}
.theme-light a[href="#downloads"] {
  background-color: #f1edeb !important;
  border-color: #cfc6b0 !important;
  color: #2b1f3d !important;
}

/* VIP Companion Banner */
.theme-light #amazonCompanionBanner {
  background-image: linear-gradient(90deg, #fef6e4 0%, #fbf1d8 50%, #fef6e4 100%) !important;
  background-color: #fef6e4 !important;
  border-color: rgba(201, 168, 76, 0.4) !important;
  color: #140926 !important;
}
.theme-light #amazonCompanionBanner * {
  color: #140926 !important;
}

/* ========================================================================= */
/* 2C. HOMEPAGE CALLOUTS, SHOWCASE BANNERS & ACCENT CARDS                    */
/* ========================================================================= */

/* Manna Powerhouse Callout Hero Card ("Stop Second-Guessing Your Entries...") */
.theme-light #mannaPowerhouseCallout,
.theme-light .bg-\[\#180b30\]\/95 {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #e2e8f0 !important;
  border-left-color: #b45309 !important;
  border-left-width: 4px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  color: #1e293b !important;
}

.theme-light #mannaPowerhouseCallout h3,
.theme-light .bg-\[\#180b30\]\/95 h3 {
  color: #140926 !important;
  font-weight: 900 !important;
}

.theme-light #mannaPowerhouseCallout p,
.theme-light .bg-\[\#180b30\]\/95 p {
  color: #2b1f3d !important;
}

.theme-light #mannaPowerhouseCallout strong,
.theme-light .bg-\[\#180b30\]\/95 strong {
  color: #140926 !important;
  font-weight: 800 !important;
}

.theme-light #mannaPowerhouseCallout .border-white\/10,
.theme-light .bg-\[\#180b30\]\/95 .border-white\/10 {
  border-color: rgba(201, 168, 76, 0.25) !important;
}

.theme-light #mannaPowerhouseCallout .font-label span,
.theme-light #mannaPowerhouseCallout .text-\[\#E5C672\],
.theme-light .bg-\[\#180b30\]\/95 .text-\[\#E5C672\] {
  color: #8A6D1E !important;
  font-weight: 800 !important;
}

.theme-light #mannaPowerhouseCallout .bg-emerald-500\/20,
.theme-light .bg-\[\#180b30\]\/95 .bg-emerald-500\/20 {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

/* Pain Point Trap Sub-Cards inside #mannaPowerhouseCallout */
.pain-point-trap-card {
  background-color: #130724;
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.theme-light .pain-point-trap-card,
.theme-light .bg-\[\#130724\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.theme-light .pain-point-trap-card span,
.theme-light .pain-point-trap-card .text-amber-300,
.theme-light .pain-point-trap-card .font-headline {
  color: #854d0e !important;
}

.theme-light .pain-point-trap-card p,
.theme-light .pain-point-trap-card .text-slate-300 {
  color: #334155 !important;
}

.theme-light .pain-point-trap-card strong,
.theme-light .pain-point-trap-card .text-white {
  color: #0f172a !important;
}

.theme-light .pain-point-trap-card .text-rose-400 {
  color: #b91c1c !important;
}

.theme-light .pain-point-trap-card .text-emerald-400 {
  color: #047857 !important;
}

/* Comparison Cards in Ecosystem Section */
.theme-light .bg-rose-950\/20 {
  background-color: #fff1f2 !important;
  border-color: #fecdd3 !important;
}
.theme-light .bg-rose-950\/20 .text-rose-400 {
  color: #9f1239 !important;
}
.theme-light .bg-rose-950\/20 .bg-rose-500\/20 {
  background-color: #ffe4e6 !important;
  color: #9f1239 !important;
  border-color: #fecdd3 !important;
}
.theme-light .bg-rose-950\/20 .border-rose-500\/20 {
  border-color: #fecdd3 !important;
}
.theme-light .bg-rose-950\/20 p,
.theme-light .bg-rose-950\/20 li,
.theme-light .bg-rose-950\/20 span {
  color: #4c0519 !important;
}
.theme-light .bg-rose-950\/20 strong {
  color: #881337 !important;
}
.theme-light .bg-rose-950\/20 .fa-xmark {
  color: #e11d48 !important;
}

.theme-light .bg-emerald-950\/20 {
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}
.theme-light .bg-emerald-950\/20 .text-emerald-400 {
  color: #15803d !important;
}
.theme-light .bg-emerald-950\/20 .bg-emerald-500\/20 {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
}
.theme-light .bg-emerald-950\/20 .border-emerald-500\/20 {
  border-color: #bbf7d0 !important;
}
.theme-light .bg-emerald-950\/20 p,
.theme-light .bg-emerald-950\/20 li,
.theme-light .bg-emerald-950\/20 span {
  color: #064e3b !important;
}
.theme-light .bg-emerald-950\/20 strong {
  color: #14532d !important;
}
.theme-light .bg-emerald-950\/20 .fa-check {
  color: #16a34a !important;
}

/* Prop Firm Guide Active Session Bar & Direct Logout Buttons */
.theme-light #flipbookSessionBar {
  background-color: #f0fdf4 !important;
  background-image: none !important;
  border-color: #86efac !important;
  color: #064e3b !important;
  box-shadow: 0 4px 15px rgba(20, 9, 38, 0.04) !important;
}
.theme-light #flipbookSessionBar strong {
  color: #064e3b !important;
}
.theme-light #flipbookSessionBar .text-slate-400 {
  color: #166534 !important;
}

.theme-light #embedReaderLogoutBtn,
.theme-light #flipbookReaderLogoutBtn,
.theme-light #bannerLogoutBtn {
  background-color: #fff1f2 !important;
  border-color: #fca5a5 !important;
  color: #9f1239 !important;
}
.theme-light #embedReaderLogoutBtn:hover,
.theme-light #flipbookReaderLogoutBtn:hover,
.theme-light #bannerLogoutBtn:hover {
  background-color: #ffe4e6 !important;
  color: #881337 !important;
}

/* Video Preview Hero Card ("Watch Manna 2.0 Scan the Market Live") */
.theme-light #mannaVideoPreviewCard {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 10px 30px rgba(20, 9, 38, 0.08) !important;
}

.theme-light #mannaVideoPreviewCard h3 {
  color: #140926 !important;
}

.theme-light #mannaVideoPreviewCard p {
  color: #2b1f3d !important;
}

.theme-light #mannaVideoPreviewCard .font-label,
.theme-light #mannaVideoPreviewCard .text-\[\#E5C672\] {
  color: #8A6D1E !important;
}

/* Trader Confirmation Banner (Manna Flagship section) */
.theme-light #mannaConfirmationBanner {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 10px 30px rgba(20, 9, 38, 0.08) !important;
}

.theme-light #mannaConfirmationBanner h3 {
  color: #140926 !important;
}

.theme-light #mannaConfirmationBanner p {
  color: #2b1f3d !important;
}

.theme-light #mannaConfirmationBanner .font-label,
.theme-light #mannaConfirmationBanner .text-\[\#E5C672\] {
  color: #8A6D1E !important;
}

/* Scanner Action Banner (Ready to Scan section) */
.theme-light #scannerActionBanner {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 10px 30px rgba(20, 9, 38, 0.08) !important;
}

.theme-light #scannerActionBanner h3 {
  color: #140926 !important;
}

.theme-light #scannerActionBanner p {
  color: #2b1f3d !important;
}

/* Triad Synergy Bridge */
.theme-light #triadSynergyBridge {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 10px 30px rgba(20, 9, 38, 0.08) !important;
}

.theme-light #triadSynergyBridge p,
.theme-light #triadSynergyBridge strong {
  color: #140926 !important;
}

/* Trader Desk Suite Showcase Card */
.theme-light #monumentBookShowcase,
.theme-light #kdtBundleShowcase {
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  box-shadow: 0 10px 30px rgba(20, 9, 38, 0.08) !important;
}

.theme-light #monumentBookShowcase h3,
.theme-light #kdtBundleShowcase h3 {
  color: #140926 !important;
}

.theme-light #monumentBookShowcase p,
.theme-light #kdtBundleShowcase p {
  color: #2b1f3d !important;
}

.theme-light #monumentBookShowcase strong,
.theme-light #kdtBundleShowcase strong {
  color: #140926 !important;
  font-weight: 800 !important;
}

/* Photo Legend Pills and Badges on Media */
.theme-light .founders-legend-pill,
.theme-light .book-badge-pill {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #C9A84C !important;
  color: #140926 !important;
  box-shadow: 0 4px 12px rgba(20, 9, 38, 0.1) !important;
}

.theme-light .founders-legend-pill span,
.theme-light .book-badge-pill span {
  color: #140926 !important;
}

/* Gradient Clipped Text Headings */
.theme-light .bg-clip-text {
  background-image: linear-gradient(135deg, #8C6E20 0%, #B8860B 50%, #7A5E10 100%) !important;
  -webkit-background-clip: text !important;
  color: transparent !important;
}

/* Translucent whites convert to gentle warm tint on light mode */
.theme-light .bg-white\/5,
.theme-light .bg-white\/10 {
  background-color: rgba(20, 9, 38, 0.04) !important;
  border-color: rgba(201, 168, 76, 0.25) !important;
}
.theme-light .bg-white\/15,
.theme-light .bg-white\/20 {
  background-color: rgba(20, 9, 38, 0.08) !important;
  border-color: rgba(201, 168, 76, 0.35) !important;
}
.theme-light .border-white\/5,
.theme-light .border-white\/10,
.theme-light .border-white\/15,
.theme-light .border-white\/20,
.theme-light .border-white\/30 {
  border-color: rgba(20, 9, 38, 0.12) !important;
}

/* ========================================================================= */
/* 3. TINTED BADGES & STATUS MICRO-PILLS IN LIGHT MODE                       */
/* ========================================================================= */

.theme-light .bg-emerald-950,
.theme-light .bg-emerald-950\/40,
.theme-light .bg-emerald-950\/60,
.theme-light .bg-emerald-950\/80 {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}

.theme-light .bg-red-950,
.theme-light .bg-red-950\/10,
.theme-light .bg-red-950\/40,
.theme-light .bg-red-950\/60,
.theme-light .bg-red-950\/80 {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

.theme-light .bg-amber-950,
.theme-light .bg-amber-950\/40,
.theme-light .bg-amber-950\/60,
.theme-light .bg-amber-950\/80 {
  background-color: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #92400e !important;
}

.theme-light .bg-blue-950,
.theme-light .bg-blue-950\/40,
.theme-light .bg-blue-950\/60,
.theme-light .bg-blue-950\/80 {
  background-color: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1e3a8a !important;
}

.theme-light .bg-purple-950,
.theme-light .bg-purple-950\/60 {
  background-color: #f3e8ff !important;
  border-color: #d8b4fe !important;
  color: #581c87 !important;
}

.theme-light .bg-cyan-950,
.theme-light .bg-cyan-950\/60 {
  background-color: #cffafe !important;
  border-color: #67e8f9 !important;
  color: #0e7490 !important;
}

/* Micro Sizing Flexibility & Micro Risk Notice in Light Mode (Screenshot upload fix) */
.theme-light #calcMicroComparison .bg-blue-950\/40,
.theme-light #calcMicroComparison [class*="bg-blue-"],
.theme-light #microFlexibilityCard,
.theme-light .micro-standard-card {
  background-color: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.06) !important;
}
.theme-light #calcMicroComparison .bg-blue-950\/40,
.theme-light #calcMicroComparison .bg-blue-950\/40 p,
.theme-light #calcMicroComparison .bg-blue-950\/40 span,
.theme-light #calcMicroComparison .text-blue-200,
.theme-light #microFlexibilityCard,
.theme-light #microFlexibilityCard p {
  color: #1e3a8a !important; /* Deep dark navy text - maximum WCAG contrast */
}
.theme-light #calcMicroComparison .bg-blue-950\/40 strong,
.theme-light #microFlexibilityCard strong {
  color: #0f172a !important; /* Solid dark bold text */
  font-weight: 800 !important;
}
.theme-light #calcMicroComparison .text-blue-300,
.theme-light #calcMicroComparison .bg-blue-950\/40 .font-bold,
.theme-light #microFlexibilityCard .font-bold,
.theme-light #microFlexibilityCard i {
  color: #1d4ed8 !important; /* High-contrast royal sapphire blue title */
}

.theme-light #calcMicroComparison .bg-emerald-950\/40,
.theme-light #calcMicroComparison [class*="bg-emerald-"],
.theme-light #microPrecisionCard,
.theme-light .micro-precision-card {
  background-color: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 2px 10px rgba(6, 78, 59, 0.06) !important;
}
.theme-light #calcMicroComparison .bg-emerald-950\/40,
.theme-light #calcMicroComparison .bg-emerald-950\/40 p,
.theme-light #calcMicroComparison .bg-emerald-950\/40 span,
.theme-light #calcMicroComparison .text-emerald-200,
.theme-light #microPrecisionCard,
.theme-light #microPrecisionCard p {
  color: #064e3b !important; /* Deep forest emerald text */
}
.theme-light #calcMicroComparison .bg-emerald-950\/40 strong,
.theme-light #microPrecisionCard strong {
  color: #022c22 !important; /* Solid dark bold text */
  font-weight: 800 !important;
}
.theme-light #calcMicroComparison .text-emerald-300,
.theme-light #calcMicroComparison .bg-emerald-950\/40 .font-bold,
.theme-light #microPrecisionCard .font-bold,
.theme-light #microPrecisionCard i {
  color: #047857 !important; /* Deep emerald title */
}

/* ========================================================================= */
/* 4. COMPONENT SPECIFICS: MANNA 2.0, QUIZZES, TABS & INTERACTIVES           */
/* ========================================================================= */

/* Live Ticker Tape in Light Mode */
.theme-light .ticker-wrap {
  background: #ede7dc !important;
  border-bottom: 1px solid rgba(201, 168, 76, 0.4) !important;
}
.theme-light .ticker-wrap .text-slate-300 {
  color: #3b2c52 !important;
}
.theme-light .ticker-wrap .text-white {
  color: #140926 !important;
}
.theme-light .ticker-wrap .text-slate-500 {
  color: #8c7f9d !important;
}

/* Header & Navigation in Light Mode */
.theme-light header {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-bottom-color: #e2e8f0 !important;
  border-top-color: #b45309 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}
.theme-light header nav a {
  color: #1e293b !important;
  font-weight: 700 !important;
}
.theme-light header nav a:hover {
  color: #854d0e !important;
}
.theme-light header .font-headline span {
  color: #0f172a !important;
}
.theme-light header .text-slate-300,
.theme-light header .text-slate-200 {
  color: #334155 !important;
}
.theme-light #mobileMenu {
  background-color: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}
.theme-light #mobileMenu a {
  color: #1e293b !important;
}

/* Manna 2.0 Telemetry Widgets */
.theme-light .manna-distance-pill {
  background: #ede8f5 !important;
  color: #312e81 !important;
  border-color: #c7d2fe !important;
}
.theme-light .manna-live-rr-pill {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}
.theme-light .manna-btn-footer {
  background: #f1edeb !important;
  color: #140926 !important;
  border-color: #cfc6b0 !important;
}
.theme-light .manna-btn-footer:hover {
  background: #C9A84C !important;
  color: #140926 !important;
}
.theme-light .manna-btn-rescan {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}
.theme-light .manna-tag-pill {
  background: rgba(20, 9, 38, 0.05) !important;
  border-color: rgba(20, 9, 38, 0.12) !important;
  color: #4a3a60 !important;
}
.theme-light .manna-conviction-badge {
  border-color: rgba(140, 110, 32, 0.5) !important;
  color: #8C6E20 !important;
}
.theme-light .manna-badge-forex {
  background: #f3e8ff !important;
  color: #6b21a8 !important;
  border-color: #d8b4fe !important;
}
.theme-light .manna-badge-futures {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}
.theme-light .video-preview-canvas {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Macro Terminal Calendar & Telemetry */
.theme-light .flash-green {
  color: #047857 !important;
}
.theme-light .flash-red {
  color: #b91c1c !important;
}
.theme-light .folder-red {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}
.theme-light .folder-orange {
  background-color: #ffedd5 !important;
  color: #c2410c !important;
  border-color: #fdba74 !important;
}
.theme-light .folder-yellow {
  background-color: #fef9c3 !important;
  color: #854d0e !important;
  border-color: #fde047 !important;
}
.theme-light .cal-row:hover {
  background-color: #f3eee3 !important;
}
.theme-light .news-wire-item:hover {
  background-color: rgba(20, 9, 38, 0.04) !important;
}

/* Interactive Quiz Option Buttons */
.theme-light .quiz-option-btn {
  background-color: #ffffff !important;
  border-color: #dfd7c4 !important;
  color: #140926 !important;
}
.theme-light .quiz-option-btn:hover {
  border-color: #C9A84C !important;
  background-color: #faf9f6 !important;
}

/* Toolkit Market Tabs & Active Buttons */
.theme-light .market-tab-btn,
.theme-light .instrument-btn {
  background-color: #ffffff !important;
  border-color: #dfd7c4 !important;
  color: #2b1f3d !important;
}
.theme-light .market-tab-btn:hover,
.theme-light .instrument-btn:hover {
  background-color: #faf9f6 !important;
}
.theme-light .market-tab-btn.bg-\[\#2a134a\],
.theme-light .instrument-btn.bg-\[\#2a134a\] {
  background-color: #f5eedb !important;
  border-color: #C9A84C !important;
  color: #140926 !important;
}
.theme-light .prop-tier-btn.bg-\[\#2a134a\] {
  background-color: #f5eedb !important;
  border-color: #C9A84C !important;
  color: #92400e !important;
}

/* Outline Buttons */
.theme-light .kdt-btn-outline {
  color: #140926 !important;
  border-color: #C9A84C !important;
  background-color: transparent !important;
}
.theme-light .kdt-btn-outline:hover {
  background-color: #C9A84C !important;
  color: #140926 !important;
}

/* Forms, Dropdowns & Inputs in Light Mode */
.theme-light input,
.theme-light select,
.theme-light textarea {
  background-color: #ffffff !important;
  color: #140926 !important;
  border-color: #cfc6b0 !important;
}
.theme-light input:focus,
.theme-light select:focus,
.theme-light textarea:focus {
  border-color: #C9A84C !important;
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2) !important;
}

/* Tables in Light Mode */
.theme-light table thead tr {
  background-color: #f1f5f9 !important;
  color: #140926 !important;
}
.theme-light table tbody tr:nth-child(even) {
  background-color: #faf9f6 !important;
}
.theme-light table tbody tr:nth-child(odd) {
  background-color: #ffffff !important;
}
.theme-light table tbody td {
  border-color: #ede7dc !important;
  color: #2b1f3d !important;
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
  transition: all 0.2s ease;
}
.theme-light .theme-toggle-btn {
  background-color: rgba(20, 9, 38, 0.08) !important;
  border-color: rgba(201, 168, 76, 0.4) !important;
  color: #140926 !important;
}
.theme-light .theme-toggle-btn:hover {
  background-color: rgba(20, 9, 38, 0.14) !important;
}

/* Upgraded Header Theme Toggle Buttons */
.theme-toggle-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: rgba(201, 168, 76, 0.18);
  border: 1.5px solid #C9A84C;
  color: #E5C672;
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle-header-btn:hover {
  background: #C9A84C;
  color: #140926;
  border-color: #C9A84C;
  transform: scale(1.04);
}
.theme-toggle-header-btn:hover i,
.theme-toggle-header-btn:hover span {
  color: #140926 !important;
}
.theme-light .theme-toggle-header-btn {
  background: rgba(20, 9, 38, 0.08) !important;
  border-color: #C9A84C !important;
  color: #140926 !important;
}
.theme-light .theme-toggle-header-btn:hover {
  background: #140926 !important;
  color: #FFFFFF !important;
}
.theme-light .theme-toggle-header-btn:hover i,
.theme-light .theme-toggle-header-btn:hover span {
  color: #FFFFFF !important;
}

/* Floating High-Visibility Theme Switcher Pill */
#floatingThemeWidget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.55));
}
#floatingThemeWidget .theme-floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  background: rgba(22, 10, 44, 0.95);
  border: 2px solid #C9A84C;
  color: #FFFFFF;
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#floatingThemeWidget .theme-floating-btn:hover {
  background: #C9A84C;
  color: #140926;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.65);
}
#floatingThemeWidget .theme-floating-btn:hover #floatingThemeIcon {
  color: #140926 !important;
}
.theme-light #floatingThemeWidget {
  filter: drop-shadow(0 10px 25px rgba(20, 9, 38, 0.2));
}
.theme-light #floatingThemeWidget .theme-floating-btn {
  background: #FFFFFF !important;
  color: #140926 !important;
  border-color: #C9A84C !important;
  box-shadow: 0 4px 20px rgba(20, 9, 38, 0.15) !important;
}
.theme-light #floatingThemeWidget .theme-floating-btn:hover {
  background: #140926 !important;
  color: #FFFFFF !important;
}
.theme-light #floatingThemeWidget .theme-floating-btn:hover #floatingThemeIcon {
  color: #E5C672 !important;
}

/* ========================================================================= */
/* 3D DIGITAL FLIPBOOK COVER THEME PRESERVATION                              */
/* ========================================================================= */
.book-page-cover,
.theme-light .book-page-cover {
  background: linear-gradient(135deg, #180b30 0%, #0e051d 100%) !important;
  color: #ffffff !important;
  border: 3px solid #C9A84C !important;
}
.book-page-cover h1,
.theme-light .book-page-cover h1,
.book-page-cover h2,
.theme-light .book-page-cover h2,
.book-page-cover h3,
.theme-light .book-page-cover h3 {
  color: #ffffff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9) !important;
}
.book-page-cover h1 span,
.theme-light .book-page-cover h1 span,
.book-page-cover h2 span,
.theme-light .book-page-cover h2 span,
.book-page-cover h3 span,
.theme-light .book-page-cover h3 span {
  color: #E5C672 !important;
  text-shadow: 0 2px 14px rgba(229, 198, 114, 0.4) !important;
}
.book-page-cover p,
.theme-light .book-page-cover p {
  color: #E2E8F0 !important;
}
.book-page-cover span,
.theme-light .book-page-cover span {
  color: #CBD5E1 !important;
}
.book-page-cover .bg-neutral-900,
.theme-light .book-page-cover .bg-neutral-900 {
  background-color: rgba(201, 168, 76, 0.25) !important;
  background-image: none !important;
  border-color: #C9A84C !important;
  color: #E5C672 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}
.book-page-cover i,
.theme-light .book-page-cover i {
  color: #E5C672 !important;
}
.book-page-cover strong,
.theme-light .book-page-cover strong,
.book-page-cover b,
.theme-light .book-page-cover b,
.book-page-cover .text-white,
.theme-light .book-page-cover .text-white,
.book-page-cover [class*="text-white"],
.theme-light .book-page-cover [class*="text-white"],
.book-cover-white-text,
.theme-light .book-cover-white-text,
body.theme-light .book-cover-white-text,
.book-page-cover .book-cover-white-text,
.theme-light .book-page-cover .book-cover-white-text {
  color: #ffffff !important;
}
.book-page-cover strong.text-white,
.theme-light .book-page-cover strong.text-white {
  color: #ffffff !important;
}
.book-page-cover .text-\[\#E5C672\],
.theme-light .book-page-cover .text-\[\#E5C672\] {
  color: #E5C672 !important;
}

/* ========================================================================= */
/* 3D FLIPBOOK & KDP INTERIOR HIGH-CONTRAST PAPER & CALLOUT STYLES           */
/* ========================================================================= */
.book-page-paper,
.theme-light .book-page-paper {
  background-color: #faf7f0 !important;
  color: #1a0f2e !important;
}

/* Ensure paragraph and body text on paper is dark and clear */
.book-page-paper p,
.theme-light .book-page-paper p {
  color: #262626;
}

/* High-contrast callout boxes on paper pages (e.g. Page 6 Consistency Rule) */
.consistency-rule-box,
.book-page-paper .consistency-rule-box,
.theme-light .consistency-rule-box,
.theme-light .book-page-paper .consistency-rule-box {
  background-color: #fefce8 !important; /* amber-50 */
  border: 2px solid #f59e0b !important; /* amber-500 */
  color: #171717 !important;
}

.consistency-rule-box p,
.book-page-paper .consistency-rule-box p,
.theme-light .consistency-rule-box p,
.theme-light .book-page-paper .consistency-rule-box p {
  color: #1f2937 !important; /* deep charcoal / neutral-800 */
}

.consistency-rule-box strong,
.book-page-paper .consistency-rule-box strong,
.theme-light .consistency-rule-box strong,
.theme-light .book-page-paper .consistency-rule-box strong {
  color: #0f172a !important; /* deep slate-900 / dark ink */
}

.consistency-rule-box .consistency-title,
.book-page-paper .consistency-rule-box .consistency-title,
.theme-light .consistency-rule-box .consistency-title,
.theme-light .book-page-paper .consistency-rule-box .consistency-title {
  color: #78350f !important; /* deep amber-900 */
}

.consistency-rule-box .consistency-badge,
.book-page-paper .consistency-rule-box .consistency-badge,
.theme-light .consistency-rule-box .consistency-badge,
.theme-light .book-page-paper .consistency-rule-box .consistency-badge {
  color: #78350f !important;
  background-color: #fde68a !important; /* amber-200 */
  border: 1px solid #d97706 !important;
}

.consistency-rule-box .formula-pill,
.book-page-paper .consistency-rule-box .formula-pill,
.theme-light .consistency-rule-box .formula-pill,
.theme-light .book-page-paper .consistency-rule-box .formula-pill {
  background-color: #18181b !important;
  color: #fcd34d !important; /* amber-300 */
  border: 1px solid #3f3f46 !important;
}

/* High-contrast sub-cards inside book callout / consistency / architecture boxes */
.consistency-rule-box .bg-white,
.book-page-paper .consistency-rule-box .bg-white,
.theme-light .consistency-rule-box .bg-white,
.theme-light .book-page-paper .consistency-rule-box .bg-white,
.kdp-page .consistency-rule-box .bg-white,
.theme-light .kdp-page .consistency-rule-box .bg-white {
  background-color: #ffffff !important;
}

.consistency-rule-box .bg-white p,
.book-page-paper .consistency-rule-box .bg-white p,
.theme-light .consistency-rule-box .bg-white p,
.theme-light .book-page-paper .consistency-rule-box .bg-white p,
.kdp-page .consistency-rule-box .bg-white p,
.theme-light .kdp-page .consistency-rule-box .bg-white p {
  color: #1f2937 !important; /* deep charcoal / neutral-800 */
}

.consistency-rule-box .bg-white span,
.book-page-paper .consistency-rule-box .bg-white span,
.theme-light .consistency-rule-box .bg-white span,
.theme-light .book-page-paper .consistency-rule-box .bg-white span,
.kdp-page .consistency-rule-box .bg-white span,
.theme-light .kdp-page .consistency-rule-box .bg-white span {
  color: #451a03 !important; /* deep amber-950 */
}

.consistency-rule-box .bg-white span.text-emerald-950,
.book-page-paper .consistency-rule-box .bg-white span.text-emerald-950,
.theme-light .consistency-rule-box .bg-white span.text-emerald-950,
.theme-light .book-page-paper .consistency-rule-box .bg-white span.text-emerald-950,
.kdp-page .consistency-rule-box .bg-white span.text-emerald-950,
.theme-light .kdp-page .consistency-rule-box .bg-white span.text-emerald-950 {
  color: #064e3b !important; /* deep emerald-950 */
}

/* Page 29 M3 Architecture Blueprint High-Contrast Card Styling */
.m3-blueprint-box,
.book-page-paper .m3-blueprint-box,
.theme-light .book-page-paper .m3-blueprint-box,
.kdp-page .m3-blueprint-box,
.theme-light .kdp-page .m3-blueprint-box {
  background-color: #fefce8 !important;
  border: 2px solid #f59e0b !important;
  color: #171717 !important;
}

.m3-blueprint-card,
.book-page-paper .m3-blueprint-card,
.theme-light .book-page-paper .m3-blueprint-card,
.kdp-page .m3-blueprint-card,
.theme-light .kdp-page .m3-blueprint-card {
  background-color: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  color: #171717 !important;
}

.m3-blueprint-card p,
.m3-blueprint-box p,
.book-page-paper .m3-blueprint-card p,
.book-page-paper .m3-blueprint-box p,
.theme-light .book-page-paper .m3-blueprint-card p,
.theme-light .book-page-paper .m3-blueprint-box p,
.kdp-page .m3-blueprint-card p,
.kdp-page .m3-blueprint-box p,
.theme-light .kdp-page .m3-blueprint-card p,
.theme-light .kdp-page .m3-blueprint-box p {
  color: #171717 !important;
}

.m3-blueprint-card span,
.m3-blueprint-card strong,
.book-page-paper .m3-blueprint-card span,
.book-page-paper .m3-blueprint-card strong,
.theme-light .book-page-paper .m3-blueprint-card span,
.theme-light .book-page-paper .m3-blueprint-card strong,
.kdp-page .m3-blueprint-card span,
.kdp-page .m3-blueprint-card strong,
.theme-light .kdp-page .m3-blueprint-card span,
.theme-light .kdp-page .m3-blueprint-card strong {
  color: #78350f !important;
}

.m3-blueprint-card span.text-emerald-950,
.book-page-paper .m3-blueprint-card span.text-emerald-950,
.theme-light .book-page-paper .m3-blueprint-card span.text-emerald-950,
.kdp-page .m3-blueprint-card span.text-emerald-950,
.theme-light .kdp-page .m3-blueprint-card span.text-emerald-950 {
  color: #064e3b !important;
}

/* Table headers in book pages must ALWAYS have solid dark backgrounds with crisp white text */
.book-page-paper thead,
.book-page-paper thead tr,
.book-page-paper thead th,
.kdp-page thead,
.kdp-page thead tr,
.kdp-page thead th,
.theme-light .book-page-paper thead,
.theme-light .book-page-paper thead tr,
.theme-light .book-page-paper thead th,
.theme-light .kdp-page thead,
.theme-light .kdp-page thead tr,
.theme-light .kdp-page thead th {
  background-color: #171717 !important;
  color: #ffffff !important;
}

.book-page-paper thead th,
.kdp-page thead th,
.theme-light .book-page-paper thead th,
.theme-light .kdp-page thead th {
  color: #ffffff !important;
}

/* Numbered step badges inside book paper pages (1, 2, 3...) */
.book-page-paper .rounded-full.bg-neutral-900,
.theme-light .book-page-paper .rounded-full.bg-neutral-900,
.kdp-page .rounded-full.bg-neutral-900,
.theme-light .kdp-page .rounded-full.bg-neutral-900 {
  background-color: #171717 !important;
  color: #ffffff !important;
}

/* Step badges with amber numbers (e.g. Page 5 & 26) */
.book-page-paper .rounded-full.bg-neutral-900.text-amber-400,
.theme-light .book-page-paper .rounded-full.bg-neutral-900.text-amber-400,
.kdp-page .rounded-full.bg-neutral-900.text-amber-400,
.theme-light .kdp-page .rounded-full.bg-neutral-900.text-amber-400 {
  background-color: #171717 !important;
  color: #fbbf24 !important; /* amber-400 */
}

/* Terminal formula pills and chapter navigation pills inside book pages */
.formula-pill,
.book-page-paper .formula-pill,
.theme-light .formula-pill,
.theme-light .book-page-paper .formula-pill,
.kdp-page .formula-pill,
.theme-light .kdp-page .formula-pill {
  background-color: #171717 !important;
  border-color: #3f3f46 !important;
  color: #fef08a !important; /* amber-200 */
}
.formula-pill *,
.book-page-paper .formula-pill *,
.theme-light .formula-pill *,
.theme-light .book-page-paper .formula-pill *,
.kdp-page .formula-pill *,
.theme-light .kdp-page .formula-pill * {
  color: inherit;
}
.formula-pill .text-slate-200,
.book-page-paper .formula-pill .text-slate-200,
.theme-light .formula-pill .text-slate-200,
.theme-light .book-page-paper .formula-pill .text-slate-200 {
  color: #e2e8f0 !important;
}
.formula-pill .text-amber-400,
.formula-pill .text-amber-300,
.book-page-paper .formula-pill .text-amber-400,
.book-page-paper .formula-pill .text-amber-300,
.theme-light .formula-pill .text-amber-400,
.theme-light .formula-pill .text-amber-300 {
  color: #fcd34d !important; /* amber-300 */
}






/* Secondary Diagnostic CTA in Light Mode */
.theme-light a[href="#readiness-diagnostic"] {
  background-color: #fefce8 !important;
  border-color: #ca8a04 !important;
  color: #854d0e !important;
}
.theme-light a[href="#readiness-diagnostic"]:hover {
  background-color: #fef08a !important;
  border-color: #a16207 !important;
  color: #713f12 !important;
}
/* Modals in Light Mode */
.theme-light .modal-content {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}
.theme-light #diagnosticResultsModal .bg-\[\#0e041a\],
.theme-light #studentLoginModal .bg-\[\#140926\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* ========================================================================= */
/* SPARKY · HIGH-CONTRAST LIGHT & DARK MODE ENGINE                           */
/* ========================================================================= */

/* Light Mode: Crisp White & Gold Theme */
.theme-light #sparkyLauncherBtn {
  background: #ffffff !important;
  border: 2px solid #C9A84C !important;
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.4) !important;
}
.theme-light #sparkyLauncherBtn .sparky-launcher-title {
  color: #0f172a !important;
}
.theme-light #sparkyLauncherBtn .sparky-launcher-sub {
  color: #b45309 !important;
}

.theme-light #sparkyChatDrawer {
  background: #ffffff !important;
  border: 2px solid #C9A84C !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
  color: #0f172a !important;
}
.theme-light #sparkyHeader {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.theme-light #sparkyTitle {
  color: #0f172a !important;
}
.theme-light #sparkySubtitle {
  color: #b45309 !important;
}
.theme-light #sparkyHeader .sparky-icon-btn {
  color: #64748b !important;
}
.theme-light #sparkyHeader .sparky-icon-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.theme-light #sparkyMessagesContainer {
  background: #f8fafc !important;
}
.theme-light .sparky-msg-bubble {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}
.theme-light .sparky-msg-bubble * {
  color: #1e293b !important;
}
.theme-light .sparky-msg-bubble strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}
.theme-light .sparky-msg-bubble em {
  color: #b45309 !important;
  font-style: italic !important;
}
.theme-light .sparky-msg-bubble code {
  background: #f1f5f9 !important;
  color: #92400e !important;
  border: 1px solid #cbd5e1 !important;
  padding: 0.1rem 0.35rem !important;
  border-radius: 0.25rem !important;
}

.theme-light .sparky-user-bubble {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25) !important;
}
.theme-light .sparky-user-bubble * {
  color: #ffffff !important;
}

.theme-light #sparkyChipsLabel {
  color: #b45309 !important;
  font-weight: 700 !important;
}
.theme-light .sparky-chip-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.theme-light .sparky-chip-btn:hover {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
  color: #92400e !important;
}

.theme-light .sparky-action-btn-primary {
  background: #C9A84C !important;
  color: #140926 !important;
}
.theme-light .sparky-action-btn-primary:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}
.theme-light .sparky-action-btn-alt {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}
.theme-light .sparky-action-btn-alt:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.theme-light #sparkyForm {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}
.theme-light #sparkyInput {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
.theme-light #sparkyInput::placeholder {
  color: #94a3b8 !important;
}
.theme-light #sparkyInput:focus {
  border-color: #C9A84C !important;
  background: #ffffff !important;
}
.theme-light #sparkySendBtn {
  background: linear-gradient(135deg, #f59e0b 0%, #C9A84C 100%) !important;
  color: #140926 !important;
}

/* ========================================================================= */
/* INACTIVE MEMBERSHIP STATUS NOTICE - ULTRA HIGH CONTRAST (DARK & LIGHT)     */
/* ========================================================================= */
:root {
  --kdt-notice-bg: #280a15;
  --kdt-notice-border: #f43f5e;
  --kdt-notice-title: #fda4af;
  --kdt-notice-icon: #fb7185;
  --kdt-notice-text: #ffffff;
  --kdt-notice-subtext: #fecdd3;
  --kdt-notice-badge-bg: #4c0519;
  --kdt-notice-badge-text: #fde047;
  --kdt-notice-badge-border: #f43f5e;
  --kdt-notice-btn-bg: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
  --kdt-notice-btn-text: #140926;
  --kdt-notice-link-text: #cbd5e1;
  --kdt-notice-link-url: #fde047;
  --kdt-notice-border-subtle: rgba(244, 63, 94, 0.35);
}

.theme-light,
html.theme-light,
body.theme-light {
  --kdt-notice-bg: #fff1f2;
  --kdt-notice-border: #e11d48;
  --kdt-notice-title: #9f1239;
  --kdt-notice-icon: #e11d48;
  --kdt-notice-text: #0f172a;
  --kdt-notice-subtext: #881337;
  --kdt-notice-badge-bg: #fee2e2;
  --kdt-notice-badge-text: #991b1b;
  --kdt-notice-badge-border: #f87171;
  --kdt-notice-btn-bg: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --kdt-notice-btn-text: #ffffff;
  --kdt-notice-link-text: #334155;
  --kdt-notice-link-url: #b45309;
  --kdt-notice-border-subtle: rgba(225, 29, 72, 0.25);
}

.kdt-cancelled-membership-notice {
  display: block !important;
  background-color: var(--kdt-notice-bg, #280a15) !important;
  border: 2px solid var(--kdt-notice-border, #f43f5e) !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.28) !important;
  color: var(--kdt-notice-text, #ffffff) !important;
  padding: 1.15rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.kdt-cancelled-membership-notice * {
  box-sizing: border-box !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-header {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  border-bottom: 1px solid var(--kdt-notice-border-subtle, rgba(244, 63, 94, 0.35)) !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 0.65rem !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-header i {
  color: var(--kdt-notice-icon, #fb7185) !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-header span,
.kdt-cancelled-membership-notice .kdt-cancelled-title {
  color: var(--kdt-notice-title, #fda4af) !important;
  font-family: var(--font-headline, system-ui, sans-serif) !important;
  font-weight: 900 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin: 0 !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-body {
  color: var(--kdt-notice-text, #ffffff) !important;
  font-size: 0.825rem !important;
  line-height: 1.55 !important;
  margin-bottom: 0.65rem !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-body p,
.kdt-cancelled-membership-notice p {
  color: var(--kdt-notice-text, #ffffff) !important;
  margin-bottom: 0.4rem !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-email-badge {
  display: inline-block !important;
  background-color: var(--kdt-notice-badge-bg, #4c0519) !important;
  color: var(--kdt-notice-badge-text, #fde047) !important;
  border: 1px solid var(--kdt-notice-badge-border, #f43f5e) !important;
  padding: 0.15rem 0.55rem !important;
  border-radius: 0.375rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  word-break: break-all !important;
  line-height: 1.3 !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-subtext {
  color: var(--kdt-notice-subtext, #fecdd3) !important;
  font-size: 0.775rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-btn-wrap {
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.75rem !important;
  background: var(--kdt-notice-btn-bg, linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%)) !important;
  color: var(--kdt-notice-btn-text, #140926) !important;
  font-family: var(--font-headline, system-ui, sans-serif) !important;
  font-weight: 900 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
  transition: transform 0.15s ease, filter 0.15s ease !important;
  cursor: pointer !important;
  text-align: center !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-btn:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-link-row {
  font-size: 0.7rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: var(--kdt-notice-link-text, #cbd5e1) !important;
  border-top: 1px solid var(--kdt-notice-border-subtle, rgba(244, 63, 94, 0.35)) !important;
  padding-top: 0.5rem !important;
  text-align: center !important;
  word-break: break-all !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-link-row a {
  color: var(--kdt-notice-link-url, #fde047) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.kdt-cancelled-membership-notice .kdt-cancelled-link-row a:hover {
  filter: brightness(1.15) !important;
}

/* Specific Light Theme Class Overrides with ultra-high specificity */
.theme-light .kdt-cancelled-membership-notice,
html.theme-light .kdt-cancelled-membership-notice,
body.theme-light .kdt-cancelled-membership-notice {
  background-color: #fff1f2 !important;
  border-color: #e11d48 !important;
  color: #0f172a !important;
  box-shadow: 0 10px 25px rgba(225, 29, 72, 0.15) !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header {
  border-bottom-color: rgba(225, 29, 72, 0.25) !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header i,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header i,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header i {
  color: #e11d48 !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-header span,
.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-title,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-title,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-title {
  color: #9f1239 !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-body,
.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-body p,
.theme-light .kdt-cancelled-membership-notice p,
html.theme-light .kdt-cancelled-membership-notice p,
body.theme-light .kdt-cancelled-membership-notice p {
  color: #0f172a !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-email-badge,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-email-badge,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-email-badge {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #f87171 !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-subtext,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-subtext,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-subtext {
  color: #881337 !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(180, 83, 9, 0.3) !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn:hover,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn:hover,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-btn:hover {
  color: #ffffff !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row {
  color: #334155 !important;
  border-top-color: rgba(225, 29, 72, 0.25) !important;
}

.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row a,
html.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row a,
body.theme-light .kdt-cancelled-membership-notice .kdt-cancelled-link-row a {
  color: #b45309 !important;
}


