@font-face {
  font-family: "Inter";
  src: url("../prototype/assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* ScopeAI-aligned platform typography. Loaded last across every runtime page. */
:root {
  --font-ui: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, Consolas, monospace;
  --type-xs: 12px;
  --type-sm: 13px;
  --type-body: 14px;
  --type-lead: 15px;
  --type-subhead: 16px;
  --type-section: 20px;
  --type-metric: 28px;
  --weight-regular: 400;
  --weight-medium: 570;
  --weight-active: 640;
  --weight-semibold: 650;
  --weight-bold: 700;
  --leading-meta: 1.4;
  --leading-title: 1.48;
  --leading-body: 1.65;
  --leading-copy: 1.8;
}

html {
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, button, input, textarea, select, option, dialog {
  font-family: var(--font-ui) !important;
  font-synthesis: none;
  font-kerning: normal;
}

body :is(h1, h2, h3, h4, h5, h6, p, span, strong, b, small, label, legend, li, dt, dd, th, td, a, time, button, input, textarea, select, option) {
  font-family: var(--font-ui) !important;
}

body .report-shell :is(h1, h2, h3, h4, h5, h6, p, span, strong, b, small, label, li, dt, dd, th, td, a, time, button) {
  font-family: var(--font-ui) !important;
}

body {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal;
}

body :is(p, li, dt, dd, td) {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal !important;
}

body :is(small, time, figcaption, caption) {
  font-size: var(--type-xs) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-meta) !important;
  letter-spacing: normal !important;
}

body :is(button, input, textarea, select) {
  font-size: var(--type-sm) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal !important;
}

body :is(th, legend) {
  font-size: var(--type-xs) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-meta) !important;
  letter-spacing: .02em !important;
}

body h1 {
  font-size: var(--type-section) !important;
  font-weight: var(--weight-bold) !important;
  line-height: 1.4 !important;
  letter-spacing: -.01em !important;
}

body h2 {
  font-size: var(--type-subhead) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-title) !important;
  letter-spacing: -.012em !important;
}

body h3 {
  font-size: var(--type-lead) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal !important;
}

body h4 {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-medium) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal !important;
}

body :is(strong, b) { font-weight: var(--weight-medium); }

body :is(.page-heading h1, .resource-heading h1, .admin-header h1, .page-intro h2, .share-heading h1, .dashboard-heading h1, .boot-error h1) {
  font-size: var(--type-section) !important;
  font-weight: var(--weight-bold) !important;
  line-height: 1.4 !important;
  letter-spacing: -.01em !important;
}

body :is(.panel-head h2, .panel-heading h2, .section-heading h2, .queue-heading h2, .card-heading h3, .modal-head h2, .drawer-top h2, .followup-share-dialog h2, .share-node-dialog h2, .analysis-company h3, .analysis-section h3, .customer-head h2, .credential-card h2, .credential-dialog-card h2, .release-notes-modal h2) {
  font-size: var(--type-subhead) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-title) !important;
  letter-spacing: -.012em !important;
}

body :is(.nav-item, .nav-link, .main-nav button, .admin-nav button) {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-body) !important;
}

body :is(.nav-item.is-active, .nav-item.active, .nav-link.is-active, .nav-link.active, .main-nav button.is-active, .admin-nav button.active) {
  font-weight: var(--weight-active) !important;
}

body :is(.nav-item, .nav-link, .main-nav button, .admin-nav button) :is(span, strong) {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

body :is(.nav-label, .eyebrow, .section-kicker, .dialog-kicker) {
  font-size: var(--type-xs) !important;
  font-weight: var(--weight-semibold) !important;
  line-height: var(--leading-meta) !important;
  letter-spacing: .02em !important;
}

body :is(.company-name, .company h3, .task-customer strong, .info-brief-link, .recent-batch-card > strong, .signal-focus strong, .region-tracking-card header strong, .batch-row strong, .account-identity strong, .share-history-item > strong) {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-medium) !important;
  line-height: var(--leading-body) !important;
  letter-spacing: normal !important;
}

body :is(.breadcrumbs, .panel-head p, .panel-heading p, .metric-label, .metric-meta, .company-meta, .chart-y-labels, .chart-x-labels, .chart-summary, .updated-label, .table-pagination, .caption-note, .legend-note, .status-tag, .tier-mark, .analysis-small, .drawer-bottom p, .share-footnote, .material-inline-status, .recent-batch-card__meta, .chart-series-legend, .signal-summary small, .signal-context dt, .info-brief-row time, .region-tracking-meta small, .region-stage-row small) {
  font-size: var(--type-xs) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-meta) !important;
  letter-spacing: normal !important;
}

body :is(.company-intro p, .detail-block p, .insight-body > p, .analysis-section p, .share-node-dialog p, .followup-share-dialog p, .release-notes-body p, .semantic-content > p, .semantic-final p) {
  font-size: var(--type-lead) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-copy) !important;
  letter-spacing: normal !important;
}

body :is(.metric-card > strong, .metric-card strong, .metric strong, .dashboard-kpi strong, .share-kpis button strong, .analysis-score-line strong, .analysis-metrics dd strong, .customer-score strong, .rule-score strong) {
  font-size: var(--type-metric) !important;
  font-weight: var(--weight-bold) !important;
  line-height: 1 !important;
  letter-spacing: -.01em !important;
  font-variant-numeric: tabular-nums;
}

body :is(time, code, .score-value, .metric-card strong, .dashboard-kpi strong, .share-kpis strong, .analysis-score-line strong, .analysis-metrics dd strong, .recent-batch-card__top b, .batch-plan-count, .batch-countdown, .region-stage-row strong) {
  font-variant-numeric: tabular-nums;
}

body code { font-family: var(--font-mono) !important; }

body :is(.modal-card, .share-drawer, .followup-share-dialog, .share-node-dialog, .credential-card, .credential-dialog-card) {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-body) !important;
}

body :is(.modal-head p, .assignment-help, .share-manager-notice, .touch-tracking-note, .notification-foot) {
  font-size: var(--type-body) !important;
  font-weight: var(--weight-regular) !important;
  line-height: var(--leading-body) !important;
}
