/*
 * Elgrace design tokens for the Team app (WP-13b-L3: B-253 the type scale, B-254 the components). Linked FIRST in index.html, before
 * every other stylesheet, so styles.css and the rest only ever read these names (var(--fs-meta)), never a number.
 * This is the team app's stand-in for the shared kit's shell/tokens.css (WP-13a): the names and values below are what that sheet
 * will carry; when the kit's copy is synced into public/shell/, this file is deleted and the link moves to it.
 *
 * The type scale is the same in all six apps: caption 12, meta 13, body 15, title 17, h2 22, h1 28; inputs are 16 on a phone
 * (iOS zooms into anything smaller). Nothing on a screen is under 12 px. Weights are 400, 550 and 650 only.
 * Do not add a max(12px, 1em) media rule on top: that is one more override layer (position S-53).
 *
 * The font is the same in all six apps (B-257): --font names Apple's system fonts first, then the bundled Inter, then Segoe UI and Roboto,
 * and the colour emoji last, with no serif. Apple's fonts and emoji are licensed for Apple devices only, so the stack names them and
 * never serves them: an iPhone or a Mac keeps SF and Apple Color Emoji and downloads nothing, and the @font-face below (font-display:
 * swap, a latin range) makes Inter the face on Android, Windows and Linux, where those names are missing. No preload, so nothing is
 * fetched where Apple's names exist; the service worker keeps the file the first time the page asks for it (sw.js, LAZY).
 *
 * The shapes are the same in all six apps: radius 10, 16 and 24, a pill and a circle, and nothing else; one status badge
 * (22 px, a pill, a tinted fill, no outline); one pill button (primary, secondary, ghost); one selected-chip pair (styles.css,
 * with the colours, because it follows the theme); one progress bar. The colours these components use are in styles.css.
 */
:root {
  /* the font: Apple's names first, Inter (below) as the fallback where they are missing, then Segoe UI and Roboto, the emoji kept last */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

  /* type scale */
  --fs-caption: 12px;  /* badges, timestamps, chips, fine print: the floor */
  --fs-meta: 13px;     /* second lines, dates, descriptions, labels */
  --fs-body: 15px;     /* running text, rows, buttons */
  --fs-input: 16px;    /* fields on a phone, and the body text of a phone chat */
  --fs-title: 17px;    /* row titles, card titles, the chat name */
  --fs-h2: 22px;       /* section and sheet headings, big figures */
  --fs-h1: 28px;       /* page titles: the same size in every app */
  /* weights */
  --fw-regular: 400;
  --fw-medium: 550;
  --fw-strong: 650;

  /* radius: every rounded corner is one of these (or 50% for a circle) */
  --r-sm: 10px;        /* thumbnails, small boxes, the tail corner of a bubble */
  --r-md: 16px;        /* rows, fields, bubbles, inner cards */
  --r-lg: 24px;        /* cards, sheets, menus, the toast, the composer */
  --r-pill: 999px;     /* buttons, chips, badges, counts, switches, bars */

  /* components */
  --btn-h: 44px;       /* the pill button: primary, secondary, ghost, danger */
  --btn-h-sm: 40px;
  --badge-h: 22px;     /* the one status badge: a pill with a tinted fill and no outline */
  --badge-px: 9px;
  --count-h: 20px;     /* a number on a tab, a thread or the island: a pill, never under 20 px wide */
  --progress-h: 6px;   /* the one progress bar (the voice level is one) */
}

/* Inter, the variable latin file (fonts/LICENSE.txt: SIL Open Font License 1.1). Fetched only when a glyph in its range is drawn with
   the stack reaching Inter, so never where -apple-system / SF Pro Text exist. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-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;
}
