/* Hindi edition typography (order 2026-09-10, owner-approved Option A): Noto Serif Devanagari for
   long-form reading (headings, body, quotes), Noto Sans Devanagari for UI/navigation/metadata — the same
   reading/apparatus split the English identity uses, and the same pairing already approved for Telugu.
   Loaded ONLY on /hi/ pages (functions.php enqueues it via tj_edition_fonts() when tj_current_language()
   === 'hi'); English and Telugu pages carry no Hindi font asset. Files are self-hosted subsets (SIL OFL):
   the Devanagari block and basic Latin per weight, so Latin technical terms inside Hindi prose (API, LLM,
   Docker) render in the same face. */

/* Both families are Google's VARIABLE builds (one file covers weights 400–600), split into the Devanagari
   block and basic Latin: four files, ~296 KB total — same dedup approach already proven for Telugu (docs/51):
   requesting the variable weight range (400..600) instead of discrete weights avoids downloading the same
   bytes multiple times under different per-weight filenames. */
@font-face { font-family: "Noto Serif Devanagari"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/noto-serif-devanagari-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Serif Devanagari"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/noto-serif-devanagari-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/noto-sans-devanagari-devanagari.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/noto-sans-devanagari-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Swap the two theme font roles for the whole page. Everything in theme.json/style.css that reads these
   variables (headings, body, .tj-label/.tj-meta, buttons, nav, forms, breadcrumb, footer …) follows. */
.tj-lang-hi {
  --wp--preset--font-family--reading: "Noto Serif Devanagari", "Source Serif 4", Georgia, serif;
  --wp--preset--font-family--apparatus: "Noto Sans Devanagari", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tj-sans: var(--wp--preset--font-family--apparatus);
}
/* Devanagari glyphs carry a connecting headstroke and stack matras above/below the baseline; the English
   1.6 body leading crowds them, so leading opens up a step, matching the Telugu edition's own adjustment. */
.tj-lang-hi body, .tj-lang-hi .wp-block-post-content p, .tj-lang-hi .tj-author-block p, .tj-lang-hi .tj-standfirst, .tj-lang-hi .wp-block-post-excerpt { line-height: 1.8; }
.tj-lang-hi h1, .tj-lang-hi .wp-block-post-title, .tj-lang-hi .tj-home-statement h1 { letter-spacing: 0; line-height: 1.3; }
.tj-lang-hi h2, .tj-lang-hi h3 { line-height: 1.4; }
.tj-lang-hi .wp-block-quote { line-height: 1.8; font-style: normal; }   /* Noto Serif Devanagari ships no italic; a synthesized slant would distort the script */
.tj-lang-hi em, .tj-lang-hi i { font-style: normal; font-weight: 600; }  /* same reason: emphasis carries as weight, never a faux italic */
.tj-lang-hi .tj-label, .tj-lang-hi .tj-meta, .tj-lang-hi .tj-breadcrumb, .tj-lang-hi .wp-block-navigation, .tj-lang-hi .tj-footer { line-height: 1.6; }
.tj-lang-hi .tj-label { letter-spacing: 0; }
/* Long unbroken Hindi compounds/transliterated terms still wrap safely inside the measure. */
.tj-lang-hi p, .tj-lang-hi li, .tj-lang-hi h1, .tj-lang-hi h2, .tj-lang-hi h3 { overflow-wrap: anywhere; }
