/* WEICUG's own default typography (see docs/overview.de.md): headings
   and GUI controls (buttons, menus, form controls other than text
   entry) use the sans-serif family, body text the serif family, and
   text-entry fields the monospace family. Framework-provided, like
   view.css, and served from the same /weicug/ prefix as every other
   bundled resource - but, unlike all of those, deliberately not behind
   device-token authentication (see content.go's own comment on this
   route): register.html, confirm.html, and the landing page all need
   consistent typography too, before any of them has a token.

   Never a requirement: an application swaps its own choice of font in
   its own stylesheet (loaded after this one) simply by redefining
   --font-sans/--font-serif/--font-mono - no selector here needs
   touching for that (see docs/overview.de.md's "WEICUG makes no GUI
   decisions for an application").

   The bundled family is Adobe's open-source Source Sans 3/Source
   Serif 4/Source Code Pro (see fetch-adobe-fonts in the Makefile and
   licenses/OFL-1.1.txt) - one variable-weight (wght 200-900, verified
   with fontTools directly against the binary) file per style/italic
   pair, not the dozens of static per-weight files each family also
   ships (see /weicug/adobe/<file> below), which is what keeps six font
   files enough to cover every weight an application might ask for. */

@font-face {
  font-family: "Source Sans 3";
  src: url("/weicug/adobe/source-sans-upright.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/weicug/adobe/source-sans-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/weicug/adobe/source-serif-upright.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/weicug/adobe/source-serif-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("/weicug/adobe/source-code-upright.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("/weicug/adobe/source-code-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "Source Code Pro", ui-monospace, monospace;
}

body {
  font-family: var(--font-serif);
}

/* uj-action-menu/uj-menu-item explicitly listed, not left to
   inheritance alone: font-family does cross their shadow-DOM boundary
   (see :host's own "font: inherit" in uj/action-menu.css), but only
   from wherever the custom element happens to sit in the document - a
   menu placed inside a serif-styled body-text region would otherwise
   inherit serif instead of the GUI sans below it. */
h1, h2, h3, h4, h5, h6,
button, select, menu, nav,
uj-action-menu, uj-menu-item,
[role="menu"], [role="menuitem"] {
  font-family: var(--font-sans);
}

input, textarea {
  font-family: var(--font-mono);
}
