:root{
  --ui-font-fa:'Vazirmatn',Tahoma,Arial,sans-serif;
  --ui-font-en:'Inter','Segoe UI',Arial,sans-serif;
  --brand-font:'Cascadia Code','Consolas','SFMono-Regular','Menlo','Monaco','Liberation Mono','Courier New',monospace;
}
html[lang="fa"],html[lang="fa"] body,html[lang="fa"] button,html[lang="fa"] input,html[lang="fa"] textarea,html[lang="fa"] select,html[lang="fa"] option,html[lang="fa"] optgroup{
  font-family:var(--ui-font-fa)!important;
  font-feature-settings:"ss01" 1;
  font-variant-numeric:lining-nums tabular-nums;
}
html[lang="en"],html[lang="en"] body,html[lang="en"] button,html[lang="en"] input,html[lang="en"] textarea,html[lang="en"] select{
  font-family:var(--ui-font-en);
}
html[lang="fa"] :where(.dashboard-kpi,.dashboard-card,.panel-table,.wallet-balance,.status-pill,.ticket-code,.metric-value,.chart-value,.money-value,.numeric-value){
  font-family:var(--ui-font-fa)!important;
  font-feature-settings:"ss01" 1!important;
  font-variant-numeric:tabular-nums!important;
}
.brand-wordmark,.code-window,.brand-slogan{font-family:var(--brand-font)}


/* v25: direction and numeral language are separate concerns.
 * LTR technical identifiers remain Latin, while an explicitly localized LTR
 * value (for example the Persian footer phone number) keeps Vazirmatn ss01.
 */
html[lang="fa"] :where(
  .latin-value,
  .technical-value,
  code,
  kbd,
  samp,
  .ticket-code,
  [dir="ltr"]:not(.localized-number),
  input[type="email"],
  input[type="url"],
  input[type="tel"]
){
  font-family:var(--ui-font-en)!important;
  font-feature-settings:normal!important;
  font-variant-numeric:lining-nums tabular-nums!important;
}
html[lang="fa"] :where(.localized-number,.fa-digits,.localized-number[dir="ltr"]){
  font-family:var(--ui-font-fa)!important;
  font-feature-settings:"ss01" 1!important;
  font-variant-numeric:lining-nums tabular-nums!important;
}
:where(.latin-value,.technical-value,[dir="ltr"],code,kbd,samp,.ticket-code,.localized-number){
  unicode-bidi:isolate;
}
:where(.latin-value,.technical-value,.localized-number){
  direction:ltr;
  display:inline-block;
  white-space:nowrap;
}
