/* Shared type roles, based on the home page. Page heroes use page-design.css. */
:root {
  --section-en-size: clamp(44px, 5vw, 76px);
  --section-ja-size: clamp(19px, 1.55vw, 24px);
  --section-heading-gap: clamp(11px, 1.1vw, 16px);
  --prose-leading: 1.95;
  --note-size: clamp(12px, .9vw, 14px);
}

:is(.campaign-heading,.concerns-heading,.medicine-heading,.flow-heading,.reasons-heading,.news-heading) > div > span[lang="en"],
.doctor-heading .doctor-heading-meta > span,
.faq-heading > span[lang="en"],
.canol-section .canol-title > p[lang="en"],
.flow-page-note-heading > h2[lang="en"] {
  display: block;
  font: 400 var(--section-en-size)/.95 var(--font-en);
  letter-spacing: .015em;
  white-space: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}
:is(.campaign-heading,.concerns-heading,.medicine-heading,.flow-heading,.reasons-heading,.news-heading) > div {
  row-gap: var(--section-heading-gap);
}
:is(.campaign-heading,.concerns-heading,.medicine-heading,.flow-heading,.reasons-heading,.news-heading) > div > :is(h2,small),
.doctor-heading .doctor-heading-meta > h2,
.faq-heading > h2,
.canol-section .canol-title > h2,
.flow-page-note-heading > strong {
  font: 300 var(--section-ja-size)/1.4 var(--font-jp-serif);
  letter-spacing: .04em;
}
:is(.campaign-heading,.concerns-heading,.medicine-heading,.flow-heading,.reasons-heading,.news-heading) > div > :is(h2,small) { margin-block: 0; }

/* Standard prose, card copy and notes keep separate sizes. */
:is(.medical-service-copy,.care-detail-cards article,.doctor-profile-copy) > p {
  font: 400 var(--type-card-body)/var(--prose-leading) var(--font-jp-sans);
}
.care-detail-cards article > h3 {
  font: 400 var(--type-card-title)/1.5 var(--font-jp-serif);
}
:is(.medicine-detail-page,.care-detail-page) .drug-body-copy,
:is(.medicine-detail-page,.care-detail-page) .drug-body-copy :is(p,ul,ol):not(.drug-source-note,.drug-price-notice),
:is(.column-article-body,.news-detail-body,.legal-body) :is(p,ul,ol) {
  font-family: var(--font-jp-sans);
  font-size: var(--type-section-body);
  line-height: var(--prose-leading);
}
:is(.medicine-detail-page,.care-detail-page) .drug-body-copy :is(.drug-source-note,.drug-price-notice),
:is(.medicine-detail-page,.care-detail-page) .drug-note {
  font-family: var(--font-jp-sans);
  font-size: var(--note-size);
}

@media (max-width: 760px) {
  :root {
    --section-en-size: clamp(32px, 9.6vw, 62px);
    --section-ja-size: 20px;
  }
  /* Keep this title on one line, including on 320px phones. */
  .medical-service .medical-service-desktop-break { display: none; }
  .medical-service .medical-service-copy > h3 {
    font-family: var(--font-jp-serif);
    font-size: clamp(20px, calc((100vw - 92px) / 10), 31px);
    white-space: nowrap;
    letter-spacing: normal;
  }
  :is(.flow-heading,.flow .care-detail-heading,.canol-flow .canol-title) :is(span,p)[lang="en"] {
    font-size: min(var(--section-en-size), 8vw);
  }
}

/* Shared orange-to-pink treatment for English titles and section headings. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  @media (forced-colors: none) {
    :is(
      [data-mv-title][lang="en"],
      main :is(h1,h2)[lang="en"],
      header :is(span,p,small)[lang="en"]:has(~ :is(h1,h2)),
      header > div > :is(span,p,small)[lang="en"]:has(~ :is(h1,h2)),
      .news-heading > div > span[lang="en"],
      .doctor-heading .doctor-heading-meta > span,
      .canol-section .canol-title > p[lang="en"]
    ):not([aria-hidden="true"]) {
      inline-size: fit-content;
      max-inline-size: 100%;
      background-image: linear-gradient(90deg, var(--olune-sunset-orange, #f3ad70), var(--olune-sunset-coral, #f08c76) 48%, var(--olune-sunset-pink, #e96888));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }
}

@media (max-width: 760px) {
  body .olune-top-cta-gradient > :is(span, b, small) {
    font-family: var(--font-jp-sans);
    font-size: max(16px, 1em);
    font-weight: 700;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
