/* ============================================================
   自备字体（思源黑体 / 思源宋体，即 Noto Sans SC / Noto Serif SC）
   —— 为什么要自备，而不是写个 font-family 栈让系统去挑：

   1. **可商用**。这两款是 SIL OFL 授权，分发、出版都没有授权风险；
      微软雅黑是商业字体，教材一旦要出版或发给学生就得换掉。
   2. **一致**。读者机器上装没装思源、是 Windows 还是 Mac，看到的是同一套字形。
      靠栈去挑的话，Windows 落到雅黑、Mac 落到苹方，两边的字重和字面都不一样。
   3. **中英混排天然协调**。思源黑体自带 Source Sans 的拉丁部分，
      中西文本来就是一套设计，不需要另外配 Source Sans。

   代价：只用了 2380 个字符（2113 个汉字），子集化后三个文件共约 1.2 MB。
   新增章节后要重新跑 `python3 qa/subset_fonts.py` 重新生成子集。

   路径是相对本文件（assets/fonts.css）的，所以无论页面在 _site/ 还是
   _site/chapters/，都能正确解析——这也是为什么要独立成一个 css 文件，
   而不是塞进 book.scss（那个会被编译进 site_libs/bootstrap/，相对路径会错位）。
   ============================================================ */

@font-face {
  font-family: "Source Han Sans SC Web";
  src: url("fonts/NotoSansSC-Regular.subset.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC Web";
  src: url("fonts/NotoSansSC-Bold.subset.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* 宋体只给 PDF 侧的构建参考，网页不用（屏幕低 PPI 下细横画会发虚） */
@font-face {
  font-family: "Source Han Serif SC Web";
  src: url("fonts/NotoSerifSC-Regular.subset.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
