/* ============================================================
   type.css — typography and the tokens that depend on it
   ------------------------------------------------------------
   Self-hosted rather than loaded from Google. School networks
   are exactly where fonts.gstatic.com gets blocked or throttled,
   and a blocked font request falls back to the stack this file
   exists to replace. Six files, 116KB, no third-party request.

   Loaded BEFORE each page's inline <style>. That works because
   the pages no longer declare --sans, --serif or --ink-light
   themselves, so there is nothing to override.
   ============================================================ */

/* Literata: commissioned for e-readers, so it was drawn to hold
   up at low resolution with degraded edges. Same problem as a
   photocopy of a photocopy. */
@font-face{
  font-family:"Literata";
  src:url("/fonts/literata-latin-400-normal.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Literata";
  src:url("/fonts/literata-latin-600-normal.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Literata";
  src:url("/fonts/literata-latin-700-normal.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:swap;
}

/* Archivo: a grotesque with institutional bones. It looks like it
   belongs on a form, which is what most of the sheets are. */
@font-face{
  font-family:"Archivo";
  src:url("/fonts/archivo-latin-400-normal.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Archivo";
  src:url("/fonts/archivo-latin-600-normal.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Archivo";
  src:url("/fonts/archivo-latin-700-normal.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:swap;
}

:root{
  --sans: Archivo, "Segoe UI", system-ui, sans-serif;
  --serif: Literata, Georgia, serif;

  /* Darkened from #8E8E88, which measured 2.56:1 against the page
     background. That fails AA at every size, including the 3:1
     large-text threshold, so there was no size at which the old
     value was safe. #6E6E68 was the first replacement I tried and
     it only reached 3.99:1. This value measures 4.56:1 on --page
     and 5.86:1 on --paper, so it clears AA at any size. */
  --ink-light: #656560;
}
