/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/montserrat-latin-ext-400.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;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/montserrat-latin-400.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;
}

/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/montserrat-latin-ext-600.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;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/montserrat-latin-600.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;
}

/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/montserrat-latin-ext-700.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;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/montserrat-latin-700.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;
}

/*
 * A fallback that occupies exactly the space Montserrat will.
 *
 * Every face above is `font-display: swap`, so text paints in whatever the
 * system offers and is then replaced — and Montserrat is narrower than Arial,
 * so every line reflowed when it arrived. Measured on the instructor header:
 * 181px at 23ms, 172px at 36ms, while `document.fonts.status` was still
 * `loading`. On a page of text that reads as the whole layout twitching.
 *
 * The guarantee is `font-display: swap` on every face above: the browser
 * blocks briefly, then either has the font or renders the fallback and does
 * *not* swap for that page view. No swap, no reflow, on every platform —
 * including the ones where the faces below cannot help.
 *
 * They are a second, best-effort layer, and only that. `local()` resolves to
 * nothing on Android, and nothing in this project's own headless Chrome either
 * — verified, all three faces report `status: "error"` there. Where Arial does
 * exist they make the optional-fallback rendering sit at Montserrat's metrics
 * instead of merely near them.
 *
 * The percentages are measured, not copied. `ascent`/`descent` are Montserrat's
 * own, and `size-adjust` is the ratio of its advance width to Arial's for the
 * same string — which differs per weight, because Arial's bold is proportionally
 * wider than Montserrat's. One fallback face for all three would fix 400 and
 * leave every heading twitching. Re-measure with a canvas `measureText` if the
 * font is ever changed.
 *
 * `local()` only: this must never cost a request. Liberation Sans is listed
 * because it is Arial-metric-compatible and is what most Linux boxes actually
 * have.
 */
@font-face {
  font-family: 'Montserrat Fallback';
  font-style: normal;
  font-weight: 400;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 97.37%;
}

@font-face {
  font-family: 'Montserrat Fallback';
  font-style: normal;
  font-weight: 600;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 90.09%;
}

@font-face {
  font-family: 'Montserrat Fallback';
  font-style: normal;
  font-weight: 700;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 91.61%;
}
