/* ── Inter + Archivo typography pairing (self-hosted, SIL OFL 1.1) ────────
   Inter carries UI body text, tables, forms, controls, and ticket threads
   with optical sizing and unambiguous character variants (cv02, cv03, cv04,
   cv11). Archivo carries headings, page titles, brand wordmarks, and KPI
   numerals. IBM Plex Mono carries IDs, durations, amounts, and config.

   ORDER IS LOAD-BEARING — latin-ext first, latin LAST in every pair so
   latin wins on colliding unicode-range codepoints (U+0131, U+0152-0153,
   U+0304, U+0308, U+0329, U+2020) and English/Western European views never
   download the latin-ext slice. */

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v4-latin-ext-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v4-latin-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    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: "Inter";
    src: url("/fonts/inter-v4-latin-ext-variable-italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v4-latin-variable-italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
    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;
}

:root {
    --itrela-font-sans: "Inter", "Archivo", system-ui, -apple-system, sans-serif;
    --itrela-font-display: "Archivo", "Inter", system-ui, sans-serif;
    --itrela-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    /* Preserve readable word-spacing on uppercase letter-spaced labels
       (LabelWordGapBrowserTests holds every tracked label to >= 0.25em). */
    --itrela-label-word-spacing: calc(0.06em + var(--itrela-caps-tracking));
}

/* Body & UI chrome: Inter with optical sizing, natural word spacing, and
   unambiguous glyphs (open 4/6/9, single-story a) for ticket prose & IDs. */
body {
    font-family: var(--itrela-font-sans);
    font-optical-sizing: auto;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    word-spacing: normal;
}

/* MudBlazor form inputs inherit Subtitle1 by default; keep form fields in
   Inter so inputs, selects, and textareas match body prose. */
.mud-input-control .mud-input,
.mud-input-control .mud-input > input,
.mud-input-control .mud-input > textarea,
.mud-input-control .mud-input .mud-input-slot,
.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
    font-family: var(--itrela-font-sans);
    font-optical-sizing: auto;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.itrela-reconnect-card,
.itrela-reconnect-btn,
#components-reconnect-modal .itrela-reconnect-btn {
    word-spacing: normal;
}

/* Display, headings, brand wordmarks, and figures that are words: Archivo.
   Never override explicit mono utilities (.itrela-mono, .itrela-money, a
   fact strip's --figure value). */
h1,
h2,
h3,
h4,
h5,
h6,
.mud-typography-h1:not(.itrela-mono):not(.itrela-money),
.mud-typography-h2:not(.itrela-mono):not(.itrela-money),
.mud-typography-h3:not(.itrela-mono):not(.itrela-money),
.mud-typography-h4:not(.itrela-mono):not(.itrela-money),
.mud-typography-h5:not(.itrela-mono):not(.itrela-money),
.mud-typography-h6:not(.itrela-mono):not(.itrela-money),
.mud-typography-subtitle1:not(.itrela-mono):not(.itrela-money),
.page-title,
.itrela-brand-name,
.auth-brand-wordmark,
.auth-brand-headline,
.auth-title,
.portal-brand-name,
.summary-value:not(.itrela-mono),
.itrela-fact-value:not(.itrela-fact-value--figure):not(.itrela-mono) {
    font-family: var(--itrela-font-display);
    font-feature-settings: normal;
}

/* Tables and metrics align columns cleanly with tabular numerals. */
table,
.mud-table-root,
.mud-table-cell,
.summary-value,
.itrela-fact-value,
.itrela-lv-value {
    font-variant-numeric: tabular-nums;
}

/* Keep mono faces untouched by Inter's stylistic character variants. */
code,
kbd,
pre,
samp,
.itrela-mono,
.itrela-money,
.itrela-fact-value--figure,
td.itrela-num-cell,
.mud-table-root .mud-table-body .mud-table-cell.itrela-mono,
.mud-table-root .mud-table-body .mud-table-cell.itrela-money,
.mud-table-root .mud-table-body td.mud-table-cell.itrela-num-cell {
    font-feature-settings: normal;
    word-spacing: normal;
}
