/* 使用独立字体族名称，避免改变文字 Logo 原有的字体回退结果。 */
@font-face {
  font-family: 'EarthWild Inter';
  src: url('/fonts/inter-vf.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'EarthWild Inter';
  src: url('/fonts/inter-italic-vf.woff2') format('woff2');
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'EarthWild Source Han Sans SC';
  src: url('/fonts/source-han-sans-cn-vf.woff2') format('woff2');
  font-style: normal;
  font-weight: 250 900;
  font-display: swap;
}

:root {
  --earthwild-text-font: 'EarthWild Inter', 'EarthWild Source Han Sans SC', sans-serif;
}

/* Inter 优先承载英文，中文回退到思源黑体；只覆盖字体族，沿用各页的字号与字重。
   Logo 及其祖先不参与覆盖，保留文字 Logo 原有的继承链；图片和 SVG Logo 无需替换。 */
:where(body, body *):not(
    :where(
      svg,
      svg *,
      .wordmark,
      .wordmark *,
      .footer-wordmark,
      .footer-wordmark *,
      .legal-page__brand,
      .legal-page__brand *,
      .logo-type,
      .logo-type *,
      .logo-symbol,
      .logo-symbol *,
      .squad-wordmark,
      .squad-wordmark *
    )
  ):not(
    :has(
      :where(
        .wordmark,
        .footer-wordmark,
        .legal-page__brand,
        .logo-type,
        .logo-symbol,
        .squad-wordmark
      )
    )
  ) {
  font-family: var(--earthwild-text-font) !important;
}

/* 专页的伪元素有 font 简写声明，需沿用所属元素的字体族，避免重新引入宋体或等宽字体。 */
::before,
::after {
  font-family: inherit !important;
}
