/* Shared type roles for every page. Layout styles must not redefine fonts. */
:root {
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --type-title: 2.75rem;
  --type-section: 1.75rem;
  --type-card: 1.25rem;
  --type-subheading: 1.125rem;
  --type-lead: 1.125rem;
  --type-body: 1rem;
  --type-small: 0.875rem;
  --type-label: 0.75rem;
  --type-nav: 0.875rem;
  --type-stat: 2rem;
  --type-total: 3rem;
  --weight-regular: 400;
  --weight-medium: 600;
  --weight-heading: 700;
  --leading-body: 1.6;
  --leading-heading: 1.2;
  --leading-ui: 1.4;
}

html { font-size: 100%; }

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

button, input, select, textarea { font: inherit; }
strong, b { font-weight: var(--weight-medium); }
small { font-size: var(--type-label); line-height: var(--leading-ui); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  letter-spacing: normal;
}
h1 { font-size: var(--type-title); }
h2 { font-size: var(--type-section); }
h3 { font-size: var(--type-card); }
h4, h5, h6 { font-size: var(--type-subheading); }

/* Every opening description has the same size and rhythm. */
.hero-lede,
.technical-hero > p:not(.kicker),
.document-hero > p:not(.kicker),
.evaluation-hero > div > p:not(.kicker),
.contact-details > p:not(.kicker) {
  font-size: var(--type-lead);
  line-height: var(--leading-body);
}

/* Cards use a shared role even when their semantic heading level differs. */
.solution-card h2,
.solution-audience h2,
.resource-group h2,
.search-results h2,
.search-empty h2,
.contact-next h2,
.policy-details > summary h2,
.directory-list strong,
.resource-links strong,
.home-solution-grid strong {
  font-size: var(--type-card);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}

.process-grid h3,
.use-case-flow h3,
.detail-columns h3,
.boundary-grid h3,
.field-groups h3,
.command-list h3 {
  font-size: var(--type-subheading);
}

/* Labels are UI text; monospace is reserved for code and keyboard notation. */
.kicker,
.offering-state,
.included-grid article > span,
.solution-audience > span,
.resource-group > div:first-child > span,
.delivery-option-meta,
.delivery-boundary > span,
.evaluation-platform-label,
.evaluation-download-status > span,
.evaluation-download-note > span,
.use-case-diagram > header > span,
.use-case-flow li > span,
.use-case-footer > span,
.use-case-branch-no,
.use-case-branch-output > span,
.directory-number,
.workbench-shot-copy > span,
.section-label > span,
.process-grid article > span,
.evaluation-process li > span,
.timeline > div > span,
.contact-methods dt,
.contact-form label > span,
.solution-card-label,
.solution-card-outcome > span,
.solution-result > span {
  font-family: var(--font-ui);
  font-size: var(--type-label);
  font-weight: var(--weight-medium);
  line-height: var(--leading-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.solution-card-label > span {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

/* Buttons, navigation, and disclosures share size and weight. */
.button,
.evaluation-download-status button,
.site-search-link,
.document-index a,
.section-tabs a,
.solution-jumps a,
.content-details > summary,
.text-link,
.workbench-shot-copy a,
.proof-links a,
.solution-related a,
.next-page a {
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
  line-height: var(--leading-ui);
}
.site-nav a, .site-nav .nav-contact {
  font-size: var(--type-nav);
  font-weight: var(--weight-medium);
  line-height: var(--leading-ui);
}

/* Secondary copy is smaller than body text, never smaller than the label role. */
.technical-note,
.table-scroll-hint,
.included-boundary,
.delivery-boundary p,
.evaluation-download-note p,
.verification-context,
.hero-meta,
.home-solution-grid span,
.home-proof-copy dd,
.resource-links small,
.directory-list small,
.contact-next a span,
.contact-form-note,
.search-suggestions,
.search-toolbar label,
.next-page,
.solution-section-intro > p:not(.kicker),
.solution-card-outcome,
.solution-evidence dd,
.solution-loop,
.solution-result p,
.solution-scope,
.solution-boundary strong,
.solution-boundary p,
.use-case-footer strong,
.use-case-branch-output strong {
  font-size: var(--type-small);
  line-height: var(--leading-body);
}

.hero-image-note,
figcaption,
.brand small,
.site-footer .footer-brand p,
.search-result-context,
.signal-bar span,
.result-stats small,
.verification-total > span,
.verification-metrics dt small,
.verification-metrics dd span {
  font-size: var(--type-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-ui);
}
.site-footer nav a { font-size: var(--type-small); }
.brand strong, .footer-product-name {
  font-size: var(--type-card);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}
.brand > span { line-height: var(--leading-heading); }

/* Tables, specifications, and result values retain clear data hierarchy. */
.data-table, .metric-table, .spec-grid dt, .spec-grid dd,
.home-proof-copy dt, .solution-evidence dt, .verification-metrics dt,
.formula-panel dt, .formula-panel dd {
  font-size: var(--type-small);
  line-height: var(--leading-body);
}
th, dt { font-weight: var(--weight-medium); }
.data-head, .metric-head, .platform-grid small, .platform-grid dt,
.formula-panel > div > span {
  font-size: var(--type-label);
  font-weight: var(--weight-medium);
  line-height: var(--leading-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.platform-grid strong, .timeline strong, .signal-bar strong {
  font-size: var(--type-card);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}
.result-stats strong, .verification-metrics dd {
  font-size: var(--type-stat);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  font-variant-numeric: tabular-nums;
}
.verification-metrics dd { font-size: var(--type-card); }
.result-stats span, .timeline small { font-size: var(--type-small); }
.verification-total strong {
  font-size: var(--type-total);
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
  font-variant-numeric: tabular-nums;
}

code, pre, kbd { font-family: var(--font-code); }
code { font-size: 0.9em; }
pre { font-size: var(--type-small); line-height: var(--leading-body); }
pre code { font-size: inherit; }
.option-grid code { font-size: var(--type-small); }
kbd { font-size: var(--type-label); line-height: var(--leading-ui); }
.formula-panel > div > strong {
  font-family: var(--font-code);
  font-size: var(--type-card);
  line-height: var(--leading-body);
}
blockquote { font-size: var(--type-subheading); line-height: var(--leading-body); }
.steps strong::before { font-size: var(--type-label); }

/* Symbols have their own dimensions; they are not text hierarchy. */
.site-search-link > span, .directory-arrow { font-size: 1.5rem; line-height: 1; }
.content-details > summary::before, .solution-loop > span,
.use-case-flow li::after, .use-case-branch-no::before {
  font-size: 1.25rem;
  font-weight: var(--weight-regular);
  line-height: 1;
}

@media (max-width: 720px) {
  :root {
    --type-title: 2rem;
    --type-section: 1.5rem;
    --type-card: 1.125rem;
    --type-lead: 1rem;
    --type-nav: 1rem;
    --type-stat: 1.75rem;
    --type-total: 2.5rem;
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  .site-nav { --type-nav: var(--type-body); }
}
