/* Self-hosted web fonts.
 *
 * These were loaded from fonts.googleapis.com and fonts.gstatic.com, which put
 * two render-blocking cross-origin stylesheets and a DNS lookup in front of
 * every first paint, leaked every visitor's IP and page load to a third party,
 * broke the application anywhere those hosts are unreachable, and forced the
 * Content Security Policy to allow style and font sources it otherwise would
 * not.
 *
 * Only the Latin subsets are vendored — the Cyrillic, Greek and Vietnamese
 * subsets Google also serves are never rendered here.
 *
 * `font-display: swap` keeps text readable while the file loads, which matters
 * most on the constrained connections this application is used on.
 *
 * ── Bill Book theme ────────────────────────────────────────────────────────
 * Space Grotesk (display), IBM Plex Sans (body), IBM Plex Mono (figures),
 * replacing Playfair Display / Inter / JetBrains Mono.
 *
 * Space Grotesk and IBM Plex Sans are variable fonts: Google serves one
 * physical file covering the whole weight range, and requesting several
 * weights returns that same file each time. They are vendored once and
 * declared with a weight range, which is why there are five files here rather
 * than nine. IBM Plex Mono is still genuinely static, one file per weight.
 *
 * Latin-subset total: 92,800 bytes across 5 files, against 411,104 bytes
 * across 10 files for the three families this replaces — a 318,304-byte
 * reduction. Captured 2026-08-15. Reproduce with:
 *
 *   curl -s -H "User-Agent: <a current desktop browser UA>" \
 *     "https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap"
 *
 * and take the @font-face block whose unicode-range contains U+0000-00FF.
 * A modern browser User-Agent is required or Google serves ttf instead.
 */

/* ─── Space Grotesk — display face (headings, buttons, table heads) ───────── */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/space-grotesk-variable-normal-dfda626c.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;
}

/* ─── IBM Plex Sans — body face ──────────────────────────────────────────── */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-variable-normal-578a0041.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;
}

/* ─── IBM Plex Mono — figures, invoice numbers, ledger columns ───────────── */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-400-normal-d13bb5b4.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-500-normal-deab9c2b.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-700-normal-1ec1315e.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: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/material-symbols-outlined-bdb41d53.woff2") format('woff2');
}

/* The ligature class Google's stylesheet also defined.
 *
 * Vendoring only the @font-face rules was not enough: this class is what points
 * an icon span at the symbol font and turns on the ligature substitution that
 * maps "upload_file" to a glyph. Without it every icon in the application
 * rendered as its own literal name in the body font.
 */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  /* 18px, in rem so it scales with the user's own text size. The vendored
     Google stylesheet shipped 24px, which oversized every icon against the
     Bill Book theme's 14px body text. */
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

