/* ══════════════════════════════════════════════════════════════════════════
   Font System — loaded FIRST, before all other CSS

   EVERY font stack includes 'Assistant' so Hebrew characters ALWAYS render
   in Assistant regardless of language mode.

   English (LTR): Inter + Assistant (body), Space Grotesk + Assistant (headlines)
   Hebrew  (RTL): Assistant only (all text)
   Both:          JetBrains Mono (code), Material Symbols (icons)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── LTR (English) — Assistant in every stack for Hebrew fallback ─────── */

html, body {
    font-family: 'Inter', 'Assistant', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-headline,
.section-title,
.card-header__title,
.stat-value {
    font-family: 'Space Grotesk', 'Assistant', sans-serif;
}

code, pre {
    font-family: 'JetBrains Mono', 'Assistant', monospace;
}

.font-mono, .mono-xs {
    font-family: 'Inter', 'Assistant', sans-serif;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Force ALL elements to inherit — ensures font stack cascades everywhere */
*, *::before, *::after {
    font-family: inherit;
}

/* Override Tailwind's font-family utilities that may not include Assistant */
.font-body,
.stat-label,
.form-label,
.action-btn__label,
.severity-badge,
.status-badge,
button, input, select, textarea, label, a, p, span, div, td, th, li {
    font-family: inherit;
}

/* ══════════════════════════════════════════════════════════════════════════
   RTL (Hebrew) — Assistant as PRIMARY font
   ══════════════════════════════════════════════════════════════════════════ */

html[dir="rtl"],
html[dir="rtl"] * {
    font-family: 'Assistant', sans-serif !important;
}

html[dir="rtl"] {
    font-size: 105%;
}

/* Code blocks keep mono even in RTL */
html[dir="rtl"] code,
html[dir="rtl"] pre {
    font-family: 'JetBrains Mono', 'Assistant', monospace !important;
}

/* Material icons — MUST keep icon font */
html[dir="rtl"] .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
}

/* Remove uppercase + letter-spacing (breaks Hebrew) */
html[dir="rtl"] * {
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Enlarged headers for Hebrew readability */
html[dir="rtl"] h1 { font-size: 1.75rem !important; }
html[dir="rtl"] h2 { font-size: 1.35rem !important; }
html[dir="rtl"] h3 { font-size: 1.1rem !important; }
