/* Tajawal webfont subsets: Arabic and Latin, weights 400/500/700 only. */
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./tajawal-ar-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./tajawal-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./tajawal-ar-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./tajawal-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./tajawal-ar-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./tajawal-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bn-font-family: "Tajawal", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --bn-font-body: 16px;
  --bn-font-secondary: 14px;
  --bn-font-section: clamp(20px, 2vw, 24px);
  --bn-font-page: clamp(28px, 3vw, 32px);
  font-family: var(--bn-font-family);
}
html, body, body * { font-family: var(--bn-font-family); }
body { font-size: var(--bn-font-body); line-height: 1.6; }
button, input, select, textarea { font-family: inherit; }

/* Main copy keeps the 16px body rhythm; secondary roles are normalized below. */
body :is(p, li, td, dd, dt, .content-copy, .empty-state, .loading, .action-item p, .task-card p, .approval-card p, .notification-item p, .company-preview-panel p, .dashboard-activity-item p, .contract-subitem, .activity div, .hero-copy p, .sidebar-help p, .action-item strong, .notification-item strong, .invoice-draft-totals, .invoice-totals, .project-cell strong, .workplan-summary strong, .phase-head strong, .contract-list-item strong, .profile strong) {
  font-size: var(--bn-font-body) !important;
  line-height: 1.6;
}

/* Supporting copy and metadata use the same readable secondary size. */
body :is(small, .small, .muted, .eyebrow, .nav-label, .sidebar-label, .nav-badge, .count-pill, .breadcrumb, .today-label, .page-kicker, .section-kicker, .table-note, .table-hint, .form-hint, .form-error, .error, .status-chip, .status, .state-chip, .task-meta, .report-meta, .readiness, .field-help, .manager-subtext, .table-subtext, .page-footer, .sidebar-foot, .sidebar-help strong, .scope-note strong, .scope-note small, .welcome-copy, .page-heading p, .panel-heading p, .card-heading p, .hero-overline, .art-card b, .metric-label, .metric span, .metric small, .weekly-strip small, .weekly-strip strong, .global-search-empty, .global-search-result small, .project-cell small, .progress-number, .open-task-reassign-item strong, .open-task-reassign-item small, .open-task-reassign-item label, .company-logo-preview, .workplan-summary small, .dashboard-activity-item strong, .invoice-detail-meta strong, .contract-list-item span, .contract-facts span, .contract-import summary, .contract-attachment, .email-status-panel, .email-test-copy strong, .email-test-copy small, .email-footnote, .activity strong, .activity small, .profile small, .brand-lockup small, .brand-copy small, .today-chip, .table-caption, .table-scroll td strong, .email-recipient, .invoice-line-labels, .notification-preference-grid label, .permission-toggle, .inline-note, .history-item, .toast, #platformToast, .email-status-panel > p, .email-status-panel > small, .email-footnote span, .contract-list-item small) {
  font-size: var(--bn-font-secondary) !important;
  line-height: 1.5;
}

/* Inputs and actions use 16px labels, with 14px field labels and table headers. */
body :is(input, select, textarea, button, .btn, .button, .text-button, .hero-link, .nav-link, .nav button, .submit-button, .logout-button, .role-chip) {
  font-size: 16px !important;
  line-height: 1.4;
}
body :is(button, .btn, .button, .text-button, .hero-link, .nav-link, .nav button, .submit-button, .logout-button, .role-chip) {
  font-weight: 500 !important;
}
body :is(label, th, .form-grid label, .email-recipient, .form-hint, .table-caption, .table-hint, .invoice-line-labels, .notification-preference-grid label, .permission-toggle) {
  font-size: var(--bn-font-secondary) !important;
  font-weight: 500 !important;
  line-height: 1.45;
}
body td { font-weight: 400; }

/* Page titles and section headings */
body :is(h1, .page-heading h1, .welcome-row h1, .auth-card h1) {
  font-size: var(--bn-font-page) !important;
  line-height: 1.3;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}
body :is(h2, .panel-heading h2, .card-heading h2, .metrics-heading h2, .team-form h2, .modal-head h2) {
  font-size: var(--bn-font-section) !important;
  line-height: 1.3;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}
body h3 { font-size: 20px !important; line-height: 1.3; font-weight: 700 !important; }
body h4 { font-size: 18px !important; line-height: 1.3; font-weight: 700 !important; }
body :is(.brand-lockup strong, .brand-copy strong) { font-weight: 700 !important; letter-spacing: normal !important; }
html[lang="ar"] body * { letter-spacing: normal !important; }
html[dir="ltr"] body { direction: ltr; text-align: left; }
body :is([dir="ltr"], [lang^="en"]) { direction: ltr; text-align: left; unicode-bidi: isolate; }
body :is([dir="rtl"], [lang^="ar"]) { direction: rtl; text-align: right; unicode-bidi: isolate; }
body :is(input[type="email"], input[type="url"], input[type="tel"], input[type="number"]) { direction: ltr; text-align: left; }

/* Compact legacy controls need room for the 16px text. */
body :is(.btn, .button, .nav button, .nav-link, .text-button, .submit-button, .logout-button, .hero-link) { min-height: 40px; }
body :is(input, select, textarea) { min-height: 42px; }
body :is(.btn.small, .button.small) { min-height: 40px; padding-block: 6px; }
