/* About uses white mission copy on a navy section. The alternating paper
   backgrounds otherwise override the section and its incoming paper edge. */
body.ogh-about #main > #mission,
body.ogh-about #main > .edge9:has(+ #mission) {
  --og-in: #002c7f !important;
}

/* This link fills an overflow-clipped card. Draw the keyboard indicator
   inside its edges so it remains visible over both the photo and the blue. */
body.ogh #providers .tm91-all > a:has(.ogh-team-invite-photo):focus-visible {
  outline: 3px solid #ffca52;
  outline-offset: -5px;
}

/* The clinic team template colors ordinary links blue. This particular
   link sits on a filled button, including its bilingual text span. */
body.ogh-osmond-family-practice #main #team .mt95 .tx a.ogh-dir-care-link {
  background: #063783;
  color: #fff !important;
}

body.ogh-osmond-family-practice #main #team .mt95 .tx a.ogh-dir-care-link > span {
  color: inherit !important;
}

body.ogh-osmond-family-practice #main #team .mt95 .tx a.ogh-dir-care-link:focus-visible {
  outline: 3px solid #063783;
  outline-offset: 3px;
}

/* At tablet widths the copy extends across bright monitors and exam rooms.
   Carry navy behind the full reading area, even at the end of a long line. */
@media (min-width: 701px) and (max-width: 1100px) {
  body.ogh #main > .p-hero.ph-full > .ph-shade {
    background: linear-gradient(98deg,
      rgb(9 27 55 / .91), rgb(9 27 55 / .78) 46%, rgb(9 27 55 / .67) 100%);
  }
}

@media (max-width: 700px) {
  /* On phones these inner-page photos still have a wide canvas at the
     top. The headline and both actions can start earlier in the hero. */
  #main :is(#ogh-visual-careers, #ogh-visual-locations, #ogh-visual-services) .v2-hero {
    min-height: 0;
    background-color: #102d52;
  }

  #main :is(#ogh-visual-careers, #ogh-visual-locations, #ogh-visual-services) .v2-hero .v2-photo-copy {
    padding-block: clamp(6rem, 26vw, 8.5rem) 3.75rem;
  }

  #main :is(#ogh-visual-careers, #ogh-visual-locations, #ogh-visual-services) .v2-hero h1 {
    font-size: calc(clamp(2.125rem, 9.7vw, 2.65rem) * var(--ts, 1));
    line-height: 1.09;
  }

  #main :is(#ogh-visual-locations, #ogh-visual-services) .v2-hero::before {
    background: linear-gradient(180deg,
      rgb(6 26 54 / .14), rgb(6 26 54 / .72) 25%, rgb(6 26 54 / .85) 70%, rgb(6 26 54 / .93));
  }

  /* Keep the employee's face in a shallow landscape frame. The dark lower
     area blends into the text panel without stretching the original photo. */
  #main #ogh-visual-careers .v2-hero .v2-backdrop {
    inset: 0 0 auto;
    height: clamp(11rem, 49vw, 15rem);
  }

  #main #ogh-visual-careers .v2-hero .v2-backdrop img {
    object-fit: cover;
    object-position: 50% 31%;
  }

  #main #ogh-visual-careers .v2-hero::before {
    background: linear-gradient(to bottom,
      transparent 2rem, rgb(16 45 82 / .14) 4.25rem, #102d52 clamp(11rem, 49vw, 15rem));
  }

  #main #ogh-visual-careers .v2-hero .v2-photo-copy {
    padding-block-start: clamp(8.75rem, 39vw, 12.5rem);
  }

  /* Keep the clinic actions in place. The original landscape images sit
     behind the top-right corner at their natural proportions on phones. */
  body:is(.ogh-osmond-family-practice, .ogh-randolph-family-practice) #main > .p-hero.ph-full {
    background: #102748;
  }

  body:is(.ogh-osmond-family-practice, .ogh-randolph-family-practice) #main > .p-hero.ph-full > img.ph-bg {
    inset: 2.75rem 0 auto auto !important;
    width: min(72%, 18rem) !important;
    height: auto !important;
    aspect-ratio: 5 / 4;
    object-fit: contain;
    mask-image: linear-gradient(to right, transparent, black 27%),
      linear-gradient(to top, transparent, black 29%);
    mask-composite: intersect;
  }

  body:is(.ogh-osmond-family-practice, .ogh-randolph-family-practice) #main > .p-hero.ph-full > .ph-shade {
    background: linear-gradient(90deg,
      rgb(16 39 72 / .95) 14%, rgb(16 39 72 / .75) 51%, rgb(16 39 72 / .38));
  }

  body.ogh-give #main > .ghero > .wrap {
    padding-block-start: 3.25rem;
  }

  body.ogh-give #main .ghero h1 {
    margin-block: .5rem .65rem;
  }

  body.ogh-give #main .ghero .wrap > div:first-child > p {
    margin-block: .7rem;
    font-size: calc(1.0625rem * var(--ts, 1));
    line-height: 1.5;
  }

  body.ogh-give #main .ghero .btnrow {
    margin-block-start: 1rem;
  }
}
