@layer components {
  /* The legal pages

     The only pages in the product read end to end rather than scanned, so they
     are prose on a measure with space between the sections and nothing else:
     terms set in boxes and rules read as a form to be filled rather than an
     agreement to be read. */

  /* The measure, in the page's own column, starting where every other page
     starts.

     These three used to take .page--narrow, which is the 30rem the sign-in form
     is set in — a form with four controls in it, centred in the viewport
     because there is nothing else on the screen. On a page of prose that is
     both too narrow to read (six words to the line, and every paragraph
     breaking four times) and in the wrong place: the column sat 270px right of
     where Workspace and Members put theirs, and .page--narrow's 80px of
     padding-top dropped the heading another 80px below every other heading in
     the product. Going from the workspace page to Privacy — which is one link
     in the footer of it — moved the page sideways and down and shrank it.

     --measure is the answer the tokens already give: prose is pinned to it
     wherever it appears, left-aligned in the column, which is what a
     standfirst does on every page here. So the heading lands exactly where the
     other headings land, and the sentence under it is exactly as wide. */
  .legal { max-width: var(--measure); }

  .legal h2 { font-size: var(--text-md); }

  /* Ochre, because it is the colour this product already uses for "this is not
     settled yet", and because a draft notice that blends in is not one. */
  .legal__draft {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    background: var(--warn-sunk);
    font-size: var(--text-sm);
  }

  /* Under the prose rather than under the column, and only after one of these
     three pages: the same footer closes the workspace page, where the cards
     above it are the full width and its rule should be too. */
  .legal + .legal__footer { max-width: var(--measure); }

  .legal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
  }

  .legal__link { color: var(--ink-muted); font-size: var(--text-sm); }
}
