/* Japanese, Chinese, Korean pages: line breaking and heading spacing.
   Loaded after styles.css by _tools/i18n/build_lang.py ("extra_css" in langs.json). */
html[lang^=ja],html[lang^=zh]{line-break:strict}
html[lang^=ko]{word-break:keep-all;overflow-wrap:anywhere}
html[lang^=ja] h1,html[lang^=ja] h2,html[lang^=ja] h3,
html[lang^=zh] h1,html[lang^=zh] h2,html[lang^=zh] h3,
html[lang^=ko] h1,html[lang^=ko] h2,html[lang^=ko] h3{letter-spacing:0}
/* Japanese headings break between phrases where the browser supports it (Chrome, Edge); others keep normal breaking. */
html[lang^=ja] h1,html[lang^=ja] h2,html[lang^=ja] h3,html[lang^=ja] h4{word-break:auto-phrase}
/* Thai: tall vowel and tone marks need more line height; letter spacing splits the marks from their consonant. */
html[lang^=th] h1,html[lang^=th] h2,html[lang^=th] h3{letter-spacing:0;line-height:1.35}
html[lang^=th] *{letter-spacing:0!important}
html[lang^=th]{line-break:loose;word-break:normal}

/* Bengali: letters join into clusters, so no letter spacing; taller glyphs need more heading line height */
html[lang^=bn] *{letter-spacing:0!important}
html[lang^=bn] :is(h1,h2,h3){line-height:1.4}
