/* Japanese, Chinese and Russian pages: font stacks and a few typographic adjustments.
 * Loaded only on ja, zh and ru pages, after the other stylesheets. Faces: i18n-fonts.css. */

/* Newsreader keeps the Latin; the self-hosted faces only cover their own scripts (unicode-range),
 * then the system's own Mincho, Song or serif for anything they lack. */
:root:lang(ja) { --serif: 'LH Serif JA', 'Newsreader', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif CJK JP', 'Noto Serif JP', serif; }
:root:lang(zh) { --serif: 'LH Serif ZH', 'Newsreader', 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Noto Serif SC', 'Source Han Serif SC', serif; }
:root:lang(ru) { --serif: 'Newsreader', 'LH Serif Cyr', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif; }

/* Ideographs have no italic and should never be slanted or smeared into a false bold. */
:root:is(:lang(ja), :lang(zh)) body {
	font-synthesis: none;
	font-variant-numeric: lining-nums;
	line-break: strict;
	text-autospace: normal;
}

/* Full-height characters need more room between lines than Latin capitals and ascenders. */
:root:is(:lang(ja), :lang(zh)) :is(h1, h2, h3, h4, .display, .h2, .h3, .h4, .hero4-title, .evening-quote, .book-quote, .router-says,
	.quiz-text, .post-cta-text, .post-offer-title, .flight-title, .flight-line, .sh-name, .ring-name, .mega-title) {
	line-height: 1.36;
	letter-spacing: .02em;
}
:root:is(:lang(ja), :lang(zh)) .prose { line-height: 1.9; }
/* Japanese headings break between phrases where the line is wide enough for the longest phrase. */
@media (min-width: 720px) {
	:root:lang(ja) :is(h1, h2, h3, h4, .display, .h2, .h3, .hero4-title, .evening-quote, .book-quote, .flight-title, .flight-line) { word-break: auto-phrase; }
}

/* Where italic marks the current page or language, CJK text gets a hairline underline instead. */
:root:is(:lang(ja), :lang(zh)) :is(.lang a[aria-current], .menu-list a[aria-current="page"], .menu-sub a[aria-current]) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .32em;
}

/* Russian runs long: long words may break in big headings on a phone rather than overflow. */
:root:lang(ru) :is(h1, h2, h3, .display, .h2, .hero4-title, .evening-quote, .flight-title, .flight-line) {
	hyphens: auto;
	hyphenate-limit-chars: 10 4 4;
	overflow-wrap: break-word;
}
