/* 定义所有字体 */
@font-face {
    font-family: 'TitleFont';
    src: url('/fonts/AktivGrotesk-Bold.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HeadingFont';
    src: url('/fonts/AktivGrotesk-Medium.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BodyFont';
    src: url('/fonts/AktivGrotesk-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CodeFont';
    src: url('/fonts/JetBrainsMono-Light.woff2') format('woff2');
    font-weight:  normal;
    font-style: normal;
    font-display: swap;
}

/* 应用到你现有的选择器 */
/* H1 使用 TitleFont */
.body #body-inner h1,
#body #body-inner h1,
article h1,
.content h1 {
    font-family: 'TitleFont', "Helvetica Neue", Arial, sans-serif !important;
    font-size: 2rem !important;
    font-weight: 550 !important;
    text-transform: uppercase !important;  /* 转为大写 */
    /*letter-spacing: 2px !important;  /* 字母间距 */
    color: #494949 !important;  /*改变颜色 */ 
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
     .body #body-inner h1,
    #body #body-inner h1,
    article h1,
    .content h1 {
        color: #a1a1a2 !important; /* 浅色文字 */
}
}

/* H2 使用 HeadingFont */
.body #body-inner h2,
#body #body-inner h2,
article h2,
.content h2 {
    font-family: 'HeadingFont', "Helvetica Neue", Arial, sans-serif !important;
    font-size: 1.5rem !important;
}

/* H3 也使用 HeadingFont */
.body #body-inner h3,
#body #body-inner h3,
article h3,
.content h3 {
    font-family: 'HeadingFont', "Helvetica Neue", Arial, sans-serif !important;
    font-size: 1.2rem !important;
}

/* H4 也使用 HeadingFont */
.body #body-inner h4,
#body #body-inner h4,
article h4,
.content h4 {
    font-family: 'HeadingFont', "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important;
}

/* H5 也使用 HeadingFont */
.body #body-inner h5,
#body #body-inner h5,
article h5,
.content h5 {
    font-family: 'HeadingFont', "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.0rem !important;
}

/* H6 也使用 HeadingFont */
.body #body-inner h6,
#body #body-inner h6,
article h6,
.content h6 {
    font-family: 'HeadingFont', "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.0rem !important;
}

/* 页面主标题使用 TitleFont */
#body h1:first-child,
.content > h1:first-child {
    font-family: 'TitleFont', "Helvetica Neue", Arial, sans-serif !important;
    font-size: 3rem !important;
}

/* 如果想给正文也设置字体 */
/* 正文使用 BodyFont */
/*
.body #body-inner p,
article p,
.content p {
  font-family:  'BodyFont', "Helvetica Neue", Arial, sans-serif !important;
  color: #1e76ce !important;  
}
*/

/* 1. 从 Google Fonts 服务引入 "JetBrains Mono" 字体 */
/*@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;1,400&display=swap'); */


/* 2. 将样式应用到所有代码块 */
pre code {
  /* 设置代码字体，浏览器会从左到右依次尝试，如果加载失败，则使用系统默认的等宽字体 */
  font-family: 'CodeFont', 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;

  /* 将字体大小设置为基础字号的 50% */
  font-size: 0.75rem !important;

  /* 您还可以在这里添加其他样式，比如行高 */
  line-height: 1.5;
}

/* 隐藏章节页面标题前的 "Chapter X" 编号 */
.chapter .article-subheading {
    display: none;
}