/* ==========================================================
   Legal pages (privacy.html, and the terms and policy pages that follow it): the list of sections in column 1,
   held in view while reading; the text across columns 2-3 in one readable column.
   ========================================================== */
.legal { align-items: start; }

.legal__toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc;
  font-family: var(--font-mono); font-size: var(--type-size-small); letter-spacing: var(--mono-letter-spacing); line-height: 1.4; }
.legal__toc li { counter-increment: toc; display: flex; gap: var(--space-3); padding: 7px 0; }
.legal__toc li::before { content: counter(toc, decimal-leading-zero); color: var(--color-text-muted); }
.legal__toc a { color: var(--color-text-muted); text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 3px; transition: color .25s, text-decoration-color .25s; }
.legal__toc a:hover { color: var(--color-text); text-decoration-color: currentColor; }

.legal__body { grid-column: 2 / -1; max-width: 68ch; padding: 0 var(--pad); font-size: clamp(16px, 1.15vw, 18px); line-height: 1.65; }
.legal__body > :first-child { margin-top: 0; }
.legal__body > :last-child { margin-bottom: 0; }
/* no line ends on a single word (fix G22) */
.legal__body p, .legal__body li, .legal__body td, .legal__body h2 { text-wrap: pretty; }
.legal__body h2 { margin: var(--space-16) 0 var(--space-4); font-family: var(--font-display); font-weight: var(--weight-headline, 400);
  font-size: clamp(22px, 1.9vw, 28px); line-height: 1.2; scroll-margin-top: calc(var(--nav-h) + var(--space-8)); }
.legal__body p, .legal__body ul, .legal__body table, .legal__body address { margin: 0 0 var(--space-4); }
.legal__body ul { padding-left: 1.2em; list-style: square; }
.legal__body li::marker { color: var(--color-orange); }
.legal__body li + li { margin-top: var(--space-2); }
.legal__body strong { font-weight: 600; }
.legal__body a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color .25s; }
.legal__body a:hover, .legal__body a:focus-visible { text-decoration-color: var(--color-orange); }
.legal__body address { font-style: normal; }

/* the uses and their legal basis: two columns of text, ruled like the site's lists */
.legal__body table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule); font-size: .94em; line-height: 1.5; }
.legal__body th { padding: var(--space-3) var(--space-4) var(--space-3) 0; text-align: left; font-weight: 400;
  font-family: var(--font-mono); font-size: var(--type-size-small); letter-spacing: var(--mono-letter-spacing); text-transform: uppercase; color: var(--color-text-muted); }
.legal__body td { padding: var(--space-3) var(--space-4) var(--space-3) 0; vertical-align: top; border-top: 1px solid var(--rule); }
/* a list of what and why (accessibility.html): one first-column width, so consecutive lists line up */
.legal__facts th:first-child { width: 11em; }

/* below 1100px column 1 is too narrow for the section names: the list goes and the text takes the full width */
@media (max-width: 1099px) {
  .legal__toc { display: none; }
  .legal__body { grid-column: 1 / -1; }
  .legal::before { display: none; }   /* no column line through the text */
}
/* phones: each use stacks over its legal basis */
@media (max-width: 559px) {
  .legal__body thead { display: none; }
  .legal__body tr, .legal__body td { display: block; }
  .legal__body tr { padding: var(--space-3) 0; border-top: 1px solid var(--rule); }
  .legal__body td { padding: 0; border: 0; }
  .legal__body td:first-child { font-weight: 600; }
  .legal__body table { border-top: 0; }
}
@media (max-width: 759px) {
  .legal__body { padding-inline: 0; }
  .pg-main > .legal:last-child { padding-bottom: var(--space-12); }   /* the standard 48px at a phone section's edge */
}

/* the surface page headline breaks after "agents" at every width, so "people" never sits alone: the width stops "and"
   joining the first line (7.3em without it, 9.3em with it), and below 381px the type shrinks so "Built for agents" fits */
.sf-title { max-width: calc(8.3em + 2 * var(--pad)); font-size: clamp(min(2.5rem, 10.5vw), 4.6vw, 4.5rem); }
