/* Prose additions for the legal pages, on top of pair.css.
 *
 * SEPARATE FILE, LOADED SECOND, because pair.css is sized for forms -- `main` is 32rem, which is
 * right for a sign-in box and far too narrow for a page somebody has to read end to end. Rather
 * than widen it there and reflow every other page, the legal pages opt in.
 *
 * No new colours. Every value below is one of pair.css's tokens, so these pages follow the same
 * light/dark switch as the rest of the product and there is nothing extra to keep in step.
 */

main.prose {
  /* ~70 characters a line at this font size, which is the readable range for long text. */
  max-width: 44rem;
}

.prose h1 { font-size: 1.6rem; margin: 0 0 0.25rem; }

/* The effective date and the "who this is" line, directly under the title. */
.prose .meta {
  margin: 0 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Numbered sections. `h2` keeps pair.css's size; the number comes from the counter so the
 * document can be reordered without renumbering by hand -- and so a section cannot be numbered
 * twice, which is the mistake that makes a cross-reference wrong. */
.prose { counter-reset: section; }
.prose section { margin: 0 0 1.75rem; }
.prose section > h2 { counter-increment: section; }
.prose section > h2::before {
  content: counter(section) ". ";
  color: var(--muted);
  font-weight: 600;
}

.prose p { margin: 0 0 0.8rem; line-height: 1.55; }
.prose ul { margin: 0 0 0.9rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 0.4rem; line-height: 1.5; }
.prose strong { font-weight: 650; }

/* A clause worth not skimming past. Used sparingly -- three times in each document -- because a
 * page where everything is emphasised has emphasised nothing. */
.prose .keynote {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 0 4px 4px 0;
}
.prose .keynote p:last-child { margin-bottom: 0; }

/* Subprocessors, retention: small tables that must stay readable on a phone. */
.prose .table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  /* WITHOUT THIS, `width: 100%` wins and the wrapper never scrolls: at phone width the three
   * subprocessor columns squeeze to a few characters each and the table is unreadable rather than
   * merely narrow. A min-width wider than a phone makes the wrapper do its job. */
  min-width: 30rem;
  font-size: 0.92rem;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.prose th { font-weight: 650; }
.prose td:first-child, .prose th:first-child { padding-right: 1rem; white-space: nowrap; }

.prose footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.prose footer a { margin-right: 1rem; }

/* The in-page contents. A plain list of links; no script, so it works before anything loads. */
.prose nav.toc {
  margin: 0 0 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.prose nav.toc ol { margin: 0; padding-left: 1.4rem; }
.prose nav.toc li { margin: 0 0 0.25rem; font-size: 0.92rem; }
