/* PageSectionComponent (app/components/page_section_component.rb): a titled part of a page. The heading row is the title, a short note after it (a count) and the actions at its
   end, over one hairline that runs the width of the section; then a sentence if there is one, then the body.

   The heading's size is the section's and not its level's: a section that is an h3 in the outline reads the same size as one that is an h2, so a page's sections look alike
   whatever depth the outline gives them. The room around it comes from the space scale (10-globals.css, "Space"): `--space-3` between the row and what it heads, `--space-4` between the
   parts of the body, and the page (`.page-flow`, 41-page-structure.css) puts `--section-gap` between two sections.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell and the console, in light and in dark, and
   mirrors in a right-to-left language. Nothing pinned to an edge, no height in vh, and everything that holds words may shrink and wrap, so a language 40% longer never widens the page (WCAG 1.4.10). */

.page-section {
  display: grid;
  gap: var(--space-3);
  min-inline-size: 0;
}

.page-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  min-inline-size: 0;
  padding-block-end: var(--space-2);
  border-block-end: 1px solid var(--rule);
}

.page-section__title {
  min-inline-size: 0;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
/* The light shell's pages are editorial, and their sections are larger. */
body:not([data-surface="console"]) .page-section__title {
  font-size: var(--text-xl);
}

.page-section__note {
  min-inline-size: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.page-section__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-inline-size: 0;
  margin-inline-start: auto;
}

.page-section__lede {
  max-inline-size: 66ch;
  margin: 0;
  color: var(--fg2);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.page-section__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  min-inline-size: 0;
}
