/* Global typography scale — load after role/page CSS so content stays consistent. */
:root {
  --fs-caption: 12px;
  --fs-body-sm: 13px;
  --fs-body: 14px;
  --fs-title-sm: 16px;
  --fs-title: 18px;
  --fs-page: 22px;
  --fs-metric: 24px;
  --lh-tight: 1.35;
  --lh: 1.55;
}

html {
  font-size: 16px;
}

body {
  font-size: var(--fs-body);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: var(--fs-body);
  line-height: var(--lh);
}

/* ---- Content surfaces: one type system for every role page ---- */
.content,
.admin-content,
.trainer-content,
.employee-content,
[data-admin-content],
[data-trainer-content],
[data-ui-parity-page] {
  font-size: var(--fs-body);
  line-height: var(--lh);
}

.content h1,
.admin-content h1,
.trainer-content h1,
.employee-content h1,
.page-heading h1,
.admin-hero h1,
.trainer-hero h1,
.business-context-band h1,
.primary-band h2,
.report-summary-band h2,
.report-hero h2 {
  font-size: var(--fs-page) !important;
  line-height: var(--lh-tight);
  font-weight: 750;
}

.content h2,
.admin-content h2,
.trainer-content h2,
.employee-content h2,
.section-heading h2,
.activity-section h2,
.admin-section-heading h2,
.admin-next-action h2,
.trainer-section-heading h2,
.trainer-next-action h2,
.business-next-action h2,
.agent-entry h2,
.employee-journey h2,
.training-contract h2,
.visible-guidance h2,
.boundary-panel h2,
.role-semantic-board h2,
.position-module-card h3,
.business-panel-header h2,
.business-panel h3 {
  font-size: var(--fs-title) !important;
  line-height: var(--lh-tight);
  font-weight: 700;
}

.content h3,
.admin-content h3,
.trainer-content h3,
.employee-content h3,
.shortcut-list h3 {
  font-size: var(--fs-title-sm) !important;
  line-height: var(--lh-tight);
  font-weight: 700;
}

.content p,
.admin-content p,
.trainer-content p,
.employee-content p,
.content li,
.admin-content li,
.trainer-content li,
.employee-content li,
.content td,
.admin-content td,
.trainer-content td,
.employee-content td,
.content label,
.admin-content label,
.trainer-content label,
.employee-content label {
  font-size: var(--fs-body);
  line-height: var(--lh);
}

.content small,
.admin-content small,
.trainer-content small,
.employee-content small,
.content .muted,
.admin-chip,
.trainer-status-chip,
.status-chip,
.preview-badge,
.nav-label {
  font-size: var(--fs-caption) !important;
  line-height: 1.45;
}

/* Tables / forms / meta rows */
.admin-table,
.trainer-table,
.table-row,
.talent-table {
  font-size: var(--fs-body-sm) !important;
}

.admin-table th,
.trainer-table th,
.talent-table .talent-head {
  font-size: var(--fs-caption) !important;
}

.admin-form label,
.admin-inline-form label,
.trainer-form label,
.business-form label,
.inline-form label,
.form-grid label,
.position-form-grid label,
.handoff-grid label,
.cited-qa label,
.selector-row label {
  font-size: var(--fs-caption) !important;
}

/* Metric / stat numbers stay intentionally larger */
.metric strong,
.admin-stat strong,
.trainer-stat strong,
.tower-metric-row strong {
  font-size: var(--fs-metric) !important;
  line-height: 1.2;
}

.metric span,
.metric small,
.admin-stat span,
.admin-stat small,
.trainer-stat span,
.trainer-stat small,
.admin-hero dt,
.trainer-hero dt,
.business-context-band dt,
.position-fact-values dt {
  font-size: var(--fs-caption) !important;
}

/* Buttons share body size */
.button,
.admin-button,
.trainer-button,
.primary-btn,
.secondary-btn {
  font-size: var(--fs-body-sm) !important;
}

/* Topbar / sidebar stay slightly compact but not micro */
.context span,
.context strong,
.account strong {
  font-size: var(--fs-body-sm);
}

.account small,
.brand small,
.sidebar-status,
.profile-trigger small {
  font-size: var(--fs-caption) !important;
}

.profile-trigger .profile-identity,
.profile-trigger > span:not(.avatar) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.profile-trigger strong,
.profile-trigger small {
  display: inline !important;
}

.nav-item,
.nav-cluster summary {
  font-size: var(--fs-body-sm) !important;
}

.workspace-label {
  font-size: var(--fs-caption) !important;
}

/* Dark / band supporting copy */
.primary-band p,
.admin-hero p,
.trainer-hero p,
.page-heading p,
.admin-section-heading p,
.trainer-section-heading p {
  font-size: var(--fs-body-sm) !important;
  line-height: var(--lh);
}

@media (max-width: 760px) {
  :root {
    --fs-page: 20px;
    --fs-title: 17px;
    --fs-metric: 22px;
  }
}
