/* Noto Sans TC - Self-hosted Traditional Chinese Font Subset
 * Source: Google Fonts (https://fonts.google.com/specimen/Noto+Sans+TC)
 * License: SIL Open Font License 1.1
 * 
 * This file contains @font-face declarations for Noto Sans TC.
 * This is a subset containing only the Chinese characters used on zenomm.com/zh-TW/
 * plus basic Latin characters and CJK punctuation for mixed content.
 *
 * font-display: swap - RELIABILITY over LCP for non-Latin scripts. A slow network
 * must never leave the web font permanently unloaded, which on an OS lacking a
 * Traditional-Chinese system font would render permanent tofu. (Inter / Latin /
 * Cyrillic stay font-display: optional, where system fonts always cover the glyphs.)
 */

/* ==========================================================================
   Noto Sans TC - Traditional Chinese Subset (Variable Weight 100-900)
   ========================================================================== */
@font-face {
    font-family: 'Noto Sans TC';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/noto-sans-tc-subset-v2.woff2?v=dad6656122d8') format('woff2');
    /* Unicode ranges for CJK characters used on this site */
    unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF, U+0020-007F, U+2000-206F, U+2190-21FF, U+2600-26FF, U+2700-27BF;
}

/* ==========================================================================
   Font Stack for Traditional Chinese Pages
   ========================================================================== */
/*
 * Usage in Traditional Chinese pages:
 * font-family: 'Noto Sans TC', 'Inter', system-ui, -apple-system, sans-serif;
 * 
 * Or use the CSS custom property:
 * font-family: var(--font-chinese);
 */
:root {
    --font-chinese: 'Noto Sans TC', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Applied on the Traditional Chinese homepage only
   ========================================================================== */
/* Inter stays first for Latin text (the approved design) and this face paints the
 * script. Without this rule the subset was preloaded but never used: no font stack
 * named it, so system fonts painted the text. Scoped to the page language, so no other
 * page downloads this subset; native names of other languages ([lang] spans) keep the
 * shared Inter + system stack from custom-styles-v2.css. */
html:lang(zh-Hant), html:lang(zh-Hant) :lang(zh-Hant) {
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
