/*
 * privacy_policy.css — the Privacy Policy set as a legal document.
 *
 * One left-aligned reading column (~70 characters), no cards, no icons.
 * Clauses are numbered with CSS counters ("2", "2.3") hung in a left gutter so
 * the text edge stays clean and any clause can be cited. On narrow screens the
 * gutter collapses and the numbers run inline. All colour comes from the shared
 * `--r-*` dark tokens; the accent appears only on the summary rule and focus.
 */

body.redesign .legal-doc {
  --legal-gutter: 3rem;
  max-width: min(44rem, 100%);
  margin: 0 auto;
  padding-block: 1rem 4rem;
  line-height: 1.7;
  counter-reset: legal-clause;
}

/* ---------- Title block ---------- */

body.redesign .legal-head {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--r-line);
}

body.redesign .legal-head h1 {
  font-size: var(--font-3xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

body.redesign .legal-meta {
  font-size: var(--font-sm);
  color: var(--r-text-faint);
  font-variant-numeric: tabular-nums;
  margin: 0 0 1.5rem;
}

body.redesign .legal-lede {
  font-size: var(--font-lg);
  line-height: 1.65;
  margin: 0;
}

/* ---------- Plain-language summary (not part of the numbered clauses) ---------- */

body.redesign .legal-summary {
  border-left: 2px solid var(--r-accent);
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

body.redesign .legal-summary h2 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin: 0 0 1rem;
}

body.redesign .legal-summary ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--r-text-dim);
}

body.redesign .legal-summary li + li {
  margin-top: 0.6rem;
}

body.redesign .legal-summary li::marker {
  color: var(--r-text-faint);
}

body.redesign .legal-doc b,
body.redesign .legal-doc strong {
  color: var(--r-text);
  font-weight: 600;
}

/* ---------- Contents ---------- */

body.redesign .legal-toc {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--r-line-soft);
}

body.redesign .legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: legal-toc;
}

body.redesign .legal-toc li {
  counter-increment: legal-toc;
  display: flex;
  align-items: baseline;
}

body.redesign .legal-toc li::before {
  content: counter(legal-toc);
  flex-shrink: 0;
  width: var(--legal-gutter);
  color: var(--r-text-faint);
  font-variant-numeric: tabular-nums;
}

body.redesign .legal-toc a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--r-text-dim);
  text-decoration: none;
  border-radius: 2px;
}

body.redesign .legal-toc a:hover {
  color: var(--r-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

body.redesign .legal-toc a:focus-visible {
  outline: 2px solid var(--r-focus);
  outline-offset: 2px;
}

/* ---------- Numbered clauses ---------- */

body.redesign .legal-clause {
  counter-increment: legal-clause;
  counter-reset: legal-sub;
  padding-left: var(--legal-gutter);
  margin-bottom: 2.75rem;
  scroll-margin-top: calc(var(--r-topbar) + 1.5rem);
}

body.redesign .legal-clause h2 {
  position: relative;
  font-size: var(--font-xl);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1rem;
}

body.redesign .legal-clause h2::before {
  content: counter(legal-clause);
  position: absolute;
  left: calc(-1 * var(--legal-gutter));
  color: var(--r-text-faint);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

body.redesign .legal-clause p {
  margin: 0 0 1rem;
}

body.redesign .legal-subclauses {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--r-text-dim);
}

body.redesign .legal-subclauses li {
  position: relative;
  counter-increment: legal-sub;
}

body.redesign .legal-subclauses li + li {
  margin-top: 0.75rem;
}

body.redesign .legal-subclauses li::before {
  content: counter(legal-clause) "." counter(legal-sub);
  position: absolute;
  left: calc(-1 * var(--legal-gutter));
  color: var(--r-text-faint);
  font-variant-numeric: tabular-nums;
}

/* Explanatory sentence that closes a clause; set apart by space, not a box. */
body.redesign .legal-clause .legal-note {
  margin-top: 1.25rem;
}

body.redesign .legal-clause > :last-child {
  margin-bottom: 0;
}

/* ---------- Closing acknowledgment ---------- */

body.redesign .legal-ack {
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--r-line);
  color: var(--r-text-faint);
}

/* Narrow screens: drop the hanging gutter, run numbers inline. */
@media (max-width: 600px) {
  body.redesign .legal-doc {
    --legal-gutter: 0;
  }

  body.redesign .legal-clause h2::before,
  body.redesign .legal-subclauses li::before {
    position: static;
    margin-right: 0.6rem;
  }

  body.redesign .legal-toc li::before {
    width: 2rem;
  }
}
