/* On phones, let the opening introduction precede the mail-kiosk photo. */
@media (max-width: 700px) {
  [data-site-flow="community"] .tf-community-opening {
    grid-template-areas: "heading" "lede" "photo" "follow";
  }
}

/* On desktop, place the original family photo beside the opening relationship copy. */
@media (min-width: 901px) {
  [data-site-flow="community"] #caring-for-relationships .tf-community-baby-photo {
    float: right;
    margin: 0 0 18px 28px;
  }
  [data-site-flow="community"] #caring-for-relationships .tf-community-hopscotch {
    display: block;
    float: left;
    height: 5.56rem;
    margin: 8px 24px 12px 0;
    position: relative;
    width: 12.5rem;
  }
  [data-site-flow="community"] #caring-for-relationships .tf-community-hopscotch svg {
    height: 12.5rem;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
    width: 5.56rem;
  }
}
/* Preserve the current mobile narrative order after moving the image in the DOM. */
@media (max-width: 900px) {
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy {
    display: flex;
    flex-direction: column;
  }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > h2 { order: 0; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(1) { order: 1; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(2) { order: 2; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(3) { order: 3; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > .tf-community-baby-photo { order: 4; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(4) { order: 5; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > .tf-community-hopscotch { order: 6; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(5) { order: 7; }
  [data-site-flow="community"] #caring-for-relationships > .recovery-community-copy > p:nth-of-type(6) { order: 8; }
}
