/* ============================================================
   touchup mafia — /privacy and /terms
   Depends on tokens.css + base.css. Load it third.

   Two pages, one stylesheet. Legal text is the only prose on
   this site longer than a paragraph, so it is the only place
   that needs a reading measure wider than --measure (34ch, the
   bio) and a heading scale between the micro label and the
   display word. Everything else is the site's own tokens.
   ============================================================ */

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--face-ui);
  font-size: var(--text-read);
  line-height: var(--leading-read);
  letter-spacing: var(--track-meta);
  --grain: 0.024;   /* a working document carries less than a poster */
}

/* ------------------------------------------------------------
   The page
   ------------------------------------------------------------ */

.doc {
  max-width: 68ch;              /* the bio's 34ch is a caption measure */
  margin: 0 auto;
  padding: var(--space-4) var(--gutter) var(--space-7);
  counter-reset: clause;
}

.doc__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
}

.doc__nav img.mark { width: var(--mark-md); }

.doc__back {
  font-size: var(--text-small);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-quiet);
  text-decoration: none;
}
.doc__back:hover { color: var(--ink); }

.doc__head {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-4);
  margin-bottom: var(--space-5);
}

.doc__title {
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--text-display-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
}

.doc__lede {
  margin: 0;
  font-size: var(--text-lede);
  line-height: 1.45;
  color: var(--ink-quiet);
}

/* ------------------------------------------------------------
   Clauses

   Numbered by CSS, so inserting one never leaves a stale figure
   in the markup.
   ------------------------------------------------------------ */

.doc section {
  border-top: 1px solid var(--hairline-soft);
  padding-top: var(--space-4);
  margin-bottom: var(--space-5);
}

.doc h2 {
  display: flex;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: var(--leading-ui);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}

.doc h2::before {
  counter-increment: clause;
  content: counter(clause);
  flex: 0 0 2.5ch;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

.doc h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-meta);
  text-transform: none;
}

.doc p { margin: 0 0 var(--space-3); }
.doc p:last-child { margin-bottom: 0; }

.doc ul {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.doc li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
}

/* An en dash, not a bullet: the same mark the ledger uses. */
.doc li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

.doc a { color: inherit; text-decoration-color: var(--ink-faint); }
.doc a:hover { color: var(--ink-hover); text-decoration-color: currentColor; }

.doc strong { font-weight: var(--weight-bold); }

/* The one block that is quoted verbatim from somebody else's
   policy and must stay recognisable as such. */
.doc blockquote {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  background: var(--fill);
  border-left: 2px solid var(--hairline);
  font-size: var(--text-base);
}

/* ------------------------------------------------------------
   Definition rows — reused from the Info ledger
   ------------------------------------------------------------ */

.doc dl {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
}

.doc dl div {
  display: grid;
  grid-template-columns: 14ch 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.doc dt {
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  font-size: var(--text-micro);
  color: var(--ink-quiet);
  padding-top: 2px;
}

.doc dd { margin: 0; }

@media (max-width: 520px) {
  .doc dl div { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ------------------------------------------------------------
   Foot
   ------------------------------------------------------------ */

.doc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-3);
  margin-top: var(--space-6);
}

.doc__foot a { color: inherit; }
