/* lang-extra.css - loaded ONLY on pages of languages whose site.yaml block has `css_extra: true`
   (ko ru id vi tr), after styles.css and the page's other sheets. English and the seven older
   languages never request it, so their output is unchanged.

   1. Font coverage (self-hosted, same origin: CSP font-src 'self' data:). The shipped Inter and
      Space Grotesk files are Latin-1 only (230 glyphs). Extra subsets, loaded per character through
      unicode-range, so a page only downloads what it uses:
        Cyrillic (ru)                 inter-cyrillic-*          Russian is fully covered; Space Grotesk has
                                                                 no Cyrillic at all, headings fall to Inter
        Latin Extended (tr, vi, id)   inter-latin-ext-*, spacegrotesk-latin-ext-*   (Turkish g-breve, s-cedilla,
                                                                 dotted I; id is plain ASCII)
        Vietnamese (vi)               inter-vietnamese-*, spacegrotesk-vietnamese-*
      Korean has NO web font: a Hangul subset is hundreds of KB; the system stack below is used.
   2. Per-script rules (Hangul stack, keep-all wrapping, tracking, stacked diacritics). */

@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("/assets/fonts/inter-latin-ext-400.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("/assets/fonts/inter-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; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("/assets/fonts/inter-cyrillic-400.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/inter-latin-ext-500.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/inter-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; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/inter-cyrillic-500.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/inter-latin-ext-600.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/inter-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; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/inter-cyrillic-600.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/inter-latin-ext-700.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/inter-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; }
@font-face { font-family:"Inter"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/inter-cyrillic-700.woff2") format("woff2"); unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/spacegrotesk-latin-ext-500.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:500; font-display:swap; src:url("/assets/fonts/spacegrotesk-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; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/spacegrotesk-latin-ext-600.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:600; font-display:swap; src:url("/assets/fonts/spacegrotesk-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; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/spacegrotesk-latin-ext-700.woff2") format("woff2"); unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Space Grotesk"; font-style:normal; font-weight:700; font-display:swap; src:url("/assets/fonts/spacegrotesk-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; }

/* Korean: system Hangul fonts (macOS/iOS Apple SD Gothic Neo, Windows Malgun Gothic, Android/Linux Noto Sans CJK KR). */
:lang(ko) {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Noto Sans KR", "Malgun Gothic", "Nanum Gothic", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Noto Sans KR", "Malgun Gothic", "Nanum Gothic", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, "Apple SD Gothic Neo", "Noto Sans CJK KR", "Malgun Gothic", monospace;
}
/* Korean wraps between words (spaces), not inside them. overflow-wrap keeps long URLs/code from overflowing. */
:lang(ko) body, :lang(ko) .prose, :lang(ko) .card .body, :lang(ko) .article-header { word-break:keep-all; overflow-wrap:break-word; }
:lang(ko) pre, :lang(ko) code { word-break:normal; }
html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3 { letter-spacing:0; }
:lang(ko) .brand .word span, :lang(ko) .hero .kicker, :lang(ko) .card .tag, :lang(ko) .spec-plate dt, :lang(ko) summary.toc-title { letter-spacing:.04em; }
html:lang(ko) .prose .dg-kicker { letter-spacing:.06em; }
html:lang(ko) .prose .dg .pick-job, html:lang(ko) .prose .dg .stack-role { letter-spacing:0; }

/* Russian: Cyrillic (Inter), long words: break rather than overflow, hyphenate with the browser dictionary. */
html:lang(ru) h1, html:lang(ru) h2, html:lang(ru) h3 { letter-spacing:0; }
:lang(ru) .prose, :lang(ru) .card .body, :lang(ru) .article-header, :lang(ru) .hero { overflow-wrap:break-word; hyphens:auto; }
:lang(ru) .brand .word span, :lang(ru) .hero .kicker, :lang(ru) .card .tag, :lang(ru) .spec-plate dt, :lang(ru) summary.toc-title { letter-spacing:.06em; }
html:lang(ru) .prose .dg-kicker { letter-spacing:.06em; }
html:lang(ru) .prose .dg .pick-job, html:lang(ru) .prose .dg .stack-role { letter-spacing:0; }

/* Vietnamese: stacked diacritics (e.g. U+1EC6) get clipped by the tight display line-heights. */
html:lang(vi) h1, html:lang(vi) h2, html:lang(vi) h3 { letter-spacing:0; line-height:1.25; }
:lang(vi) .hero h1, :lang(vi) .article-header h1 { line-height:1.22; }
:lang(vi) .prose, :lang(vi) .card .body { line-height:1.7; }

/* Turkish: text-transform:uppercase turns i into U+0130 (dotted capital I) only because <html lang="tr">
   is set (base.html); the glyph comes from the Latin Extended faces above. Nothing to override;
   all-caps labels need no override. */
html:lang(tr) h1, html:lang(tr) h2, html:lang(tr) h3 { letter-spacing:0; }

/* Indonesian: ASCII Latin, no overrides needed (listed so the file names all five languages). */
