
/* V18 FINAL LEGAL/PUBLIC CONTRAST FIX
   Keeps existing theme/layout. Only improves readability and contrast. */

:root{
  --sd-cream:#fff8df;
  --sd-card:#fffdf3;
  --sd-maroon:#a3003c;
  --sd-text:#18232b;
  --sd-muted:#3e4b53;
  --sd-link:#075f9e;
  --sd-gold:#ffe49b;
  --sd-navy:#061522;
}

/* Never allow faded text on public content */
.v5-body main *,
.v5-body .info-block *,
.v5-body .notice-grid *,
.v5-body .legal-page *,
.v5-body .policy-page *,
.v5-body .rules-page *,
.v5-body .content-card *,
.v5-body .content-wrap *,
.v5-body .seo-page *,
.v5-body .seo-section *,
.v5-body .rd-disclaimer-page *,
.v5-body .rd-archive-page *{
  opacity:1 !important;
  filter:none !important;
}

/* Legal/info page containers */
.v5-body main .info-block,
.v5-body main .notice-grid,
.v5-body main .legal-page,
.v5-body main .policy-page,
.v5-body main .rules-page,
.v5-body main .content-card,
.v5-body main .content-wrap{
  background:var(--sd-cream) !important;
  color:var(--sd-text) !important;
}

/* Paragraphs and list items - strongest readability */
.v5-body main .info-block p,
.v5-body main .notice-grid p,
.v5-body main .legal-page p,
.v5-body main .policy-page p,
.v5-body main .rules-page p,
.v5-body main .content-card p,
.v5-body main .content-wrap p,
.v5-body main .info-block li,
.v5-body main .notice-grid li,
.v5-body main .legal-page li,
.v5-body main .policy-page li,
.v5-body main .rules-page li,
.v5-body main .content-card li,
.v5-body main .content-wrap li,
.v5-body main .info-block span,
.v5-body main .notice-grid span,
.v5-body main .legal-page span,
.v5-body main .policy-page span,
.v5-body main .rules-page span,
.v5-body main .content-card span,
.v5-body main .content-wrap span{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
  font-weight:500 !important;
  text-shadow:none !important;
}

/* Main and section headings */
.v5-body main .info-block h1,
.v5-body main .notice-grid h1,
.v5-body main .legal-page h1,
.v5-body main .policy-page h1,
.v5-body main .rules-page h1,
.v5-body main .content-card h1,
.v5-body main .content-wrap h1,
.v5-body main .info-block h2,
.v5-body main .notice-grid h2,
.v5-body main .legal-page h2,
.v5-body main .policy-page h2,
.v5-body main .rules-page h2,
.v5-body main .content-card h2,
.v5-body main .content-wrap h2,
.v5-body main .info-block h3,
.v5-body main .notice-grid h3,
.v5-body main .legal-page h3,
.v5-body main .policy-page h3,
.v5-body main .rules-page h3,
.v5-body main .content-card h3,
.v5-body main .content-wrap h3{
  color:var(--sd-maroon) !important;
  -webkit-text-fill-color:var(--sd-maroon) !important;
  font-weight:900 !important;
  text-shadow:none !important;
}

/* Contact page / generic copy that previously appeared pale yellow */
.v5-body main .contact-page p,
.v5-body main .contact-page li,
.v5-body main .contact-page div,
.v5-body main .contact-page span{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
}
.v5-body main .contact-page h1,
.v5-body main .contact-page h2,
.v5-body main .contact-page h3{
  color:var(--sd-maroon) !important;
  -webkit-text-fill-color:var(--sd-maroon) !important;
}

/* Old existing legal pages may use plain wrappers */
.v5-body main > section,
.v5-body main > article{
  text-shadow:none !important;
}
.v5-body main > section[style*="background"],
.v5-body main > article[style*="background"]{
  color:var(--sd-text);
}

/* Explicitly fix common legal page names/classes */
.privacy-policy p,.privacy-policy li,.privacy-policy span,
.terms-page p,.terms-page li,.terms-page span,
.terms-conditions p,.terms-conditions li,.terms-conditions span,
.website-rules p,.website-rules li,.website-rules span,
.contact-us p,.contact-us li,.contact-us span{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
  opacity:1 !important;
}
.privacy-policy h1,.privacy-policy h2,.privacy-policy h3,
.terms-page h1,.terms-page h2,.terms-page h3,
.terms-conditions h1,.terms-conditions h2,.terms-conditions h3,
.website-rules h1,.website-rules h2,.website-rules h3,
.contact-us h1,.contact-us h2,.contact-us h3{
  color:var(--sd-maroon) !important;
  -webkit-text-fill-color:var(--sd-maroon) !important;
}

/* Generic cream cards across home/info hub */
.v5-ivory p,.v5-textbox p,.v5-blog-card p,.v5-article p,
.v5-market-card p,.rd-disclaimer-card p,.top-list p,.live-card p{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
  opacity:1 !important;
}
.v5-ivory h1,.v5-ivory h2,.v5-ivory h3,
.v5-textbox h1,.v5-textbox h2,.v5-textbox h3,
.v5-blog-card h1,.v5-blog-card h2,.v5-blog-card h3,
.v5-article h1,.v5-article h2,.v5-article h3,
.v5-market-card h1,.v5-market-card h2,.v5-market-card h3,
.rd-disclaimer-card h1,.rd-disclaimer-card h2,.rd-disclaimer-card h3{
  color:var(--sd-maroon) !important;
  -webkit-text-fill-color:var(--sd-maroon) !important;
  opacity:1 !important;
}

/* Footer/navigation links */
.v5-body main a:not(.v5-content-btn):not(.v5-refresh):not(.sd-disclaimer-readmore){
  opacity:1 !important;
}
.v5-body main .info-block a,
.v5-body main .notice-grid a,
.v5-body main .legal-page a,
.v5-body main .policy-page a,
.v5-body main .rules-page a,
.v5-body main .content-card a,
.v5-body main .content-wrap a{
  color:var(--sd-link) !important;
  -webkit-text-fill-color:var(--sd-link) !important;
  font-weight:700 !important;
}

/* Dark section labels */
.v5-panel-title,.v5-chart-heading,.v5-info-title,.record-head,.chart-title,.monthly-title{
  color:var(--sd-gold) !important;
  -webkit-text-fill-color:var(--sd-gold) !important;
  opacity:1 !important;
}

/* Table contrast */
.v5-body main table th,.v5-chart th{
  background:#07364d !important;
  color:var(--sd-gold) !important;
  -webkit-text-fill-color:var(--sd-gold) !important;
  font-weight:900 !important;
}
.v5-body main table td,.v5-chart td{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
  opacity:1 !important;
}

/* Emergency override for inline pale-yellow text inside cream legal cards */
.v5-body main .info-block [style*="color"],
.v5-body main .notice-grid [style*="color"],
.v5-body main .legal-page [style*="color"],
.v5-body main .policy-page [style*="color"],
.v5-body main .rules-page [style*="color"],
.v5-body main .content-card [style*="color"],
.v5-body main .content-wrap [style*="color"]{
  color:var(--sd-text) !important;
  -webkit-text-fill-color:var(--sd-text) !important;
}

/* Re-assert headings after the inline-color emergency rule */
.v5-body main .info-block h1,.v5-body main .info-block h2,.v5-body main .info-block h3,
.v5-body main .notice-grid h1,.v5-body main .notice-grid h2,.v5-body main .notice-grid h3,
.v5-body main .legal-page h1,.v5-body main .legal-page h2,.v5-body main .legal-page h3,
.v5-body main .policy-page h1,.v5-body main .policy-page h2,.v5-body main .policy-page h3,
.v5-body main .rules-page h1,.v5-body main .rules-page h2,.v5-body main .rules-page h3,
.v5-body main .content-card h1,.v5-body main .content-card h2,.v5-body main .content-card h3,
.v5-body main .content-wrap h1,.v5-body main .content-wrap h2,.v5-body main .content-wrap h3{
  color:var(--sd-maroon) !important;
  -webkit-text-fill-color:var(--sd-maroon) !important;
}

@media(max-width:650px){
  .v5-body main .info-block p,
  .v5-body main .notice-grid p,
  .v5-body main .legal-page p,
  .v5-body main .policy-page p,
  .v5-body main .rules-page p,
  .v5-body main .content-card p,
  .v5-body main .content-wrap p{
    font-size:16px !important;
    line-height:1.5 !important;
  }
}
