/*
  AV LÜ™ Site Finish Contrast Hardening v2.4.1
  Designed, created, and owned by AVLU.
  Front-end contrast, legibility, and navigation polish only.
  © 2026 AVLU. All rights reserved.
*/

:root {
  --sfc-dark-surface: #08111b;
  --sfc-dark-panel: #0c1b2d;
  --sfc-dark-panel-2: #10243a;
  --sfc-light-paper: #f7f1e6;
  --sfc-light-paper-bright: #fffdf8;
  --sfc-light-ink: #11171d;
  --sfc-light-copy: #3f4a54;
  --sfc-primary: #2459a8;
  --sfc-primary-hover: #173d77;
  --sfc-cyan: #72d4ff;
  --sfc-light-copy-on-dark: #c8daf2;
}
/* Dark hero text must stay light even when global craft tokens change. */

body.route-authority-map .authority-hero .authority-hero__copy h1,
body.route-simulation-lab .simulation-hero .simulation-hero__copy h1,
body.route-presentation .presentation-slide--navy .presentation-stage > h2,
body.route-presentation .presentation-slide--hero .presentation-stage h1,
body.route-presentation .presentation-slide--close .presentation-stage h2 {
  color: #f8fbff !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .22);
}

body.route-authority-map .authority-hero .authority-eyebrow,
body.route-simulation-lab .simulation-hero .simulation-eyebrow,
body.route-presentation .presentation-slide--navy .presentation-kicker,
body.route-presentation .presentation-slide--hero .presentation-kicker,
body.route-presentation .presentation-slide--close .presentation-kicker {
  color: var(--sfc-cyan) !important;
}

html[data-theme="dark"] body.route-authority-map .authority-hero .authority-hero__lead,
html[data-theme="dark"] body.route-simulation-lab .simulation-hero .simulation-lead {
  color: var(--sfc-light-copy-on-dark) !important;
}

body.route-presentation .presentation-slide--navy .presentation-section-lead,
body.route-presentation .presentation-slide--hero .presentation-lead,
body.route-presentation .presentation-slide--close .presentation-lead {
  color: var(--sfc-light-copy-on-dark) !important;
}

/* Keep the current section visible without leaving its tooltip over content. */

.avlu-section-nav a[aria-current="true"]::before {
  opacity: 0;
  transform: translate(8px, -50%);
}

.avlu-section-nav a[aria-current="true"]:hover::before,
.avlu-section-nav a[aria-current="true"]:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}

/*
  The scorecard inherits several older high-specificity presentation rules.
  These explicit selectors keep the light panel readable without flattening
  the dark technical portions of the card.
*/

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__head > b {
  color: #0f3629 !important;
  -webkit-text-fill-color: #0f3629 !important;
  border-color: #8ebda8 !important;
  background-color: #bdebd8 !important;
  background-image: none !important;
}

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__total {
  background-color: #edf5ff !important;
  background-image: linear-gradient(135deg, #f8fbff, #edf5ff) !important;
}

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__total > strong[data-evidence-metric="evidenceRows"] {
  color: #173d77 !important;
  -webkit-text-fill-color: #173d77 !important;
  text-shadow: none !important;
}

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__total > span {
  color: #11171d !important;
  -webkit-text-fill-color: #11171d !important;
}

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__grid strong {
  color: #f8fbff !important;
  -webkit-text-fill-color: #f8fbff !important;
}

html[data-theme="light"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard :is(.target-evidence-scorecard__head > span, .target-evidence-scorecard__grid span, p, a) {
  color: #c8d5e8 !important;
  -webkit-text-fill-color: #c8d5e8 !important;
}

/* Dark-theme controls and navigation. */

html[data-theme="dark"] body.avlu-site-finish .v13-nav a[aria-current="page"],
html[data-theme="dark"] body.avlu-site-finish .v13-nav a.is-current {
  color: #f8fbff !important;
  border-color: rgba(79, 140, 255, .46) !important;
  background: #14243b !important;
}

html[data-theme="dark"] body.avlu-site-finish :is(.v13-btn--primary, .ref-btn--primary, .client-btn--primary) {
  color: #fffdfa !important;
  border-color: #3b76c8 !important;
  background: var(--sfc-primary) !important;
  text-shadow: none !important;
}

html[data-theme="dark"] body.avlu-site-finish :is(.v13-btn--primary, .ref-btn--primary, .client-btn--primary):is(:hover, :focus-visible) {
  color: #fffdfa !important;
  border-color: #6fa3eb !important;
  background: var(--sfc-primary-hover) !important;
}

html[data-theme="dark"] body.avlu-site-finish :is(.v13-btn--primary, .ref-btn--primary, .client-btn--primary):disabled {
  color: rgba(255, 253, 250, .78) !important;
  background: #2c4e78 !important;
}

html[data-theme="dark"] body.avlu-site-finish .avlu-section-nav a::before,
html[data-theme="dark"] body.avlu-site-finish .avlu-back-top,
html[data-theme="dark"] body.avlu-site-finish :is(.v13-ledger-table, .simulation-table-card table, .dealer-difference-table table) thead th,
html[data-theme="dark"] body.route-feedback #feedback form.ref-panel::before,
html[data-theme="dark"] body.route-login .v13-login-card::before {
  color: #f8fbff !important;
  background: var(--sfc-dark-surface) !important;
}

html[data-theme="dark"] body.avlu-site-finish .avlu-back-top:is(:hover, :focus-visible) {
  background: #173d77 !important;
}

/* Restore intentional dark technical panels that broad dark-mode rules flatten. */

html[data-theme="dark"] body.route-about .about-proof-map {
  color: #f8fbff !important;
  border-color: rgba(114, 212, 255, .42) !important;
  background:
    radial-gradient(circle at 100% 0, rgba(34, 125, 255, .32), transparent 38%),
    linear-gradient(145deg, #061831, #072a59 70%, #073c7c) !important;
  box-shadow: 10px 10px 0 #2e7357, 0 26px 46px rgba(0, 0, 0, .34) !important;
}

html[data-theme="dark"] body.route-about .about-proof-map :is(header, header strong, li strong) {
  color: #f8fbff !important;
}

html[data-theme="dark"] body.route-about .about-proof-map :is(li p, footer) {
  color: #d9e8fb !important;
}

html[data-theme="dark"] body.route-about .about-proof-map li > span {
  color: #d4e2ff !important;
  border-color: rgba(133, 183, 255, .5) !important;
  background: rgba(8, 103, 247, .2) !important;
}

html[data-theme="dark"] body.route-about .about-evidence-strip,
html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) {
  color: #f8fbff !important;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--sfc-dark-surface) !important;
}

/* Evidence panel values remain readable in dark mode. */

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard {
  color: #edf3fb !important;
  border-color: rgba(129, 166, 218, .46) !important;
  background: var(--sfc-dark-panel) !important;
  box-shadow: 10px 10px 0 #93611b, 0 24px 46px rgba(0, 0, 0, .34) !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__head {
  color: #edf3fb !important;
  border-bottom-color: rgba(237, 243, 251, .18) !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__total {
  background-color: #0b192b !important;
  background-image: linear-gradient(135deg, #10243a, #0b192b) !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__total strong,
html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__grid strong {
  color: #f8fbff !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard :is(.target-evidence-scorecard__total span, .target-evidence-scorecard__grid span, p, a) {
  color: #c8d5e8 !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__grid,
html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__grid div {
  border-color: rgba(237, 243, 251, .18) !important;
  background: transparent !important;
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard__head b {
  color: #0f3629 !important;
  border-color: #8ebda8 !important;
  background: #bdebd8 !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard {
  color: #edf3fb !important;
  border-color: rgba(129, 166, 218, .46) !important;
  background-color: var(--sfc-dark-panel) !important;
  background-image: none !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__total {
  background-color: #0b192b !important;
  background-image: linear-gradient(135deg, #10243a, #0b192b) !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard :is(.target-evidence-scorecard__total strong, .target-evidence-scorecard__grid strong) {
  color: #f8fbff !important;
  -webkit-text-fill-color: #f8fbff !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard :is(.target-evidence-scorecard__head > span, .target-evidence-scorecard__total span, .target-evidence-scorecard__grid span, p, a) {
  color: #c8d5e8 !important;
  -webkit-text-fill-color: #c8d5e8 !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-operator-craft.avlu-site-finish.route-evidence.target-evidence.evidence-page .v13-page-hero .v13-evidence-callout.target-evidence-scorecard .target-evidence-scorecard__head > b {
  color: #0f3629 !important;
  -webkit-text-fill-color: #0f3629 !important;
  border-color: #8ebda8 !important;
  background-color: #bdebd8 !important;
  background-image: none !important;
}

/* Login and legal records use deliberate paper cards inside the dark shell. */

html[data-theme="dark"] body.route-login .v13-login-card,
html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  color: var(--sfc-light-ink) !important;
  border-color: #11171d !important;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .04) 31px 32px),
    var(--sfc-light-paper) !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  background:
    linear-gradient(90deg, rgba(168, 77, 53, .16) 0 1px, transparent 1px) 42px 0 / calc(100% - 42px) 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .04) 31px 32px),
    var(--sfc-light-paper) !important;
}

html[data-theme="dark"] body.route-login .v13-login-card :is(h1, h2, h3, label, strong, .v13-brand),
html[data-theme="dark"] body.route-privacy .v13-legal-panel :is(h1, h2, h3, strong),
html[data-theme="dark"] body.route-terms .v13-legal-panel :is(h1, h2, h3, strong) {
  color: var(--sfc-light-ink) !important;
}

html[data-theme="dark"] body.route-login .v13-login-card :is(p, span, small, .v13-login-copyright),
html[data-theme="dark"] body.route-privacy .v13-legal-panel :is(p, li, span, small),
html[data-theme="dark"] body.route-terms .v13-legal-panel :is(p, li, span, small) {
  color: var(--sfc-light-copy) !important;
}

html[data-theme="dark"] body.route-login .v13-login-card a,
html[data-theme="dark"] body.route-privacy .v13-legal-panel a,
html[data-theme="dark"] body.route-terms .v13-legal-panel a {
  color: #173d77 !important;
}

html[data-theme="dark"] body.route-login .v13-login-card :is(input, select, textarea) {
  color: var(--sfc-light-ink) !important;
  border-color: #7d8790 !important;
  background: var(--sfc-light-paper-bright) !important;
}

html[data-theme="dark"] body.route-login .v13-login-card :is(input, textarea)::placeholder {
  color: #6c747c !important;
}

html[data-theme="dark"] body.route-login .v13-runtime-boundary {
  color: #153e30 !important;
  border-color: #6ea88c !important;
  background: #e7f4ed !important;
  box-shadow: 0 3px 0 rgba(46, 115, 87, .24) !important;
}

html[data-theme="dark"] body.route-login .v13-runtime-boundary :is(strong, span, p) {
  color: inherit !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-note,
html[data-theme="dark"] body.route-terms .v13-legal-note {
  color: #1f344e !important;
  border-color: #88a7cc !important;
  background: #e8f0fb !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-note :is(strong, p, a, span),
html[data-theme="dark"] body.route-terms .v13-legal-note :is(strong, p, a, span) {
  color: inherit !important;
}

/* Keep light cards and tables from inheriting white borders that overpower content. */

html[data-theme="dark"] body.route-login .v13-login-card,
html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  box-shadow: 12px 12px 0 #b45c43, 0 32px 68px rgba(0, 0, 0, .42) !important;
}

@media (max-width: 620px) {
  html[data-theme="dark"] body.route-login .v13-login-card,
  html[data-theme="dark"] body.route-privacy .v13-legal-panel,
  html[data-theme="dark"] body.route-terms .v13-legal-panel {
    box-shadow: 7px 7px 0 #b45c43, 0 18px 38px rgba(0, 0, 0, .3) !important;
  }
}

@media print {
  .avlu-section-nav a::before {
    display: none !important;
  }
}

/* Login control contrast repair v2.4.1 */

html[data-theme="dark"] body.avlu-v13.avlu-site-finish.route-login .v13-login-form {
  opacity: 1 !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-site-finish.route-login .v13-login-form .client-btn.client-btn--primary {
  color: #fffdfa !important;
  -webkit-text-fill-color: #fffdfa !important;
  border-color: #356fbf !important;
  background-color: #173d77 !important;
  background-image: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-site-finish.route-login .v13-login-form .client-btn.client-btn--primary:is(:hover, :focus-visible) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #75a7ff !important;
  background-color: #102f60 !important;
  background-image: none !important;
}

html[data-theme="dark"] body.avlu-v13.avlu-site-finish.route-login .v13-login-form .client-btn.client-btn--primary:disabled {
  color: #f8fbff !important;
  -webkit-text-fill-color: #f8fbff !important;
  border-color: #66778d !important;
  background-color: #1d2d42 !important;
  background-image: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

html[data-theme="dark"] body.avlu-v13.avlu-site-finish.route-login .v13-login-form[aria-disabled="true"] input:disabled {
  color: #4d5863 !important;
  -webkit-text-fill-color: #4d5863 !important;
  border-color: #9aa3ad !important;
  background-color: #e9edf0 !important;
  background-image: none !important;
  opacity: 1 !important;
}
