/* ============================================================
   Balance — legal pages (privacy.html, terms.html).

   These load site.css FIRST and this file second: site.css owns
   the tokens, the scrolling body, the nav and the footer, so all
   that is left here is a readable prose column. Duplicating the
   palette in a third file is exactly how the schemes drift apart.
   ============================================================ */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.legal-header {
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--hairline);
}

.legal-header h1 {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.legal-updated {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}

/* The opening paragraph carries the summary, so it reads a size up. Qualified
   with the element to outweigh the `.legal p` colour below it. */
.legal p.legal-lede {
  font-size: 16.5px;
  color: var(--text);
}

.legal h2 {
  margin: 38px 0 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.72;
  color: var(--text-2);
}

.legal p { margin-bottom: 14px; }

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li { margin-bottom: 9px; }

.legal li::marker { color: var(--text-3); }

.legal strong {
  color: var(--text);
  font-weight: 600;
}

/* Links inside prose are underlined on purpose. The bylines elsewhere hide
   their underline because they are dressed as bylines; here a link is a link. */
.legal-body a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A callout for the two things people most need to notice: that Balance is a
   record for you and not an agreement between you and anyone else. */
.legal-callout {
  margin: 26px 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.legal-callout p:last-child { margin-bottom: 0; }

/* `.footer-legal` — the Privacy · Terms line in the footer — lives in site.css,
   because the landing page carries the same line and does not load this file.
   It sits *inside* `.legal-body` here though, so the prose link rule above wins
   on specificity and would paint it indigo and underlined. Put it back. */
/* On these pages it also closes the document, so it gets a rule above it —
   mirroring the one under the title. On the landing page it just trails the
   footer note and needs neither. */
.legal-body .footer-legal {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.legal-body .footer-legal a {
  color: var(--text-2);
  font-weight: 400;
  text-decoration: none;
}

.legal-body .footer-legal a:hover { color: var(--text); }

@media (min-width: 880px) {
  .legal { padding-top: 40px; }
  .legal-header h1 { font-size: 38px; }
}
