/* Scoped interface refinements. Never change header geometry, theme files or image frames. */
body #main :is(.wp-block-post.type-post .wp-block-post-title,.vnh-family-latest-card h3,.vnh-health-card-title),
body #main :is(.wp-block-post.type-post .wp-block-post-title,.vnh-family-latest-card h3,.vnh-health-card-title) a,
body.single-post #main .entry-title,
body.single-post #main .vnh-editorial-content > h1,
body .vnh-topic-adjacent h4 a {
 color:#4c57d6!important;
 text-decoration:none!important;
 text-underline-offset:3px;
 text-decoration-thickness:1px;
}

/* Restore the original compact newsletter footprint from the saved footer component.
   Brevo fields, action, validation, success and error states remain untouched. */
@media(min-width:768px) {
 body #colophon .custom-footer .newsletter-box {
  box-sizing:border-box!important;
  width:240px!important;
  max-width:100%!important;
  padding:24px!important;
 }
 body #colophon .custom-footer .newsletter-box .sub {
  font-size:12.5px!important;
  line-height:1.6!important;
  margin:0 0 12px!important;
 }
 body #colophon .custom-footer .newsletter-box input[type=email] {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  padding:8px 10px!important;
  margin:0!important;
  font:inherit;
  font-size:13px!important;
 }
 body #colophon .custom-footer .newsletter-box button[type=submit] {
  box-sizing:border-box!important;
  width:100%!important;
  height:auto!important;
  min-height:44px!important;
  padding:10px!important;
  margin:0!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:800!important;
  white-space:normal!important;
 }
}
/* Existing orange, with the existing dark text colour for legible button labels. */
body #colophon .custom-footer .newsletter-box button[type=submit],
body #colophon .custom-footer .newsletter-box button[type=submit] span {
 color:#1f2937!important;
 font-weight:700!important;
}
body #colophon .custom-footer .newsletter-box input[type=email]:focus-visible {
 outline:3px solid #4c57d6!important;
 outline-offset:3px;
}
body.single-post #main .vnh-week-visual > figure:has(> .vnh-week-image-caption) {
 background:transparent!important;
 border:0!important;
 box-shadow:none!important;
 overflow:visible!important;
}
body.single-post #main .vnh-week-visual > figure > .vnh-week-image-caption {
 display:block!important;
 position:static!important;
 background:transparent!important;
 border:0!important;
 border-radius:0!important;
 box-shadow:none!important;
 padding:0!important;
 margin:8px 0 0!important;
 width:auto!important;
 color:#4b5563!important;
 font-size:12px!important;
 font-weight:400!important;
 line-height:1.5!important;
 text-align:left!important;
}
body.single-post #main .post-navigation .vnh-week-adjacent {
 display:inline-flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 min-height:44px;
 color:#4c57d6;
 font-weight:700;
}
body.single-post #main .post-navigation .vnh-week-adjacent:focus-visible {
 outline:3px solid #4c57d6;
 outline-offset:3px;
}
@media(max-width:767.98px) {
 /* Remove the legacy iPhone -7px page shift at its source. Keep the existing widths,
    gutters and image frames; cancel the header/footer counter-shifts with it. */
 body #page {
  left:0!important;
  right:auto!important;
 }
 body #page #masthead,
 body #page #colophon:has(.custom-footer) {
  left:0!important;
  right:auto!important;
 }
 /* The historic desktop query offset starts at 767px, inside the phone breakpoint. */
 body #main .wp-block-query {
  left:0!important;
  right:auto!important;
 }
 /* Keep the home phone panel inside the layout viewport, including browsers with
    a reserved scrollbar. 100vw full-bleed sizing previously clipped the 767px edge. */
 body.home #main .entry-content:has(> .vnh-panel--mobile) {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-inline:0!important;
  padding-inline:20px!important;
 }
 body.home #main .entry-content > .vnh-panel--mobile {
  box-sizing:border-box!important;
  width:calc(100% + 40px)!important;
  max-width:calc(100% + 40px)!important;
  margin-inline:-20px!important;
  padding-inline:11px!important;
 }
 body.home #main .vnh-panel--mobile .wp-block-post-template {
  padding-inline:0!important;
 }
}
body #main :is(.wp-block-post.type-post .wp-block-post-title,.vnh-family-latest-card h3,.vnh-health-card-title) a:is(:hover,:focus-visible),
body .vnh-topic-adjacent h4 a:is(:hover,:focus-visible) {
 text-decoration:underline!important;
}
body #main :is(.wp-block-post-title,.vnh-family-latest-card h3,.vnh-health-card-title) a:focus-visible,
body .vnh-topic-adjacent :is(a:focus-visible) {
 outline:3px solid #4c57d6;
 outline-offset:4px;
 border-radius:3px;
}
body #main .wp-block-post.type-post .wp-block-post-title { line-height:1.3!important; }
body #main :is(.vnh-family-latest-card h3,.vnh-health-card-title) { line-height:1.35!important; }

/* Retain the useful tools row and bring the first articles closer after removing one duplicate row. */
body.vnh-family-hub .vnh-ready-gateway { margin-bottom:16px!important; }
body.vnh-family-hub #main .vnh-family-latest { margin-bottom:24px!important; }
body.vnh-family-hub #main .vnh-family-latest > h2 { margin-bottom:16px!important; }
body.vnh-family-hub #main .vnh-family-index-heading { margin-top:8px!important; }
body.vnh-topic-preparing .vnh-topic-empty { padding:20px; }
body.vnh-topic-preparing .vnh-topic-empty > h2 { font-size:clamp(20px,2vw,24px)!important; }

/* Availability is text as well as colour; never disable a useful parent-section fallback. */
.vnh-mega-panel .vnh-nav-status,
#vnh-mobile-header .vnh-nav-status {
 display:block!important;
 width:fit-content;
 max-width:100%;
 margin:5px 0 0!important;
 padding:2px 7px!important;
 border:1px solid currentColor;
 border-radius:5px;
 color:inherit!important;
 background:transparent;
 font-family:inherit;
 font-size:11px!important;
 font-weight:500!important;
 line-height:1.35!important;
 letter-spacing:normal;
 text-transform:none;
 white-space:normal;
}
.vnh-section-navigation .vnh-nav-status { display:none; }
@media(max-width:767.98px) {
 body.vnh-family-hub .vnh-ready-gateway { margin-bottom:14px!important; }
 body.vnh-topic-preparing .vnh-topic-empty { padding:16px; }
 /* Keep every hero destination, using two rows instead of three tall button rows. */
 body.vnh-family-hub:is(.vnh-family-fertility,.vnh-family-pregnancy,.vnh-family-baby) .viranest-hero-wrapper .vnh-subcategory-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
 }
 body.vnh-family-hub:is(.vnh-family-fertility,.vnh-family-pregnancy,.vnh-family-baby) .viranest-hero-wrapper .vnh-subcategory-grid > a {
  min-width:0;
  min-height:44px!important;
  padding:8px 9px!important;
  font-size:14px!important;
  line-height:1.35!important;
  overflow-wrap:anywhere;
 }
 body.vnh-family-hub:is(.vnh-family-fertility,.vnh-family-pregnancy,.vnh-family-baby) .viranest-hero-wrapper .vnh-subcategory-grid > a:first-child:nth-last-child(3) { grid-column:1/-1; }
 /* The adjacent action already names the calculator; omit its duplicate summary on phones. */
 body.vnh-family-hub .vnh-ready-gateway-copy > span { display:none; }
 body.vnh-family-hub .vnh-direct-guides {
  box-sizing:border-box;
  position:relative;
  /* Center this fragment even when the existing parent uses a negative full-width offset. */
  left:var(--vnh-guide-offset,0px);
  width:auto!important;
  min-width:0;
  max-width:none;
  margin:0 16px 18px!important;
 }
 body.vnh-family-hub .vnh-direct-guides h3 { margin-bottom:8px!important; }
 body.vnh-family-hub .vnh-direct-guides ul { display:flex!important;flex-wrap:wrap;gap:0 16px!important;width:auto!important;max-width:100%;margin:0!important;padding:0!important;list-style:none; }
 body.vnh-family-hub .vnh-direct-guides li { margin-block:0!important; }
 body.vnh-family-hub .vnh-direct-guides a { display:inline-flex;align-items:center;min-height:44px; }
}

/* Preserve the existing search drawer when ADV replaces its empty form with a link.
   The replacement must never become a new text column in the closed header. */
#masthead .ast-search-menu-icon > a.vnh-form-link {
 display:none!important;
 box-sizing:border-box;
 position:absolute;
 inset:auto 0 auto auto;
 top:calc(100% + 10px);
 z-index:10000;
 width:240px;
 max-width:calc(100vw - 32px);
 min-height:44px;
 padding:12px 16px;
 border:1px solid #d1d5db;
 border-radius:8px;
 background:#fff;
 color:#4c57d6;
 box-shadow:0 4px 16px rgba(0,0,0,.1);
 font-size:15px;
 line-height:1.5;
 text-align:left;
 white-space:normal;
 overflow-wrap:anywhere;
 text-decoration:underline;
 text-underline-offset:3px;
}
#masthead .ast-search-menu-icon.ast-dropdown-active > a.vnh-form-link { display:block!important; }
#masthead .ast-search-menu-icon > a.vnh-form-link:focus-visible { outline:3px solid #4c57d6!important; outline-offset:3px; }

/* ADV-safe newsletter: retain the existing box and style its destination as the original action. */
#colophon .custom-footer .newsletter-box a.vnh-form-link {
 box-sizing:border-box;
 display:flex;
 align-items:center;
 justify-content:center;
 width:100%;
 min-height:44px;
 padding:10px;
 margin:0;
 border:0;
 border-radius:8px;
 background:#ff8a00;
 color:#1f2937!important;
 font-family:Helvetica,Arial,sans-serif;
 font-size:12px;
 font-weight:800;
 line-height:1.35;
 letter-spacing:.6px;
 text-align:center;
 text-decoration:none;
 overflow-wrap:anywhere;
}
#colophon .custom-footer .newsletter-box a.vnh-form-link:hover { text-decoration:underline; text-underline-offset:3px; }
#colophon .custom-footer .newsletter-box a.vnh-form-link:focus-visible { outline:3px solid #4c57d6!important; outline-offset:3px; }

