/* Self-hosted webfonts. No CDN — see docs/UI-Conventions.md §2.
   The two @font-face files live under wwwroot/lib/fonts/** and are imported rather
   than duplicated here, so replacing a font is a single-folder swap. */

@import url('../lib/fonts/IranSansX/IranSansX.css');
@import url('../lib/fonts/IranYekanX/IranYekanX.css');

/*
   Two families, two jobs:
     IRANSansX  — body, tables, forms, labels. Optimised for long reading at small sizes.
     IRANYekanX — headings and page/section titles only. Heavier, more display-like.

   Both are the "FaNum" cuts, whose numeral glyphs are Persian. That is the whole reason
   ToPersianDigits() is only needed for text we build in C#: a Latin "1405" typed into the
   markup already *renders* as ۱۴۰۵. It also means an <input type="number"> keeps working,
   because the underlying character is still Latin — the font changes the glyph, not the value.
   Do not "fix" this by switching the culture to fa-IR; that breaks decimal separators.
*/
h1, h2, h3, h4, h5, h6,
.page-header h4, .page-header h5,
.section-title,
.metric-value,
.admin-sidebar__brand,
.admin-topbar__title {
    font-family: 'IRANYekanX', 'IRANSansX', Tahoma, sans-serif;
}

/* Latin-only technical text: stack traces, exception types, URLs, JSON, API keys.
   A Persian font renders these with the wrong metrics and no monospace alignment. */
.font-monospace,
pre[dir="ltr"],
code[dir="ltr"],
.code-box {
    font-family: 'Cascadia Mono', Consolas, 'Courier New', ui-monospace, monospace;
}
