/**
 * Gaia base typography and density contract.
 * Bootstrap Reboot remains authoritative for reset and element normalization.
 */

html {
  font-size: var(--gaia-font-size-root);
}

body {
  font-family: var(--gaia-font-family-ui);
  font-size: var(--gaia-font-size-body);
  line-height: var(--gaia-font-line-height-body);
  color: var(--gaia-text-primary);
  background-color: var(--gaia-surface-page);
}

:where(h1, h2, h3, h4, h5, h6, .gaia-heading, .gaia-metric) {
  font-family: var(--gaia-font-family-heading);
  line-height: var(--gaia-font-line-height-heading);
}

h1,
.gaia-page-title {
  font-size: var(--gaia-font-size-page-title);
}

h2,
.gaia-section-title {
  font-size: var(--gaia-font-size-section);
}

h3,
.gaia-component-title {
  font-size: var(--gaia-font-size-component);
}

:where(table) {
  font-size: var(--gaia-table-font-size);
}

:where(label) {
  font-size: var(--gaia-font-size-label);
}

small,
.gaia-caption {
  font-size: var(--gaia-font-size-caption);
}

.gaia-metric {
  font-size: var(--gaia-font-size-metric);
  font-weight: var(--gaia-font-weight-semibold);
}

/* Retained public typography aliases used by existing Razor views. */
:where(.display-one, .display-two, .heading-3xl, .heading-2xl) {
  font-family: var(--gaia-font-family-heading);
  font-size: var(--gaia-font-size-page-title);
  font-weight: var(--gaia-font-weight-bold);
  line-height: var(--gaia-font-line-height-heading);
}

:where(.heading-xl, .heading-lg) {
  font-family: var(--gaia-font-family-heading);
  font-size: var(--gaia-font-size-section);
  font-weight: var(--gaia-font-weight-semibold);
  line-height: var(--gaia-font-line-height-heading);
}

:where(.subtitle-md, .subtitle-sm) {
  font-family: var(--gaia-font-family-heading);
  font-size: var(--gaia-font-size-component);
  font-weight: var(--gaia-font-weight-semibold);
  line-height: var(--gaia-font-line-height-heading);
}

:where(.body-lg, .body-md, .text-md) {
  font-size: var(--gaia-font-size-body);
  font-weight: var(--gaia-font-weight-regular);
  line-height: var(--gaia-font-line-height-body);
}

:where(.body-md-bold, .body-sm-bold) {
  font-size: var(--gaia-font-size-body);
  font-weight: var(--gaia-font-weight-semibold);
  line-height: var(--gaia-font-line-height-body);
}

:where(.body-sm, .text-sm) {
  font-size: var(--gaia-font-size-table);
  font-weight: var(--gaia-font-weight-regular);
  line-height: var(--gaia-font-line-height-body);
}

:where(.caption, .caption-demi, .text-xs) {
  font-size: var(--gaia-font-size-caption);
  line-height: var(--gaia-font-line-height-body);
}

.caption-demi {
  font-weight: var(--gaia-font-weight-semibold);
}

:where(.form-control, .form-select, .btn) {
  min-height: var(--gaia-control-height);
}
