/* base.css — the type foundation. Loads immediately after tokens.css and
 * before every legacy rule, so anything here is a floor that later rules
 * may raise but never has to fight.
 *
 * Inter is SELF-HOSTED. It was named in font-family from the beginning but no
 * @font-face and no <link> ever existed, so the shell had been quietly running
 * on Segoe UI for its whole life. Two subsets of the variable file cover the
 * whole UI; Google ships one woff2 per subset spanning the full weight axis,
 * so 400/500/600 cost two files between them, not six.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;          /* variable axis — do not request others */
  font-display: swap;
  src: url("/fonts/inter-latin.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: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.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 {
  /* One family. A second face is not coming: the wordmark gets its weight and
     tracking from --t-wordmark below, which is why it does not need one. */
  --font-ui:   Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type scale. These are `font` shorthands — use them as `font: var(--t-body)`,
     not as a size. --t-micro additionally needs the tracking and casing that a
     font shorthand cannot carry; the .t-micro class below is the whole token. */
  --t-display: 500 26px/1.2   var(--font-ui);
  --t-title:   500 17px/1.35  var(--font-ui);
  --t-body:    400 15px/1.62  var(--font-ui);
  --t-meta:    400 12.5px/1.45 var(--font-ui);
  --t-micro:   500 11px/1.3   var(--font-ui);
  --t-wordmark: 400 14px/1    var(--font-ui);

  --track-micro:    0.14em;
  --track-wordmark: 0.26em;
  --measure: 62ch;
}

/* cv05 gives a straight-legged lowercase l (no tail), ss03 a squarer curly
   quote set. Both are what makes Inter read as Inter Display rather than as
   generic grotesk at this size. */
html {
  font-family: var(--font-ui);
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Anything a person compares down a column must not shift its digits: timers,
   costs, counts, timestamps, meters, table figures. This is deliberately a
   broad net rather than a per-component opt-in, because the failure mode of
   missing one is a number that visibly jitters once a second. */
.tabular,
input, select, textarea,
time, code, kbd, samp, pre,
[data-numeric],
.msg-time, .msg-meta,
#callTimer, .pt-count,
.cost-row, .cost-total,
.md-table td, .md-table th,
.rail-metric-value, .rail-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "cv05" 1, "ss03" 1, "tnum" 1;
}

/* The whole of the --t-micro token: eyebrow labels, rail section headings,
   the "APPROVAL REQUIRED" line on a gate card. */
.t-micro {
  font: var(--t-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
}

/* Tracked-out uppercase is the entire wordmark treatment. It reads as luxury
   and costs nothing — no second family, no logo asset, no image request. */
.t-wordmark {
  font: var(--t-wordmark);
  letter-spacing: var(--track-wordmark);
  text-transform: uppercase;
}

/* Motion is purposeful or it is off. Nothing in this shell depends on a
   transitionend event firing, so collapsing durations is safe here. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
