/* Self-hosted reading faces. Served from the binary (see assetsFS in web.go),
   so no CDN is involved and the same files are embedded in the PDF export.

   The browser gets .woff2; the .ttf files beside them are NOT dead weight —
   installPDFFont embeds those in the PDF export, since fpdf cannot read woff2.
   Both formats are the same faces, so the page and the exported book match.

   A @font-face rule costs nothing until a glyph actually uses the family, so
   declaring all five here does not download all five: a reader fetches the one
   their book is set in, plus whichever they preview in the Aa menu.

   All five are SIL Open Font License; each family's OFL.txt sits beside it. */

@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/Spectral/Spectral-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/Spectral/Spectral-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/Spectral/Spectral-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('/assets/fonts/Spectral/Spectral-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora/Lora-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora/Lora-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora/Lora-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/assets/fonts/Lora/Lora-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

/* Merriweather ships optical sizes; 24pt is the TEXT cut (larger x-height,
   looser fit). The 120pt cut is for display and reads thin at body size. */
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/Merriweather/Merriweather_24pt-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/Merriweather/Merriweather_24pt-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/Merriweather/Merriweather_24pt-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/Merriweather/Merriweather_24pt-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('/assets/fonts/Alegreya_Sans/AlegreyaSans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/assets/fonts/Alegreya_Sans/AlegreyaSans-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/assets/fonts/Alegreya_Sans/AlegreyaSans-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('/assets/fonts/Alegreya_Sans/AlegreyaSans-BoldItalic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}

/* Lexend has no italic by design; the browser will synthesise a slant. */
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/Lexend/Lexend-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/Lexend/Lexend-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- UI faces ----
   Hanken Grotesk is the interface font and JetBrains Mono the label/badge font.
   They are not reading faces and never appear in the book typeface picker; they
   live here so no page has to reach out to Google for them. Weights match what
   the CDN link used to request (Hanken 400/500/600/700, Mono 400/500/600). */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/Hanken_Grotesk/HankenGrotesk-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/Hanken_Grotesk/HankenGrotesk-Italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/Hanken_Grotesk/HankenGrotesk-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/Hanken_Grotesk/HankenGrotesk-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/Hanken_Grotesk/HankenGrotesk-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrains_Mono/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrains_Mono/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrains_Mono/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
