/* Brand typography, self-hosted.
 *
 * SELF-HOSTED, NOT LINKED FROM GOOGLE. The company network blocks external
 * CDNs -- the same reason Chart.js and the decorative florals live in
 * /static. A stylesheet that asks for a font nobody can fetch is how this
 * dashboard spent months silently falling back to whatever each machine
 * happened to have, so it looked different on every screen.
 *
 * WOODFORD BOURNE PRO IS THE BRAND FACE AND CANNOT BE USED HERE. Its license
 * (Paulo Goode desktop EULA, section 4c) explicitly forbids @font-face
 * linking; web embedding is a separate paid license. Jost is the closest
 * open-licensed match -- a Futura-lineage geometric sans with the same
 * circular bowls and single-storey 'a' -- and stands in for it on screen.
 * The real face is still correct for print and decks, which the same license
 * does permit.
 *
 * TWO FACES, DELIBERATELY. Geometric sans faces have small x-heights: superb
 * at heading size, tiring in a dense table of small figures, which is most of
 * what this dashboard shows. So Jost carries the brand character in titles
 * and headline numbers, and Inter -- drawn for exactly this -- carries the
 * tables and labels where being unnoticed is the job.
 *
 * Both are SIL Open Font License 1.1. Variable fonts: one file each covers
 * every weight, 26KB and 47KB.
 */

@font-face {
  font-family: "Jost";
  src: url("/static/fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;      /* variable: one file, every weight */
  font-style: normal;
  font-display: swap;        /* show the fallback immediately, swap when ready */
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The fallbacks matter: with font-display:swap these are what renders for
     the first moment, and on any machine where the woff2 fails. */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-display: "Jost", "Inter", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Brand character where it reads as design; Inter everywhere it reads as
   data. Headline numbers get Jost AND tabular figures, so a column of them
   stays in line as the digits change. */
h1, h2, h3,
.sc-card-name,
.tile-big, .lt-big, .sc-snap-v, .mx-big, .rv-big {
  font-family: var(--font-display);
}

.tile-big, .lt-big, .sc-snap-v, .mx-big, .rv-big {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;   /* geometric caps run wide; pull them back a touch */
}

/* Jost sits optically smaller than Inter at the same size, so uppercase
   micro-labels need a little more tracking to stay legible rather than
   looking merely small. */
h1 { letter-spacing: 0.04em; }
