/* One UI family and role-based hierarchy, loaded after page-specific presentation. */
:is(.app-layout, .login-view) :is(button, input, select, textarea, option) {
    font-family: var(--font-ui);
}
:is(.app-layout, .login-view) input::file-selector-button {
    font-family: var(--font-ui);
    font-size: var(--text-ui);
    font-weight: var(--weight-semibold);
}

.app-layout h1 {
    font-size: var(--text-page-title);
    font-weight: var(--weight-bold);
    line-height: 1.2;
}
.app-layout :is(.hero, .page-heading) h1 {
    font-size: var(--text-page-title);
    font-weight: var(--weight-bold);
    line-height: 1.2;
}
.login-view h1 { font-size: var(--text-login-title); font-weight: var(--weight-bold); line-height: 1.2; }
.app-layout h2 { font-size: var(--text-section); font-weight: var(--weight-bold); line-height: 1.3; }
.app-layout h3 { font-size: var(--text-subsection); font-weight: var(--weight-semibold); line-height: 1.4; }
.app-layout h4 { font-size: var(--text-body); font-weight: var(--weight-semibold); line-height: 1.4; }
.dashboard-view .dashboard-panel-heading h2 { font-size: var(--text-body); font-weight: var(--weight-bold); line-height: 1.35; }
.app-layout strong { font-weight: var(--weight-bold); }

.app-layout :is(.hero, .page-heading, .section-heading) p,
.app-layout :is(.app-card p, .section-intro, .connected-profile p, .small),
.dashboard-view .dashboard-panel-body > p,
.login-view .small {
    font-size: var(--text-ui);
    font-weight: var(--weight-regular);
    line-height: 1.6;
}
.app-layout :is(small, .field-hint) { font-size: var(--text-caption); font-weight: var(--weight-regular); line-height: 1.5; }
.dashboard-view .dashboard-quick-link strong { font-size: var(--text-ui); font-weight: var(--weight-bold); }
.dashboard-view .dashboard-quick-link small { font-size: var(--text-caption); font-weight: var(--weight-regular); }

:is(.app-layout, .login-view) :is(label, legend) { font-size: var(--text-ui); font-weight: var(--weight-semibold); line-height: 1.5; }
.login-view .field label { font-size: var(--text-ui); font-weight: var(--weight-semibold); }
.app-layout :is(.application-config-card, .configuration-options, .configuration-fields, .portal-configuration, .import-row-editor) label {
    font-size: var(--text-ui);
    font-weight: var(--weight-semibold);
}
.app-layout :is(.account-controls, .hr-filters, .company-switch, .org-chart-controls) label,
.app-layout :is(.profile-details dt, .profile-edit-field label, .credential-details dt, .account-summary-grid dt, .detail-list dt) {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
}

:is(.app-layout, .login-view) :is(input, select, textarea):not(:where([type=hidden], [type=checkbox], [type=radio], [type=submit], [type=button], [type=color], [type=range])),
.app-layout :is(.field, .profile-edit-field, .processor-settings-card, .application-config-card, .configuration-options, .configuration-fields, .portal-configuration, .stage-row, .settings-grid, .account-controls, .hr-filters, .document-replacement, .password-control) :is(input, select, textarea):not(:where([type=hidden], [type=checkbox], [type=radio])),
.app-layout .processor-settings-card input:not([type=hidden]):not([type=checkbox]) {
    font-family: var(--font-ui);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    line-height: 1.5;
}
:is(.app-layout, .login-view) option { font-weight: var(--weight-regular); }

:is(.app-layout, .login-view) .button,
.app-layout :is(.form-tab, .hr-tab, .sidebar-open, .remove-stage-button) {
    font-family: var(--font-ui);
    font-size: var(--text-ui);
    font-weight: var(--weight-semibold);
    line-height: 1.4;
}
.app-layout .sidebar-link,
.dashboard-view .dashboard-link-list a { font-size: var(--text-nav); font-weight: var(--weight-semibold); line-height: 1.45; }
.dashboard-view .dashboard-panel-action { font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.app-layout :is(.badge, .status, .role, .status-pill, .stage-counter, .eyebrow, .section-kicker, .notification-count) { font-size: var(--text-caption); font-weight: var(--weight-semibold); }
.app-layout :is(.brand, .sidebar-brand, .profile-avatar),
.login-view .brand { font-weight: var(--weight-brand); }
.app-layout :is(.sidebar-profile strong, .settings-link strong) { font-size: var(--text-ui); font-weight: var(--weight-semibold); }
.app-layout .sidebar-profile small { font-size: var(--text-caption); font-weight: var(--weight-regular); }

.app-layout td { font-size: var(--text-ui); font-weight: var(--weight-regular); line-height: 1.5; }
.app-layout th { font-size: var(--text-caption); font-weight: var(--weight-semibold); line-height: 1.4; }

/* Compact chart roles fit the existing fixed cards and reserved action rows. */
.app-layout .org-card strong { font-size: var(--text-body); font-weight: var(--weight-bold); line-height: 1.35; }
.app-layout .org-title { font-size: var(--text-nav); font-weight: var(--weight-medium); line-height: 1.45; }
.app-layout :is(.org-department, .org-unit) { font-size: var(--text-caption); font-weight: var(--weight-regular); line-height: 1.4; }
.app-layout :is(.org-toggle, .org-profile-link) { font-size: var(--text-nav); font-weight: var(--weight-semibold); line-height: 1.4; }
.app-layout :is(.org-order-toolbar, .org-order-item-controls) button { font-size: var(--text-nav); font-weight: var(--weight-semibold); line-height: 1.4; }
:is(.app-layout, .login-view) .password-toggle { font-size: var(--text-caption); font-weight: var(--weight-semibold); }
:is(.app-layout, .login-view) .password-toggle span { font-size: inherit; font-weight: inherit; }

/* Explicit code/UUID elements keep their semantic monospace presentation. */
