
/* Page introductions, hero copy, and publication dates. */
body[data-v2-page] :is(
  main h1, .v2-hero-copy, .v2-banner-title, .v2-article-copy,
  .file-header, .file-fact, .file-intro, .hero-copy, .page-eyebrow,
  .v2-update-strip, .gmeta, .lu613, .kept .lu, .gga-update, .as-updated-line,
  .published-review-stamp, .archive-intro, .news-hub-intro,
  .na-kicker, .na-dek, .s13-ht, .sv-h1 ~ :is(.subtitle,.byline), div:has(> .sv-h1) > .eyebrow
) {
  text-align: center;
}
body[data-v2-page] :is(
  .file-intro, .file-fact, .v2-article-copy > p, .v2-hero-copy > p,
  .gmeta, .lu613, .gga-update, .archive-intro, .published-review-stamp
) {
  margin-inline: auto;
}
body[data-v2-page] #root :is(.file-header > .file-intro, .file-header > .gl-outline) {
  text-align: center;
  margin-inline: auto;
}
body[data-v2-page] #root .gmeta { justify-content: center; }
body[data-v2-page] .v2-hero-copy { justify-self: center; }
body[data-v2-page] .v2-article-copy { justify-items: center; align-items: center; }
body[data-v2-page] .lt613 .hd { justify-content: center; text-align: center; }
body[data-v2-page] .lt613 > .intro { margin-inline: auto; text-align: center; }
body[data-v2-page] .lt613 > .eyebrow { text-align: center; }
body[data-v2-page] :is(.gear613 > p:first-child, main > h1 + p, main > h1 + p + p:has(+ form)),
body[data-wg-page="request"] #formview > .intro > :is(h1,.eyebrow,p) { text-align: center; }
body[data-v2-page] main :is(.page-title,.page-description,.page-tagline) { text-align: center; }

/* Match title capitalization across page headings and navigation labels. */
body :is(h1, h2, h3, h4, h5, h6),
body :is(nav, [role="navigation"], .v2-mast, .v2-footer, .v2-sidebar)
  :is(a, button, summary, [role="menuitem"]) {
  text-transform: capitalize;
}

/* Center the endorsement badges within their guide or card. */
body[data-v2-page] .sbm-wrap { text-align: center; }
body[data-v2-page] .sb2 { margin-inline: auto; }

/* Center illustrations within guide content and retain each caption below its image. */
body[data-v2-page="interior"]:not([data-v2-section="news"])
  :is(.rich figure, .gl-card .gl-fig) :is(img, picture) {
  display: block;
  max-width: 100%;
  margin-inline: auto;
}
body[data-v2-page="interior"]:not([data-v2-section="news"])
  :is(.rich figure, .gl-card .gl-fig) figcaption { text-align: center; }
body[data-v2-page="interior"] .rich :is(figure.afs613-fig, figure.ed-fig) {
  margin-inline: auto;
}

@media (min-width: 960px) {
  body[data-v2-page] .rich > .gs-rule:has(> .afs613) {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(1.2rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1rem, 2vw, 1.6rem);
  }
  body[data-v2-page] .rich > .gs-rule > h3 { grid-column: 1; grid-row: 1; }
  body[data-v2-page] .rich > .gs-rule > p { grid-column: 1; grid-row: 2; }
  body[data-v2-page] .rich > .gs-rule > .afs613 {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    max-width: 31rem;
    justify-self: center;
    margin: 0;
  }
  body[data-v2-page] .rich > .gs-rule > .afs613 > figure { max-width: 100%; margin-inline: 0; }
}
