/* Karma Jyotisha: self-hosted Devanagari.
   Served first-party from /assets/fonts/ so Hindi typography never depends on a
   third-party CDN and never changes under us.
   unicode-range is kept per-subset, so an English-only reader downloads nothing here.
   Faces: Tiro Devanagari Sanskrit (display/headings, traditional) + Mukta (body, Ek Type).
   Both SIL Open Font License 1.1. */
@font-face {
  font-family: 'Tiro Devanagari Sanskrit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/tiro-devanagari-sanskrit-400-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: 'Tiro Devanagari Sanskrit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/tiro-devanagari-sanskrit-400-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: 'Mukta';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/mukta-400-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: 'Mukta';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/mukta-400-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: 'Mukta';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/mukta-600-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: 'Mukta';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/mukta-600-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: 'Mukta';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/mukta-700-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: 'Mukta';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/mukta-700-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;
}

/* Devanagari type stack.
   Fraunces and JetBrains Mono carry no Devanagari glyphs, so without these rules every
   Hindi paragraph silently fell back to whatever the reader's OS shipped. */
:root {
  --font-deva-display: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', Georgia, serif;
  --font-deva-body: 'Mukta', 'Noto Sans Devanagari', system-ui, sans-serif;
}

/* Whole-page Hindi (the /hi/ shell and Hindi blog pages). */
html[lang="hi"] body,
html[lang="hi"] p,
html[lang="hi"] li,
html[lang="hi"] span,
html[lang="hi"] a,
html[lang="hi"] div,
html[lang="hi"] input,
html[lang="hi"] button {
  font-family: var(--font-deva-body);
}
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4 {
  font-family: var(--font-deva-display);
  font-weight: 400;
}
/* Devanagari sits optically smaller than Latin at the same px, and its matras need
   vertical room, so nudge size and line-height rather than leaving Latin metrics. */
html[lang="hi"] body { font-size: 1.02em; }
html[lang="hi"] p, html[lang="hi"] li { line-height: 1.75; }
html[lang="hi"] h1, html[lang="hi"] h2 { line-height: 1.32; letter-spacing: 0; }

/* Keep the monospace eyebrow/label system readable: Devanagari has no monospace face,
   so labels in Hindi use the body face instead of falling back mid-string. */
html[lang="hi"] .section-eyebrow,
html[lang="hi"] .hero-trust,
html[lang="hi"] .price-sub,
html[lang="hi"] .footer-meta,
html[lang="hi"] .kjb-crumb,
html[lang="hi"] .nav-mega-eyebrow,
html[lang="hi"] .footer-mega-eyebrow {
  font-family: var(--font-deva-body);
  letter-spacing: .02em;
}

/* Devanagari inside an otherwise-English page: the śloka marquee, the हिन्दी switcher,
   and the "हिन्दी में पढ़ें" breadcrumb link on English blog posts. */
.marquee-item.script, .hero-bg-script, .nav-lang-switch, [lang="hi"] {
  font-family: var(--font-deva-display);
}
.nav-lang-switch { font-family: var(--font-deva-body); }

/* In-article label system.
   The WP-authored .kjw content and the blog chrome set several small labels in
   JetBrains Mono, which carries no Devanagari. On Hindi pages those strings were
   falling through to the OS monospace face (32 elements on a single post: the
   eyebrow, glance labels, every <dt> key, duration chips, footnotes, author role).
   Route them to the body face and keep the uppercase-label rhythm via tracking. */
html[lang="hi"] .kjw .eb,
html[lang="hi"] .kjw .lb,
html[lang="hi"] .kjw .dur,
html[lang="hi"] .kjw .fx,
html[lang="hi"] .kjw .meta,
html[lang="hi"] .kjw dt,
html[lang="hi"] .kjb-author .who,
html[lang="hi"] .kjb-related h3,
html[lang="hi"] .kjb-hooknote,
html[lang="hi"] .kjb-tag {
  font-family: var(--font-deva-body);
  letter-spacing: .04em;
}
/* Antardaśā table: <th> headers and the <small> sub-period cells are also mono. */
html[lang="hi"] .kjw table th,
html[lang="hi"] .kjw table small,
html[lang="hi"] .kjw .sc th,
html[lang="hi"] .kjw .sp small {
  font-family: var(--font-deva-body);
  letter-spacing: .03em;
}
