/* Legal pages (Terms of Use, Privacy Policy).
   These are the only long-form reading pages on the site: no hero, no curtain,
   no scroll choreography — just a column of text someone may have to work
   through carefully, or land in mid-way from a footer link. Everything here is
   in service of that, and nothing in this file is used by any other page. */

.legal-main {
  /* The site header is `position: fixed`, so the first line of a legal page
     would otherwise start underneath it. */
  padding: calc(5.5rem + var(--gutter)) var(--gutter) clamp(3rem, 6vw, 5rem);
  background: var(--paper);
}

.legal-doc {
  max-width: 46rem; /* ~72 characters at this size — a comfortable measure. */
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.5rem, 4vw, 3.25rem);
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--section-shadow);
}

.legal-doc__title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.legal-doc__date {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.legal-doc__body {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--paper-strong);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-doc__body h2 {
  margin: 2.6rem 0 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  /* Legal headings run long and are the lines most likely to strand a single
     word; `balance` evens the lines instead of leaving a widow. */
  text-wrap: balance;
  /* A heading reached from a footer link or an in-page anchor should not land
     flush against the fixed header. */
  scroll-margin-top: 6rem;
}

.legal-doc__body h2:first-child {
  margin-top: 0;
}

.legal-doc__body h3 {
  margin: 1.9rem 0 0.7rem;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.legal-doc__body p {
  margin: 0 0 1.05rem;
  /* Body copy is set as written and cannot be re-broken by hand, so widow
     control here is the browser's: `pretty` keeps a lone word off the last
     line wherever it can. */
  text-wrap: pretty;
}

.legal-doc__body ul {
  margin: 0 0 1.15rem;
  padding-left: 1.3rem;
}

.legal-doc__body li {
  margin-bottom: 0.55rem;
  text-wrap: pretty;
}

.legal-doc__body li::marker {
  color: var(--accent);
}

.legal-doc__body strong {
  color: var(--ink);
  font-weight: 700;
}

/* Global `a` is colour:inherit / no underline, which is right for navigation
   but wrong inside a document: a cross-reference to the other policy has to
   look like a link in a wall of text. */
.legal-doc__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  /* Email addresses and the full policy URL are long, unbreakable strings that
     would otherwise push the column sideways on a phone. */
  overflow-wrap: anywhere;
}

.legal-doc__body a:hover,
.legal-doc__body a:focus-visible {
  color: var(--ink);
}

/* Six paragraphs in the Terms (the warranty disclaimer and the liability cap)
   are set in full capitals in the source and stay that way — the emphasis is
   legally deliberate. But a wall of capitals at body size is punishing to
   read, so these get a little air between the letters and a slightly smaller
   size, which shortens the line and makes the block scannable without
   softening it. */
.legal-doc__body .legal-caps {
  font-size: 0.93rem;
  line-height: 1.75;
  letter-spacing: 0.012em;
}
