/* Inter, self-hosted.
 *
 * Served from this origin rather than fonts.gstatic.com. A stylesheet loaded
 * from Google sends every visitor's IP and referring page to Google before a
 * single pixel is painted, which is a third-party transfer a shop has to
 * disclose and cannot switch off. Self-hosting removes the question.
 *
 * The old argument for a public font CDN — the visitor already has this file
 * cached from another site — died in 2020, when browsers began partitioning
 * the HTTP cache by origin. A cross-origin font is now a fresh download plus a
 * DNS lookup and a TLS handshake to a second host.
 *
 * One variable file per subset rather than four static weights. This
 * application uses 400, 500, 600 and 700; a variable font covers 100 to 900
 * continuously in a single request.
 *
 * font-display: swap — text paints immediately in the fallback and swaps when
 * Inter arrives. Without it a browser will hide text for up to three seconds
 * waiting on a font, which is worse than the wrong typeface for a moment.
 *
 * unicode-range means latin-ext (83KB) is fetched only by pages that actually
 * contain those characters. Most pages download the 47KB latin file alone.
 * Anything outside both — a Japanese shipping address — falls back to the
 * system stack, which is why that stack has to be a real one.
 *
 * SIL Open Font License 1.1.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-496a588b.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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-ext-5a6754fc.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Bootstrap reads this, so every component picks it up without an override. */
  --bs-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                        Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Fredoka, self-hosted, on the same terms as Inter above.
 *
 * Display only: headings under eight words, and the card titles. Body copy
 * stays on Inter — the design system's rule, and a rounded display face is
 * tiring to read at paragraph length.
 *
 * One variable file covering 300–700 rather than separate weights, for the
 * same reason Inter is variable. latin-ext is 4.5KB and fetched only by a page
 * that contains those characters; most pages take the 29KB latin file alone.
 *
 * SIL Open Font License 1.1.
 */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fredoka-latin-c7301cae.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: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fredoka-latin-ext-04ba9568.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Luckiest Guy and Permanent Marker, self-hosted, on the same terms as Inter
 * and Fredoka above — and for a reason this project enforces rather than
 * merely prefers: lib/verify/checks/assets.rb asserts that no storefront page
 * fetches anything from a third party, so the <link> to fonts.googleapis.com
 * that the design was prototyped with fails the run.
 *
 * Both are display faces at a single weight, used for headings and the marker
 * labels and never below about 18px.
 *
 * SPLIT BY unicode-range, exactly as Inter and Fredoka are, and NOT because
 * the bytes matter at this size — because getting it wrong is silent. Google
 * ships a family as one @font-face per subset and returns latin-ext FIRST.
 * A fetch that takes "the" URL takes the accents-only file, which loads
 * cleanly, reports as loaded, satisfies document.fonts.check(), and then
 * renders nothing: it has no A-Z in it, so every ordinary word falls through
 * to the next family in the stack. Declaring the ranges is what makes the
 * browser ask for the right file. tools/fetch_display_fonts.rb fetches both.
 *
 * Permanent Marker ships a single latin subset, so it has one face here.
 *
 * font-display: swap, so a heading paints in Fredoka immediately and upgrades
 * when the file arrives, rather than being invisible for up to three seconds.
 * That fallback is also the safety net: if these files are missing entirely
 * the pages still read, because --co-font-display and --co-font-marker both
 * name Fredoka next.
 *
 * Both SIL Open Font License 1.1.
 */
@font-face {
  font-family: "Luckiest Guy";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/luckiest-guy-latin-6c913991.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: "Luckiest Guy";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/luckiest-guy-latin-ext-d70e1827.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Permanent Marker";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/permanent-marker-latin-5c9f8b5c.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;
}
