/* Tuotu Astro-projektista: src/components/GuideHero.astro, <style is:global> (bin/sync-astro.py). */
  /* The portrait at its own 90 px and square, as the header logo shows it: the
     migrated openers crop theirs to a circle, which would cut the corners off
     this one's backdrop. */
  .guide-hero .wp-opener-portrait img {
    width: 5.625rem;
    height: 5.625rem;
    /* The other openers put 1.5rem under their portrait, which made the row taller. */
    margin: 0;
    border-radius: 0;
  }

  /* Two columns: the portrait in the first, everything else in the second, so
     the heading and the text under it share one left edge. */
  .guide-hero.split-hero.split-hero--rails .split-hero-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.5rem;
    align-content: center;
  }

  .guide-hero .guide-hero-above {
    grid-column: 2;
    grid-row: 1;
  }

  .guide-hero .split-hero-copy > .wp-opener-portrait {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    margin: 0;
  }

  /* Level with the portrait: a one-line heading (an archive's) would otherwise
     sit at the top of the portrait-high row, the text far below it. */
  .guide-hero .split-hero-copy > h1 {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
  }

  .guide-hero .guide-hero-text {
    grid-column: 2;
    grid-row: 3;
    margin-top: 1.5rem;
  }

  .guide-hero .guide-hero-text > .wp-prose {
    margin-top: 0;
  }

  /* A sentence under the heading (the blog's and the archives' openers): a step
     above the body text. */
  body.page-service main .guide-hero .guide-hero-text .lede:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
    max-width: 40rem;
    margin: 0;
    color: var(--gh-subtle);
    font-size: 20px !important;
    line-height: 1.5 !important;
  }

  /* On a phone the text takes the whole width: a column beside the portrait
     would leave it about 270 px wide. */
  @media (max-width: 640px) {
    .guide-hero :is(.guide-hero-above, .guide-hero-text) {
      grid-column: 1 / -1;
    }
  }

  /* Wider, the text has a column of its own beside the portrait, so the portrait
     need not set the heading row's height: it stays centred on the heading but
     may reach past a one-line one, and the text follows the heading, not the
     portrait. */
  @media (min-width: 641px) {
    .guide-hero .split-hero-copy > .wp-opener-portrait {
      margin-block: -2rem;
    }
  }

  /* One column, eight twelfths of the row, in the middle, with as much room
     above and below as the front page's hero (170 px). */
  @media (min-width: 961px) {
    .guide-hero .split-hero-rails-inner {
      grid-template-columns: minmax(0, calc(100% * 8 / 12));
      justify-content: center;
    }

    .guide-hero.split-hero.split-hero--rails .split-hero-copy {
      padding-top: 170px;
      padding-bottom: 170px;
    }
  }
