/* Summary section — one check-your-answers group, per the Figma Forms
   confirmation comp: a heading with a section-level Change link, the answer
   rows (a summary list), closed off by a rule.

   Sections space themselves: 24px between siblings, and nothing before the first
   or after the last, so a stack never carries a dangling margin at either end.

   A page that lays its own blocks out with a flex or grid gap would space them
   twice, so the amount is a custom property the page can turn off:

     .my-check-answers { --govbb-summary-section-gap: 0; }

   (Not a registered @property: an initial-value cannot reference the spacing
   token, and splitting the two would be worse than the var() fallback.) */

.govbb-summary-section {
  display: flex;
  flex-direction: column;
  gap: var(--govbb-space-s);
  padding-block-end: var(--govbb-space-m);
  font-size: var(--govbb-font-size-body);
  line-height: var(--govbb-line-height-base);
  border-block-end: 4px solid var(--govbb-color-neutral);
}

/* 24px between sections, as between the answer groups in the Review comp. */
.govbb-summary-section + .govbb-summary-section {
  margin-block-start: var(--govbb-summary-section-gap, var(--govbb-space-xm));
}

.govbb-summary-section__header {
  display: flex;
  gap: var(--govbb-space-m);
  align-items: start;
}

.govbb-summary-section__title {
  flex: 1;
  margin: 0;
  font-size: var(--govbb-font-size-h2);
  font-weight: 600;
  line-height: var(--govbb-line-height-h2);
  letter-spacing: var(--govbb-letter-spacing-heading);
}
