/* v5.2 final frontend reliability and contrast layer. Loaded after all page modules. */
:root{--dsn-safe-ink:#111827;--dsn-safe-body:#4b5565;--dsn-safe-muted:#667085;--dsn-safe-line:#dce3ec;--dsn-safe-link:#a30d2a;--dsn-safe-white:#fff;--dsn-safe-dark:#0f172a}
body.dsn-pro-plugin .dsn-main{background:#fff;color:var(--dsn-safe-ink)}

/* Homepage: the lead component is a split light card, not a dark overlay. */
body.dsn-pro-plugin .dsn-home-premium-lead{background:#fff!important;color:var(--dsn-safe-ink)!important}
body.dsn-pro-plugin .dsn-home-premium-copy{background:#fff!important;color:var(--dsn-safe-ink)!important;-webkit-text-fill-color:initial!important}
body.dsn-pro-plugin .dsn-home-premium-copy :where(h1,h2,h3,strong,b){color:#101827!important;-webkit-text-fill-color:#101827!important;text-shadow:none!important}
body.dsn-pro-plugin .dsn-home-premium-copy h1 a{color:#101827!important;-webkit-text-fill-color:#101827!important}
body.dsn-pro-plugin .dsn-home-premium-copy>p{color:#596578!important;-webkit-text-fill-color:#596578!important}
body.dsn-pro-plugin .dsn-home-premium-copy .dsn-home-category{color:var(--dsn-red)!important;-webkit-text-fill-color:var(--dsn-red)!important}
body.dsn-pro-plugin .dsn-home-premium-copy .dsn-home-meta,
body.dsn-pro-plugin .dsn-home-premium-copy .dsn-home-meta span{color:#6b7687!important;-webkit-text-fill-color:#6b7687!important}
body.dsn-pro-plugin .dsn-home-premium-rail,
body.dsn-pro-plugin .dsn-home-trust-metrics-grid,
body.dsn-pro-plugin .dsn-home-trust-metrics-grid>div{background:#fff!important;color:var(--dsn-safe-ink)!important}
body.dsn-pro-plugin .dsn-home-premium-rail :where(h2,h3,strong,.dsn-home-premium-rail-title),
body.dsn-pro-plugin .dsn-home-trust-metrics-grid strong{color:#172033!important;-webkit-text-fill-color:#172033!important}
body.dsn-pro-plugin .dsn-home-premium-rail :where(p,small,.dsn-home-rail-category),
body.dsn-pro-plugin .dsn-home-trust-metrics-grid span{color:#697586!important;-webkit-text-fill-color:#697586!important}
body.dsn-pro-plugin .dsn-home-premium-rail .dsn-home-rail-number,
body.dsn-pro-plugin .dsn-home-rail-head a{color:var(--dsn-red)!important;-webkit-text-fill-color:var(--dsn-red)!important}

/* Explicit dark homepage panels. */
body.dsn-pro-plugin .dsn-home-fact-column,
body.dsn-pro-plugin .dsn-home-empty-premium{background-color:#111827!important;color:#fff!important}
body.dsn-pro-plugin .dsn-home-fact-column :where(h1,h2,h3,h4,h5,h6,p,li,strong,b,a:not(.dsn-btn),small),
body.dsn-pro-plugin .dsn-home-empty-premium :where(h1,h2,h3,p,strong,a:not(.dsn-btn),small){color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important}
body.dsn-pro-plugin .dsn-home-fact-column :where(.dsn-home-rail-category,.dsn-kicker),
body.dsn-pro-plugin .dsn-home-empty-premium .dsn-kicker{color:#fde68a!important;-webkit-text-fill-color:#fde68a!important}

/* Generic light surface guarantees. */
body.dsn-pro-plugin :where(.dsn-surface-light-safe,.dsn-v47-trust-intro,.dsn-v47-stat-grid>div,.dsn-v47-method-grid article,.dsn-v47-fact-card,.dsn-v47-policy-toc,.dsn-v47-policy-facts article,.dsn-v47-policy-sections article,.dsn-v47-policy-contact>div,.dsn-v47-related a,.dsn-v47-featured-video,.dsn-v47-video-card,.dsn-v47-video-standards article,.dsn-epaper-card,.dsn-epaper-featured-copy,.dsn-form-card,.dsn-contact-panel,.dsn-team-profile,.dsn-policy-section){background-color:#fff!important;color:var(--dsn-safe-ink)!important;color-scheme:light!important}
body.dsn-pro-plugin :where(.dsn-surface-light-safe,.dsn-v47-trust-intro,.dsn-v47-stat-grid>div,.dsn-v47-method-grid article,.dsn-v47-fact-card,.dsn-v47-policy-toc,.dsn-v47-policy-facts article,.dsn-v47-policy-sections article,.dsn-v47-policy-contact>div,.dsn-v47-related a,.dsn-v47-featured-video,.dsn-v47-video-card,.dsn-v47-video-standards article,.dsn-epaper-card,.dsn-epaper-featured-copy,.dsn-form-card,.dsn-contact-panel,.dsn-team-profile,.dsn-policy-section) :where(h1,h2,h3,h4,h5,h6,strong,b,dt){color:var(--dsn-safe-ink)!important;-webkit-text-fill-color:var(--dsn-safe-ink)!important;text-shadow:none!important}
body.dsn-pro-plugin :where(.dsn-surface-light-safe,.dsn-v47-trust-intro,.dsn-v47-stat-grid>div,.dsn-v47-method-grid article,.dsn-v47-fact-card,.dsn-v47-policy-toc,.dsn-v47-policy-facts article,.dsn-v47-policy-sections article,.dsn-v47-policy-contact>div,.dsn-v47-featured-video,.dsn-v47-video-card,.dsn-v47-video-standards article,.dsn-epaper-card,.dsn-epaper-featured-copy,.dsn-form-card,.dsn-contact-panel,.dsn-team-profile,.dsn-policy-section) :where(p,li,dd,label,small,figcaption){color:var(--dsn-safe-body)!important;-webkit-text-fill-color:var(--dsn-safe-body)!important}
body.dsn-pro-plugin .dsn-text-dark-safe{color:var(--dsn-safe-ink)!important;-webkit-text-fill-color:var(--dsn-safe-ink)!important;text-shadow:none!important}
body.dsn-pro-plugin a.dsn-text-dark-safe{color:var(--dsn-safe-link)!important;-webkit-text-fill-color:var(--dsn-safe-link)!important}

/* Generic dark surface guarantees. */
body.dsn-pro-plugin :where(.dsn-surface-dark-safe,.dsn-rti-command,.dsn-rti-timeline,.dsn-rti-newsroom-help,.dsn-topic-band,.dsn-sidebar-panel,.dsn-contact-command,.dsn-team-hero,.dsn-portal-hero,.dsn-frontdesk-hero,.dsn-v47-policy-summary,.dsn-v47-rating-guide,.dsn-v47-video-cta,.dsn-epaper-reader-toolbar){color:#f8fafc!important}
body.dsn-pro-plugin :where(.dsn-surface-dark-safe,.dsn-rti-command,.dsn-rti-timeline,.dsn-rti-newsroom-help,.dsn-topic-band,.dsn-sidebar-panel,.dsn-contact-command,.dsn-team-hero,.dsn-portal-hero,.dsn-frontdesk-hero,.dsn-v47-policy-summary,.dsn-v47-rating-guide,.dsn-v47-video-cta,.dsn-epaper-reader-toolbar) :where(h1,h2,h3,h4,h5,h6,strong,b,p,li,dd,dt,label,small,a:not(.dsn-btn)){color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important;text-shadow:none!important}
body.dsn-pro-plugin .dsn-text-light-safe{color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important;text-shadow:none!important}
body.dsn-pro-plugin a.dsn-text-light-safe{color:#fde68a!important;-webkit-text-fill-color:#fde68a!important}

/* Fact Check, Policy and Video centres: correct mixed surfaces. */
body.dsn-pro-plugin .dsn-v47-trust-intro :where(h1,h2,h3,strong){color:#0f172a!important;-webkit-text-fill-color:#0f172a!important}
body.dsn-pro-plugin .dsn-v47-trust-intro p:not(.dsn-kicker){color:#596579!important;-webkit-text-fill-color:#596579!important}
body.dsn-pro-plugin .dsn-v47-featured-video>div :where(h1,h2,h3,strong){color:#111827!important;-webkit-text-fill-color:#111827!important}
body.dsn-pro-plugin .dsn-v47-featured-video>div p:not(.dsn-kicker){color:#5f6a7b!important;-webkit-text-fill-color:#5f6a7b!important}
body.dsn-pro-plugin .dsn-v47-video-card .dsn-v47-video-body h2,
body.dsn-pro-plugin .dsn-v47-fact-card .dsn-v47-fact-body h2{color:#111827!important;-webkit-text-fill-color:#111827!important}
body.dsn-pro-plugin .dsn-v47-video-card .dsn-v47-video-body p,
body.dsn-pro-plugin .dsn-v47-fact-card .dsn-v47-claim,
body.dsn-pro-plugin .dsn-v47-card-meta{color:#647083!important;-webkit-text-fill-color:#647083!important}
body.dsn-pro-plugin .dsn-v47-policy-summary :where(h1,h2,h3,p,strong){color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important}

/* Form controls and validation remain readable regardless of theme inheritance. */
body.dsn-pro-plugin .dsn-main :where(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),textarea,select){background:#fff!important;color:#111827!important;-webkit-text-fill-color:#111827!important;border-color:#b9c4d2!important;color-scheme:light!important}
body.dsn-pro-plugin .dsn-main :where(input,textarea)::placeholder{color:#667386!important;-webkit-text-fill-color:#667386!important;opacity:1!important}
body.dsn-pro-plugin .dsn-main :where(input,textarea,select):focus{border-color:var(--dsn-red)!important;outline:3px solid rgba(200,16,46,.16)!important;box-shadow:none!important}

/* Digital Help must stay readable even when another theme applies global dark/white text. */
body .dsnp-digital-help,
body .dsnp-help-dialog{color:#111827!important;-webkit-text-fill-color:initial!important;color-scheme:light!important}
body .dsnp-help-dialog :where(.dsnp-help-bubble,.dsnp-help-suggestion,.dsnp-help-privacy,.dsnp-help-source-list strong){color:#334155!important;-webkit-text-fill-color:#334155!important}
body .dsnp-help-message.is-user .dsnp-help-bubble,
body .dsnp-help-header,
body .dsnp-help-header :where(strong,small,button){color:#fff!important;-webkit-text-fill-color:#fff!important}
body .dsnp-help-source-list a{color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8!important}
body .dsnp-help-form textarea{color:#111827!important;-webkit-text-fill-color:#111827!important}

/* Accessibility focus indicators. */
body.dsn-pro-plugin :where(a,button,input,textarea,select):focus-visible{outline:3px solid rgba(200,16,46,.35)!important;outline-offset:3px!important}

@media(max-width:900px){body.dsn-pro-plugin .dsn-home-premium-copy{padding:24px!important}}
@media(max-width:700px){body.dsn-pro-plugin .dsn-home-premium-copy h1{font-size:clamp(1.8rem,8.5vw,2.55rem)!important}}
