/* ─── Legal pages (Privacy Policy, Terms) ─────────────────────
 * Standalone readable typography for long-form legal documents.
 * Uses the same font families + color tokens as the main app
 * (see styles.css) so links and headings match the brand.
 */

:root {
  --legal-text: #4a6080;
  --legal-heading: #1a2f4a;
  --legal-rule: #e0e8f0;
  --legal-muted: #8a9db5;
}

/* Header bar across the top of a legal page. */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--legal-rule);
  background: #fff;
}

.legal-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--legal-heading);
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  text-decoration: none;
}

.legal-header-logo {
  height: 32px;
  width: auto;
}

.legal-header-nav {
  display: inline-flex;
  gap: 18px;
}

.legal-header-nav a {
  color: #4d84d6;
  font-size: 0.9rem;
  text-decoration: none;
}

.legal-header-nav a:hover {
  text-decoration: underline;
}

/* Document shell. */
.legal-page {
  background: #fafbfd;
  min-height: calc(100vh - 200px);
  padding: 48px 24px 72px;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 56px 64px;
  box-shadow: 0 2px 8px rgba(26, 47, 74, 0.04);
  color: var(--legal-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.legal-content h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--legal-heading);
  margin: 0 0 12px;
  line-height: 1.25;
}

.legal-content h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--legal-heading);
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.legal-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--legal-heading);
  margin: 1.25rem 0 0.5rem;
}

.legal-content p {
  margin: 0 0 0.9rem;
}

.legal-content ul {
  padding-left: 24px;
  margin: 0 0 1rem;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: #4d84d6;
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-content strong {
  color: var(--legal-heading);
}

.legal-content .last-updated,
.legal-content .effective-date {
  color: var(--legal-muted);
  font-size: 13px;
  margin: 0.5rem 0 1.5rem;
}

.legal-content .effective-date {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--legal-rule);
}

/* Tighter layout on narrow screens. */
@media (max-width: 680px) {
  .legal-header {
    padding: 12px 16px;
  }
  .legal-page {
    padding: 24px 12px 48px;
  }
  .legal-content {
    padding: 32px 22px;
    border-radius: 8px;
  }
  .legal-content h1 { font-size: 26px; }
  .legal-content h2 { font-size: 19px; }
  .legal-content h3 { font-size: 16px; }
}

/* Print-friendly: drop the header/footer chrome, use system serif,
   and make it look like a clean printed doc. */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .legal-header,
  .legal-header-nav,
  footer,
  .navbar {
    display: none !important;
  }
  .legal-page {
    background: #fff;
    padding: 0;
    min-height: 0;
  }
  .legal-content {
    max-width: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }
  .legal-content h1 { font-size: 22pt; margin-top: 0; }
  .legal-content h2 { font-size: 14pt; margin-top: 16pt; }
  .legal-content h3 { font-size: 12pt; }
  .legal-content a {
    color: #000;
    text-decoration: underline;
  }
  /* Prevent orphaned headings. */
  .legal-content h2,
  .legal-content h3 {
    page-break-after: avoid;
  }
  .legal-content ul {
    page-break-inside: avoid;
  }
}
