/*
 * Geely — per-tenant CSS override for the decision interface.
 *
 * Loaded AFTER the app's own stylesheet, via theme.override_css_url in this
 * tenant's brand.yaml (tenant-resolve -> TenantTheme.overrideCssUrl -> a <link>
 * in root.tsx). The font faces themselves are declared in fonts.css next door.
 *
 * This sheet exists because two things the tenant theme cannot reach were still
 * rendering in pyfoi's typography on Geely's own demo:
 *
 *   1. Buttons hard-code `Poppins, sans-serif` rather than reading
 *      --pyfoi-font-sans, so the most-clicked elements on the page were still
 *      wearing pyfoi's font while everything around them was Geely's.
 *   2. Nothing consumes the brand's DISPLAY face. tenant-resolve maps exactly one
 *      typography token, --pyfoi-font-sans, from font_stack.primary — there is no
 *      heading-font token — so `geelyBold` was loaded and then never used.
 *
 * Scoped to headings and controls only. Body copy is deliberately left alone: it
 * already resolves to Inter through --pyfoi-font-sans, which is what geely.nz
 * itself sets on <html>.
 */

/* ---------------------------------------------------------------------------
 * On !important
 *
 * Every declaration below carries it, and none of them is decoration. Measured
 * against the running app, each rule here loses without it:
 *
 *   .signin-info      { font-family: Poppins, sans-serif }   a CLASS (0,1,0)
 *   .list-header-title{ font-family: var(--pyfoi-font-sans) } beats any element
 *                                                             selector this sheet
 *                                                             can write
 *   body              { font-family: var(--mantine-font-family) }  same
 *   body              { font-family: var(--brand-font) }           specificity,
 *                                                                  but injected as
 *                                                                  <style> AFTER
 *                                                                  this <link>, so
 *                                                                  order decides
 *
 * Raising specificity instead would mean guessing at the app's class names from
 * a tenant config that must not know them. This sheet is loaded last and exists
 * solely to win, so it says so.
 * ------------------------------------------------------------------------ */

/* ---------------------------------------------------------------------------
 * 1. Close the Poppins leak.
 *
 * `inherit` rather than naming Inter: it keeps these elements following
 * --pyfoi-font-sans, so if the tenant's body face is ever changed in brand.yaml
 * this sheet does not have to change with it.
 * ------------------------------------------------------------------------ */

button,
input,
select,
textarea,
.signin-info {
    font-family: inherit !important;
}

/* The app's <body> resolves to the UA system stack rather than the tenant token,
   which is what leaves everything inheriting from it off-brand. */
body {
    font-family: var(--pyfoi-font-sans), sans-serif !important;
}

/* ---------------------------------------------------------------------------
 * 2. Headings in Geely's display face.
 *
 * Every headline on geely.nz is geelyBold, set tight and uppercase — see the
 * `headings` block in brand.yaml, whose values these mirror. The tracked
 * uppercase eyebrow is not reproduced here: it belongs to specific storefront
 * elements, and blanket-applying letter-spacing to app headings would wreck the
 * decision interface's dense parameter labels.
 *
 * The fallback chain matters. `geelyBold Fallback` is a metric-override face
 * declared in fonts.css (ascent/descent/size-adjust tuned against Arial), so if
 * the woff has not arrived yet the substituted text occupies almost exactly the
 * same box and the heading does not reflow when it does.
 * ------------------------------------------------------------------------ */

h1,
h2,
h3 {
    font-family: "geelyBold", "geelyBold Fallback", var(--pyfoi-font-sans), sans-serif !important;
    line-height: 1.1;
}
