/* =============================================================================
   legal.css — Terms of Service & Privacy Policy content
   Zap Design System

   Fixes a real gap: js/pages/legal.js has rendered these pages since Phase 9,
   but no CSS file ever defined rules for any .legal-* class — the pages
   rendered as unstyled default browser HTML (no theme, no spacing, no
   dark/light mode support). This is that missing styling.

   The page's outer shell (back button, title) reuses .settings-page /
   .settings-back-btn / .settings-page-title from settings.css rather than
   inventing another wrapper system — everything below is specific to the
   legal document CONTENT itself, which has no equivalent elsewhere in the app.
   ============================================================================= */

.legal-body {
  font-family: var(--font-ui);
}

/* ─── HERO (title/subtitle/effective-date badge) ────────────────────────────── */

.legal-hero {
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-soft);
}

.legal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin: 0 0 var(--space-xs);
}

.legal-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
}

.legal-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-full);
  padding: 4px 12px;
}

/* ─── SECTIONS ───────────────────────────────────────────────────────────────── */

.legal-section {
  margin-bottom: var(--space-lg);
}

.legal-section__title {
  font-size: var(--text-base);
  font-weight: var(--font-semi);
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
}

.legal-section p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
}

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

.legal-list {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-md);
  list-style: none;
}

.legal-list li {
  position: relative;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  padding-left: var(--space-sm);
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.legal-list li:last-child {
  margin-bottom: 0;
}

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

/* ─── CALLOUT (a fact worth pausing on — never the danger tone; this is
   informational, not a warning. See legal-section--contact / anti-scam
   notice elsewhere in the app for that treatment) ───────────────────── */

.legal-callout {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--text-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-sm) 0 var(--space-md);
}

/* ─── TABLES (data collected / third-party processors) ─────────────────────── */

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--space-md);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 480px;
}

.legal-table th {
  text-align: left;
  font-weight: var(--font-semi);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-soft);
}

.legal-table td {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table td:first-child {
  color: var(--text-primary);
  font-weight: var(--font-medium);
  white-space: nowrap;
}

/* ─── CONTACT ────────────────────────────────────────────────────────────────── */

.legal-section--contact {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.legal-contact p {
  margin: 0 0 4px;
}

.legal-contact p:first-child {
  color: var(--text-primary);
  font-weight: var(--font-medium);
}

/* ─── LINKS ──────────────────────────────────────────────────────────────────── */

.legal-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-active);
  text-underline-offset: 2px;
}

.legal-link:hover {
  text-decoration-color: var(--text-primary);
}
