/* ---------------------------------------------------------------------------
   aVersion_Lines docs — brand typography

   Aldrich for headings and the site title, matching the blog.
   IBM Plex Sans for body text.

   Both self-hosted (no request to Google) so the site works offline and makes
   no third-party requests. `font: false` in mkdocs.yml stops Material loading
   its own Roboto.

   Aldrich by Matthew Desmond (MADType), SIL Open Font License 1.1.
   Display face, single 400 weight — headings only, never body text.

   IBM Plex Sans by Mike Abbink / Bold Monday for IBM, SIL Open Font License 1.1.
   Lighter on the page than Roboto at the same weight, which is why it is here.
   --------------------------------------------------------------------------- */

/* IBM Plex Sans — body text. 400 and its italic, 500 for emphasis inside
   Material's UI chrome, 700 for bold. Latin subset only. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
}

/* Material reads its body and code faces from these two variables. Setting them
   here replaces Roboto everywhere without touching each rule. Code falls back to
   the platform monospace stack, since no mono face is shipped. */
:root {
  --md-text-font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  --md-code-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
}

@font-face {
  font-family: "Aldrich";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/aldrich-v22-latin-400.woff2") format("woff2");
  /* Matches the latin subset shipped by Google Fonts. */
  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;
}

:root {
  --avr-display-font: "Aldrich", var(--md-text-font-family, Roboto), sans-serif;
}

/* Site title in the header and the nav sidebar title. */
.md-header__topic > .md-ellipsis,
.md-nav__title {
  font-family: var(--avr-display-font);
}

/* Headings only down to h3. h4+ sit close to body size, where a square display
   face costs more legibility than it buys brand. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: var(--avr-display-font);
}

/* Aldrich is wide and has no bold weight, so Material's heavier heading weights
   would render identically and lose the hierarchy. Re-establish it with size and
   letter-spacing instead. */
.md-typeset h1 {
  font-weight: 400;
  letter-spacing: 0.01em;
}

.md-typeset h2 {
  font-weight: 400;
  letter-spacing: 0.005em;
}

.md-typeset h3 {
  font-weight: 400;
}
