/* ============================================================
   LEGALFREI FINAL CONTRAST LAYER
   - Does NOT choose or remove a theme.
   - Keeps the existing light/current theme.
   - Keeps the existing Premium Dark theme.
   - Only fixes readability/contrast.
   ============================================================ */

:root{
    --lf-text:#24364b;
    --lf-text-strong:#0b1728;
    --lf-text-muted:#526a82;
    --lf-text-soft:#60768c;
    --lf-heading:#081426;
    --lf-link:#006f9f;
    --lf-accent:#007fae;
    --lf-card:#ffffff;
    --lf-card-border:#d7e4ef;
    --lf-input:#ffffff;
    --lf-input-border:#b9ccdb;
}

/* Existing Premium Dark theme. */
html.lf-application-premium-dark,
body.lf-application-premium-dark,
html[data-theme="premium-dark"],
body[data-theme="premium-dark"],
html[data-theme="dark"],
body[data-theme="dark"]{
    --lf-text:#d7e7f3;
    --lf-text-strong:#ffffff;
    --lf-text-muted:#b9cddd;
    --lf-text-soft:#a9bfd1;
    --lf-heading:#ffffff;
    --lf-link:#72eaff;
    --lf-accent:#72eaff;
    --lf-card:#0d2033;
    --lf-card-border:rgba(114,234,255,.24);
    --lf-input:#0a2034;
    --lf-input-border:rgba(114,234,255,.30);
}

/* ------------------------------------------------------------
   BASE TEXT
   ------------------------------------------------------------ */
body,
body main,
body section,
body article,
body p,
body li,
body dd,
body dt,
body label,
body td,
body th,
body figcaption{
    color:var(--lf-text) !important;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6{
    color:var(--lf-heading) !important;
}

body small,
body .muted,
body .text-muted,
body .meta,
body .subtitle,
body .eyebrow,
body .description,
body .secondary-text{
    color:var(--lf-text-muted) !important;
}

body strong,
body b{
    color:var(--lf-text-strong) !important;
}

body a{
    color:var(--lf-link) !important;
}

body a:hover{
    color:var(--lf-text-strong) !important;
}

/* ------------------------------------------------------------
   COMMON CONTENT / CARD / PANEL ELEMENTS
   ------------------------------------------------------------ */
body .card,
body .panel,
body .content-card,
body .service-card,
body .feature-card,
body .info-card,
body .review-card,
body .review,
body .lf-shared-review-card{
    color:var(--lf-text) !important;
}

/* Light theme cards. */
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .card,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .panel,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .content-card,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .service-card,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .feature-card,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body .info-card{
    background:#ffffff !important;
    border-color:var(--lf-card-border) !important;
}

/* Dark theme cards. */
html.lf-application-premium-dark body .card,
html.lf-application-premium-dark body .panel,
html.lf-application-premium-dark body .content-card,
html.lf-application-premium-dark body .service-card,
html.lf-application-premium-dark body .feature-card,
html.lf-application-premium-dark body .info-card,
html[data-theme="premium-dark"] body .card,
html[data-theme="premium-dark"] body .panel,
html[data-theme="premium-dark"] body .content-card,
html[data-theme="premium-dark"] body .service-card,
html[data-theme="premium-dark"] body .feature-card,
html[data-theme="premium-dark"] body .info-card{
    background:var(--lf-card) !important;
    border-color:var(--lf-card-border) !important;
}

/* ------------------------------------------------------------
   FORMS
   ------------------------------------------------------------ */
body input,
body textarea,
body select{
    color:var(--lf-text-strong) !important;
    border-color:var(--lf-input-border) !important;
}

html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body input,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body textarea,
html:not(.lf-application-premium-dark):not([data-theme="premium-dark"]):not([data-theme="dark"]) body select{
    background:#ffffff !important;
}

html.lf-application-premium-dark body input,
html.lf-application-premium-dark body textarea,
html.lf-application-premium-dark body select,
html[data-theme="premium-dark"] body input,
html[data-theme="premium-dark"] body textarea,
html[data-theme="premium-dark"] body select,
html[data-theme="dark"] body input,
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select{
    background:#0a2034 !important;
}

body input::placeholder,
body textarea::placeholder{
    color:var(--lf-text-soft) !important;
    opacity:1 !important;
}

/* ------------------------------------------------------------
   HOMEPAGE REVIEW AREA — specifically fixes the screenshot
   where pale review text is sitting on a white background.
   ------------------------------------------------------------ */
#customer-reviews,
.lf-shared-reviews{
    color:var(--lf-text) !important;
}

#customer-reviews h1,
#customer-reviews h2,
#customer-reviews h3,
.lf-shared-reviews h1,
.lf-shared-reviews h2,
.lf-shared-reviews h3{
    color:var(--lf-heading) !important;
}

#customer-reviews p,
#customer-reviews li,
#customer-reviews span,
#customer-reviews small,
.lf-shared-reviews p,
.lf-shared-reviews li,
.lf-shared-reviews span,
.lf-shared-reviews small{
    color:var(--lf-text) !important;
}

#customer-reviews .lf-shared-review-card,
.lf-shared-reviews .lf-shared-review-card{
    color:var(--lf-text) !important;
}

#customer-reviews .lf-shared-review-card p,
#customer-reviews .lf-shared-review-card span,
#customer-reviews .lf-shared-review-card small,
#customer-reviews .lf-shared-review-card div,
#customer-reviews .lf-shared-review-card li,
.lf-shared-reviews .lf-shared-review-card p,
.lf-shared-reviews .lf-shared-review-card span,
.lf-shared-reviews .lf-shared-review-card small,
.lf-shared-reviews .lf-shared-review-card div,
.lf-shared-reviews .lf-shared-review-card li{
    color:var(--lf-text) !important;
}

#customer-reviews .lf-shared-review-card strong,
.lf-shared-reviews .lf-shared-review-card strong{
    color:var(--lf-text-strong) !important;
}

/* Review metadata stays readable in both modes. */
#customer-reviews time,
#customer-reviews .date,
#customer-reviews .category,
.lf-shared-reviews time,
.lf-shared-reviews .date,
.lf-shared-reviews .category{
    color:var(--lf-text-muted) !important;
}

/* Stars retain their visual meaning. */
#customer-reviews .lf-shared-stars,
.lf-shared-reviews .lf-shared-stars{
    color:#e6a91a !important;
}

/* ------------------------------------------------------------
   HOMEPAGE / HERO TEXT PROTECTION
   Do not let old pale inline colors disappear on light pages.
   ------------------------------------------------------------ */
body .hero p,
body .hero .subtitle,
body .hero .description,
body .hero li,
body .hero small,
body .hero .eyebrow,
body .homepage-hero p,
body .homepage-hero .subtitle,
body .homepage-hero .description,
body .home-hero p,
body .home-hero .subtitle,
body .home-hero .description{
    color:var(--lf-text) !important;
}

body .hero h1,
body .hero h2,
body .hero h3,
body .homepage-hero h1,
body .homepage-hero h2,
body .homepage-hero h3,
body .home-hero h1,
body .home-hero h2,
body .home-hero h3{
    color:var(--lf-heading) !important;
}

/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */
header a,
nav a,
.site-header a{
    color:var(--lf-text-strong) !important;
}

/* ------------------------------------------------------------
   FOOTER — visibility only; structure is untouched.
   ------------------------------------------------------------ */
footer,
.site-footer,
footer p,
footer li,
footer span,
footer small,
footer .footer-note{
    color:var(--lf-text-muted) !important;
}

footer h1,
footer h2,
footer h3,
footer h4,
footer strong,
footer b{
    color:var(--lf-text-strong) !important;
}

footer a{
    color:var(--lf-link) !important;
}

/* ------------------------------------------------------------
   INLINE-COLOR OVERRIDE FOR COMMON INVISIBILITY VALUES
   These target text containers, not SVG/icon elements.
   ------------------------------------------------------------ */
body p[style*="color"],
body li[style*="color"],
body small[style*="color"],
body label[style*="color"],
body .description[style*="color"],
body .subtitle[style*="color"],
body .muted[style*="color"]{
    color:var(--lf-text) !important;
}

/* ------------------------------------------------------------
   ACCESSIBILITY
   ------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
    outline:3px solid #00a8d6 !important;
    outline-offset:3px !important;
}

/* Never hide text merely because the previous theme was dark. */
body .text-white{
    color:var(--lf-text-strong) !important;
}

body .text-muted{
    color:var(--lf-text-muted) !important;
}

@media(max-width:700px){
    body{
        overflow-x:hidden;
    }
}

@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{
        animation:none !important;
        transition:none !important;
        scroll-behavior:auto !important;
    }
}
