/*
 * Inter - the site's global UI typeface.
 *
 * Self-hosted (fonts/inter/*.woff2) rather than pulled from Google Fonts:
 * this site already self-hosts its faces, and a local file removes an
 * external DNS + TLS round trip from every page load, keeps working if
 * fonts.gstatic.com is unreachable, and sends no visitor data to a third
 * party.
 *
 * One variable font covers weights 100-900, so bold/semibold text needs no
 * extra download. Two subsets are shipped: latin for everyday copy and
 * latin-ext for accented characters (Italian, European names). Non-Latin
 * scripts - Punjabi, Hindi - are deliberately NOT overridden here; the
 * unicode-range keeps Inter out of their way so they fall through to the
 * system faces that can actually render them.
 *
 * font-display: swap - text paints immediately in the fallback face and
 * re-renders when Inter arrives, so a slow font never blocks a child from
 * reading the question.
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-latin-ext.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;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-latin.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+2074, U+20AC,
                   U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Global default. Kept at html/body so it inherits everywhere without
 * !important; the few places that set their own stack are updated to lead
 * with Inter rather than being fought with specificity.
 *
 * Icon fonts (Font Awesome, Glyphicons) set font-family on their own
 * pseudo-elements, so they are unaffected by an inherited body rule.
 */
html,
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/*
 * Bootstrap 3 hardcodes "Helvetica Neue", Helvetica, Arial on body and again
 * on form controls, which would otherwise beat the inherited value on inputs,
 * buttons and selects and leave the UI in two different typefaces.
 */
input,
button,
select,
textarea,
optgroup,
.form-control,
.btn {
    font-family: inherit;
}
