/* Layout-stability fixes based on Cloudflare Web Analytics CLS debug data. */
/* Loaded sitewide by the Worker so every current and future HTML page gets the same fix. */
/* Production redeploy marker after an expired Cloudflare device-authorization window. */

/* Reserve the complete masthead footprint before the logo and text finish painting. */
.masthead-inner {
  min-height: calc(var(--brand-height) + 6.25rem);
}

.masthead-tagline {
  min-height: 5.5rem;
}

/* Preserve the logo's intrinsic geometry even on browsers that recalculate image sizing late. */
.brand-banner,
.brand-logo {
  aspect-ratio: 1781 / 883;
}

/* Keep article hero geometry stable while the image decodes. */
.article-hero {
  aspect-ratio: 16 / 9;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  .masthead-inner {
    min-height: calc(var(--brand-height) + 8rem);
  }

  .masthead-tagline {
    min-height: 7rem;
  }
}

@media (max-width: 720px) {
  .masthead-inner {
    min-height: calc(var(--brand-height) + 7.5rem);
  }

  .masthead-tagline {
    min-height: 6.75rem;
  }
}
