/*
 * Korean typography.
 *
 * Pretendard gave Korean the site's typeface instead of whatever the reader's
 * system supplied, which is what was reported. It did not change how that type
 * is set, and the settings are all Latin ones: tracking tightened for display
 * English, leading chosen for letters that have ascenders and descenders, and
 * line breaking left at the browser default.
 *
 * Measured on the live home page before any of this:
 *
 *     h1   76px / 1.05 line-height / -1.29px tracking
 *     body 21px / 1.43
 *     breaks:  링킹 플랫 ⏎ 폼
 *
 * That last line is the one a Korean reader notices. 플랫폼 is one word and it
 * was split down the middle, because browsers treat every Hangul syllable as a
 * place a line may end. It is the most common Korean web bug there is, and it
 * is one declaration to fix.
 *
 * Everything here is scoped to body.translatepress-ko_KR. The eight Latin
 * locales keep the type they were designed with.
 *
 * Sources consulted, and where they disagreed the looser value was taken,
 * because Hangul fills its em box and reads denser than Latin at the same
 * ratio: community guidance puts Korean body leading at 1.6 to 1.8 and
 * headlines from 1.15 upward, with tracking at zero for Hangul body text.
 */

/* ---- line breaking ------------------------------------------------ */

/*
 * keep-all breaks at spaces, the way the language is read.
 *
 * Checked before shipping: applying it to every element on the home page
 * caused zero new overflows. The pairing with overflow-wrap is the safety
 * net the guidance asks for, so a URL or an unbroken run longer than its
 * container still wraps instead of escaping it.
 */
body.translatepress-ko_KR,
body.translatepress-ko_KR h1,
body.translatepress-ko_KR h2,
body.translatepress-ko_KR h3,
body.translatepress-ko_KR h4,
body.translatepress-ko_KR h5,
body.translatepress-ko_KR h6,
body.translatepress-ko_KR p,
body.translatepress-ko_KR li,
body.translatepress-ko_KR a,
body.translatepress-ko_KR button,
body.translatepress-ko_KR td,
body.translatepress-ko_KR th,
body.translatepress-ko_KR figcaption,
body.translatepress-ko_KR blockquote {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---- tracking ----------------------------------------------------- */

/*
 * Hangul syllables are already square and evenly set. Negative tracking is a
 * Latin display trick, and on Hangul it pushes blocks into each other: the
 * hero was running at -1.29px and the buttons at -0.16px.
 */
body.translatepress-ko_KR h1,
body.translatepress-ko_KR h2,
body.translatepress-ko_KR h3,
body.translatepress-ko_KR h4,
body.translatepress-ko_KR h5,
body.translatepress-ko_KR h6,
body.translatepress-ko_KR .azzle-default-btn,
body.translatepress-ko_KR button,
body.translatepress-ko_KR .azzle-section-title,
body.translatepress-ko_KR .azzle-hero-title {
  letter-spacing: normal;
}

/* ---- leading ------------------------------------------------------ */

/*
 * Every Hangul block fills the full em, so there is none of the optical air
 * that ascenders and descenders give a line of Latin. The same ratio reads
 * noticeably tighter, which is why these go up rather than staying put.
 *
 * Headings move from 1.05 to 1.3, body from 1.43 to 1.7. Both sit inside the
 * ranges the guidance gives, at the generous end.
 */
body.translatepress-ko_KR h1,
body.translatepress-ko_KR h2,
body.translatepress-ko_KR h3 {
  line-height: 1.3;
}

body.translatepress-ko_KR h4,
body.translatepress-ko_KR h5,
body.translatepress-ko_KR h6 {
  line-height: 1.4;
}

body.translatepress-ko_KR p,
body.translatepress-ko_KR li,
body.translatepress-ko_KR dd,
body.translatepress-ko_KR blockquote,
body.translatepress-ko_KR figcaption {
  line-height: 1.7;
}

/*
 * Controls keep their own measure. A button is one line by definition, and
 * 1.7 inside a fixed-height pill pushes the label off centre.
 */
body.translatepress-ko_KR .azzle-default-btn,
body.translatepress-ko_KR button,
body.translatepress-ko_KR .tlk-lang-trigger,
body.translatepress-ko_KR input,
body.translatepress-ko_KR select {
  line-height: 1;
}
