/* The retained artist, discovery and study pages use the same native opening
   image in their server HTML and after client navigation. */
@media screen {
  body .cp-site .gh-hero.gp-feature-opening {
    --opening-ink: var(--gp-ink, #080b0c);
    --opening-paper: var(--gp-cream, #f5f0df);
    --opening-accent: #f2ebcf;
    --opening-gutter: max(clamp(24px, 6vw, 92px), calc((100% - 1280px) / 2));
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: none;
    min-height: clamp(420px, 45vw, 670px);
    margin: 0 0 clamp(36px, 6vw, 96px);
    padding: clamp(50px, 6vw, 100px) var(--opening-gutter) !important;
    border: 0;
    border-radius: 0;
    background: var(--opening-ink);
    color: var(--opening-paper);
    overflow: clip;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-art {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: -2;
    width: 75%;
    height: 100%;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-art > .gh-base {
    object-position: var(--opening-focus, 68% 38%) !important;
  }
  body .cp-site .gh-hero.gp-feature-opening::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(90deg, var(--opening-ink) 10%, var(--opening-ink) 27%, transparent 78%),
      linear-gradient(0deg, var(--opening-ink), transparent 21%);
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-kicker {
    order: -1;
    width: fit-content;
    margin: 0 0 clamp(16px, 2.1vw, 34px);
    color: var(--gp-sage, #c2cec6);
    font: 500 .75rem/1.5 var(--gp-sans, Arial, sans-serif);
    letter-spacing: .14em;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-title {
    width: min(100%, 13ch);
    font: 500 clamp(3.4rem, 7.3vw, 7.5rem)/.94 var(--gp-roman, Georgia, serif);
    color: var(--opening-paper);
    letter-spacing: -.065em;
    text-transform: none;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
  body .cp-site .gh-hero.gp-feature-opening .gh-title > .gh-title-back,
  body .cp-site .gh-hero.gp-feature-opening .gh-title > .gh-title-front {
    width: auto;
    margin: 0;
    text-transform: none;
    font: inherit !important;
    color: var(--opening-paper) !important;
    letter-spacing: inherit;
  }
  body .cp-site .gh-hero.gp-feature-opening .gh-title > .gh-title-front {
    color: var(--opening-accent) !important;
    font-family: var(--gp-italic, Georgia, serif) !important;
    font-style: italic !important;
  }
  body .cp-site .gh-hero.gp-feature-opening .gh-title > :empty { display: none; }
  body .cp-site .gh-hero.gp-feature-opening > .gh-summary {
    max-width: min(43ch, 45%);
    margin: clamp(15px, 2vw, 28px) 0 0;
    font: 500 clamp(1rem, 1.35vw, 1.14rem)/1.62 var(--gp-sans, Arial, sans-serif);
    color: var(--gp-sage, #c2cec6);
    text-wrap: pretty;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-down {
    width: auto;
    min-height: 44px;
    padding: 8px 0;
    margin: 14px 0 0;
    border: 0;
    border-bottom: 1px solid var(--gp-mint, #9bd1ca);
    border-radius: 0;
    background: transparent;
    color: var(--opening-paper);
    box-shadow: none;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-down:focus-visible {
    outline: 2px solid var(--gp-mint, #9bd1ca);
    outline-offset: 4px;
  }
  /* Ministry links contain a leading arrow in their text. Keep it on the
     same baseline as the label and give both a single, generous hit area. */
  body .cp-site .mn-page .gh-hero.gp-feature-opening > a.gh-down {
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    min-height: 46px;
    margin: 16px 0 0;
    padding: 11px 2px 9px;
    border: 0;
    border-bottom: 1px solid var(--gp-mint, #9bd1ca);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--opening-paper);
    font: 500 1rem/1.5 var(--gp-sans, Arial, sans-serif);
    letter-spacing: .01em;
    word-spacing: .10em;
    text-decoration: none;
  }
  body .cp-site .mn-page .gh-hero.gp-feature-opening > a.gh-down::first-letter {
    margin-right: .44em;
    color: var(--gp-gold, #dec69d);
  }
  body .cp-site .mn-page .gh-hero.gp-feature-opening > a.gh-down:is(:hover,:focus-visible) {
    border-bottom-color: var(--gp-gold, #dec69d);
    background: transparent;
    color: var(--opening-paper) !important;
  }
  body .cp-site .mn-page .gh-hero.gp-feature-opening > a.gh-down:focus-visible {
    outline: 2px solid var(--gp-mint, #9bd1ca);
    outline-offset: 4px;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-interaction {
    width: min(100%, 40rem);
  }

  /* First-person pages use Thomas's portrait; directories and guidebooks keep
     the scene connected to the recordings credited on each page. */
  body .cp-site :is(.cp-industry,.cp-follow,.cp-join,.cp-artist-data) .gp-feature-opening {
    --opening-focus: 54% 29%;
  }
  /* Thomas's hair starts 3% from the top of this square source. Anchor
     the original upper edge as the stage changes from portrait to landscape. */
  body .cp-site [data-ministry-path="/stories"] .gp-feature-opening[data-hero-art="homepage"] {
    --opening-focus: 50% 0%;
  }
  body .cp-site :is(.cp-follow,.cp-join) .gp-feature-opening {
    min-height: clamp(340px, 32vw, 500px);
  }
  body .cp-site .mn-editorial-reading .gp-feature-opening {
    min-height: clamp(355px, 34vw, 530px);
    margin-bottom: clamp(24px, 3.6vw, 60px);
  }
  body .cp-site .mn-editorial-reading .gp-feature-opening > .gh-title { font-size: clamp(3rem, 5.5vw, 5.9rem); }
  body .cp-site .mn-editorial-reading .mn-prose :is(.mn-section,.mn-callout) > h2 {
    font: 500 clamp(1.6rem, 2.7vw, 2.7rem)/1.13 var(--gp-roman, Georgia, serif);
    text-transform: none;
    letter-spacing: -.035em;
    text-wrap: balance;
  }
  body .cp-site .mn-editorial-reading .mn-prose .mn-callout {
    border: 0;
    border-inline-start: 2px solid #6b897b;
    border-radius: 0;
    padding: 8px clamp(18px, 3vw, 36px);
    background: transparent;
  }
  body .cp-site .mn-editorial-reading .mn-aside .mn-card {
    padding: 19px 0;
    border: 0;
    border-bottom: 1px solid var(--gp-rule, #879c904a);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body .cp-site :is(.mn-teach-library,.jr-resources,.mn-start-page,.mn-editorial-reading,.grow-room,.guide-experience,.profile-page,.utility-page,.ex-new-music,.ex-catalog) :is(.guide-section-lead,.cp-industry-section-heading,.grow-heading,.ex-section-heading,.jr-resource-copy,.mn-teach-library-heading) h2 {
    font: 500 clamp(1.85rem, 3.5vw, 3.6rem)/1.08 var(--gp-roman, Georgia, serif);
    letter-spacing: -.045em;
    text-transform: none;
    text-wrap: balance;
  }
  body .cp-site .profile-focus-record,
  body .cp-site .utility-page .cp-follow-service,
  body .cp-site .jr-resources .jr-resource-feature {
    border-radius: 0;
    box-shadow: none;
  }
  body .cp-site .utility-page .cp-follow-service {
    border: 0;
    border-bottom: 1px solid var(--gp-rule, #879c904a);
    padding-inline: 0;
    background: transparent;
    color: var(--gp-cream, #f5f0df);
  }
  body .cp-site .utility-page .cp-follow-service strong { color: inherit; }
  body .cp-site .utility-page .cp-follow-service:hover { color: var(--gp-mint, #9bd1ca); }
  body .cp-site .guide-experience .gp-guide-queue > li {
    border-inline: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body .cp-site :is(.mn-teach-library,.jr-resources,.guide-experience,.profile-page) :is(.mn-reading-list,.jr-resource-copy,.guide-section-lead,.profile-record-copy) p {
    max-width: 65ch;
    text-wrap: pretty;
  }
  body .cp-site :is([data-ministry-path="/explore"],[data-ministry-path="/grow"]) .mn-room-intro--art {
    background: transparent;
    border: 0;
    column-gap: clamp(24px,5vw,82px);
  }
  body .cp-site :is([data-ministry-path="/explore"],[data-ministry-path="/grow"]) .mn-room-intro--art h1 {
    font: 500 clamp(3rem, 6.8vw, 7rem)/1 var(--gp-roman, Georgia, serif);
    letter-spacing: -.06em;
    color: var(--gp-cream, #f5f0df);
    text-transform: none;
  }
  body .cp-site :is([data-ministry-path="/explore"],[data-ministry-path="/grow"]) .mn-room-intro--art h1 span {
    color: #f2ebcf !important;
    font-family: var(--gp-italic, Georgia, serif);
    font-style: italic;
  }
  body .cp-site :is([data-ministry-path="/explore"],[data-ministry-path="/grow"]) .mn-room-intro-art {
    border: 0; border-radius: 0; box-shadow: none;
  }
}

@supports (mask-image: linear-gradient(black,transparent)) {
  @media screen {
    body .cp-site .gh-hero.gp-feature-opening > .gh-art {
      mask: linear-gradient(90deg, transparent, #000 32%) !important;
    }
    body .cp-site :is([data-ministry-path="/explore"],[data-ministry-path="/grow"]) .mn-room-intro-art {
      mask-image: radial-gradient(ellipse 80% 80% at 60% 45%, #000 40%, transparent 94%);
    }
  }
}

@media screen and (max-width: 700px) {
  body .cp-site .gh-hero.gp-feature-opening {
    --opening-gutter: clamp(20px, 6vw, 34px);
    justify-content: flex-end;
    min-height: 0;
    padding: clamp(170px, 48vw, 275px) var(--opening-gutter) 26px !important;
    margin: 0 0 25px;
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-art {
    inset: 0 0 auto; width: 100%; height: clamp(235px,65vw,350px);
    mask: linear-gradient(#000 52%,transparent 100%) !important;
  }
  body .cp-site .gh-hero.gp-feature-opening::before {
    background: linear-gradient(0deg,var(--opening-ink) 26%, transparent 74%),
      linear-gradient(90deg, #070b0e40, transparent 72%);
  }
  body .cp-site .gh-hero.gp-feature-opening > .gh-kicker { margin-bottom: 10px; }
  body .cp-site .gh-hero.gp-feature-opening > .gh-title { width: min(100%,14ch); font-size: clamp(2.9rem,11.5vw,4.9rem); }
  body .cp-site .gh-hero.gp-feature-opening > .gh-summary { width: 100%; max-width: 43ch; margin-top: 16px; }
  body .cp-site :is(.cp-follow,.cp-join,.mn-editorial-reading) .gp-feature-opening {
    min-height: 0;
  }
}

@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media screen and (prefers-reduced-motion: no-preference) {
    body .cp-site :is(.jr-resource-feature,.profile-focus-record) > img,
    body .cp-site .jr-resource-feature .jr-resource-art img {
      animation: gp-editorial-photo linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
    @keyframes gp-editorial-photo {
      from { transform: translateY(8px) scale(1.015); }
      to { transform: none; }
    }
  }
}

/* The line tracks the passage or essay inside its own reading surface. */
@supports ((animation-timeline: view()) and (animation-range: contain)) {
  @media screen and (prefers-reduced-motion: no-preference) {
    body .cp-site .mn-bible-passage .mn-reading,
    body .cp-site .mn-editorial-reading .mn-prose {
      view-timeline-name: --gp-reading;
      view-timeline-axis: block;
    }
    body .cp-site .mn-bible-passage .mn-reading::before,
    body .cp-site .mn-editorial-reading .mn-prose::before {
      content: "";
      display: block;
      position: sticky;
      top: 0;
      z-index: 1;
      height: 2px;
      width: 100%;
      pointer-events: none;
      transform-origin: left;
      background: linear-gradient(90deg, #829989, #bda885);
      animation: gp-reading-position linear both;
      animation-timeline: --gp-reading;
      animation-range: contain;
    }
    @keyframes gp-reading-position {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}
