/* ============================================================
   DESIGN AUDIT POLISH — Task #1427731
   CEO-mandated sitewide quality sweep: Fortune 500 grade

   Scope: Global fixes that apply to ALL pages
   Standard: White backgrounds, premium typography, consistent brand
   ============================================================ */

/* ── 1. MINIMUM FONT SIZE ENFORCEMENT ─────────────────────── */
/* Nothing below 12px (0.75rem) anywhere on the site            */
/* Labels, eyebrows, badges, meta text — all raised to legible  */

/* Eyebrow pills used across hero sections */
.hp-hero__eyebrow,
.news-eyebrow,
.ch-hero-eyebrow,
.bnk-eyebrow,
.lf-hero-eyebrow,
.dir-freshness-badge,
[class*="-eyebrow"] {
  font-size: max(0.75rem, 12px) !important;
}

/* Badge/pill text — floor at 12px */
.news-item-badge,
.lf-card-badge,
.lf-card-tier,
.lf-section-label,
.bnk-eyebrow,
[class*="badge-pill"],
[class*="-badge"] {
  font-size: max(0.75rem, 12px) !important;
}

/* Meta and timestamp text — floor at 13px */
.news-item-meta,
.lf-trust-item,
.lf-trust-label,
.lf-card-features li,
.lf-field label,
.lf-card-tagline,
.lf-price-period,
[class*="-meta"],
[class*="-date"],
[class*="-time"] {
  font-size: max(0.8125rem, 13px) !important;
}

/* Small body text — floor at 14px */
.hp-hero__proof-text,
.dir-card-company,
.dir-stat-payout,
.dir-stat-item,
.dir-hero-stat-label,
.news-item-description,
.news-item-cta,
[class*="-sub-text"],
[class*="-small"] {
  font-size: max(0.875rem, 14px) !important;
}

/* Logo tagline */
.hn-logo-tag {
  font-size: 0.8125rem !important; /* 13px — was 0.69rem (11px) */
  line-height: 1.35 !important;
  color: #4B5563 !important; /* Gray-600 — better contrast than #6B7280 */
}


/* ── 2. WHITE BACKGROUND ENFORCEMENT ─────────────────────── */
/* CEO directive: all-white backgrounds, no gradients, no gray  */

.news-hero,
.lf-section--dark,
.lf-section--gray,
.bnk-hero,
.ch-hero,
.pr-hero,
.pr-page,
[class*="-section--gray"],
[class*="-section--dark"],
[class*="-section--alt"] {
  background: #FFFFFF !important;
  background-image: none !important;
}

/* Remove subtle gradient overlays that deviate from pure white */
.lf-hero::before,
.bnk-hero::before {
  background: none !important;
  display: none !important;
}

/* Ensure sections with gray backgrounds go white */
.lf-section--dark {
  border-top-color: #E5E7EB !important;
  border-bottom-color: #E5E7EB !important;
}


/* ── 3. BRAND COLOR CONSISTENCY ──────────────────────────── */
/* Unify for-law-firms (was indigo #6366f1) and for-banks      */
/* (was blue #2563eb) to brand emerald #00875A                 */

/* Law Firms: Override indigo → emerald */
.lf-page {
  --lf-accent:      #00875A;
  --lf-accent-hover: #006B4D;
  --lf-accent-light: #E6F9F3;
  --lf-blue:        #00875A;
  --lf-blue-hover:  #006B4D;
  --lf-heading:     'Fraunces', Georgia, serif;
}

.lf-hero-eyebrow {
  background: rgba(0, 135, 90, 0.06) !important;
  border-color: rgba(0, 135, 90, 0.2) !important;
  color: #00875A !important;
}
.lf-hero-eyebrow-dot {
  background: #00875A !important;
}
.lf-hero h1 span {
  color: #00875A !important;
}
.lf-card--featured {
  border-color: #00875A !important;
  box-shadow: 0 0 0 1px #00875A, 0 8px 24px rgba(0, 135, 90, 0.15) !important;
}
.lf-card-badge {
  background: #00875A !important;
}
.lf-card-tier,
.lf-section-label,
.lf-trust-label {
  color: #00875A !important;
}
.lf-check {
  background: #E6F9F3 !important;
}
.lf-check svg {
  stroke: #00875A !important;
}
.lf-btn--primary {
  background: #00875A !important;
}
.lf-btn--primary:hover {
  background: #006B4D !important;
  box-shadow: 0 8px 24px rgba(0, 135, 90, 0.35) !important;
}
.lf-btn--dark-outline:hover {
  border-color: #00875A !important;
  color: #00875A !important;
}
.lf-trust-icon {
  color: #00875A !important;
}

/* Banks: Override blue → emerald */
.bnk-eyebrow {
  background: rgba(0, 135, 90, 0.06) !important;
  border-color: rgba(0, 135, 90, 0.18) !important;
  color: #00875A !important;
}
.bnk-hero h1 .highlight {
  color: #00875A !important;
  background: none !important;
  -webkit-text-fill-color: #00875A !important;
}


/* ── 4. CARD SYSTEM POLISH ──────────────────────────────── */
/* Consistent hover effects, shadows, transitions everywhere  */

/* All card-like elements get smooth hover transitions */
.news-item,
.lf-card,
.ch-card,
.bnk-card,
[class*="pricing-card"],
[class*="-card"]:not(.card):not(.settlement-card):not(.sr-settlement-card):not(.sp-card) {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out !important;
}

/* Standardize card border radius to 12px */
.news-item,
.lf-card,
.ch-card,
.bnk-card {
  border-radius: 12px !important;
}

/* Premium card shadow on hover */
.news-item:hover,
.lf-card:hover,
.ch-card:hover,
.bnk-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-3px) !important;
}


/* ── 5. BUTTON POLISH ───────────────────────────────────── */
/* Consistent hover feedback across all button styles          */

/* All buttons get a subtle lift on hover */
.lf-btn:hover,
.bnk-btn:hover,
.ch-btn:hover,
[class*="btn-primary"]:hover,
[class*="btn-secondary"]:hover {
  transform: translateY(-1px);
}

/* All buttons get smooth transitions */
.lf-btn,
.bnk-btn,
.ch-btn {
  transition: all 0.2s ease-out !important;
}

/* Disabled buttons lose lift */
[class*="btn"]:disabled,
[class*="btn"][aria-disabled="true"] {
  transform: none !important;
  cursor: not-allowed;
  opacity: 0.6;
}


/* ── 6. SECTION SPACING STANDARDIZATION ─────────────────── */
/* Consistent vertical rhythm across all pages                 */

/* Section separators — use consistent border */
.lf-section,
.bnk-section,
.ch-section,
.news-hero,
[class*="-section"] {
  border-bottom: 1px solid #E5E7EB;
}

/* Remove double borders where consecutive sections both have borders */
.lf-section + .lf-section,
.bnk-section + .bnk-section,
.ch-section + .ch-section {
  border-top: none;
}


/* ── 7. LINK & INTERACTIVE POLISH ───────────────────────── */
/* Smooth transitions on all interactive elements              */

a:not([class]) {
  transition: color 0.15s ease-out;
}

/* Footer links — consistent sizing */
.sr-ramsey-footer a,
.sr-ft-seo-section a {
  font-size: max(0.8125rem, 13px);
  transition: color 0.15s ease-out;
}


/* ── 8. MOBILE REFINEMENTS (375px) ──────────────────────── */

@media (max-width: 480px) {
  /* Ensure hero headlines don't break on small screens */
  .lf-hero h1,
  .bnk-hero h1,
  .ch-hero h1,
  .news-hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    word-break: break-word;
  }

  /* Card padding on mobile */
  .lf-card,
  .bnk-card,
  .ch-card {
    padding: 20px !important;
  }

  /* Pricing cards stack properly */
  .lf-pricing-grid {
    grid-template-columns: 1fr !important;
  }

  /* CTA buttons go full width on mobile */
  .lf-hero-cta,
  .bnk-hero-btns {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .lf-hero-cta .lf-btn,
  .bnk-hero-btns .bnk-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Trust bar wraps cleanly */
  .lf-trust-inner {
    gap: 16px !important;
  }
  .lf-trust-sep {
    display: none !important;
  }

  /* News grid single column on small screens */
  .news-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Consistent section padding on tablet/mobile */
  .lf-section,
  .bnk-section,
  .ch-section {
    padding: 48px 20px !important;
  }

  /* Pricing grid responsive */
  .lf-pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}


/* ── 9. TYPOGRAPHY REFINEMENTS ──────────────────────────── */
/* Tighter letter-spacing on large headings, relaxed on body  */

/* All hero subheadings — consistent treatment */
.lf-hero-sub,
.bnk-hero-sub,
.ch-hero-sub,
.news-hero p,
.pr-hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem) !important;
  color: #374151 !important;
  line-height: 1.65 !important;
}

/* Section subtitles */
.lf-section-sub,
.bnk-section-sub,
.ch-section-sub {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem) !important;
  line-height: 1.6 !important;
  color: #4B5563 !important;
}


/* ── 10. FORM ELEMENT POLISH ────────────────────────────── */
/* Consistent form styling across all pages                    */

.lf-field input,
.lf-field select,
.bnk-field input,
.bnk-field select {
  font-size: 16px !important; /* Prevents iOS zoom */
  height: 48px !important;
  border-radius: 8px !important;
  border: 1.5px solid #E5E7EB !important;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out !important;
}

.lf-field input:focus,
.lf-field select:focus,
.bnk-field input:focus,
.bnk-field select:focus {
  border-color: #00875A !important;
  box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.12) !important;
  outline: none !important;
}


/* ── 11. SCROLL PERFORMANCE ─────────────────────────────── */
/* GPU-accelerated transforms for smooth animations            */

.settlement-card,
.sr-settlement-card,
.sp-card,
.news-item,
.lf-card,
.ch-card,
.bnk-card,
.card {
  will-change: transform;
  backface-visibility: hidden;
}


/* ── 12. FOCUS STATES (WCAG) ────────────────────────────── */
/* Consistent focus rings across all custom components         */

.lf-btn:focus-visible,
.bnk-btn:focus-visible,
.ch-btn:focus-visible,
.news-cat-pill:focus-visible {
  outline: 3px solid #00875A !important;
  outline-offset: 2px !important;
}


/* ── 13. IMAGE QUALITY ──────────────────────────────────── */
/* Prevent stretched or broken images                          */

img {
  image-rendering: auto;
}

img[src=""],
img:not([src]) {
  display: none;
}

/* News item images — consistent aspect ratio */
.news-item-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #F3F4F6;
}


/* ── 14. PRINT STYLES ───────────────────────────────────── */
/* Clean printing for any page                                  */

/* ── 15. BROAD BRAND COLOR OVERRIDE ─────────────────────── */
/* 79 templates use inline styles with off-brand colors.       */
/* These selectors catch the most common patterns.             */

/* Override indigo/purple inline styles */
[style*="color:#6366f1"],
[style*="color: #6366f1"],
[style*="color:#4f46e5"],
[style*="color: #4f46e5"] {
  color: #00875A !important;
}

/* Override blue inline styles */
[style*="color:#2563eb"],
[style*="color: #2563eb"],
[style*="color:#1d4ed8"],
[style*="color: #1d4ed8"] {
  color: #00875A !important;
}

/* Override indigo/blue backgrounds */
[style*="background:#6366f1"],
[style*="background: #6366f1"],
[style*="background-color:#6366f1"],
[style*="background-color: #6366f1"],
[style*="background:#4f46e5"],
[style*="background: #4f46e5"],
[style*="background-color:#4f46e5"],
[style*="background-color: #4f46e5"] {
  background: #00875A !important;
  background-color: #00875A !important;
}

[style*="background:#2563eb"],
[style*="background: #2563eb"],
[style*="background-color:#2563eb"],
[style*="background-color: #2563eb"],
[style*="background:#1d4ed8"],
[style*="background: #1d4ed8"],
[style*="background-color:#1d4ed8"],
[style*="background-color: #1d4ed8"] {
  background: #00875A !important;
  background-color: #00875A !important;
}

/* Override border-color inline */
[style*="border-color:#6366f1"],
[style*="border-color: #6366f1"],
[style*="border-color:#4f46e5"],
[style*="border-color: #4f46e5"],
[style*="border-color:#2563eb"],
[style*="border-color: #2563eb"] {
  border-color: #00875A !important;
}


/* ── 16. SETTLEMENT DETAIL PAGE POLISH ──────────────────── */
/* The most-visited template — ensure premium quality          */

.sd-hero,
.sd-content,
.sd-sidebar {
  background: #FFFFFF !important;
}

/* Settlement detail cards — consistent shadow */
.sd-info-card,
.sd-eligibility-card,
.sd-filing-card {
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease-out;
}

.sd-info-card:hover,
.sd-eligibility-card:hover,
.sd-filing-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
}


/* ── 17. AUTH PAGES POLISH ──────────────────────────────── */
/* Login/signup should be clean, distraction-free               */

.aup-page {
  background: #FFFFFF !important;
}

.aup-mkt {
  background: #F9FAFB !important;
}

/* Form card polish */
.aup-card,
.aup-form-card {
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #E5E7EB;
}


/* ── 18. PRICING PAGE POLISH ────────────────────────────── */
/* Ensure pricing cards look premium and consistent             */

.pr-page {
  background: #FFFFFF !important;
}

/* Pricing cards — premium shadow and hover */
[class*="pr-card"],
[class*="pricing-card"] {
  border-radius: 16px !important;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out !important;
}

[class*="pr-card"]:hover,
[class*="pricing-card"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}


/* ── 19. COMMUNITY PAGE POLISH ──────────────────────────── */

.ch-page {
  background: #FFFFFF !important;
}

.ch-hero {
  background: #FFFFFF !important;
}

.ch-hero-eyebrow {
  font-size: 0.75rem !important; /* was 0.72rem — 12px minimum */
  color: #00875A !important;
}


/* ── 20. GLOBAL PREMIUM TOUCHES ─────────────────────────── */
/* Small details that separate amateur from Fortune 500         */

/* Smooth page-level transitions */
main {
  animation: fadeIn 0.3s ease-out;
}

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

/* Selection color — brand emerald */
::selection {
  background: rgba(0, 135, 90, 0.15);
  color: #0A0A0A;
}

::-moz-selection {
  background: rgba(0, 135, 90, 0.15);
  color: #0A0A0A;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F9FAFB;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Table polish — any table on any page */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid #E5E7EB;
  padding: 12px 16px;
  font-size: 14px;
  color: #4B5563;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 15px;
}

tr:hover td {
  background: #F9FAFB;
}


@media print {
  .lf-hero::before,
  .bnk-hero::before,
  [class*="ticker"],
  [class*="toast"],
  [class*="fab"],
  [class*="bottom-bar"] {
    display: none !important;
  }
}


/* ── 21. HOMEPAGE TRENDING CARDS ─────────────────────────── */
/* Replaced inline styles with proper CSS classes              */

.hp-sotd__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.hp-sotd__views {
  font-size: var(--text-xs);
  color: #6B7280;
  margin: 2px 0 6px;
}


/* ── 22. PRICING PAGE — PRICING-B CLEANUP ────────────────── */
/* Override inline styles in pricing-b.ejs with proper CSS     */

/* Gray feature text in pricing-b free tier */
.prb-free-features span[style*="color:#9ca3af"],
.prb-free-features span[style*="color: #9ca3af"] {
  color: #6B7280 !important; /* WCAG AA compliant gray */
}

/* Pricing-b comparison table header widths */
.prb-comparison th {
  padding: 12px 16px;
}

/* Pricing-b disclaimer bar */
.prb-disclaimer {
  background: #F9FAFB !important;
  border-top: 1px solid #E5E7EB;
  padding: 16px 24px;
  text-align: center;
}

.prb-disclaimer p {
  font-size: 13px !important;
  color: #4B5563 !important;
  margin: 0;
  line-height: 1.65;
  max-width: 820px;
  margin: 0 auto;
}

.prb-disclaimer a {
  color: #4B5563 !important;
  text-decoration: underline;
}


/* ── 23. SETTLEMENT LISTING PAGE POLISH ──────────────────── */
/* Consistent card grid and search/filter bar                   */

.settlements-page {
  background: #FFFFFF !important;
}

/* Settlement cards in listing — consistent height rows */
.settlements-grid {
  display: grid;
  gap: 16px;
}

/* Search/filter bar polish */
.settlements-filter-bar {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}


/* ── 24. NEWS / BLOG / CONTENT PAGES ─────────────────────── */
/* Consistent article cards and content typography              */

.news-page,
.blog-page,
.ask-page,
.wins-page {
  background: #FFFFFF !important;
}

/* Article content — premium reading experience */
.article-content,
.blog-content,
.news-content {
  font-size: 17px;
  line-height: 1.75;
  color: #1F2A37;
}

.article-content h2,
.blog-content h2,
.news-content h2 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.article-content h3,
.blog-content h3,
.news-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

/* News card images — consistent aspect ratio */
.news-item-image,
.blog-item-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #F3F4F6;
}

/* News category pills */
.news-cat-pill {
  font-size: 13px !important;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  color: #374151;
  transition: all 0.15s ease-out;
}

.news-cat-pill:hover,
.news-cat-pill.active {
  background: #00875A;
  color: #FFFFFF;
  border-color: #00875A;
}


/* ── 25. DASHBOARD / MY-MONEY PAGE ───────────────────────── */

.dashboard-page,
.my-money-page {
  background: #FFFFFF !important;
}

/* Dashboard stat cards */
.dashboard-stat-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dashboard-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}


/* ── 26. ALERTS / QUIZ / SEARCH PAGES ────────────────────── */

.alerts-page,
.quiz-page,
.search-results-page {
  background: #FFFFFF !important;
}


/* ── 27. ABOUT / CONTACT / LEGAL PAGES ───────────────────── */

.about-page,
.contact-page,
.privacy-page,
.terms-page,
.disclaimer-page {
  background: #FFFFFF !important;
}

/* Legal page content — readable width */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
}


/* ── 28. CATEGORY / STATE PSEO PAGES ─────────────────────── */

.category-page,
.state-page,
.pseo-page {
  background: #FFFFFF !important;
}


/* ── 29. ADDON / PRODUCT PAGES ───────────────────────────── */
/* Consistent styling for all one-time purchase/addon pages     */

[class*="addon-page"],
.annual-pass-page,
.gift-page {
  background: #FFFFFF !important;
}

/* Product feature lists — consistent check icons */
.addon-features li,
.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 15px;
  color: #374151;
}


/* ── 30. DARK BACKGROUND NUCLEAR OVERRIDE ────────────────── */
/* CEO: all-white backgrounds. Catch EVERY dark inline bg.     */
/* These selectors target the 5 most common dark hex values    */
/* used across 40+ templates as inline styles.                 */

/* --- Background overrides: any element --- */
[style*="background:#0a2540"],
[style*="background: #0a2540"],
[style*="background:#0f172a"],
[style*="background: #0f172a"],
[style*="background:#1e293b"],
[style*="background: #1e293b"],
[style*="background:#111827"],
[style*="background: #111827"],
[style*="background:#0a0a2e"],
[style*="background: #0a0a2e"],
[style*="background:#0a0f1e"],
[style*="background: #0a0f1e"],
[style*="background:#0a1628"],
[style*="background: #0a1628"],
[style*="background:#0f1a2e"],
[style*="background: #0f1a2e"],
[style*="background:#0a0f19"],
[style*="background:#0a0f1a"],
[style*="background:#0a1020"] {
  background: #F9FAFB !important;
  background-color: #F9FAFB !important;
  border-color: #E5E7EB !important;
}

/* Headings in formerly-dark containers */
[style*="background:#0a2540"] h1,
[style*="background:#0a2540"] h2,
[style*="background:#0a2540"] h3,
[style*="background:#0a2540"] h4,
[style*="background:#0f172a"] h1,
[style*="background:#0f172a"] h2,
[style*="background:#0f172a"] h3,
[style*="background:#0f172a"] h4,
[style*="background:#1e293b"] h1,
[style*="background:#1e293b"] h2,
[style*="background:#1e293b"] h3,
[style*="background:#1e293b"] h4,
[style*="background:#111827"] h1,
[style*="background:#111827"] h2,
[style*="background:#111827"] h3,
[style*="background:#111827"] h4,
[style*="background:#0a0f1e"] h1,
[style*="background:#0a0f1e"] h2,
[style*="background:#0a0f1e"] h3,
[style*="background:#0a0f1e"] h4,
[style*="background:#0a1628"] h1,
[style*="background:#0a1628"] h2,
[style*="background:#0a1628"] h3,
[style*="background:#0a1628"] h4 {
  color: #0A0A0A !important;
}

/* Body text in formerly-dark containers */
[style*="background:#0a2540"] p,
[style*="background:#0a2540"] span,
[style*="background:#0a2540"] li,
[style*="background:#0f172a"] p,
[style*="background:#0f172a"] span,
[style*="background:#0f172a"] li,
[style*="background:#1e293b"] p,
[style*="background:#1e293b"] span,
[style*="background:#1e293b"] li,
[style*="background:#111827"] p,
[style*="background:#111827"] span,
[style*="background:#111827"] li,
[style*="background:#0a0f1e"] p,
[style*="background:#0a0f1e"] span,
[style*="background:#0a0f1e"] li,
[style*="background:#0a1628"] p,
[style*="background:#0a1628"] span,
[style*="background:#0a1628"] li {
  color: #374151 !important;
}

/* Links in formerly-dark containers */
[style*="background:#0a2540"] a,
[style*="background:#0f172a"] a,
[style*="background:#1e293b"] a,
[style*="background:#111827"] a,
[style*="background:#0a0f1e"] a,
[style*="background:#0a1628"] a {
  color: #00875A !important;
}

/* Buttons keep brand colors */
[style*="background:#0a2540"] .btn-primary,
[style*="background:#0f172a"] .btn-primary,
[style*="background:#1e293b"] .btn-primary,
[style*="background:#111827"] .btn-primary,
[style*="background:#0a0f1e"] .btn-primary,
[style*="background:#0a1628"] .btn-primary {
  background: #00875A !important;
  color: #FFFFFF !important;
}

/* Light text forced to dark in formerly-dark containers */
[style*="color:#f1f5f9"],
[style*="color: #f1f5f9"],
[style*="color:#e2e8f0"],
[style*="color: #e2e8f0"],
[style*="color:#cbd5e1"],
[style*="color: #cbd5e1"] {
  color: #0A0A0A !important;
}

/* Muted text in dark containers → accessible gray */
[style*="color:#94a3b8"],
[style*="color: #94a3b8"],
[style*="color:#64748b"],
[style*="color: #64748b"] {
  color: #6B7280 !important;
}

/* Dark borders → light borders */
[style*="border:1px solid #1e293b"],
[style*="border: 1px solid #1e293b"],
[style*="border:1px solid #334155"],
[style*="border: 1px solid #334155"] {
  border-color: #E5E7EB !important;
}

/* Details/accordions in dark theme → light */
details[style*="background:#1e293b"],
details[style*="background: #1e293b"] {
  background: #F9FAFB !important;
  border-color: #E5E7EB !important;
}

details[style*="background:#1e293b"] summary,
details[style*="background: #1e293b"] summary {
  color: #0A0A0A !important;
}

/* Nav breadcrumbs in dark → light */
nav[style*="background:#0f172a"],
nav[style*="background: #0f172a"] {
  background: #F9FAFB !important;
}

nav[style*="background:#0f172a"] a,
nav[style*="background: #0f172a"] a {
  color: #00875A !important;
}

/* Blue highlight borders → emerald */
[style*="border-color:#3b82f6"],
[style*="border: 1px solid #3b82f6"],
[style*="border:1px solid #3b82f6"],
[style*="border:2px solid #3b82f6"],
[style*="border-left:3px solid #3b82f6"],
[style*="border-left:2px solid #334155"] {
  border-color: #00875A !important;
}

/* Blue text in dark containers → emerald */
[style*="color:#3b82f6"],
[style*="color: #3b82f6"],
[style*="color:#60a5fa"],
[style*="color: #60a5fa"] {
  color: #00875A !important;
}


/* ── 30B. PAYWALL MODAL OVERRIDE ─────────────────────────── */
/* The global paywall modal uses dark backgrounds — override   */

#srPaywallModal > div[style*="background:linear-gradient"] {
  background: #FFFFFF !important;
  border-color: #E5E7EB !important;
}

#srPaywallModal h2[style*="color:#fff"] {
  color: #0A0A0A !important;
}

#srPaywallModal p[style*="color:#94a3b8"] {
  color: #6B7280 !important;
}

#srPaywallModal p[style*="color:#34d399"] {
  color: #00875A !important;
}

#srPaywallModal span[style*="color:#6b7280"] {
  color: #6B7280 !important;
}

#srPaywallModal button[style*="background:#1e3a5f"] {
  background: #E5E7EB !important;
}

#srPaywallModal span[style*="color:#4ade80"] {
  color: #00875A !important;
}


/* ── 31. GLOBAL INLINE COLOR OVERRIDES ───────────────────── */
/* Fix remaining off-brand inline color values                  */

/* Teal/cyan inline colors → emerald */
[style*="color:#0d9488"],
[style*="color: #0d9488"],
[style*="color:#14b8a6"],
[style*="color: #14b8a6"],
[style*="color:#0891b2"],
[style*="color: #0891b2"] {
  color: #00875A !important;
}

/* Orange/amber inline → emerald (unless deadline-related) */
[style*="color:#ea580c"]:not([class*="deadline"]),
[style*="color: #ea580c"]:not([class*="deadline"]) {
  color: #00875A !important;
}

/* Pink/rose inline → emerald */
[style*="color:#e11d48"],
[style*="color: #e11d48"],
[style*="color:#ec4899"],
[style*="color: #ec4899"] {
  color: #00875A !important;
}

/* Blue inline links → emerald (most common off-brand color) */
[style*="color:#2563eb"],
[style*="color: #2563eb"] {
  color: #00875A !important;
}

/* Indigo inline → emerald */
[style*="color:#6366f1"],
[style*="color: #6366f1"],
[style*="color:#4f46e5"],
[style*="color: #4f46e5"] {
  color: #00875A !important;
}

/* Indigo backgrounds → emerald */
[style*="background:rgba(79,70,229"],
[style*="background: rgba(79,70,229"],
[style*="background:rgba(99,102,241"],
[style*="background: rgba(99,102,241"] {
  background: rgba(0, 135, 90, 0.08) !important;
}

/* Indigo borders → emerald */
[style*="border:1px solid rgba(79,70,229"],
[style*="border: 1px solid rgba(79,70,229"],
[style*="border:1px solid rgba(99,102,241"],
[style*="border: 1px solid rgba(99,102,241"] {
  border-color: rgba(0, 135, 90, 0.25) !important;
}

/* Blue background buttons (dark CTA) → emerald */
[style*="background:#1e40af"],
[style*="background: #1e40af"],
[style*="background:#1e3a5f"],
[style*="background: #1e3a5f"] {
  background: #00875A !important;
  color: #FFFFFF !important;
}


/* ── 32. FOOTER POLISH ───────────────────────────────────── */
/* Ensure footer is consistently styled across all pages        */

footer,
.sr-ramsey-footer,
.site-footer {
  background: #FFFFFF !important;
  border-top: 1px solid #E5E7EB;
}

/* Footer section headings */
footer h3,
footer h4,
.sr-ramsey-footer h3,
.sr-ramsey-footer h4 {
  font-size: 13px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0A0A0A !important;
  margin-bottom: 12px;
}

/* Footer links — consistent */
footer a,
.sr-ramsey-footer a {
  font-size: 14px;
  color: #6B7280 !important;
  transition: color 0.15s ease-out;
}

footer a:hover,
.sr-ramsey-footer a:hover {
  color: #00875A !important;
}

/* Footer bottom bar */
.sr-ft-bottom,
.footer-bottom {
  font-size: 13px;
  color: #6B7280;
  border-top: 1px solid #E5E7EB;
  padding-top: 24px;
  margin-top: 48px;
}


/* ── 33. HEADER POLISH ───────────────────────────────────── */
/* Clean, minimal header across all pages                       */

.hn-header,
header[role="banner"] {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Nav links — consistent weight and color */
.hn-nav-link,
.hn-link {
  font-size: 15px !important;
  font-weight: 500;
  color: #0A0A0A !important;
  transition: color 0.15s ease-out;
}

.hn-nav-link:hover,
.hn-link:hover {
  color: #00875A !important;
}


/* ── 34. GLOBAL SPACING REFINEMENTS ──────────────────────── */
/* Consistent section padding sitewide                          */

/* Ensure all main sections have consistent vertical rhythm */
main > section,
main > .section {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Remove excessive margin between adjacent sections */
main > section + section {
  margin-top: 0;
}

/* Container max-width enforcement */
.container,
[class*="container"] {
  max-width: 1200px;
}

.container-lg,
[class*="container-lg"] {
  max-width: 1400px;
}


/* ── 35. RESPONSIVE IMAGE POLISH ─────────────────────────── */

img {
  max-width: 100%;
  height: auto;
}

/* Prevent layout shift from images */
img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}


/* ── 36. MOBILE BOTTOM BAR REFINEMENT ────────────────────── */

@media (max-width: 768px) {
  .mobile-cta-bar {
    padding: 8px 16px !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08) !important;
  }

  .mobile-cta-bar .btn-primary {
    border-radius: 10px !important;
    font-size: 15px !important;
  }
}


/* ── 37. LINK UNDERLINE POLISH ───────────────────────────── */
/* Links in body text should have underlines for accessibility  */

.article-content a,
.blog-content a,
.news-content a,
.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 135, 90, 0.3);
}

.article-content a:hover,
.blog-content a:hover,
.news-content a:hover,
.legal-content a:hover {
  text-decoration-color: #00875A;
}


/* ── 38. EMPTY STATE POLISH ──────────────────────────────── */
/* When there's no data to show — clean empty states            */

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: #6B7280;
}

.empty-state h3,
.empty-state p {
  color: #6B7280;
}

.empty-state .btn {
  margin-top: 16px;
}


/* ── 39. ERROR STATE COLOR PROTECTION ──────────────────────── */
/* Error/warning elements must stay red regardless of global    */
/* color overrides. This prevents color normalization from      */
/* turning error text emerald.                                  */

[class*="error"][style*="color:#dc2626"],
[class*="Error"][style*="color:#dc2626"],
[id*="error"][style*="color:#dc2626"],
[id*="Error"][style*="color:#dc2626"] {
  color: #dc2626 !important;
}

/* Also protect success messages that should stay green */
[class*="success"][style*="color:#00875A"],
[class*="Success"][style*="color:#00875A"] {
  color: #00875A !important;
}
