/* ==========================================================================
   AI Free Tools - Futuristic Neon Redesign CSS
   Author: Phoenix Architect (Antigravity Senior AI Engineer)
   Scope: Scoped strictly using .aft- selectors and body-level overrides
   ========================================================================== */

:root {
  --aft-bg: #05070d;
  --aft-surface: #07101a;
  --aft-panel: rgba(10, 18, 30, 0.76);
  --aft-border: rgba(255, 255, 255, 0.08);
  --aft-orange: #ff6b1a;
  --aft-orange-glow: rgba(255, 107, 26, 0.18);
  --aft-violet: #8b5cf6;
  --aft-violet-glow: rgba(139, 92, 246, 0.16);
  --aft-lilac: #c084fc;
  --aft-cyan: #22d3ee;
  --aft-green: #39ff88;
  --aft-text: #f8fafc;
  --aft-muted: #a7b0c0;
  --aft-font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --aft-font-heading: 'Sora', 'Outfit', sans-serif;
  --aft-font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* aif- variables from contrast pack */
  --aif-bg: #05070d;
  --aif-bg-2: #080b14;
  --aif-surface: rgba(13, 18, 32, 0.92);
  --aif-surface-solid: #0d1220;
  --aif-surface-2: #121a2b;
  --aif-text: #f8fafc;
  --aif-text-body: #e2e8f0;
  --aif-text-muted: #a9b4c8;
  --aif-orange: #ff6b1a;
  --aif-orange-2: #ff8a3d;
  --aif-violet: #8b5cf6;
  --aif-lilac: #c084fc;
  --aif-cyan: #22d3ee;
  --aif-border: rgba(255,255,255,.12);
  --aif-border-hot: rgba(255,107,26,.55);
  --aif-shadow-orange: 0 0 32px rgba(255,107,26,.22);
  --aif-shadow-violet: 0 0 42px rgba(139,92,246,.22);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--aif-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 26, 0.3);
  border-radius: 99px;
  border: 2px solid var(--aif-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--aif-orange);
}

/* Master Layout Overrides */
html:not(.autosuperbrain-dashboard),
body:not(.autosuperbrain-dashboard),
#page:not(.autosuperbrain-dashboard),
.site:not(.autosuperbrain-dashboard),
#content:not(.autosuperbrain-dashboard) {
  background: radial-gradient(circle at 10% 0%, rgba(255, 107, 26, 0.16), transparent 30%),
              radial-gradient(circle at 90% 0%, rgba(139, 92, 246, 0.15), transparent 35%),
              var(--aif-bg) !important;
  background-color: var(--aif-bg) !important;
  color: var(--aif-text-body) !important;
  font-family: var(--aft-font-main) !important;
  min-height: 100vh;
}

body:not(.autosuperbrain-dashboard) h1,
body:not(.autosuperbrain-dashboard) h2,
body:not(.autosuperbrain-dashboard) h3,
body:not(.autosuperbrain-dashboard) h4,
body:not(.autosuperbrain-dashboard) h5,
body:not(.autosuperbrain-dashboard) h6,
body:not(.autosuperbrain-dashboard) .entry-title,
body:not(.autosuperbrain-dashboard) .section-title,
body:not(.autosuperbrain-dashboard) .wp-block-heading,
body:not(.autosuperbrain-dashboard) .entry-title a,
.aif-page h1,
.aif-page h2,
.aif-page h3,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.archive-title,
.featured-tools-title {
  color: var(--aif-text) !important;
  opacity: 1 !important;
  text-shadow: 0 0 18px rgba(255,255,255,.08);
}

body:not(.autosuperbrain-dashboard) p,
body:not(.autosuperbrain-dashboard) li,
body:not(.autosuperbrain-dashboard) .entry-content,
body:not(.autosuperbrain-dashboard) label {
  color: var(--aif-text-body) !important;
}

/* Hide Astra header and footer dynamically since we output our own gorgeous header/footer in overrides */
body.home #masthead,
body.home #colophon,
body.single-ai-tool #masthead,
body.single-ai-tool #colophon,
body.post-template-default #masthead,
body.post-template-default #colophon,
body.archive #masthead,
body.archive #colophon,
body.search #masthead,
body.search #colophon,
body.page #masthead,
body.page #colophon {
  display: none !important;
}

/* Scoped Wrapper Elements */
.aft-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Dynamic Header/Nav */
.aft-header {
  border-bottom: 1px solid var(--aft-border);
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: border-color 0.3s;
}
.aft-header:hover {
  border-color: rgba(255, 122, 24, 0.25);
}
.aft-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.aft-brand {
  font-family: var(--aft-font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: none;
  color: var(--aft-text) !important;
}
.aft-brand span {
  color: var(--aft-orange);
  position: relative;
}
.aft-brand span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--aft-orange);
  box-shadow: 0 0 10px var(--aft-orange);
}
.aft-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.aft-nav-link {
  color: var(--aft-muted) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: var(--aft-font-heading);
}
.aft-nav-link:hover, .aft-nav-link.active {
  color: var(--aft-text) !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}
.aft-nav-link.aft-special-link {
  background: linear-gradient(135deg, var(--aft-orange), var(--aft-violet));
  color: white !important;
  padding: 8px 18px;
  border-radius: 99px;
  box-shadow: 0 0 15px rgba(255, 122, 24, 0.25);
}
.aft-nav-link.aft-special-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(255, 122, 24, 0.45);
}

/* Menu Toggle Button (Mobile Only) */
.aft-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--aft-border);
  color: var(--aft-text);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.aft-menu-toggle:hover {
  border-color: var(--aft-orange);
  box-shadow: 0 0 10px var(--aft-orange-glow);
}

/* Mobile Nav Overlay Menu */
.aft-mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100vh - 80px);
  background: rgba(3, 5, 10, 0.98);
  z-index: 999;
  padding: 40px 24px;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  backdrop-filter: blur(16px);
}
.aft-mobile-menu.open {
  display: flex;
}
.aft-mobile-menu .aft-nav-link {
  font-size: 20px;
}

/* Hero Section */
.aft-hero {
  border: 1px solid rgba(255, 122, 24, 0.16);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.05), rgba(139, 92, 246, 0.05)), var(--aft-panel);
  padding: 60px 40px;
  margin-top: 40px;
  margin-bottom: 48px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6), inset 0 0 30px rgba(255, 122, 24, 0.05);
  position: relative;
  overflow: hidden;
}
.aft-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.005) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255,255,255,0.005) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.8;
  pointer-events: none;
}
.aft-hero h1 {
  font-family: var(--aft-font-heading);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--aft-text);
}
.aft-hero h1 span {
  background: linear-gradient(135deg, var(--aft-orange), var(--aft-lilac));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aft-hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--aft-muted);
  max-width: 720px;
  line-height: 1.5;
  margin-bottom: 36px;
}

/* Search Bar Component */
.aft-search-container {
  display: flex;
  max-width: 680px;
  border: 1px solid var(--aft-border);
  background: rgba(3, 5, 10, 0.9);
  border-radius: 99px;
  padding: 6px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.aft-search-container:focus-within {
  border-color: var(--aft-orange);
  box-shadow: 0 0 25px rgba(255, 122, 24, 0.25);
}
.aft-search-container input {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  color: var(--aft-text) !important;
  font-family: var(--aft-font-main);
  font-size: 16px;
  padding: 14px 24px;
  outline: none !important;
}
.aft-search-container button {
  background: linear-gradient(135deg, var(--aft-orange), var(--aft-violet)) !important;
  color: white !important;
  border: 0 !important;
  border-radius: 99px;
  padding: 0 32px;
  font-weight: 800;
  font-family: var(--aft-font-heading);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.aft-search-container button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(255, 122, 24, 0.4);
}

/* Category Filter System */
.aft-filters-container {
  margin-bottom: 44px;
  position: relative;
}
.aft-filters-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none; /* Hide scrollbar for clean chip aesthetics */
}
.aft-filters-inner::-webkit-scrollbar {
  display: none;
}
.aft-filter-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--aft-border);
  color: var(--aft-muted);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--aft-font-heading);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.aft-filter-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--aft-text);
}
.aft-filter-chip.active {
  background: var(--aft-orange-glow);
  border-color: var(--aft-orange);
  color: var(--aft-orange);
  box-shadow: 0 0 15px rgba(255, 122, 24, 0.15);
}

/* Sections Headings */
.aft-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--aft-border);
  padding-bottom: 12px;
}
.aft-section-header h2 {
  font-family: var(--aft-font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--aft-text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.aft-section-header h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 24px;
  background: var(--aft-orange);
  border-radius: 99px;
  box-shadow: 0 0 10px var(--aft-orange);
}

/* Responsive Grid Layouts */
.aft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

/* The Futuristic Card Component */
.aft-card {
  border: 1px solid var(--aft-border);
  background: var(--aft-panel);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0,0,0,0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 280px;
}
.aft-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--aft-orange), var(--aft-violet));
  opacity: 0;
  transition: opacity 0.3s;
}
.aft-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 24, 0.45);
  box-shadow: 0 0 35px rgba(255, 122, 24, 0.12), 0 20px 60px rgba(0,0,0,0.6);
}
.aft-card:hover::after {
  opacity: 1;
}

/* Card Badge/Category Label */
.aft-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.aft-card-badge {
  font-family: var(--aft-font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--aft-cyan);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.04);
  letter-spacing: 0.05em;
}
.aft-card-time {
  font-family: var(--aft-font-mono);
  font-size: 11px;
  color: var(--aft-muted);
}

/* Card Content styling */
.aft-card h3 {
  font-family: var(--aft-font-heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--aft-text);
  letter-spacing: -0.02em;
}
.aft-card p {
  color: var(--aft-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 0;
  margin-bottom: 24px;
  flex: 1;
}

/* Card Actions / Buttons */
.aft-card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.aft-btn {
  text-decoration: none;
  font-family: var(--aft-font-heading);
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 20px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
}
.aft-btn-primary {
  background: linear-gradient(135deg, var(--aft-orange), var(--aft-violet));
  color: white !important;
  box-shadow: 0 4px 15px rgba(255, 122, 24, 0.2);
}
.aft-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 24, 0.4);
}
.aft-btn-secondary {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aft-border);
  color: var(--aft-text) !important;
}
.aft-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

/* Single Post Layout Override styling */
.aft-main-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 36px;
  margin-top: 48px;
  margin-bottom: 80px;
}
.aft-content-card {
  border: 1px solid var(--aft-border);
  background: var(--aft-panel);
  border-radius: 32px;
  padding: 48px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}
.aft-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.aft-meta-chip {
  font-family: var(--aft-font-mono);
  font-size: 12px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--aft-border);
  color: var(--aft-muted);
  border-radius: 99px;
}
.aft-meta-chip.aft-accent-chip {
  border-color: var(--aft-orange);
  color: var(--aft-orange);
  background: var(--aft-orange-glow);
}
.aft-content-card h1 {
  font-family: var(--aft-font-heading);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 36px;
  letter-spacing: -0.04em;
}
.aft-post-content {
  color: #e2e8f0;
  font-size: 16px;
  line-height: 1.75;
}
.aft-post-content p {
  margin-bottom: 24px;
}
.aft-post-content h2 {
  font-family: var(--aft-font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 20px;
  color: var(--aft-text);
  letter-spacing: -0.03em;
}
.aft-post-content h3 {
  font-family: var(--aft-font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--aft-text);
}
.aft-post-content ul, .aft-post-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.aft-post-content li {
  margin-bottom: 10px;
}

/* Sidebar styling */
.aft-sidebar-card {
  border: 1px solid var(--aft-border);
  background: var(--aft-panel);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.4);
  position: sticky;
  top: 112px;
}
.aft-sidebar-card h3 {
  font-family: var(--aft-font-heading);
  font-size: 20px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.aft-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aft-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--aft-border);
  text-decoration: none;
}
.aft-sidebar-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.aft-sidebar-item-icon {
  font-size: 24px;
}
.aft-sidebar-item-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--aft-text);
}
.aft-sidebar-item-info p {
  margin: 0;
  font-size: 12px;
  color: var(--aft-muted);
}

/* Footer Section */
.aft-footer {
  border-top: 1px solid var(--aft-border);
  background: #020408;
  padding: 60px 0 40px;
  margin-top: 80px;
}
.aft-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.aft-footer-brand {
  font-family: var(--aft-font-heading);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}
.aft-footer-brand span {
  color: var(--aft-orange);
}
.aft-footer p {
  color: var(--aft-muted);
  font-size: 14px;
  line-height: 1.6;
}
.aft-footer-title {
  font-family: var(--aft-font-heading);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 20px;
  color: var(--aft-text);
  letter-spacing: -0.02em;
}
.aft-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aft-footer-links a {
  color: var(--aft-muted) !important;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.aft-footer-links a:hover {
  color: var(--aft-text) !important;
}
.aft-footer-bottom {
  border-top: 1px solid var(--aft-border);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--aft-muted);
}

/* CPT Tool Container Frame */
.aft-tool-frame {
  border: 1px solid var(--aft-border);
  background: rgba(10, 18, 30, 0.45);
  border-radius: 32px;
  padding: 40px;
  margin-top: 36px;
  margin-bottom: 60px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .aft-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .aft-main-layout {
    grid-template-columns: 1fr;
  }
  .aft-sidebar-card {
    position: static;
  }
  .aft-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .aft-nav {
    display: none;
  }
  .aft-menu-toggle {
    display: block;
  }
  .aft-hero {
    padding: 40px 24px;
    border-radius: 24px;
  }
  .aft-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .aft-footer {
    padding: 40px 0 28px;
  }
  .aft-footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .aft-grid {
    grid-template-columns: 1fr;
  }
  .aft-search-container {
    flex-direction: column;
    border-radius: 24px;
    padding: 12px;
    gap: 12px;
  }
  .aft-search-container input {
    padding: 8px 12px;
  }
  .aft-search-container button {
    padding: 14px;
  }
  .aft-content-card {
    padding: 24px 16px;
    border-radius: 20px;
  }
  .aft-content-card h1 {
    font-size: 28px;
    margin-bottom: 24px;
  }
  .aft-tool-frame {
    padding: 20px 12px;
    border-radius: 20px;
  }
}

/* ==========================================================================
   Global High-Contrast & Light Background Safety Rules
   ========================================================================== */
body:not(.autosuperbrain-dashboard) .aift-tool,
body:not(.autosuperbrain-dashboard) .aift-card,
body:not(.autosuperbrain-dashboard) .is-light-bg,
body:not(.autosuperbrain-dashboard) [style*="background: #fff"],
body:not(.autosuperbrain-dashboard) [style*="background:#fff"],
body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"],
body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"],
body:not(.autosuperbrain-dashboard) [style*="background: white"],
body:not(.autosuperbrain-dashboard) [style*="background:white"],
body:not(.autosuperbrain-dashboard) .aft-card.is-light,
body:not(.autosuperbrain-dashboard) .tool-card--light,
body:not(.autosuperbrain-dashboard) .wp-block-group.is-light-theme {
  color: #0f172a !important;
}

body:not(.autosuperbrain-dashboard) .aift-tool h1, body:not(.autosuperbrain-dashboard) .aift-tool h2, body:not(.autosuperbrain-dashboard) .aift-tool h3, body:not(.autosuperbrain-dashboard) .aift-tool h4, body:not(.autosuperbrain-dashboard) .aift-tool h5, body:not(.autosuperbrain-dashboard) .aift-tool h6,
body:not(.autosuperbrain-dashboard) .aift-tool p, body:not(.autosuperbrain-dashboard) .aift-tool li, body:not(.autosuperbrain-dashboard) .aift-tool span, body:not(.autosuperbrain-dashboard) .aift-tool label, body:not(.autosuperbrain-dashboard) .aift-tool div:not(.aift-premium-cta-button-wrap), body:not(.autosuperbrain-dashboard) .aift-tool legend,
body:not(.autosuperbrain-dashboard) .aift-card h1, body:not(.autosuperbrain-dashboard) .aift-card h2, body:not(.autosuperbrain-dashboard) .aift-card h3, body:not(.autosuperbrain-dashboard) .aift-card h4, body:not(.autosuperbrain-dashboard) .aift-card p, body:not(.autosuperbrain-dashboard) .aift-card li, body:not(.autosuperbrain-dashboard) .aift-card span, body:not(.autosuperbrain-dashboard) .aift-card label,
body:not(.autosuperbrain-dashboard) .is-light-bg h1, body:not(.autosuperbrain-dashboard) .is-light-bg h2, body:not(.autosuperbrain-dashboard) .is-light-bg h3, body:not(.autosuperbrain-dashboard) .is-light-bg h4, body:not(.autosuperbrain-dashboard) .is-light-bg p, body:not(.autosuperbrain-dashboard) .is-light-bg li, body:not(.autosuperbrain-dashboard) .is-light-bg span, body:not(.autosuperbrain-dashboard) .is-light-bg label,
body:not(.autosuperbrain-dashboard) [style*="background: #fff"] h1, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] h2, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] h3, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] p, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] li, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] span, body:not(.autosuperbrain-dashboard) [style*="background: #fff"] label,
body:not(.autosuperbrain-dashboard) [style*="background:#fff"] h1, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] h2, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] h3, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] p, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] li, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] span, body:not(.autosuperbrain-dashboard) [style*="background:#fff"] label,
body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] h1, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] h2, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] h3, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] p, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] li, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] span, body:not(.autosuperbrain-dashboard) [style*="background-color: #fff"] label,
body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] h1, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] h2, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] h3, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] p, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] li, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] span, body:not(.autosuperbrain-dashboard) [style*="background-color:#fff"] label,
body:not(.autosuperbrain-dashboard) [style*="background: white"] h1, body:not(.autosuperbrain-dashboard) [style*="background: white"] h2, body:not(.autosuperbrain-dashboard) [style*="background: white"] h3, body:not(.autosuperbrain-dashboard) [style*="background: white"] p, body:not(.autosuperbrain-dashboard) [style*="background: white"] li, body:not(.autosuperbrain-dashboard) [style*="background: white"] span, body:not(.autosuperbrain-dashboard) [style*="background: white"] label,
body:not(.autosuperbrain-dashboard) .aft-card.is-light h1, body:not(.autosuperbrain-dashboard) .aft-card.is-light h2, body:not(.autosuperbrain-dashboard) .aft-card.is-light h3, body:not(.autosuperbrain-dashboard) .aft-card.is-light p, body:not(.autosuperbrain-dashboard) .aft-card.is-light span, body:not(.autosuperbrain-dashboard) .aft-card.is-light label,
body:not(.autosuperbrain-dashboard) .tool-card--light h1, body:not(.autosuperbrain-dashboard) .tool-card--light h2, body:not(.autosuperbrain-dashboard) .tool-card--light h3, body:not(.autosuperbrain-dashboard) .tool-card--light p, body:not(.autosuperbrain-dashboard) .tool-card--light span, body:not(.autosuperbrain-dashboard) .tool-card--light label {
  color: #0f172a !important;
  text-shadow: none !important;
}

/* Specifically style inputs, textareas and selects inside tools to be highly legible */
.aift-tool input[type="text"],
.aift-tool input[type="number"],
.aift-tool input[type="email"],
.aift-tool input[type="url"],
.aift-tool textarea,
.aift-tool select,
.aift-card input,
.aift-card textarea,
.aift-card select {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  transition: all 0.2s !important;
}

.aift-tool input::placeholder,
.aift-tool textarea::placeholder,
.aift-card input::placeholder,
.aift-card textarea::placeholder {
  color: #64748b !important;
  opacity: 0.8 !important;
}

/* Secondary descriptions or muted text inside tools */
.aift-tool .aift-muted,
.aift-tool p.description,
.aift-tool .description,
.aift-tool small,
.aift-tool .aift-card-time,
.aift-card .aift-muted,
.aift-card p.description,
.aift-card .description,
.aift-card small {
  color: #475569 !important; /* Slate-600 for high-contrast muted text */
}

/* Ensure buttons inside tools retain correct text color */
.aift-tool button:not(.aift-btn-secondary),
.aift-tool input[type="submit"],
.aift-tool .aift-btn-primary,
.aift-card button:not(.aift-btn-secondary),
.aift-card input[type="submit"] {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--aft-orange), var(--aft-violet)) !important;
}

.aift-tool .aift-btn-secondary,
.aift-card .aift-btn-secondary {
  color: #0f172a !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

/* ==========================================================================
   Mobile Contrast & Light Background Safety Rules
   ========================================================================== */
@media (max-width: 768px) {
  /* Force dark neon background on all public site body wrappers to override Astra mobile leaks */
  body:not(.autosuperbrain-dashboard),
  #page:not(.autosuperbrain-dashboard),
  .site:not(.autosuperbrain-dashboard),
  #content:not(.autosuperbrain-dashboard),
  .entry-content:not(.autosuperbrain-dashboard) {
    background: #05070d !important;
    background-color: #05070d !important;
  }

  /* Just in case there is any light-background card or section on mobile, make its text high-contrast dark */
  .is-light-bg,
  [style*="background: #fff"],
  [style*="background:#fff"],
  [style*="background-color: #fff"],
  [style*="background-color:#fff"],
  [style*="background: white"],
  [style*="background:white"],
  .aft-card.is-light,
  .tool-card--light,
  .wp-block-group.is-light-theme {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
  }

  /* Force dark text inside any light container */
  .is-light-bg h1, .is-light-bg h2, .is-light-bg h3, .is-light-bg h4, .is-light-bg p, .is-light-bg li, .is-light-bg span,
  [style*="background: #fff"] h1, [style*="background: #fff"] h2, [style*="background: #fff"] h3, [style*="background: #fff"] p, [style*="background: #fff"] li, [style*="background: #fff"] span,
  [style*="background:#fff"] h1, [style*="background:#fff"] h2, [style*="background:#fff"] h3, [style*="background:#fff"] p, [style*="background:#fff"] li, [style*="background:#fff"] span,
  [style*="background-color: #fff"] h1, [style*="background-color: #fff"] h2, [style*="background-color: #fff"] h3, [style*="background-color: #fff"] p, [style*="background-color: #fff"] li, [style*="background-color: #fff"] span,
  [style*="background-color:#fff"] h1, [style*="background-color:#fff"] h2, [style*="background-color:#fff"] h3, [style*="background-color:#fff"] p, [style*="background-color:#fff"] li, [style*="background-color:#fff"] span,
  [style*="background: white"] h1, [style*="background: white"] h2, [style*="background: white"] h3, [style*="background: white"] p, [style*="background: white"] li, [style*="background: white"] span,
  .aft-card.is-light h1, .aft-card.is-light h2, .aft-card.is-light h3, .aft-card.is-light p, .aft-card.is-light span,
  .tool-card--light h1, .tool-card--light h2, .tool-card--light h3, .tool-card--light p, .tool-card--light span {
    color: #0f172a !important;
    text-shadow: none !important;
  }

  .is-light-bg .aft-card-badge,
  [style*="background: #fff"] .aft-card-badge,
  [style*="background-color: #fff"] .aft-card-badge,
  .aft-card.is-light .aft-card-badge {
    border-color: rgba(15, 23, 42, 0.2) !important;
    color: #4b5563 !important;
    background: rgba(15, 23, 42, 0.05) !important;
  }
}

/* Strict navigation hidden display selectors to prevent duplicate navigation lines */
@media (min-width: 769px) {
  .aft-mobile-menu {
    display: none !important;
    visibility: hidden !important;
  }
  .aft-nav {
    display: flex !important;
  }
  .aft-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .aft-nav {
    display: none !important;
    visibility: hidden !important;
  }
  .aft-menu-toggle {
    display: block !important;
  }
}

