﻿/* ==========================================================
   Self-hosted Google Fonts — China-friendly, no googleapis
   ========================================================== */

/* --- Material Icons --- */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  /* Icon fonts use ligature names as text; `block` keeps the glyph invisible while loading instead of
     briefly showing the raw word (e.g. "dashboard") in a fallback font, which caused the sidebar FOUC. */
  font-display: block;
  src: url('/fonts/material-icons/MaterialIcons-Regular.woff2') format('woff2'),
       url('/fonts/material-icons/MaterialIcons-Regular.ttf') format('truetype');
}
.material-icons {
  font-family: 'Material Icons';
  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;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* --- Material Symbols Outlined --- */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  /* See note above: `block` avoids the ligature-word flash that shifted the sidebar nav on load. */
  font-display: block;
  src: url('/fonts/material-icons/MaterialSymbolsOutlined.woff2') format('woff2'),
       url('/fonts/material-icons/MaterialSymbolsOutlined.ttf') format('truetype');
}
.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;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* --- Inter (variable weight 300-700, latin) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Open Sans (normal 400/700, latin) --- */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/OpenSans-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* --- Open Sans (italic 400/700, latin) --- */
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/fonts/OpenSans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Source Sans Pro (300/400/700 normal, latin) --- */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/SourceSansPro-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/SourceSansPro-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/SourceSansPro-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* --- Source Sans Pro (300/400/700 italic, latin) --- */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/SourceSansPro-300italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/SourceSansPro-400italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/SourceSansPro-700italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Noto Sans CJK fallback (system fonts) ---
   Noto Sans CJK woff2 files are too large (~5MB each) to self-host practically.
   We rely on system-installed Noto Sans or OS defaults for CJK characters.
   Most modern OS ship with adequate CJK fonts:
   - Windows: Microsoft YaHei (SC), Microsoft JhengHei (TC), Yu Gothic (JP), Malgun Gothic (KR)
   - macOS: PingFang SC/TC, Hiragino Sans, Apple SD Gothic Neo
   - Linux: Noto Sans CJK (if installed)
*/
@font-face {
  font-family: 'Noto Sans TC';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Noto Sans TC'), local('Microsoft JhengHei'), local('PingFang TC');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Noto Sans SC'), local('Microsoft YaHei'), local('PingFang SC');
}
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Noto Sans JP'), local('Yu Gothic'), local('Hiragino Sans');
}
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Noto Sans KR'), local('Malgun Gothic'), local('Apple SD Gothic Neo');
}
