/* 正文：HarmonyOS Sans SC。Regular 用于常规文字，Medium 用于加粗 */
@font-face {
  font-family: "HarmonyOS Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/HarmonyOS_Sans_SC_Regular.woff2")
    format("woff2");
}

/* 只有 Medium 一档，500 和 700 都映射到它，避免浏览器合成假粗体 */
@font-face {
  font-family: "HarmonyOS Sans SC";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/HarmonyOS_Sans_SC_Medium.woff2")
    format("woff2");
}

/* 代码：Crysnal Mono */
@font-face {
  font-family: "Crysnal Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/CrysnalMono-Regular.woff2")
    format("woff2");
}

:root {
  --md-text-font:
    "HarmonyOS Sans SC", sans-serif;
  /* 代码里的中文回退到 HarmonyOS Sans SC */
  --md-code-font:
    "Crysnal Mono", "HarmonyOS Sans SC",
    monospace;
}

code,
pre,
.md-typeset code,
.md-typeset pre {
  font-family: var(
    --md-code-font
  ) !important;
  font-feature-settings:
    "liga" 1,
    "calt" 1;
}

.md-typeset pre code {
  line-height: 1.6;
}
