/* rmee-cwv-overrides: EESRMS direct intervention 2026-04-23 (v7).
   Auto-enqueued site-wide via wp-content/mu-plugins/rmee-cwv-bootstrap.php.

   v7 change-log vs v6:
   - NEW: content-visibility: auto on below-fold archive post cards.
     Root cause: PSI mobile on /blog/ showed Style & Layout 2841ms,
     long-task 1423ms attributed to the HTML URL itself — classic
     "too many elements rendering at once" archive page. content-visibility:
     auto tells the browser to skip layout+paint for offscreen elements
     until they scroll into view. contain-intrinsic-size gives a size
     estimate so the scrollbar and page height are still correct.
     Scoped :nth-of-type(n+3) so the top 2 cards (above-fold) render
     normally — avoids any risk of CLS during their paint.
   - Kept from v6: logo/header dimension locks, font-display: optional,
     contain: layout on #content, #rmee-intake-widget slot reserve,
     will-change on narrow scopes, 11 scoped color-contrast overrides,
     body.wp-singular min-height: 80vh.
*/

/* ==========================================================================
   CRITICAL: lock logo and header dimensions FIRST
   ========================================================================== */
img.custom-logo {
  width: 100px !important;
  height: 60px !important;
  aspect-ratio: 5 / 3;
  max-width: 100px;
  max-height: 60px;
  object-fit: contain;
}
div.site-branding {
  min-height: 64px;
  min-width: 100px;
}
div.site-logo {
  min-height: 60px;
  min-width: 100px;
}

/* ==========================================================================
   FONT-DISPLAY
   ========================================================================== */
@font-face {
  font-family: "League Spartan";
  font-display: optional;
  src: local("League Spartan");
}
@font-face {
  font-family: "Share";
  font-display: optional;
  src: local("Share");
}

/* ==========================================================================
   LAYOUT-SHIFT MITIGATIONS
   ========================================================================== */
#content.site-content,
div#content,
main.site-main {
  contain: layout;
}
.site-header,
header#masthead {
  min-height: 64px;
}
#rmee-intake-widget,
#rmee-widget-form {
  min-height: 420px;
}

/* ==========================================================================
   GPU HINT (narrow scope)
   ========================================================================== */
.rmee-animate,
.rmee-hover-lift,
.menu-toggle {
  will-change: transform;
}

/* ==========================================================================
   COLOR-CONTRAST A11Y — scoped to avoid context clashes
   ========================================================================== */

/* Footer TEXT LINKS only — :not(.btn) keeps button variants alone.
   Target: #5a7ba6 text on #161616 bg → #a0b5d0 (~7.5:1) */
div.footer-content a.social-link:not(.btn),
div.footer-content > div.footer-section > p > a:not(.btn),
div.footer-section > ul > li > a:not(.btn),
div.footer-section > ul > li.footer-careers-item > a:not(.btn) {
  color: #a0b5d0 !important;
}

/* Footer BUTTONS on dark-blue bg (#415a77) — white text (~10:1) */
div.footer-content a.btn,
div.footer-section a.btn {
  color: #ffffff !important;
}

/* Careers-hero subtitle (#293847 on #161616, 1.5) → #a5b4c8 (~6.5:1) */
div.careers-page section.careers-hero p.careers-hero-subtitle {
  color: #a5b4c8 !important;
}

/* Position-meta small text (#777 on #fff, 4.47) → #595959 (~6.5:1) */
div#positions-list div.careers-position-card div.careers-position-meta span {
  color: #595959 !important;
}

/* Intake-widget body text (#94a3b8 on #f8fafc, 2.45) → #4a5568 (~7:1) */
div.entry-content #rmee-intake-widget #rmee-widget-form p,
div.entry-content #rmee-intake-widget #rmee-widget-form p a {
  color: #4a5568 !important;
}

/* Floating schedule button (#161616 on #2b3a55, 1.8) — flip to white text on same bg (~10:1) */
body.wp-singular a.floating-schedule-btn,
a.floating-schedule-btn {
  color: #ffffff !important;
}

/* Footer-bottom copyright (#2c3e50 on #161616, 1.64) → #a9b7c5 (~6:1) */
div#page > footer#colophon > div.footer-bottom > p,
div#page > footer#colophon > div.footer-bottom > p a {
  color: #a9b7c5 !important;
}

/* ==========================================================================
   Reserve body.wp-singular #content slot so async-grown content doesn't shift
   ========================================================================== */
body.wp-singular > div#page > div#content {
  min-height: 80vh;
}

/* ==========================================================================
   v7: content-visibility on archive post cards — skip offscreen layout.
   First 2 cards render normally (above-fold LCP safety). Cards 3+ get
   contain-intrinsic-size so the scrollbar + page height stay correct.
   ========================================================================== */
body.archive article.post:nth-of-type(n+3),
body.blog    article.post:nth-of-type(n+3),
body.category article.post:nth-of-type(n+3),
body.tag     article.post:nth-of-type(n+3),
body.search  article.post:nth-of-type(n+3) {
  content-visibility: auto;
  contain-intrinsic-size: 0 460px;
}
