/*
  Global typography normalizer.
  Keep the UI readable and consistent even where older page CSS used very
  heavy 800-950 weights.
*/
:root {
  --app-font: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --app-font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Noto Kufi Arabic", Cairo, Tajawal, "Segoe UI", Tahoma, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 600;
}

html[dir="rtl"] {
  --app-font: var(--app-font-arabic);
}

html[dir="rtl"] body {
  text-align: right;
  line-height: 1.65;
}

html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
  text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"] {
  direction: ltr;
  text-align: left;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--app-font) !important;
  font-weight: var(--weight-regular) !important;
}

body,
body * {
  font-family: var(--app-font) !important;
}

body :where(p, span, small, li, dd, dt, input, select, textarea, label) {
  font-weight: var(--weight-regular) !important;
}

body :where(h1, h2, h3, h4, h5, h6) {
  font-weight: var(--weight-strong) !important;
  letter-spacing: 0 !important;
}

body :where(strong, b, th, summary) {
  font-weight: var(--weight-strong) !important;
}

body :where(a, button, .btn, .primary-action, .soft-button, .danger-button, .status-tag) {
  font-weight: var(--weight-medium) !important;
}

.search-icon-action {
  min-width: 42px;
  padding-inline: 12px !important;
}

.search-icon-action svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

body :where(.eyebrow, .dash-eyebrow, .auth-eyebrow, .region-kicker, .company-kicker, .company-label, .overview-kicker, .overview-label) {
  font-weight: var(--weight-medium) !important;
  letter-spacing: .06em !important;
}

body :where(.metric-card strong, .dash-stats b, .map-kpi b, .big-green, .profile-complete-box strong, .company-progress-box strong, .overview-metric strong, .overview-score-pill) {
  font-weight: var(--weight-strong) !important;
}

body :where(.sidebar-brand, .brand, .brand-text, .metric-icon, .company-avatar, .company-avatar-sm, .company-avatar-lg, .activity-company-mark, .linkedin-profile-avatar) {
  font-weight: var(--weight-strong) !important;
}

body :where(.status-badge, .score-badge, .badge, .impact-badge, .select-pill, .result-score, .score-pill) {
  font-weight: var(--weight-medium) !important;
}

body :where(.app-table th, .relationship-table th) {
  font-weight: var(--weight-medium) !important;
}
