/* Hero layout: outer width and image ratio are separate controls.
   Loaded last on published pages and on all editor previews. */
.hero.hero-mode-graphic > .hero-layout {
  container-type: inline-size;
  container-name: cms-hero-layout;
  min-width: 0;
}
.hero.hero-mode-graphic > .hero-layout > :is(.hero-copy,.hero-side-image,.chess-art) {
  min-width: 0;
  max-width: 100%;
}
.hero.hero-mode-graphic.cms-opt-width-full > .hero-layout {
  width: 100% !important;
  max-width: none !important;
}
/* The full-width generic hero needs a text gutter because its container no
   longer provides one. The documentary theme gets its own gutter below. */
.hero.hero-mode-graphic.cms-opt-width-full > .hero-layout > .hero-copy {
  padding-inline: clamp(20px, 4cqw, 64px);
}
/* Documentary layout: measure the actual layout, not the viewport. On wide
   screens keep the original editorial alignment for the default preset only. */
.wr-site .hero.hero-mode-graphic > .hero-layout > .hero-copy {
  margin-inline: 0;
  padding-inline-start: clamp(24px, calc((100cqw - 1250px) / 2), 25cqw);
  padding-inline-end: clamp(24px, 4cqw, 95px);
  width: 100%;
  max-width: none;
}
.wr-site .hero.hero-mode-graphic:is(.cms-opt-width-narrow,.cms-opt-width-wide,.cms-opt-width-full) > .hero-layout > .hero-copy {
  padding-inline: clamp(20px, 4cqw, 64px);
}
.wr-site .hero.hero-mode-graphic.cms-opt-width-narrow > .hero-layout {
  width: min(740px, calc(100% - 40px));
}
.wr-site .hero.hero-mode-graphic > .hero-layout > .hero-copy > h1 {
  overflow-wrap: break-word;
  font-size: clamp(36px, 5.65cqw, 87px);
}
.wr-site:not(.wr-home) .hero.hero-mode-graphic > .hero-layout > .hero-copy > h1 {
  font-size: clamp(36px, 5.15cqw, 76px);
}
.wr-site .hero.hero-mode-graphic > .hero-layout.hero-layout-plain {
  grid-template-columns: minmax(0, 1fr);
}
/* A constrained hero can be narrow on a wide screen, e.g. the narrow preset,
   individual pixel width, or when the editor is docked. Stack by its own size. */
@container cms-hero-layout (max-width: 860px) {
  .hero.hero-mode-graphic > .hero-layout > :is(.hero-copy,.hero-side-image,.chess-art) {
    grid-column: 1 / -1;
  }
  .hero.hero-mode-graphic > .hero-layout > .hero-copy,
  .wr-site .hero.hero-mode-graphic > .hero-layout > .hero-copy {
    margin-inline: 0;
    padding-inline: clamp(16px, 4cqw, 32px);
    padding-block: clamp(30px, 6cqw, 57px);
    width: 100%;
    max-width: 100%;
  }
  .hero.hero-mode-graphic > .hero-layout > .hero-side-image,
  .wr-site .hero.hero-mode-graphic > .hero-layout > :is(.hero-side-image,.chess-art) {
    width: 100%;
    height: clamp(180px, 55cqw, 440px);
    min-height: 0;
    max-height: 440px;
  }
  .hero.hero-mode-graphic > .hero-layout > .hero-side-image > .hero-custom-image,
  .wr-site .hero.hero-mode-graphic > .hero-layout > .hero-side-image > .hero-custom-image {
    min-height: 0;
    height: 100%;
  }
  .wr-site .hero.hero-mode-graphic > .hero-layout > .hero-copy > h1,
  .wr-site:not(.wr-home) .hero.hero-mode-graphic > .hero-layout > .hero-copy > h1 {
    font-size: clamp(32px, 8cqw, 62px);
  }
}
/* Very large explicit typography may exceed a small column; keep the content
   within the column rather than clipping it against the image. */
.hero.hero-mode-graphic > .hero-layout > .hero-copy :is(h1,.hero-lead,.eyebrow) {
  min-width: 0;
  overflow-wrap: break-word;
}
