/*
 * Krishna Mail / PrabhupadaBooks text fonts, self-hosted.
 *
 * The reading text in the database is stored as proper UTF-8, with the Sanskrit
 * diacritics as real Unicode characters (U+1E63 ṣ, U+1E25 ḥ, U+0101 ā and so on).
 * Those characters are absent from the system fonts the sites previously fell back
 * to, so a browser substituted whatever it had and the result differed per platform.
 *
 * These declarations are the same set prabhupadabooks.com uses. The first group
 * defines the fonts by name; the second aliases the legacy Folio family names that
 * the imported markup still carries, so old inline styles keep working without
 * rewriting 850,000 rows of stored HTML.
 */

/* --- the base reading font -------------------------------------------------- */

@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-bold.ttf") format("truetype");
  font-style: normal; font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-italic.ttf") format("truetype");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-bold-italic.ttf") format("truetype");
  font-style: italic; font-weight: 700; font-display: swap;
}

/* --- the scripts ------------------------------------------------------------ */

@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-bold.ttf") format("truetype");
  font-style: normal; font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-italic.ttf") format("truetype");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/fonts/noto-sans-bold-italic.ttf") format("truetype");
  font-style: italic; font-weight: 700; font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-bold.ttf") format("truetype");
  font-style: normal; font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-italic.ttf") format("truetype");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-bold-italic.ttf") format("truetype");
  font-style: italic; font-weight: 700; font-display: swap;
}

@font-face {
  font-family: "Noto Serif Devanagari";
  src: url("/fonts/noto-serif-devanagari-regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Serif Devanagari";
  src: url("/fonts/noto-serif-devanagari-bold.ttf") format("truetype");
  font-style: normal; font-weight: 700; font-display: swap;
}

@font-face {
  font-family: "Noto Serif Bengali";
  src: url("/fonts/noto-serif-bengali-regular.ttf") format("truetype");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Noto Serif Bengali";
  src: url("/fonts/noto-serif-bengali-bold.ttf") format("truetype");
  font-style: normal; font-weight: 700; font-display: swap;
}

/* --- legacy Folio family names ---------------------------------------------
 *
 * The stored markup references the fonts the original Folio infobase shipped —
 * ScaSabon, ScaKorinna, ScaPalatino, Helv, Tms Rmn — which are single-byte ANSI
 * fonts that have no Sanskrit diacritics at all. Aliasing them here means the
 * old inline styles resolve to a Unicode font instead of a browser fallback.
 */

@font-face { font-family: "ScaGoudy";      src: url("/fonts/noto-serif-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaGoudy";      src: url("/fonts/noto-serif-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaGoudy";      src: url("/fonts/noto-serif-italic.ttf")  format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "ScaSabon";      src: url("/fonts/noto-serif-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaSabon";      src: url("/fonts/noto-serif-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaSabon";      src: url("/fonts/noto-serif-italic.ttf")  format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "ScaKorinna";    src: url("/fonts/noto-serif-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaKorinna";    src: url("/fonts/noto-serif-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaPalatino";   src: url("/fonts/noto-serif-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "ScaPalatino";   src: url("/fonts/noto-serif-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Sanskrit-Garamond"; src: url("/fonts/eb-garamond-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Sanskrit-Garamond"; src: url("/fonts/eb-garamond-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Arial";         src: url("/fonts/noto-sans-regular.ttf")  format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Arial";         src: url("/fonts/noto-sans-bold.ttf")     format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Arial";         src: url("/fonts/noto-sans-italic.ttf")   format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "RM Devanagari"; src: url("/fonts/noto-serif-devanagari-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "RM Devanagari"; src: url("/fonts/noto-serif-devanagari-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Indevr";        src: url("/fonts/noto-serif-devanagari-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Indevr";        src: url("/fonts/noto-serif-devanagari-bold.ttf")    format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

/* --- the reading text -------------------------------------------------------
 *
 * 96% of the stored folios carry no inline font-family, so they inherit from
 * body — which is Open Sans, a font with no Sanskrit diacritics. This is the rule
 * that decides what the books are actually read in.
 *
 * The generic families stay as fallbacks so the text is readable while the
 * webfonts load (font-display: swap) and if they fail.
 */
.Purport, .Normal-Level, .Verse-in-purp, .After-Verse, .Synonyms-SA {
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
}

/* The Devanagari verse above each transliteration. Its own script and its own font —
   Noto Serif has no Devanagari coverage, so without this the browser substitutes
   whatever it has and the rendering differs per platform. */
.Devanagari {
  font-family: "Noto Serif Devanagari", "Noto Serif", serif;
  font-size: 1.08em;
  line-height: 1.9;
  margin-bottom: 10px;
}
