/*
 * Canonical application typography.
 * Loaded after page/feature styles so hierarchy is consistent across the shell,
 * admin workspaces, assessor tools, participant runtime, auth and public pages.
 */
:root {
    --hpc-ui-font-family: "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
    --hpc-font-weight-regular: 400;
    --hpc-font-weight-medium: 500;
    --hpc-font-weight-semibold: 600;
    --hpc-font-weight-bold: 700;
}

html {
    font-family: var(--app-content-font-family, var(--hpc-ui-font-family));
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    font-optical-sizing: auto;
}

body,
button,
input,
select,
textarea,
optgroup {
    font-family: var(--app-content-font-family, var(--hpc-ui-font-family));
}

body { font-weight: var(--hpc-font-weight-regular); }

h1,
h2,
h3,
h4,
h5,
h6,
.ui-primary-page-heading {
    font-family: var(--app-heading-font-family, var(--hpc-ui-font-family));
    font-weight: var(--hpc-font-weight-bold) !important;
}

strong,
b { font-weight: var(--hpc-font-weight-semibold); }

label,
legend,
th,
summary,
button,
.btn,
.as-btn,
.ms-btn,
.hpc-button,
.hpc-icon-button,
.hpc-user-button,
.ui-action-group a,
.ui-action-group button,
[data-row-action-menu] button,
[data-row-action-panel] a,
[data-row-action-panel] button {
    font-weight: var(--hpc-font-weight-semibold) !important;
}

small,
.page-description,
.ui-section-card__description,
.as-help,
.ui-help,
.text-muted,
.hpc-muted { font-weight: var(--hpc-font-weight-regular) !important; }

.ui-page-header-eyebrow,
.ui-section-card__title,
.ui-section-card__count,
.ui-index-summary,
.ui-filter-bar label,
.ui-form-section__title,
.ui-form-section__description {
    font-weight: var(--hpc-font-weight-semibold) !important;
}

.ui-stat-card strong,
.ui-kpi-card strong,
[class*="metric"] > strong,
[class*="metric"] strong,
[class*="stat"] > strong,
[class*="stat"] strong,
[class*="count"] > strong,
[class*="count"] strong {
    font-weight: var(--hpc-font-weight-bold) !important;
}

.hpc-sidebar,
.hpc-sidebar button,
.hpc-sidebar a { font-family: var(--app-sidebar-font-family, var(--hpc-ui-font-family)); }

.hpc-sidebar-brand-text p { font-weight: var(--hpc-font-weight-bold) !important; }
.hpc-sidebar-brand-text span,
.hpc-sidebar-section-title { font-weight: var(--hpc-font-weight-semibold) !important; }
.hpc-sidebar-link,
.hpc-sidebar-link.is-child { font-weight: var(--hpc-font-weight-medium) !important; }
.hpc-sidebar-link.is-active,
.hpc-sidebar-link[aria-current="page"] { font-weight: var(--hpc-font-weight-semibold) !important; }

.hpc-topbar,
.hpc-topbar button,
.hpc-topbar a { font-family: var(--app-navbar-font-family, var(--hpc-ui-font-family)); }

.hpc-topbar-title p,
.hpc-topbar-title h1,
.hpc-user-meta strong,
.hpc-user-panel-head p,
.hpc-user-panel-head strong,
.hpc-user-panel-head em { font-weight: var(--hpc-font-weight-semibold) !important; }

.hpc-avatar,
.hpc-status-badge,
.as-badge,
.ui-badge,
[class*="badge"],
[class*="pill"] { font-weight: var(--hpc-font-weight-semibold) !important; }

.hpc-page-container th,
.hpc-page-container label,
.hpc-page-container .as-label,
.hpc-page-container button,
.hpc-page-container a[class*="btn"],
.hpc-page-container a[class*="button"] {
    font-weight: var(--hpc-font-weight-semibold) !important;
}

.hpc-page-container input,
.hpc-page-container select,
.hpc-page-container textarea,
.par-shell input,
.par-shell select,
.par-shell textarea { font-weight: var(--hpc-font-weight-regular) !important; }

.par-shell,
.par-shell button,
.par-shell input,
.par-shell select,
.par-shell textarea { font-family: var(--app-content-font-family, var(--hpc-ui-font-family)); }

.par-shell__brand strong,
.par-shell__identity strong,
.par-stage-header h1,
.par-stage-header h2,
.par-stage-header h3 { font-weight: var(--hpc-font-weight-semibold) !important; }

.public-nav,
.public-nav button,
.public-nav a,
.auth-login-page,
.auth-login-page button,
.auth-login-page input { font-family: var(--app-content-font-family, var(--hpc-ui-font-family)); }

.public-brand-name,
.public-nav-link,
.public-login-btn,
.auth-story-brand strong,
.auth-kicker,
.auth-field label,
.auth-submit-button { font-weight: var(--hpc-font-weight-semibold) !important; }

.hpc-app-footer,
.hpc-app-footer * { font-family: var(--app-footer-font-family, var(--hpc-ui-font-family)); }
.hpc-app-footer { font-weight: var(--hpc-font-weight-regular) !important; }

code,
kbd,
pre,
samp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
