/*
 * Site typography (loaded last, after dark_mode.css).
 *
 *  - Inter: all text (replaces Open Sans, which stays as fallback)
 *  - Bricolage Grotesque: display font for titles (page titles, block titles,
 *    dialogs) and the big figures of the KPI dashboard
 *
 * Both are SIL OFL fonts, loaded from Google Fonts (see html_css() in
 * core/html_api.php). If they cannot be loaded, the stacks below fall back to
 * Open Sans (self-hosted), so nothing breaks.
 *
 * Font Awesome icons are untouched: their own class sets the icon font.
 */
:root {
	--cy-font-body: "Inter", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--cy-font-display: "Bricolage Grotesque", "Inter", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Ace sets its stack on body and on h1..h6; form controls inherit it. */
html body,
html h1, html h2, html h3, html h4, html h5, html h6,
html .tooltip, html .popover {
	font-family: var(--cy-font-body);
}

/* Whole site: display font for every title (page titles, h1..h6, the title bar
   of each block/widget, dialogs). Declared after the body rule above so it wins
   on h1..h6. Loaded weights are 700/800, so titles are set to bold. */
html h1, html h2, html h3, html h4, html h5, html h6,
html .page-header h1,
html .widget-title,
html .widget-header .widget-title,
html .modal-title,
html .popover-title {
	font-family: var(--cy-font-display);
	font-weight: 700;
	letter-spacing: -.01em;
}

/* KPI dashboard: display font for titles and figures. */
.kpi-section-title,
.kpi-tile .kpi-tile-value,
.kpi-card .kpi-card-value,
.kpi-hl-label,
.kpi-hl-value,
.kpi-hl-compare b,
.kpi-score {
	font-family: var(--cy-font-display);
}

/* Inter: tabular (fixed-width) figures so ids, dates and counters line up in
   columns; "cv11" = single-storey a, easier on small text. */
html body {
	font-feature-settings: "tnum" 1, "cv11" 1;
}

/* Emphasised summaries in the issue list and issue view (priority high / urgent
   / immediate, and "significant" priority): they were forced to Helvetica; use
   the display font instead, keeping the existing weights/italics/sizes. */
html .bug-summary-high,
html .bug-summary-urgent,
html .bug-summary-immediate,
html .column-summary-significant,
html #buglist .column-summary-significant {
	font-family: var(--cy-font-display);
}
