/* legal.css — long-form legal pages (privacy.html; reusable by a future terms.html).
   Auth/marketing zone: Plus Jakarta Sans headings + Inter body. Tonal layering, no 1px
   section borders, ambient shadows only (per the Narrative Voyager design rules). */

.legal-body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

/* ── Top bar (wordmark + back link; no pill nav on a public legal page) ── */
.legal-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.legal-bar-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.legal-bar-wordmark img { height: 22px; width: auto; display: block; }
.legal-back {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  transition: color 0.15s ease, background 0.15s ease;
}
.legal-back:hover { color: var(--text-primary); background: var(--bg-tertiary); }

/* ── Document column ── */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.legal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.legal-updated {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.legal-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 28px;
}

/* ── Anchored section index ── */
.legal-toc {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin: 0 0 40px;
}
.legal-toc-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}
.legal-toc li { margin: 0 0 8px; break-inside: avoid; }
.legal-toc a {
  font-size: 14.5px;
  color: var(--text-secondary);
  text-decoration: none;
}
.legal-toc a:hover { color: var(--accent-text); }

/* ── Sections ── */
.legal-section {
  scroll-margin-top: 80px; /* offset for the sticky bar on anchor jump */
  padding: 30px 0;
  /* Section separation is by whitespace only — no hairline/border (design rule). */
}
.legal-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.legal-section h2 .legal-num {
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 8px;
}
.legal-section h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  margin: 22px 0 8px;
  color: var(--text-primary);
}
.legal-section p,
.legal-section li {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text-secondary);
}
.legal-section p { margin: 0 0 14px; }
.legal-section ul { margin: 0 0 14px; padding-left: 22px; }
.legal-section li { margin: 0 0 7px; }
.legal-section a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.legal-section strong { color: var(--text-primary); font-weight: 600; }

.legal-note {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── Data / processor tables ── */
.legal-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  vertical-align: top;
  line-height: 1.55;
}
.legal-table thead th {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}
.legal-table tbody tr + tr td { box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04); } /* tonal row separation */
.legal-table td:first-child { color: var(--text-primary); font-weight: 500; white-space: nowrap; }

/* ── Footer ── */
.legal-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.legal-foot a { color: var(--text-secondary); text-decoration: none; }
.legal-foot a:hover { color: var(--text-primary); }

@media (max-width: 768px) {
  .legal-page { padding: 32px 18px 72px; }
  .legal-toc ol { columns: 1; }
  .legal-table td:first-child { white-space: normal; }
}
