/* Shared title typography based on the Context Switching simulator. */
:root body [data-page-title],
:root body [data-page-title] :where(h1, h2, p, a, span, strong, em, b, small, div, li) {
  font-family: var(--font-family-title);
}

/* Include the article ID selector to override the existing post title rules. */
:root body [data-page-title-part][data-page-title-part='title'],
:root body #articleTitle[data-page-title-part='title'] {
  font-size: var(--page-heading-size);
  font-weight: var(--page-heading-weight);
  font-style: normal;
  line-height: var(--page-heading-line-height);
  letter-spacing: var(--page-heading-letter-spacing);
  white-space: normal;
  overflow-wrap: break-word;
}

:root body [data-page-title-part][data-page-title-part='category'] {
  font-size: var(--page-category-size);
  font-weight: var(--page-category-weight);
  font-style: normal;
  line-height: var(--page-category-line-height);
  letter-spacing: var(--page-category-letter-spacing);
}

:root body [data-page-title-part][data-page-title-part='description'],
:root body [data-page-title-part][data-page-title-part='description'] > p {
  font-size: var(--page-description-size);
  font-weight: var(--page-description-weight);
  font-style: normal;
  line-height: var(--page-description-line-height);
  letter-spacing: var(--page-description-letter-spacing);
}

/* Split title lines and responsive copy use their parent typography. */
:root body [data-page-title-part][data-page-title-part] :where(span, em),
:root body [data-page-title-part][data-page-title-part='title'] strong {
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

/* Keep the category, heading, and introduction on the same vertical rhythm. */
:root body [data-page-title-part='category'] {
  display: flex;
  align-items: center;
  margin: 0 0 var(--page-title-category-gap);
}

:root body a[data-page-title-part='category'] {
  display: block;
}

:root body .error-content [data-page-title-part='category'] {
  display: flex;
  justify-content: center;
}

:root body [data-page-title-part='title'] {
  margin: 0;
}

:root body [data-page-title-part='description'] {
  margin-top: var(--page-title-description-gap);
}

/* Description wrappers must not add a second paragraph margin. */
:root body .hero-description[data-page-title-part='description'] > p {
  margin: 0;
}

:root body .page-category-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.65em;
  row-gap: 2px;
  text-transform: none;
}

:root body .page-category-path > a {
  color: inherit;
  text-decoration: none;
}

:root body .page-category-path > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root body .page-category-path > a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

:root body .page-category-path > span {
  padding: 0;
  opacity: 1;
}

:root body .page-category-path > .page-category-separator {
  opacity: 0.5;
}
