/* SectionHeader - a 20/600 sentence-case title over a panel or a grid,
   an optional muted description under it, an optional action on the
   right. Per docs/design-system.md, Type. */

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-header__text {
  max-width: 60ch;
}

.section-header__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-section);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.section-header__description {
  margin: var(--space-1) 0 0;
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

.section-header__action {
  flex-shrink: 0;
}

.section-header--center {
  justify-content: center;
  text-align: center;
}

/* The action goes under the title, so the title keeps the full width. */
@media (max-width: 600px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header--center {
    align-items: center;
  }
}
