:root { --system-font: var(--font-sans); --system-arabic-font: var(--font-arabic); }

html,
body,
button,
input,
select,
textarea,
summary,
table {
  font-family: var(--system-font) !important;
}

body {
  font-size: var(--text-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(ar),
[dir="rtl"] {
  font-family: var(--system-arabic-font) !important;
}

button,
input,
select,
textarea,
summary {
  font-size: var(--text-control);
  line-height: 1.35;
}

h1 { font-size: var(--text-title); line-height: 1.2; }
h2 { font-size: var(--font-size-heading); line-height: 1.25; }
h3 { font-size: var(--text-section); line-height: 1.3; }
h4 { font-size: var(--font-size-subheading); line-height: 1.35; }

.topbar-title h1,
.page-heading h1 { font-size: var(--text-title) !important; }
.topbar-title p,
.page-heading p,
small { font-size: var(--text-sm); }
.nav-item { font-size: var(--text-body); }
.nav-label,
.version { font-size: var(--text-xs); }
th { font-size: var(--text-sm) !important; }
td { font-size: var(--font-size-small) !important; }
