/* BuildEase typography: shared by Client, Admin, public and account pages.
   Arial is the existing application font. No geometry or semantic colors are changed.
   Important declarations resolve legacy module/inline typography overrides only. */
:root {
    --be-font-family: Arial, Helvetica, sans-serif;
    --be-type-page: 30px;
    --be-type-section: 18px;
    --be-type-card: 16px;
    --be-type-body: 14px;
    --be-type-helper: 13px;
    --be-type-badge: 12px;
    --be-placeholder-color: #757575;
}
:root body { font-family: var(--be-font-family) !important; font-size: var(--be-type-body); font-weight: 400; }
:root :is(h1,h2,h3,h4,h5,h6,p,label,input,textarea,select,option,button,table,dt,dd,summary,nav a) {
    font-family: var(--be-font-family) !important;
}
:root body :is(div,section,aside,header,footer,nav,li,strong,small,time,a,span):not([class*="fa-"]):not([class*="material-"]):not([class*="icon"]) {
    font-family: var(--be-font-family) !important;
}
/* Application titles; marketing hero and KPI/value headings keep their own scale. */
:root body :is(.dashboard-header,.admin-header,.dm-title-row,.page-header,.settings-heading) h1,
:root body :is(.dashboard-content,.admin-content,.buildease-admin-content) > h1 {
    font-size: var(--be-type-page) !important; font-weight: 700 !important; line-height: 1.2 !important;
}
:root body :is(h2,h3):not(.completed-hero-cost):not(.completed-hero-duration):not(.stat-number):not(.kpi-value):not(.dm-chat-person h2) {
    font-size: var(--be-type-section) !important; font-weight: 700 !important; line-height: 1.35 !important;
}
:root body :is(h4,h5,h6,.card-title,.subsection-title,.dm-chat-person h2) {
    font-size: var(--be-type-card) !important; font-weight: 600 !important; line-height: 1.35 !important;
}
/* Known major section headings rendered as h4 in the estimation views. */
:root body :is(.project-details-card,.history-card,.est-detail-section,.est-result-section,.est-result-header) > h4,
:root body :is(.estimation-lead,.modal-title,dialog > header h2,.modal-content h2,.modal-content h3) {
    font-size: var(--be-type-section) !important; font-weight: 700 !important; line-height: 1.35 !important;
}
:root body :is(label,.form-label,.est-field,.admin-est-field label) {
    font-size: var(--be-type-body) !important; font-weight: 600 !important; line-height: 1.4;
}
:root body :is(p,dd,.dm-message-text,.message-text) {
    font-size: var(--be-type-body) !important; font-weight: 400;
}
/* Inputs must not inherit a label's semibold weight. Keep their existing dimensions. */
:root body :is(input,textarea,select,option) {
    font-size: var(--be-type-body) !important; font-weight: 400 !important;
}
:root body input::placeholder,
:root body textarea::placeholder {
    font-family: var(--be-font-family) !important; font-size: var(--be-type-helper) !important;
    font-weight: 400 !important; color: var(--be-placeholder-color) !important; opacity: 1 !important;
}
:root body :is(small,time,.dashboard-subtitle,.admin-page-description,.est-card-description,
    .auth-field-error,.inquiry-field-error,.helper-text,.help-text,.form-help,.field-hint,
    .history-item-date,.dm-account,.dm-preview,.dm-conversation-time,.dm-chat-person p,
    .dm-list-footer,.dm-message-time,.message-time,.chat-time,.timestamp) {
    font-size: var(--be-type-helper) !important; font-weight: 400 !important; line-height: 1.5;
}
/* Exclude compact icon/remove controls, whose glyph sizing is functional. */
:root body button:not(.file-remove-btn):not(.dm-icon-button):not(.modal-close):not(.close-modal):not(.close-btn):not(.est-lightbox-close),
:root body.client-estimation-page .booking-menu a,
:root body :is(input[type="submit"],input[type="button"],.btn,.button,.consultation-primary,.analyze-btn) {
    font-size: var(--be-type-body) !important; font-weight: 600 !important;
}
:root body :is(.badge,.status-badge,.booking-badge,.estimate-badge,.client-status,
    .status,.status-pill,.status-tag,.project-status,.contract-status,.inquiry-status,.dm-unread) {
    font-size: var(--be-type-badge) !important; font-weight: 600 !important;
}
:root body th { font-size: var(--be-type-helper) !important; font-weight: 600 !important; }
:root body td { font-size: var(--be-type-helper) !important; font-weight: 400; }
:root body :is(.dashboard-menu,.admin-menu,.buildease-sidebar nav,.sidebar-menu) a {
    font-size: var(--be-type-body) !important; font-weight: 600 !important; line-height: 1.4 !important;
}
:root body .dm-conversation-name { font-size: var(--be-type-body) !important; font-weight: 600 !important; }
:root body .dm-preview { font-weight: 400 !important; }
:root body .dm-filters button { font-size: var(--be-type-helper) !important; font-weight: 600 !important; }
:root body :is(dialog,.modal-content,.modal-panel) :is(dt,label) { font-size: var(--be-type-body) !important; font-weight: 600 !important; }
:root body :is(dialog,.modal-content,.modal-panel) :is(dd,.detail-value) { font-size: var(--be-type-body) !important; font-weight: 400 !important; }
/* Semantic success/error colors, emphasis, figures, map labels and icon fonts are preserved. */

/* Prominent subtitles are distinct from supporting descriptions. */
:root body .dashboard-subtitle.estimation-lead {
    font-size: var(--be-type-section) !important; font-weight: 700 !important; line-height: 1.35 !important;
}
:root body .brand-sub { font-family: var(--be-font-family) !important; }

:root body :is(.dashboard-menu,.admin-menu,.sidebar-menu) a span:not([class*="icon"]) {
    font-size: var(--be-type-body) !important; font-weight: 600 !important; line-height: 1.4 !important;
}
:root body :is(.admin-stat-card,.stat-info,.kpi-card) :is(.kpi-label,.stat-label) {
    font-size: var(--be-type-body) !important; font-weight: 600 !important;
}
