/* Copyright (c) 2026, Openly and contributors
 * For license information, please see license.txt
 *
 * Loads the UAE Dirham symbol (U+20C3) from a vendored web font.
 *
 * The `unicode-range` descriptor scopes this font to ONLY the Dirham codepoint,
 * so every other character continues to render in the user's existing UI font.
 *
 * Source font: https://github.com/pooyagolchian/dirham (MIT, U+20C3 mapped).
 *
 * When OS fonts ship native U+20C3 support (Unicode 18.0, ~Sept 2026) this
 * @font-face becomes a benign fallback and can be removed.
 */

@font-face {
    font-family: "Dirham";
    src: url("/assets/openly_pdc/fonts/Dirham-Regular.woff2") format("woff2");
    unicode-range: U+20C3;
    font-display: swap;
    font-weight: 400;
    font-style: normal;
    /* The vendored font's glyph metrics render U+20C3 noticeably larger than
     * surrounding digits/letters. `size-adjust` rescales the glyph in place
     * without touching any other character (unicode-range scopes this face
     * to U+20C3 only). Tune as needed — 65% matches a ~35% visual reduction. */
    size-adjust: 75%;
}

/* Prepend "Dirham" to a real platform font stack on every visible surface so
 * the @font-face above is consulted for U+20C3. The unicode-range constraint
 * means this has zero visual impact on any other glyph.
 *
 * NOTE: `inherit` is NOT a valid value inside a font-family list — only a
 * standalone value. Using it here would invalidate the whole declaration and
 * the browser would silently drop "Dirham" from the resolved stack, never
 * loading the woff2.
 */
body,
.desk-page,
.web-page,
.print-format,
.modal,
input,
select,
textarea,
button {
    font-family: "Dirham", var(--font-stack), system-ui, -apple-system,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
        sans-serif;
}
