/*
 * IBM Plex (SIL Open Font License 1.1, see /fonts/OFL.txt).
 * Latin-1 subsets from the official @ibm/plex-sans-condensed 2.0.0,
 * @ibm/plex-sans 1.1.0 and @ibm/plex-mono 2.5.0 packages.
 * The condensed display weight and the body regular are preloaded (head.html).
 * Every face is font-display: optional: a face that misses the first paint
 * window is skipped for that view (fallback below) instead of reflowing it.
 */

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: optional; /* preloaded; never swap the display face after paint (CLS) */
  src: url('/fonts/IBMPlexSansCondensed-SemiBold-Latin1.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: optional; /* never swap after paint: no font CLS on any OS */
  src: url('/fonts/IBMPlexSans-Regular-Latin1.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: optional; /* never swap after paint: no font CLS on any OS */
  src: url('/fonts/IBMPlexSans-SemiBold-Latin1.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional; /* never swap after paint: no font CLS on any OS */
  src: url('/fonts/IBMPlexMono-Regular-Latin1.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional; /* never swap after paint: no font CLS on any OS */
  src: url('/fonts/IBMPlexMono-Medium-Latin1.woff2') format('woff2');
}

/*
 * Metric-matched local fallbacks so the swap does not reflow the page.
 * size-adjust = Plex average advance / fallback average advance (English
 * letter frequency); ascent/descent = Plex hhea metrics / size-adjust.
 */
@font-face {
  font-family: 'IBM Plex Sans Condensed Fallback';
  font-weight: 600;
  src: local('Arial Narrow Bold'), local('ArialNarrow-Bold');
  size-adjust: 106.8%;
  ascent-override: 96%;
  descent-override: 25.7%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'IBM Plex Sans Condensed Fallback Wide';
  font-weight: 600;
  src: local('Arial Bold'), local('Arial-BoldMT');
  size-adjust: 87.6%;
  ascent-override: 117%;
  descent-override: 31.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'IBM Plex Sans Fallback';
  font-weight: 400;
  src: local('Arial'), local('ArialMT');
  size-adjust: 101.2%;
  ascent-override: 101.3%;
  descent-override: 27.2%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'IBM Plex Sans Fallback';
  font-weight: 600;
  src: local('Arial Bold'), local('Arial-BoldMT');
  size-adjust: 96.9%;
  ascent-override: 105.8%;
  descent-override: 28.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'IBM Plex Mono Fallback';
  src: local('Courier New'), local('CourierNewPSMT');
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
}
