/* The console's typeface: Sora, everywhere (Phase 1, Oct 2026).

   Self-hosted rather than pulled from Google Fonts: the console runs under a
   Content-Security-Policy, and a font that has to be fetched from a third
   party is one more origin to allow and one more thing that can be slow. Two
   variable files (Latin and Latin Extended) cover every weight.

   Linked from the shared <head> of every page -- the console pages and the
   dialogs that open over them in an iframe -- so a page that never mentions a
   font still gets this one. `--font-sans` is the one name to use when a rule
   genuinely has to spell a family out (`font-family: inherit` is better). */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-display: swap;
  /* Declared 300-700, not the file's full 100-800. A rule that still asks
     for 800 or 900 (the old "heavy dashboard" weights) is served 700, the
     heaviest this system uses, instead of an extra-bold. */
  font-weight: 300 700;
  src: url("../fonts/sora/sora-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/sora/sora-latin-wght-normal.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: "Sora";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/sora/sora-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/sora/sora-latin-ext-wght-normal.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 {
  --font-sans: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* Bootstrap reads these, and stylesheet.css's `*` reset reads
     --bs-body-font-family -- so this one line reaches every element. */
  --bs-font-sans-serif: var(--font-sans);
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-weight: 400;

  /* The three weights the system is built on. */
  --fw-regular: 400;   /* body text            */
  --fw-medium: 500;    /* UI: buttons, menus   */
  --fw-semibold: 600;  /* headings, emphasis   */
}

html, body { font-family: var(--font-sans); }
body {
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Form controls do not inherit the page's font by default. */
button, input, select, textarea, optgroup { font-family: inherit; }

/* Headings and emphasis at semibold. Sora is a wide, geometric face and reads
   heavier than the old one at the same number, so 700/800 headings looked
   shouted. Bootstrap's two bold utilities follow, so `fw-bold` / `fw-bolder`
   markup across the pages lands on the same weight without being touched. */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: inherit;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}
b, strong { font-weight: var(--fw-semibold); }
.fw-bold, .fw-bolder { font-weight: var(--fw-semibold) !important; }
.fw-semibold { font-weight: var(--fw-semibold) !important; }
.fw-medium { font-weight: var(--fw-medium) !important; }

/* Figures in columns and balances line up digit for digit. */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* No zoom when a field is tapped (9 Oct 2026). On an iPhone, Safari zooms the
   whole page in when a field under 16px takes the focus, and the console's are
   13-14px: tapping the search box left the page enlarged, to be pinched back.
   Touch phones only; the single-digit code boxes are larger already. */
@media (max-width: 767.98px) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([maxlength="1"]),
  select, textarea { font-size: 16px !important; }
}
