/* ============================================================================
   LEGAL DOCUMENT TYPOGRAPHY — privacy.html, terms.html
   Loads after site.css and uses its tokens.

   Two accessibility rules are load-bearing here:
     · Body and TOC links use --color-gold-text (#FF4A55), not --color-gold
       (#E51523). At 11–15px the brand red only reaches 3.78:1 on
       --color-surface, which fails AA.
     · Every prose link is underlined. WCAG 1.4.1 forbids colour as the only
       means of identifying a link, and red-on-grey gives just 1.58:1 against
       the surrounding text.
   ========================================================================= */

.legal-body {
  max-width: 820px;
  margin: 0 auto;
}

.legal-meta {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* ------------------------------------------------------ table of contents -- */
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 52px;
  padding: 22px 26px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

/* Specificity note: `.legal-body a` below matches these same links with equal
   weight, so the TOC rules must win on their own terms — hence the descendant
   selector rooted at .legal-body. */
.legal-body .legal-toc a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);   /* 6.00:1 on --color-surface */
  text-decoration: none;                /* a list of links needs no underline */
  transition: color .2s;
}
.legal-body .legal-toc a:hover,
.legal-body .legal-toc a:focus-visible {
  color: var(--color-gold-text);
  text-decoration: underline;
}

/* ---------------------------------------------------------------- prose -- */
.legal-body h2 {
  margin: 52px 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  scroll-margin-top: 120px;
}
.legal-body h2:first-of-type { margin-top: 0; }

.legal-body p,
.legal-body li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-secondary);
}
.legal-body p { margin-bottom: 16px; }
.legal-body ul { margin: 0 0 16px 20px; }
.legal-body li { margin-bottom: 10px; }

.legal-body strong { color: var(--color-text-primary); font-weight: 500; }

/* Prose links: readable colour AND an underline, so colour is never the only
   signal that something is a link. */
.legal-body p a,
.legal-body li a {
  color: var(--color-gold-text);        /* 5.40:1 on --color-surface */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.legal-body p a:hover,
.legal-body li a:hover {
  color: var(--color-gold-bright);
  text-decoration-thickness: 2px;
}

@media (max-width: 700px) {
  .legal-toc { gap: 8px 16px; padding: 18px 20px; }
  .legal-body h2 { margin: 40px 0 14px; }
}
