/* One type scale for both languages and all project chapters.
   Keep this after chapter styles: their legacy sizes must not add new tiers. */
:root {
  --type-caption: .875rem; /* 14 */
  --type-body: 1.125rem;   /* 18 */
  --type-heading: 2rem;   /* 32 */
  --type-display: 3.5rem; /* 56 */
}
#app { font-size: var(--type-body); }
#app *, #app *::before, #app *::after { font-size: inherit !important; }

#app :is(p, li, dd, dt, h4, h5, h6, summary, .module-description) {
  font-size: var(--type-body) !important;
}
#app :is(h1, h2, h3, .lead, .wordmark) {
  font-size: var(--type-heading) !important;
  line-height: 1.2;
}
#app :is(h4, h5, h6) { line-height: 1.4; font-weight: 600; }
#app :is(.research-decisions h3, .brief h3, .priority-row h3,
  .wheelchair-notes h3, .initial-architecture-parts h4,
  .cmf-surfaces h4, .intro-label, #hero-title) {
  font-size: var(--type-body) !important;
  line-height: 1.4;
  font-weight: 600;
}
#app :is(.product-hero-headline, .stat-number) {
  font-size: var(--type-display) !important;
  line-height: 1.08;
}
#app .stat-number small { font-size: var(--type-heading) !important; }

/* Supporting information and controls share the same readable caption size. */
#app :is(button, input, select, small, sup, figcaption, .eyebrow, .tag,
  .header-links, .project-context, .project-facts, .project-facts dt,
  .project-facts dd, .section-top, .section-id, .section-id span,
  .footnote, .note, .source-list li, .sources summary, .footer p, .footer-links,
  .product-hero-category, .product-hero-actions, .module-collapse-row,
  .initial-model-label, .initial-model-toolbar p, .initial-part-number,
  .initial-architecture-parts p, .initial-architecture-note,
  .form-decision-meta, .cmf-row-number, .cmf-marker, .cmf-spec,
  .gripper-feature-note, .gripper-feature-details dt > span,
  .workbench-interactive-label, .workbench-toggle-hint,
  .workbench-instructions, .wheelchair-note-number, .wheelchair-marker,
  .stat-kicker, .chart-title, .chart-ends, .chart-scale, .chart-legend,
  .sketch-gallery-tools p, .privacy-design-note, .privacy-design-references,
  .research-takeaway, .architecture-brief, .initial-architecture-copy > .eyebrow) {
  font-size: var(--type-caption) !important;
}
#app :is(.workbench-toggle-copy strong, .workbench-toggle-action) {
  font-size: var(--type-body) !important;
}
#app svg text { font-size: var(--type-caption) !important; }
#app .architecture-brief {
  width: 100%;
  max-width: none;
  margin: 28px 0;
  line-height: 1.65;
  text-wrap: wrap;
}
@media (max-width: 580px) {
  /* Reuse existing tiers rather than introducing more mobile sizes. */
  #app .product-hero-headline { font-size: var(--type-heading) !important; }
  #app .module-summary .module-title { font-size: var(--type-body) !important; }
  #app .narrative-extra > summary { flex-wrap: wrap; gap: 8px 16px; }
  #app .narrative-extra > summary > small { margin-left: 0; }
}
