/* ==========================================================================
   NumeralQ accessibility fixes, round 2 (10 Nov 2026)
   Save as public/a11y-fixes.css and link it as the LAST stylesheet on every page:
     <link rel="stylesheet" href="/a11y-fixes.css?v=8" />
   It must load after style.css, homeowner-shell.css, nq-estimator.css and home-visual-fixes.css,
   because those files set the old colors and sizes. !important is used so this layer always wins.
   1. Text colors that pass WCAG AA contrast (4.5:1) on their real backgrounds.
   2. No body text smaller than 12px.
   Only color and font-size change. No layout, spacing or wording changes.
   Colors: #475569 = slate-600, #4f46e5 = indigo-600, #b91c1c = red-700.
   ========================================================================== */

/* ---- 1. Contrast: grey text on light backgrounds (was #94a3b8 or #64748b) ---- */
.ucf-card-title,
.ucf-trust-item,
.ucf-research-link,
.link-sub,
.city-card-state,
.city-card-climate,
.sdir-category-desc,
.sdir-card-desc,
.sidebar-links-title,
.trends-sub,
.table-note,
.service-grid-sub,
.why-nq-sub,
.fin-disclaimer,
.fin-disclaimer strong,
.research-meta span:not(.rb-id-tag):not(.research-tag),
.research-meta-bar span,
.policy-nav-links a { color: #475569 !important; }

/* "Coming soon" badge on the services directory */
.sdir-soon-badge { color: #475569 !important; }

/* ---- Indigo accent text (was #6366f1 / #8883ec, 3.0 to 4.46:1) ---- */
.section-label,
.fin-section-eyebrow,
.fin-project-card-range,
.sdir-card-range { color: #4f46e5 !important; }

/* Roofing tag on research cards (was #dc2626 on pink, 3.99:1) */
.research-tag.tag-roofing { color: #b91c1c !important; }

/* ---- Footer on the dark background (was #64748b on #0f172a, 3.75:1) ---- */
.footer-bottom,
.footer-bottom a,
.footer-bottom span,
.footer-disclaimer,
.footer-links a,
.site-footer .footer-legal a { color: #a3b1c6 !important; }

/* ---- Breadcrumb on the dark hero (was #94a3b8 at 11.84px, 15px tap height) ---- */
.breadcrumb a { color: #cbd5e1 !important; font-size: 0.8125rem !important; display: inline-block; padding: 4px 0; }

/* ---- 2. Minimum 12px text ---- */
.logo-sub,                       /* "Renovation Intelligence" tagline, was 10.08px */
.nq-eyebrow,                     /* "NumeralQ initial estimate", was 10.88px */
.section-label,                  /* was 10.88px */
.ucf-card-title,                 /* "Related Guides", was 10.88px */
.ucf-insight-label,              /* was 9.6px */
.mib-label,                      /* "Market Intelligence", was 9.92px */
.rlc-label,                      /* was 9.92px */
.rlc-arrow,
.nq-field-help,                  /* was 10.88px */
.nq-stage .nq-note,
.footer-col h3,                  /* footer column headings, was 11.52px */
.footer-bottom, .footer-bottom span, .footer-bottom a,
.footer-disclaimer,
.city-card-state, .city-card-pct, .city-card-climate, .city-card-cta,
.service-card-sub,
.sidebar-links-title,
.trends-sub,
.trend-badge, .trend-link,
.panel-label, .panel-badge, .panel-range,
.rpi-tag,
.rib-title,
.rb-stat-desc, .rb-id-tag,
.research-tag,
.research-hub-label,
.research-callout-title,
.findings-title,
.regional-note,
.sdir-category-label, .sdir-soon-badge,
.fin-section-eyebrow, .fin-cta-eyebrow, .fin-cta-note, .fin-hero-badge, .fin-pay-cell,
.mobile-cta-text span { font-size: 0.75rem !important; }

/* ---- Keep the places that sit on a dark background light ---- */
.page-hero .nq-national-planning-baseline .section-label { color: #c7d2fe !important; }
.rb-id-tag { color: #ffffff !important; }

/* ---- Hover colors the rules above would otherwise block ---- */
.breadcrumb a:hover, .footer-bottom a:hover, .footer-links a:hover { color: #ffffff !important; }
.ucf-research-link:hover { color: #4338ca !important; }

/* ---- Rules in style.css that already use !important need the same selector here ---- */
.ucf-research .ucf-card-title { color: #475569 !important; font-size: 0.75rem !important; }   /* "Related Guides" */
.research-sidebar-card .section-label,
.nav-card .section-label { color: #4f46e5 !important; }                                      /* "Related Research" */
.fin-disclaimer a { color: #4f46e5 !important; }                                             /* links inside financing disclaimers */

/* "Coming soon" cards were faded with opacity 0.65, which made their text fail contrast.
   The "Coming soon" badge still marks them. */
.sdir-card-soon { opacity: 1 !important; }
.sdir-card-soon .sdir-card-range { color: #475569 !important; }
.nq-state-city-links a { font-size: 0.8125rem !important; }                                 /* city links on state pages */
.research-table th { font-size: 0.75rem !important; }                                        /* research table headers */
.state-section-count,
.state-hub-link,
.scl-meta,
.pct-badge { font-size: 0.75rem !important; }                                                /* location index labels */

.locations-service-tabs > span,
.state-section-count,
.scl-meta { color: #475569 !important; }
.pct-below { color: #047857 !important; }
.pct-above { color: #92400e !important; }
.nq-preserved-links .nav-mega-title { color: #334155 !important; }

/* Non-text contrast: form boundaries were below 3:1 on white/light surfaces. */
body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):not(:disabled) {
  border-color: #64748b !important;
}

/* The mobile menu boundary sits on the dark site header. */
.nq-shell-header .nq-mobile-nav-toggle { border-color: rgba(255,255,255,0.55) !important; }

/* Location search focus rings were translucent and too weak to identify focus. */
#locZipInput:focus-visible,
#locSearchInput:focus-visible,
.nq-local-market-submit:focus-visible {
  outline: 3px solid #4f46e5 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Essential data series in the storm-chaser figures: both colors were under 3:1. */
#figure-1 [fill="#1baf7a"],
#figure-2 [fill="#1baf7a"],
#figure-3 [fill="#1baf7a"] { fill: #0f7a54 !important; }
#figure-1 [fill="#9aa3ad"] { fill: #64748b !important; }

/* Muted series in runtime charts still encode data and must remain distinguishable. */
.nq-chart,
.nq-package-chart,
.nq-state-section,
.nq-city-section { --barmut: #64748b; }

/* Confirmed text-contrast failures from rendered pseudo-element/gradient cases. */
.hero-price-panel .panel-label,
.panel-range { color: #cbd5e1 !important; }
.fin-cta-block .fin-cta-eyebrow,
.fin-cta-block .fin-cta-sub,
.fin-cta-block .fin-cta-note { color: #ffffff !important; }
.research-featured-card .tag-kitchen { color: #92400e !important; }
.fin-step-num { background-color: #4f46e5 !important; }
.research-hero .nq-sitewide-review-date,
.research-hero .nq-sitewide-review-date time { color: #cbd5e1 !important; }
.page-hero a[href$="heat-pump-cost"],
.page-hero a[href$="furnace-replacement-cost"] { color: #c7d2fe !important; }
.info-page-wrap p a[href$="contact"]:active { color: #b91c1c !important; }

/* Focus indicators: use colors with at least 3:1 contrast against the adjacent surface. */
.nq-shell-header .nav-mega-card:focus-visible,
.nq-shell-header .nav-mega-cta:focus-visible {
  outline-color: #4f46e5 !important;
}
.footer-col a:focus-visible {
  outline: 3px solid #c7d2fe !important;
  outline-offset: 3px !important;
}
.hero-price-panel .panel-link:focus-visible {
  outline: 3px solid #c7d2fe !important;
  outline-offset: 2px !important;
}
.home-local-navigation-submit:focus-visible {
  outline: 3px solid #4f46e5 !important;
  outline-offset: 2px !important;
}
.nq-local-market-state-link:focus-visible,
.nq-local-market-link:focus-visible,
.nq-local-market-service-list a:focus-visible {
  outline: 3px solid #4f46e5 !important;
  outline-offset: 2px !important;
}

/* Not changed: text inside the SVG charts. Those charts scale with the screen, so their 10-11.5px labels
   render larger on desktop. Making them bigger needs the chart generator changed, not CSS. */
