/* The comparison heading on currency pages sets the public section scale. */
.l-container__contents {
  --public-section-size: 18px;
  --public-section-leading: 25px;
  --public-subsection-size: 16px;
  --public-subsection-leading: 22px;
}

@media (max-width: 767px) {
  .l-container__contents {
    --public-section-size: 16px;
    --public-subsection-size: 14px;
    --public-subsection-leading: 1.4;
  }

  /* Clip only the ends of the existing 4px rule; retain its color and the heading's layout. */
  .l-container__contents .home-heading {
    --heading-rule-half: min(50%, max(calc(.5em + 2px), calc(100% - 1lh)));
    clip-path: polygon(
      0 calc(50% - var(--heading-rule-half)), 4px calc(50% - var(--heading-rule-half)), 4px 0,
      100% 0, 100% 100%, 4px 100%, 4px calc(50% + var(--heading-rule-half)), 0 calc(50% + var(--heading-rule-half))
    );
  }
}

/* These metrics take precedence over the page-specific heading styles. */
.l-container__contents :is(h2, [role="heading"][aria-level="2"], .mb-journey-section__title, .p-news h4):not(h1) {
  font-size: var(--public-section-size) !important;
  font-weight: 700 !important;
  line-height: var(--public-section-leading) !important;
}

.l-container__contents :is(h3, [role="heading"][aria-level="3"], .mb-journey-step__title, .sell-store-shipping__items dt,
    .p-qa__card__question-text, .usd-faq__question > span:last-child):not(h1) {
  font-size: var(--public-subsection-size) !important;
  font-weight: 700 !important;
  line-height: var(--public-subsection-leading) !important;
}

@media (max-width: 359px) {
  .store-chart__heading > span {
    min-inline-size: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
