/* ==========================================================================
   ToolsGrove - Devanagari localization layer
   Load AFTER tg-tokens.css and BEFORE tg-components.css.

   Why this file exists: Sora has no Devanagari coverage, so a Marathi or Hindi
   build cannot use the default stack. Mukta covers Devanagari and Latin in one
   family across 200-800, which keeps a bilingual page (Marathi copy, Latin
   acronyms like SIP and EMI) rendering in one consistent texture.

   Font:
   https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;600;700;800&display=swap
   ========================================================================== */

body.tg-surface,
.tg-section {
    font-family: "Mukta", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.tg-surface h1, body.tg-surface h2, body.tg-surface h3,
body.tg-surface h4, body.tg-surface h5, body.tg-surface h6,
.tg-section h1, .tg-section h2, .tg-section h3,
.tg-section h4, .tg-section h5, .tg-section h6 {
    font-family: "Anek Devanagari", "Mukta", "Sora", "Inter", sans-serif;
}

/* --------------------------------------------------------------------------
   Devanagari needs more vertical room and far less negative tracking than the
   Latin scale. Matras sit above the headline and below the baseline, so a
   1.08 line-height clips them; and tightening conjuncts past about -0.01em
   starts to visually merge them.
   -------------------------------------------------------------------------- */

/* Anek Devanagari runs a little tighter than Mukta at the same size, so the
   display sizes carry slightly more leading than the Latin scale would. */
.tg-display { line-height: 1.26; letter-spacing: -0.012em; }
.tg-h2      { line-height: 1.30; letter-spacing: -0.010em; }
.tg-h3      { line-height: 1.40; letter-spacing: 0; }
.tg-lead    { line-height: 1.80; }
.tg-body    { line-height: 1.80; }
.tg-small   { line-height: 1.70; }

/* Uppercase does not exist in Devanagari. Dropping the transform and the wide
   tracking prevents the browser from faking a caps effect on conjuncts. */
.tg-label {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.75rem;
}

/* Prose headings carry a vertical rule sized to Latin cap height; Devanagari
   sits taller, so the rule grows to match. */
.tg-prose h2::before { height: 30px; }
.tg-prose h3::before { height: 25px; }
.tg-prose h4::before { height: 22px; }
/* Long-form Devanagari at 15px was cramped. 17px with generous leading is the
   comfortable reading size for this script at this measure. */
.tg-prose p,
.tg-prose li {
    font-size: 17px;
    line-height: 1.95;
}
.tg-prose { font-size: 17px; }

/* Controls need a little more height so descender matras are not clipped. */
.tg-search-input { height: 44px; }
.tg-btn          { min-height: 46px; }

/* Latin numerals inside Devanagari copy read better with tabular figures,
   which matters on a page full of calculators. */
.tg-num { font-variant-numeric: tabular-nums; }
