/* ============================================================================
 * App fonts, self-hosted, and the Text choice (architecture design-systems/02)
 * ----------------------------------------------------------------------------
 * Every font an App look or the Text choice names is served from
 * app/assets/fonts/, never a font CDN. A browser downloads a face only when a
 * rendered element uses it, so Atkinson costs nothing unless it is chosen.
 * Geist, Geist Mono and Atkinson Hyperlegible Next are SIL Open Font License 1.1.
 *
 * `data-interface-font` on <html> (InterfaceDesignSystem::Font) swaps the UI and
 * display fonts under every App look. The selector (0,3,1) outranks every
 * adapter block, including the OS-dark and phone blocks (0,3,0). Page bodies
 * keep their own fonts: a viewer with a Text choice always gets the Page's
 * content scope, which re-declares them. The mono font never changes.
 * ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/assets/mineral/geist-latin-wght-normal-90ac0fe7.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/mineral/geist-mono-latin-wght-normal-a600ad3f.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/mineral/atkinson-hyperlegible-next-latin-wght-normal-264aa1e2.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --kk-font-choice-system: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kk-font-choice-readable: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

html:root[data-interface-font="system"][data-interface-font] {
  --kk-font-ui: var(--kk-font-choice-system);
  --kk-font-display: var(--kk-font-choice-system);
}

html:root[data-interface-font="readable"][data-interface-font] {
  --kk-font-ui: var(--kk-font-choice-readable);
  --kk-font-display: var(--kk-font-choice-readable);
}
