/**
 * Typography, shared by the panel, the support desk and the storefront.
 *
 * Both families are served from this server - nothing is fetched from a CDN, so
 * the pages render correctly on a connection that cannot reach Google Fonts.
 *
 * Estedad is the default: a geometric Persian sans in the same spirit as Yekan,
 * and unlike Yekan it is SIL OFL 1.1 licensed, so it can legally ship with the
 * panel. Shabnam is bundled as a second, softer option.
 *
 * To switch the whole UI to another family, change --font-ui below. To use a
 * font you have licensed yourself (IRANYekan, IRANSans, …), drop its .woff2
 * into public-shared/fonts/, add an @font-face block here, and point --font-ui
 * at it - no other file needs to change.
 */

/* --- Estedad: one variable file covers weight 100 through 900 ---
   Declared as plain woff2 with a weight *range*: that is what every current
   browser understands for a variable font. The older 'woff2-variations'
   keyword is rejected outright by some of them. */
@font-face {
  font-family: 'Estedad';
  src: url('/fonts/estedad-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Shabnam: static weights --- */
@font-face {
  font-family: 'Shabnam';
  src: url('/fonts/shabnam.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Shabnam';
  src: url('/fonts/shabnam-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Shabnam';
  src: url('/fonts/shabnam-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Swap 'Estedad' for 'Shabnam' here to change every page at once. */
  --font-ui: 'Estedad', 'Shabnam', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;

  /* Codes, passwords and connection links are always ASCII, so a Latin
     monospace is the right choice - it makes 0/O and 1/l/I distinguishable. */
  --font-mono: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, 'Courier New', monospace;
}

/* Persian text sits low in its em box; a touch more line height keeps the
   descenders of گ ژ ی from colliding with the row below in dense tables. */
body {
  font-family: var(--font-ui);
}

/* Figures line up in columns instead of jittering row to row. Applied to the
   places that actually hold numbers, so it cannot disturb running text. */
table,
.stat .value,
.ratio,
.okfail,
code {
  font-variant-numeric: tabular-nums;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}
