:root {
    --type-2xs: 10px;
    --type-xs: 11px;
    --type-sm: 12px;
    --type-label: 13px;
    --type-body: 14px;
    --type-subtitle: 16px;
    --type-card-title: 18px;
    --type-section-title: 21px;
    --type-page-title: 28px;
    --leading-tight: 1.25;
    --leading-normal: 1.45;
}

body {
    font-size: var(--type-body);
    line-height: var(--leading-normal);
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: var(--type-body);
}

small,
.topbar-sub {
    font-size: var(--type-sm);
    line-height: var(--leading-normal);
}

.brand {
    font-size: 19px;
    line-height: var(--leading-tight);
}

.sidebar nav > a,
.main-nav .settings-nav > summary {
    font-size: var(--type-body);
    line-height: 1.35;
}

.sidebar .settings-subnav a,
.sidebar .settings-subnav .settings-coming {
    font-size: var(--type-sm);
}

.topbar > div:first-child > h1 {
    font-size: var(--type-body);
    line-height: var(--leading-tight);
    margin: 0;
    font-weight: 700;
}

.topbar-link,
.user-pill,
.btn-primary,
.btn-secondary,
.btn-danger,
button {
    font-size: var(--type-label);
    line-height: 1.35;
}

.page-head h1,
.settings-heading h1 {
    font-size: var(--type-page-title);
    line-height: 1.2;
    letter-spacing: -.02em;
}

.page-head p,
.settings-heading > p,
.muted {
    font-size: var(--type-label);
    line-height: var(--leading-normal);
}

.panel > h2,
.panel-title h2,
.catalog-pane-head h2 {
    font-size: var(--type-card-title);
    line-height: var(--leading-tight);
}

.panel > h3,
.section-block h3,
.combo-title h3 {
    font-size: var(--type-subtitle);
    line-height: 1.3;
}

.form label,
.filter-panel label,
.field-edit-grid label,
.create-grid label,
.compact-form label {
    font-size: var(--type-label);
    line-height: 1.35;
}

.form input,
.form select,
.form textarea,
.filter-panel input,
.filter-panel select {
    font-size: var(--type-body);
    line-height: 1.4;
}

table th,
.fields-head {
    font-size: var(--type-sm);
    line-height: 1.35;
}

table td {
    font-size: var(--type-body);
    line-height: 1.4;
}

.badge,
.panel-badge,
.input-type,
.system-pill,
.lock-pill,
.type-pill,
.level-mark,
.phase-badge {
    font-size: var(--type-xs);
    line-height: 1.3;
}

.alert,
.empty,
.desc,
.history,
.comment {
    font-size: var(--type-body);
    line-height: var(--leading-normal);
}

/* Asset list */
.asset-import-copy h3,
.asset-list-toolbar h2 {
    font-size: var(--type-card-title);
    line-height: var(--leading-tight);
}

.asset-list-toolbar p,
.asset-page-size,
.asset-sort-menu button,
.row-action {
    font-size: var(--type-label);
}

.asset-sort-menu p,
.asset-status-stack small {
    font-size: var(--type-xs);
}

/* Asset detail */
.asset-detail-title-row h1 {
    font-size: var(--type-page-title);
    line-height: 1.2;
}

.asset-detail-form .asset-detail-section-head h2 {
    font-size: var(--type-section-title);
    line-height: var(--leading-tight);
}

/* User profiles use the same page and card hierarchy as Asset pages. */
.users-page .page-head h1 {
    font-size: var(--type-page-title);
}

.users-page .panel > h2 {
    font-size: var(--type-card-title);
    line-height: var(--leading-tight);
}

.users-page .panel > h3 {
    font-size: var(--type-subtitle);
    line-height: 1.3;
}

.asset-detail-form .section-block h3 {
    font-size: var(--type-subtitle);
    line-height: 1.3;
}

.asset-main-tabs button,
.asset-context-tabs button,
.asset-action-card summary {
    font-size: var(--type-label);
}

.asset-field-nav-head h2,
.asset-context-section-head h2 {
    font-size: var(--type-subtitle);
    line-height: var(--leading-tight);
}

.asset-detail-nav-slot .asset-field-nav-head h2 {
    font-size: var(--type-subtitle);
}

.asset-field-nav-head p,
.asset-context-section-head p,
.asset-context-head small,
.asset-summary-no-action,
.asset-action-content label,
.asset-action-content button {
    font-size: var(--type-sm);
}

.asset-detail-nav-slot .asset-field-nav-head p,
.asset-detail-nav-slot .asset-field-nav a {
    font-size: var(--type-sm);
}

.asset-field-nav a,
.asset-context-head strong,
.asset-summary-list dt,
.asset-summary-list dd,
.asset-action-content input,
.asset-action-content select,
.asset-action-content textarea {
    font-size: var(--type-label);
}

.asset-field-nav-index,
.asset-main-tab-count {
    font-size: var(--type-xs);
}

/* Settings and catalogs */
.group-toolbar h2,
.field-group h2,
.config-section-title h2 {
    font-size: var(--type-card-title);
    line-height: var(--leading-tight);
}

.settings-workspace > .group-toolbar h2 {
    font-size: var(--type-card-title);
}

.group-panel-head h3,
.settings-card-link strong {
    font-size: var(--type-subtitle);
    line-height: 1.3;
}

.group-toolbar p,
.field-group-head p,
.group-chips a,
.settings-local-nav a,
.settings-local-nav > span,
.catalog-tab,
.catalog-pane-head p,
.field-name strong {
    font-size: var(--type-label);
}

.field-name small,
.combo-title p,
.catalog-count,
.catalog-total span,
.settings-crumb,
.field-help {
    font-size: var(--type-sm);
}

.asset-configuration-zone-header h4,
.options-box h4 {
    font-size: 15px;
    line-height: 1.3;
}

/* Dashboard: metric numbers intentionally remain larger than UI copy. */
.kpi-label,
.donut-center span,
.recent-main small,
.panel-badge {
    font-size: var(--type-sm);
}

.panel-title p,
.panel-title > a,
.legend-row,
.bar-meta,
.recent-main strong {
    font-size: var(--type-label);
}

/* Public and authentication screens */
.login-card h1,
.public-card h1,
.public-asset-card h1 {
    font-size: 24px;
    line-height: 1.2;
}

.login-card p,
.public-card p,
.public-asset-card p {
    font-size: var(--type-body);
    line-height: var(--leading-normal);
}

.login-card label,
.public-card label {
    font-size: var(--type-label);
}

@media (max-width: 720px) {
    .page-head h1,
    .settings-heading h1,
    .asset-detail-title-row h1 {
        font-size: 24px;
    }

    .asset-detail-form .asset-detail-section-head h2 {
        font-size: 19px;
    }
}
