/* ==========================================================================
   自托管字体（不再向 fonts.googleapis.com 取）
   --------------------------------------------------------------------------
   为什么要自托管：站点在 Cloudflare 之后、访客与站长都在中国大陆时打不开 Google。
   原来是两个 <link rel="stylesheet"> 指向 fonts.googleapis.com，属于**渲染阻塞资源**——
   浏览器会一直等到请求失败或超时才绘制首屏，表现就是「页面一直转圈」，
   而且 Material Symbols 取不到时，全站图标会退化成 "shopping_cart" 这种字面文字。
   改成同源文件后：美国访客少一次跨域 TLS 握手，大陆访客不再被卡住。

   来源：@fontsource/lexend 5.3.0、@fontsource/inter 5.3.0、
        @fontsource/material-symbols-outlined 5.3.9 的 latin 子集（SIL OFL 授权，可自托管）。
   只取 latin：前台是英文站，正文里用到的字符都在 latin 内。
   图标字体用的是静态 400 字重；主题里唯一的 font-variation-settings:'FILL' 0
   本来就是默认值，没有任何图标用 FILL 1，所以不需要可变字体。

   以后要加新字重/新字体：把 woff2 放进 assets/fonts/ 并在下面补一条 @font-face，
   不要去改回 Google 地址。
   ========================================================================== */

/* ===== Lexend：标题字族 ===== */
@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/lexend-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/lexend-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/lexend-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/lexend-latin-700-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/lexend-latin-800-normal.woff2') format('woff2');
}

/* ===== Inter：正文字族 ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}

/* ===== Material Symbols Outlined：图标 ===== */
/* 图标字体用 font-display:block 而不是 swap：swap 会先把 "shopping_cart"
   这类连字原文当普通文字显示出来再换成图标，比短暂空白更难看。 */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/material-symbols-outlined-latin-400-normal.woff2') format('woff2');
}

/*
 * 图标的基线样式。这一段以前是 Google Fonts 那张 CSS 顺带提供的（它除了 @font-face
 * 还自带 .material-symbols-outlined 工具类），换成自托管后只剩 @font-face，
 * 全站 69 处图标会集体退化成 "pets" / "shopping_cart" 这样的字面文字。
 * 属性照抄 Google 那份，连 font-size:24px 也保留——主题里凡是要改尺寸的
 * 图标都写了更高特异度的后代选择器，去掉这行反而会让没写字号的图标变小。
 */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

