/* ReRoot production presentation authority.
   This file is injected last on every page by reroot-layout.js.
   Earlier CSS may provide layout, but colors, readability, focus states,
   safe areas, and footer presentation are finalized here. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
  color-scheme: light;
}

:root {
  --rr-global-ink: #17263a;
  --rr-global-muted: #4b5f73;
  --rr-global-soft: #66788a;
  --rr-global-link: #244f79;
  --rr-global-line: #cbd7e2;
  --rr-global-surface: #ffffff;
  --rr-global-surface-alt: #f3f7fa;
  --rr-global-dark: #172b42;
  --rr-global-on-dark: #ffffff;
  --rr-global-on-dark-muted: #d8e3ec;
  --color-text: var(--rr-global-ink);
  --color-text-secondary: var(--rr-global-muted);
  --color-text-inverse: var(--rr-global-on-dark);
  --rr-ink: var(--rr-global-ink);
  --rr-muted: var(--rr-global-muted);
  --rr-on-dark: var(--rr-global-on-dark);
  --rr-on-dark-muted: var(--rr-global-on-dark-muted);
}

body {
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-tap-highlight-color: transparent;
  background: var(--rr-global-surface);
  color: var(--rr-global-ink);
}

body:not(.results-page) main,
body:not(.results-page) .page-main,
body:not(.results-page) .main-narrow,
body:not(.results-page) .content-wrap,
body:not(.results-page) .rr-container,
body:not(.results-page) .editorial-page-hero,
body:not(.results-page) .editorial-hero-shell,
body:not(.results-page) .page-hero,
body:not(.results-page) .compare-hero,
body:not(.results-page) .cities-hero,
body:not(.results-page) .explore-hero {
  color: var(--rr-global-ink);
}

body:not(.results-page) main :is(h1, h2, h3, h4, h5, h6),
body:not(.results-page) :is(.page-title, .hero-title, .editorial-page-title, .section-title, .compare-title, .cities-title, .explore-title) {
  color: var(--rr-global-ink) !important;
  opacity: 1 !important;
  text-shadow: none;
}

body:not(.results-page) main :is(p, li, label, dt, dd),
body:not(.results-page) :is(.page-lead, .hero-lead, .editorial-page-lead, .section-lead, .muted, .subtitle, .description, .compare-description, .cities-description, .explore-description) {
  color: var(--rr-global-muted) !important;
  opacity: 1 !important;
}

body:not(.results-page) main :is(small, .caption, .eyebrow, .kicker, .meta, .helper-text) {
  color: var(--rr-global-soft) !important;
  opacity: 1 !important;
}

body:not(.results-page) main a:not(.btn-primary):not(.btn-secondary):not(.ash-btn):not(.nav-cta-btn) {
  color: var(--rr-global-link);
  opacity: 1;
}

html[data-path="compare.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .compare-hero, main > section:first-child),
html[data-path="cities.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .cities-hero, .explore-hero, main > section:first-child) {
  background: var(--rr-global-surface-alt) !important;
  color: var(--rr-global-ink) !important;
  opacity: 1 !important;
}

html[data-path="compare.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .compare-hero, main > section:first-child) :is(h1, h2, h3, .page-title, .hero-title),
html[data-path="cities.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .cities-hero, .explore-hero, main > section:first-child) :is(h1, h2, h3, .page-title, .hero-title) {
  color: var(--rr-global-ink) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-path="compare.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .compare-hero, main > section:first-child) :is(p, span, .muted, .lead, .description),
html[data-path="cities.html"] :is(.editorial-page-hero, .editorial-hero-shell, .page-hero, .cities-hero, .explore-hero, main > section:first-child) :is(p, span, .muted, .lead, .description) {
  color: var(--rr-global-muted) !important;
  opacity: 1 !important;
}

:is(.dark-section, .section-dark, .hero-dark, .on-dark, .bg-dark, .bg-navy, .ash-ask, .ash-note, .ash-final, .results-type-report, .conversion-type-reveal, .reroot-type-hero, .results-top-match-overlay) {
  color: var(--rr-global-on-dark) !important;
}

:is(.dark-section, .section-dark, .hero-dark, .on-dark, .bg-dark, .bg-navy, .ash-ask, .ash-note, .ash-final, .results-type-report, .conversion-type-reveal, .reroot-type-hero, .results-top-match-overlay) :is(h1, h2, h3, h4, h5, h6, strong, b) {
  color: var(--rr-global-on-dark) !important;
  opacity: 1 !important;
}

:is(.dark-section, .section-dark, .hero-dark, .on-dark, .bg-dark, .bg-navy, .ash-ask, .ash-note, .ash-final, .results-type-report, .conversion-type-reveal, .reroot-type-hero, .results-top-match-overlay) :is(p, li, span, small, label, .muted, .caption, .eyebrow, .kicker) {
  color: var(--rr-global-on-dark-muted) !important;
  opacity: 1 !important;
}

.site-footer-v1,
.reroot-footer,
#site-footer {
  background: var(--rr-global-dark) !important;
  color: var(--rr-global-on-dark) !important;
  opacity: 1 !important;
}

.site-footer-v1 *,
.reroot-footer *,
#site-footer * {
  opacity: 1 !important;
}

.site-footer-v1 :is(.footer-brand-name, .footer-group-label, h2, h3, strong),
.reroot-footer :is(.footer-brand-name, .footer-group-label, h2, h3, strong),
#site-footer :is(.footer-brand-name, .footer-group-label, h2, h3, strong) {
  color: #ffffff !important;
}

.site-footer-v1 :is(.footer-mission, p, small, .footer-meta, .footer-legal),
.reroot-footer :is(.footer-mission, p, small, .footer-meta, .footer-legal),
#site-footer :is(.footer-mission, p, small, .footer-meta, .footer-legal) {
  color: #d8e3ec !important;
}

.site-footer-v1 a,
.reroot-footer a,
#site-footer a {
  color: #eef5fb !important;
  text-decoration-color: rgba(238, 245, 251, 0.48) !important;
}

.site-footer-v1 a:hover,
.site-footer-v1 a:focus-visible,
.reroot-footer a:hover,
.reroot-footer a:focus-visible,
#site-footer a:hover,
#site-footer a:focus-visible {
  color: #ffffff !important;
  text-decoration-color: #ffffff !important;
}

.site-footer-v1 :is(.footer-top, .footer-bottom, .footer-col, .footer-links),
.reroot-footer :is(.footer-top, .footer-bottom, .footer-col, .footer-links),
#site-footer :is(.footer-top, .footer-bottom, .footer-col, .footer-links) {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

main > section,
main > div,
.page-main,
.main-narrow,
.content-wrap,
.editorial-page-hero,
.editorial-hero-shell,
.page-hero,
#site-footer {
  opacity: 1 !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 79, 121, 0.42) !important;
  outline-offset: 3px;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* Final mobile navigation authority. */
@media (max-width: 767px) {
  #site-header .rr-mobile-panel.rr-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    flex-direction: column !important;
    padding: calc(18px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)) !important;
    background: #ffffff !important;
    color: var(--rr-global-ink) !important;
    overflow-y: auto !important;
  }

  #site-header .rr-mobile-panel.rr-open > * {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #site-header .rr-mobile-panel.rr-open .rr-mobile-head {
    flex: 0 0 auto !important;
    width: 100% !important;
  }

  #site-header .rr-mobile-panel.rr-open .reroot-lang-host-mobile {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 0 !important;
  }

  #site-header .rr-mobile-panel.rr-open .rr-mobile-list {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 8px 0 0 !important;
  }

  #site-header .rr-mobile-panel.rr-open .rr-mobile-link {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 50px !important;
    padding: 13px 14px !important;
    background: #f3f7fa !important;
    color: var(--rr-global-ink) !important;
    border: 1px solid #dbe4ec !important;
    border-radius: 8px !important;
    font-family: Inter, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }

  #site-header .rr-mobile-panel.rr-open .nav-auth-mobile {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 14px !important;
  }

  .site-header-v1 {
    min-height: calc(64px + env(safe-area-inset-top));
  }

  .site-footer-v1 a,
  .reroot-footer a,
  #site-footer a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}