/* ---------------------------------------------------------------------------
 * Roboto, self-hosted.
 *
 * NUS asked for the font stack to match their web standards. www.nus.edu.sg
 * serves it from Google Fonts (Cwp/NUS/Html/corporate/css/bs-upgrade.css):
 *
 *     @import url('https://fonts.googleapis.com/css2?family=Roboto:...&display=swap');
 *     body { font-family: "Roboto", Arial, sans-serif; ... }
 *
 * The rendered result here is identical; only the origin differs. Self-hosted
 * because Google Fonts would mean widening a Content-Security-Policy that was
 * tightened specifically to close the NUS-OUC findings - style-src would need
 * fonts.googleapis.com and font-src fonts.gstatic.com - and adding two
 * third-party hosts days before a security assessment is poor timing for no
 * visible gain. font-src is 'self' data:, which already covers these files.
 *
 * Roboto is licensed Apache-2.0, so self-hosting is permitted. The upstream
 * licence is at public/assets/fonts/Roboto-LICENSE.txt.
 *
 * Roboto v51 is a VARIABLE font: one file per subset carries every weight from
 * 100 to 900, which is why there are two files and not eight. Google's own CSS
 * declares 400 and 700 pointing at the same file; declaring the axis range
 * once is the same thing, expressed properly.
 *
 * font-display: swap matches the &display=swap in the NUS URL. Without it the
 * text is invisible while the font loads rather than shown in Arial first.
 *
 * This file loads LAST, after jquery-ui.min.css - see the note by the rules at
 * the bottom.
 * ------------------------------------------------------------------------ */

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

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/roboto-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;
}

/* The stack NUS specified, character for character. Bootstrap 3.4.1 already
 * gives this page the same font-size (14px), line-height (1.42857143), color
 * (#333) and background (#fff) that bs-upgrade.css sets, so the family is the
 * only thing that actually differs between the two sites. */
body {
    font-family: "Roboto", Arial, sans-serif;
}

/* jquery-ui.min.css sets its own family on every widget and on the controls
 * inside them:
 *
 *     .ui-widget { font-family: Arial, Helvetica, sans-serif }
 *     .ui-widget input, .ui-widget select, .ui-widget textarea,
 *     .ui-widget button { font-family: Arial, Helvetica, sans-serif }
 *
 * Those match the elements directly, so they beat anything inherited from
 * body no matter how specific it is. Without these two rules the "Email This
 * Location" dialog and the search autocomplete would stay Arial while the
 * rest of the page changed - which is exactly the kind of half-done change
 * that gets reported back as a bug. */
.ui-widget,
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
    font-family: "Roboto", Arial, sans-serif;
}

/* fancybox pins its caption with an ID selector, #fancybox-title { font-family:
 * Helvetica }, which outranks anything above no matter what order the files
 * load in - so it has to be named explicitly. It shows on the Data Protection
 * Policy popup (feedback.php). */
#fancybox-title,
#fancybox-title div {
    font-family: "Roboto", Arial, sans-serif;
}

/* Search-result pagination was pinned to Tahoma in nus.css long before any of
 * this - inconsistent with the rest of the page even today. */
.page_navigation a,
.page_navigation span {
    font-family: "Roboto", Arial, sans-serif;
}

/* Deliberately NOT touched: FontAwesome, nus-icon and Glyphicons. Those set
 * font-family on the element itself, so they are unaffected by the rules
 * above - and overriding them would turn every icon into a blank box. */
