.chapter {
  --theme-background: var(--color-paper-warm);
  --theme-foreground: var(--color-charcoal-deep);
  padding: clamp(5rem, 12vh, 10rem) var(--page-gutter);
  background-color: var(--theme-background);
  color: var(--theme-foreground);
}

.chapter--forest {
  --theme-background: var(--color-forest-green);
  --theme-foreground: var(--color-paper-warm);
}

.chapter--charcoal {
  --theme-background: var(--color-charcoal-deep);
  --theme-foreground: var(--color-paper-warm);
}

.chapter--slate {
  --theme-background: var(--color-slate-blue);
  --theme-foreground: var(--color-paper-warm);
}

.chapter--auto-height {
  min-height: 0;
}

.chapter__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
}

.chapter__title {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 45rem;
  font-size: 2rem;
  line-height: 1.2;
}

.chapter__number {
  font-size: var(--font-size-lead);
  font-weight: 400;
  line-height: 1;
}

.chapter__number::after {
  display: block;
  width: 5rem;
  height: 1px;
  margin-top: 0.375rem;
  background-color: currentColor;
  content: "";
}

.chapter__lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-size: var(--font-size-lead);
  line-height: 1.7;
}

.chapter__statement {
  max-width: 30ch;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.35;
}

.chapter__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  margin-top: 2.5rem;
}

.chapter__related {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid currentColor;
}

@media (max-width: 40em) {
  .chapter {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .chapter__title {
    font-size: 1.75rem;
  }

  .chapter__statement {
    font-size: 1.75rem;
  }
}
