/*
 * 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 — moved out of this sheet, deliberately.
 *
 * There used to be an `h1, h2, h3 { font-family: geelyBold... !important }` rule
 * here. Heading typography now lives in app/mystyles/src/_zGeelySkin.css, in its
 * TYPOGRAPHY section, and this sheet no longer says anything about headings.
 *
 * The reason is what each sheet is allowed to know. This one is tenant config:
 * it is published from brand.yaml and must not encode the app's class names, so
 * the only thing it could ever write was a blunt element-level rule. The skin
 * sheet ships with the app, so it can name the real panel and section headings —
 * the decision list header, parameter-value group headings, panel titles — and
 * give them the brand's actual treatment (uppercase, line-height 0.9) while
 * leaving parameter names and value labels in Inter, sentence case.
 *
 * Left here, the element rule also WON, because everything in this sheet is
 * importance-flagged and this sheet loads after compiled.css. It beat the
 * targeted rules wherever an h1/h2/h3 was involved, and imposed line-height 1.1
 * where brand.yaml specifies 0.9. Removing it is what lets the targeted rules
 * take effect at all.
 *
 * Nothing is left unstyled by the move: the skin carries an equivalent
 * tenant-scoped h1/h2/h3 baseline that is not gated on a route theme class, so
 * Geely routes with neither `pf-skin-dark` nor `pf-skin-light` still get the
 * display face. The one behaviour that does change is GEELY_SKIN=off, which now
 * turns heading typography off along with the rest of the skin — which is what a
 * kill switch is for.
 *
 * Rules 1 and 2 above stay here: they are about the tenant's own font tokens,
 * they name no app classes, and they must apply whether or not the skin is on.
 * ------------------------------------------------------------------------ */
