/* Unified text contrast, 2026-10-08. Loaded after all version styles. */
:root{--muted:#4c567c}
/* Pale surfaces and metadata. */
.nav-label,.breadcrumb,.breadcrumb b,.breadcrumb span,.version,.profile-link{color:#4c567c}
.guest-feature p,.guest-intro>p:last-child,.guest-story p:not(.eyebrow),.home-action p,.home-action small,.image-caption,.provider-credit,.advice-basis{color:#4c567c;opacity:1}
.guest-final{color:#20285e}
.guest-final h2,.guest-final p,.guest-final .eyebrow{color:#20285e;opacity:1}
/* Dark panels: explicit foreground prevents heading overrides from diary styles. */
.ai-feedback-panel,.result-summary{background:#4036a5!important;color:#fff!important}
.ai-feedback-panel :is(h2,h3,h4),.result-summary :is(h2,h3,h4){color:#fff1a8!important;-webkit-text-fill-color:#fff1a8!important;opacity:1!important}
.ai-feedback-panel :is(p,label,legend,small,.eyebrow,.muted,.feedback-status),.result-summary :is(p,small,.muted){color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important}
.ai-feedback-panel .error{color:#fff1a8!important;-webkit-text-fill-color:#fff1a8!important}
/* Controls and badges are light islands within dark panels. */
.ai-feedback-panel :is(input,select,textarea),.guest-scan-fields :is(input,select,textarea){background:#fff!important;color:#20285e!important;-webkit-text-fill-color:#20285e!important}
input::placeholder,textarea::placeholder{color:#59617b!important;opacity:1}
select option{background:#fff;color:#20285e}
.result-summary :is(.tag,.review-badge){background:#fff!important;color:#312d86!important;-webkit-text-fill-color:#312d86!important}
/* Findings use the same light presentation on home, guest and diary pages. */
.finding-card,.result-comment-column,.result-more details,.v18-criteria article,.v18-conclusion{background:#fff!important;color:#253149!important}
.finding-card :is(h3,h4,b,strong,summary,p,li,small),.result-comment-column :is(h3,h4,p,li),.result-more :is(summary,p,li),.v18-criteria :is(h3,h4,p,li),.v18-conclusion :is(p,b,strong){color:#253149!important;-webkit-text-fill-color:#253149!important;opacity:1!important}
.finding-card .finding-number{background:#4036a5!important;color:#fff!important}
.finding-card .tag,.finding-card .review-badge{background:#edf0ff!important;color:#312d86!important}
.finding-card .tag.warn{background:#fff1b8!important;color:#554000!important}
.finding-card .finding-title small{color:#4c567c!important}
/* Buttons: make the foreground independent from their parent panel. */
.btn-blue{background:#4036a5!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
.btn-white,.btn-soft,.icon-btn{color:#20285e!important;-webkit-text-fill-color:#20285e!important}
.btn-yellow{color:#293a55!important;-webkit-text-fill-color:#293a55!important}
.btn-danger{color:#9c2432!important;-webkit-text-fill-color:#9c2432!important}
/* Guest hero, camera, footer and navigation retain light text on dark backgrounds. */
.guest-hero,.guest-quick-scan,.guest-story .story-card,.guest-footer{background:linear-gradient(135deg,#27347c,#4036a5)!important;color:#fff!important}
.guest-hero-copy>p,.guest-hero-copy>small,.guest-story .story-card :is(p,span),.guest-footer :is(p,a,span,small),.guest-footer{color:#fff!important;opacity:1}
.guest-quick-scan .guest-scan-heading :is(h2,p,.eyebrow),.guest-scan-fields>label,.guest-one-shot :is(b,small){color:#fff!important}
.sidebar :is(.nav-label,.version,.main-nav a,.profile-link,.side-note p){color:#fff!important;opacity:1}
.sidebar .nav-badge{color:#283477!important}
.sidebar .rx-site-stat,.rx-guest-stats-rail .rx-site-stat{background:#4036a5!important}
.sidebar .rx-site-stat strong,.rx-guest-stats-rail .rx-site-stat strong{color:#fff1a8!important}
.sidebar .rx-site-stat :is(span,small),.rx-guest-stats-rail .rx-site-stat :is(span,small){color:#fff!important}
.page-footer,.mobile-nav a,.tip-card p{color:#4c567c}
.sidebar{background:linear-gradient(160deg,#252f75,#4036a5)!important}
.sidebar .brand small{color:#fff!important}
.home-hero-v14{background:linear-gradient(145deg,#27347c,#4036a5)!important}
.home-hero-v14 .hero-copy :is(p,small,.hero-foot){color:#fff!important;opacity:1}
