/* Self-hosted CJK serif — Source Han Serif CN + HK + JP (Adobe/Google, OFL-1.1, v2.003).
   url() is relative to THIS file (css/tokens.css).

   Priority cascade in --font-cjk:
     CN (GB2312, ~1.5MB/wt)  → simplified Chinese ideographs
     HK (Big5-HKSCS, ~4MB/wt) → traditional Chinese ideographs not in CN
     JP (JIS+kana, ~1.6MB/wt) → hiragana/katakana + JIS kanji not in CN/HK */

/* ---- Source Han Serif CN ---- */
/* Weights 300/400/700 (Simplified Chinese). */
@font-face {
  font-family: 'Source Han Serif CN';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/SourceHanSerifCN-300.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: 'Source Han Serif CN';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SourceHanSerifCN-400.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: 'Source Han Serif CN';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SourceHanSerifCN-700.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* ---- Source Han Serif HK ---- */
/* Weights 300/400/700 (Traditional Chinese, Big5-HKSCS). */
@font-face {
  font-family: 'Source Han Serif HK';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/SourceHanSerifHK-300.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: 'Source Han Serif HK';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SourceHanSerifHK-400.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: 'Source Han Serif HK';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SourceHanSerifHK-700.woff2') format('woff2');
  unicode-range:
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF,
    U+3190-319F, U+3220-324F, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* ---- Source Han Serif JP ---- */
/* Weights 300/400/700 (kana + JIS kanji fallback). */
@font-face {
  font-family: 'Source Han Serif JP';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/SourceHanSerifJP-300.woff2') format('woff2');
  unicode-range:
    U+3041-3096, U+3099-30FF, U+31F0-31FF, U+FF65-FF9F,
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3400-4DBF,
    U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F;
}
@font-face {
  font-family: 'Source Han Serif JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SourceHanSerifJP-400.woff2') format('woff2');
  unicode-range:
    U+3041-3096, U+3099-30FF, U+31F0-31FF, U+FF65-FF9F,
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3400-4DBF,
    U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F;
}
@font-face {
  font-family: 'Source Han Serif JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SourceHanSerifJP-700.woff2') format('woff2');
  unicode-range:
    U+3041-3096, U+3099-30FF, U+31F0-31FF, U+FF65-FF9F,
    U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+3400-4DBF,
    U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F;
}

/* ---- Spectral ---- */
/* Self-hosted Spectral (OFL-1.1, Google Fonts v15) — static serif, primary --font-serif.
   url() is relative to THIS file. Per-subset unicode-range: each visitor only downloads
   the scripts their page uses (latin alone ~30KB per weight). Weights 200–800, normal + italic. */

/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-200.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-200.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-200.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-200.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-latin-200.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-300.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-300.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-300.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-300.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-latin-300.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-400.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-400.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-latin-400.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-500.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-500.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-latin-500.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-600.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-600.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-latin-600.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-700.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-700.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-latin-700.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-800.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-800.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-800.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-800.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-latin-800.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-200-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-200-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-200-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-200-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/Spectral-latin-200-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-300-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-300-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Spectral-latin-300-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-400-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-400-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Spectral-latin-400-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-500-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-500-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-500-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-500-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Spectral-latin-500-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-600-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-600-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-600-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-600-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Spectral-latin-600-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-700-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-700-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-700-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-700-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Spectral-latin-700-italic.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-ext-800-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-cyrillic-800-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-vietnamese-800-italic.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-latin-ext-800-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Spectral-latin-800-italic.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;
}

/* ---- Design Tokens ---- */
/* SubstellarAtlas v1.0 palette: deep navy + antique gold + serif tan.
   Both spec-named and legacy-named tokens are exported so existing rules keep working. */
:root {
  /* ---- Backgrounds (lapidary v4) ---- */
  --bg-deep:      #242628;   /* rail / deep panels */
  --bg-mid:       #242628;   /* buttons / cards */
  --bg-line:      rgba(210, 215, 222, 0.16);   /* borders / dividers */
  --bg-panel:     rgba(32, 34, 38, 0.90);      /* floating panels */
  --bg-overlay:   rgba(32, 34, 38, 0.90);

  /* ---- Foreground / text (lapidary v4: hi/mid/lo) ---- */
  --fg-primary:   #e7e3da;   /* --hi */
  --fg-muted:     #9aa0aa;   /* --mid */
  --fg-disabled:  #8b909a;   /* --lo (raised for AA 4.5:1) */
  --text-primary:   #e7e3da; /* legacy alias */
  --text-secondary: #9aa0aa; /* legacy alias */
  --text-dim:       #8b909a;
  --text-on-light:  #1e293b;

  /* ---- Accents ---- */
  --accent:         #b39468;  /* aged brass (Uranometria spec lock) */
  --accent-gold:    #b39468;  /* legacy alias */
  --brass:          #b39468;  /* canonical name per spec */
  --accent-gold-d:  #8a7050;

  /* ---- Gilt two-tier (bright activation + calm area highlight) ---- */
  --gilt-bright: #ecc874;
  --gilt-calm:   #c9a86a;
  --gilt-edge:   #cdab6a;
  --accent-silver:  #cbd5e1;
  --accent-blue:    #6a8cd0;
  --accent-violet:  #9580c0;
  --danger:         #a8632b;  /* total-solar badge / warnings */

  /* ---- Borders / glow (lapidary v4) ---- */
  --border-soft:      rgba(210, 215, 222, 0.16);  /* --line */
  --border-hairline:  rgba(210, 215, 222, 0.16);  /* --line */
  --border-mid:       rgba(210, 215, 222, 0.26);  /* --line2 */
  --border-gold:      rgba(179, 148, 104, 0.40);
  --glow-night:   0 0 12px rgba(106, 140, 208, 0.4);
  --glow-gold:    0 0 8px rgba(179, 148, 104, 0.5);

  /* ---- Shell / overlay surfaces (lapidary v4) ---- */
  --bg-shell:     rgba(32, 34, 38, 0.90);  /* --panel */
  --bg-rail:      #242628;                 /* --rail */
  --map-mask:     rgba(40, 56, 82, 0.06);
  --map-sheen:    rgba(207, 224, 245, 0.022);

  /* ---- Text three-tier (warm white) ---- */
  --text-high: #e7e3da;   /* deduped to equal --fg-primary (was #ece7da) */
  --text-mid-warm: #9aa0aa;
  --text-low-warm: #8b909a;

  /* ---- Star spectral anchors (continuous OKLab interpolation in JS) ---- */
  --sp-W: #c0c9ff;  --sp-O: #a9cdff;  --sp-B: #bedbfc;  --sp-A: #dceaf6;
  --sp-F: #ebece0;  --sp-G: #ece2b9;  --sp-K: #ebbe8a;  --sp-M: #e19c72;
  --sp-M-end: #d27f66;
  --star-core-white: #fff5e8;

  /* ---- Constellation lines (engraved groove) ---- */
  --const-line:        #dad6ca;
  --const-line-shadow: #0e1014;

  /* ---- Lapidary surface (engraved texture + chiseled bevel) ---- */
  --engrave-hatch: repeating-linear-gradient(45deg, var(--brass) 0 0.5px, transparent 0.5px 4px);
  --engrave-op:    0.03;
  /* Same 45° brass hatch with the 3% opacity baked into the line color, for
     surfaces that can't host the ::before overlay (e.g. <input> elements):
     layer this over the element's solid background-color. */
  --engrave-hatch-baked: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--brass) 4%, transparent) 0 0.5px,
    transparent 0.5px 4px);
  --bevel-light:   rgba(255,255,255,.06);
  --bevel-groove:  rgba(0,0,0,.38);

  /* ---- Asterism (celestite overlay) ---- */
  --asterism:       #93b1b2;
  --asterism-label: #b3cdcc;

  /* ---- Constellation boundaries ---- */
  --const-bounds:    #9aa0b8;
  --const-bounds-hi: var(--gilt-edge);
  --const-hi-halo:   var(--gilt-calm);
  --const-hi-fill:   color-mix(in oklab, var(--gilt-calm) 2.8%, transparent);

  /* ---- Typography stacks ---- */
  --font-cjk:
    'Source Han Serif CN', 'Source Han Serif HK', 'Source Han Serif JP',
    'Noto Serif SC', 'Source Han Serif SC',
    'Spectral', Georgia, serif;
  --font-serif:
    'Spectral',
    'Source Serif 4', 'Source Serif Pro', 'EB Garamond',
    'Source Han Serif CN', 'Noto Serif SC', 'Source Han Serif SC',
    Georgia, 'Times New Roman', serif;
  --font-mono:
    'JetBrains Mono', 'IBM Plex Mono', 'SF Mono',
    Consolas, Monaco, 'Courier New', monospace;
  --font-sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-symbol:
    'Noto Sans Symbols 2', 'Source Serif 4', 'Segoe UI Symbol', serif;

  /* ---- Font scale ---- */
  --text-xs:   13px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-lg:   17px;
  --text-xl:   21px;
  --text-2xl:  29px;

  /* ---- Unified UI type scale (left sidebar + right sidebar + bottom rail) ----
     Collapses the prior 11/11.5/12/12.5/13/14/16/17.5 sprawl into four steps
     with a 12px floor for chrome text. */
  --fs-title:   17px;  /* panel titles: "Eclipse events", "Quantou" */
  --fs-body:    15px;  /* primary rows: info-row, eclipse-card date */
  --fs-sub:     14px;  /* subtitles & secondary: coords, ec-dt, timecode */
  --fs-caption: 13px;  /* floor: ec-row2/3, filter & rail buttons, captions */
  --fw-regular: 450;
  --fw-medium:  500;

  /* ---- Line heights ---- */
  --lh-tight: 1.25;
  --lh-base:  1.5;
  --lh-loose: 1.7;

  /* ---- Observer compass (bone-white astrolabe) ---- */
  --compass-ring:       #e7e3da;
  --compass-cardinal:   #e7e3da;
  --compass-cardinal-n: #e7e3da;
  --compass-planet:     #b9d3cb;  /* verdigris — patinated-bronze tone, reads as instrument not candy (was mint #cfe9cc) */
  --sun-trace:          #ead7b6;  /* warm bone — sun pointer joins the warm family (was var(--fg-primary)) */
  --sun-label:          #ccbd9a;
  --moon-trace:         #a4c1d6;
  --moon-label:         #a4c1d6;
  /* Per-event rim labels (barb line + name + time). These four ALSO drive the
     diurnal trace gradients: the sun path ramps --sunrise-label → --sunset-label
     along its arc, the moon path --moonrise-label → --moonset-label, and the
     sun/moon glyphs are filled with the gradient colour at the body's current
     position (see addTraceGradient / drawDirectionLine in js/observer.js). */
  --sunrise-label:      #f6cf99;  /* 晨金 — pushed off bone-white for ΔE separation (was #f9ddc1) */
  --sunset-label:       #ee9f72;  /* 暮珊瑚 — widens the dawn→dusk span (was #f4c1aa) */
  --moonrise-label:     #aed3ec;
  --moonset-label:      #80b6e0;  /* deepened to keep the cool side balanced against the bolder warm arc */
  --annual-envelope:    #d2b486;  /* warm gold wash — marks the sun's annual territory (was #c8c2b4) */
  --great-circle:       #b6c0cf;  /* geodesic navigation line (observer→sub-point) — a neutral graphite "drafting" tone kept OUTSIDE the body hues; endpoint dot stays body-coloured for identity */
  --dark-casing:        var(--const-line-shadow);

  /* ---- Eclipse contact-curve palette ----
     Contact-curve colors live in js/eclipse.js `CURVE_STYLE` (the single source
     of truth). The only eclipse token consumed via CSS is the greatest-eclipse
     marker glyph below; keep it in sync with CURVE_STYLE.lunarPeak. */
  --eclipse-greatest:     #22c55e;   /* greatest-eclipse ✶ marker glyph */

  /* ---- Eclipse disk-glyph overlays (sidebar list icons) ----
     Lapidary mineral, lifted slightly for legibility at icon scale; harmonizes
     with the contact-curve palette above. Owner may consolidate later. */
  --ecl-moon-silhouette: #15161a;  /* Moon dark silhouette (solar partial/annular) */
  --ecl-corona:          #b7c2cd;  /* 日全食 corona ring */
  --ecl-corona-disk:     #15161a;  /* 日全食 black disk */
  --ecl-corona-bead:     #eef1f4;  /* 日全食 diamond ring bead */
  --ecl-umbra:           #a8472e;  /* 月偏食 umbra copper fill */
  --ecl-umbra-center:    #7d2e1b;  /* 月偏食 umbra center hint */
  --ecl-penumbra:        #2a221c;  /* 月半影食 deep warm wash */
  --ecl-bloodmoon:       #a8472e;  /* 月全食 uniform blood disk */
  --ecl-bloodmoon-rim:   #7e3320;  /* 月全食 disk rim */

  /* ---- Eclipse contact-trajectory schematic (right-sidebar active panel) ----
     Tuned for legibility on the dark sidebar: shadow rings read as outlined
     translucent discs, moon/sun discs sit on top, contacts strung on a path. */
  --ecl-schem-pen:       #353b47;  /* penumbra ring fill — neutral dark shadow */
  --ecl-schem-pen-rim:   #5a6373;  /* penumbra ring outline */
  --ecl-schem-umb:       #23262d;  /* umbra ring fill — neutral darker shadow (no red; red lives only on the moon faces) */
  --ecl-schem-umb-rim:   #3a3f49;  /* umbra ring outline */
  --ecl-schem-moon:      #ddd2b0;  /* Moon disc outside the shadow */
  --ecl-schem-moon-pen:  #9a8f73;  /* Moon disc within the penumbra */
  --ecl-schem-rim:       #c9c0a8;  /* Moon disc outline */
  --ecl-schem-sun:       #f3c64b;  /* Sun disc (solar schematic) */
  --ecl-schem-sun-rim:   #cf9e1f;  /* Sun disc outline */
  --ecl-schem-path:      #8a93a3;  /* crossing-trajectory dashed line */
  --ecl-schem-label:     #9aa4b2;  /* contact-key labels */
  --ecl-schem-axis:      #6f7787;  /* × shadow centre + ecliptic line */
}
