/* 한국어 (ko) overrides.
 *
 * Loaded by header.php only when the page is in this language, so no other visitor
 * downloads it. Everything is scoped to html[lang="ko"] and cannot leak.
 *
 * Korean. Inter has no Hangul, so it falls through to the system face.
 * Measured against the English: the median string is 54% of the English length,
 * so nothing overflows; the rules below are typographic.
 */

/* Latin stays in the site's own Inter; this script falls through to the system face named
   here. Setting the theme's two font variables reaches everything styled with them. */
html[lang="ko"] {
    --primary-font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    --alt-font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
html[lang="ko"] :is(body, input, textarea, select, button, .btn) {
    font-family: var(--primary-font);
}

/* Marks above and below the line need more room than the Latin line height gives. */
html[lang="ko"] :is(body, p, li) { line-height: 1.8; }
/* Small headings set with a size utility (an h3 at fs-20) keep the theme's 50px line: it is what
   spaces them. main.js tightens them only when they wrap. */
html[lang="ko"] :is(h1, h2, h3, h4, h5, h6):not(.fs-12, .fs-13, .fs-14, .fs-15, .fs-16, .fs-17, .fs-18, .fs-19, .fs-20, .fs-22, .fs-24, .fs-26, .fs-2, .fs-3, .fs-4, .fs-5, .fs-6) { line-height: 1.45; }

/* Tracking and synthetic italics were chosen for Latin. On this script tracking pulls
   apart clusters that belong together, and there is no true italic -- the browser only
   slants the glyphs. Icon fonts rely on <i> and are exempt. */
html[lang="ko"] :is(h1, h2, h3, h4, h5, h6, .ls-minus-1px, .ls-minus-2px, .btn, .pot-lang-toggle, .pot-lang-soon) {
    letter-spacing: 0;
}
html[lang="ko"] :is(em, i:not([class*="icon"]):not([class*="fa-"]):not([class*="bi-"]):not([class*="feather"])) {
    font-style: normal;
    font-weight: 600;
}

/* Korean breaks lines between words, at spaces; without keep-all the browser also breaks
   inside a word, which reads as a typo. It has to be set on body and below: the shared
   stylesheet sets word-break: break-word on body (and initial on .icon-with-text-style-03 *),
   which would override a value set on html for everything on the page. */
html[lang="ko"] body,
html[lang="ko"] .icon-with-text-style-03 * { word-break: keep-all; }

/* Buttons whose English label is one word and whose translation is two or three. */
html[lang="ko"] :is(.btn.btn-switch-text.btn-small, .btn.btn-switch-text.btn-very-small, .btn.btn-medium) > span {
    white-space: normal;
    line-height: 1.3;
}

/* Plan cards keep each feature on one line; translated feature names need a second
   line rather than an ellipsis. */
html[lang="ko"] :is(#vps-features-list li, .pot-plan-feature) {
    white-space: normal;
    line-height: 1.5;
}
