/* ==========================================================================
   RoofLeadHQ — Legal pages (Phase 2B, 2026-09-25): terms.html and privacy.html.
   Layers on public.css (tokens, type) and public-forms.css (slim header and
   compact footer, scoped under .rl-form). Everything here is scoped under
   .rl-legal. Reading comfort first: a readable measure, clear heading rhythm,
   no animation. The legal text itself is generated from legal/*-SOURCE.md by
   scripts/generate_legal_html.py and is never hand-edited in the HTML.
   ========================================================================== */

.rl-legal .lg-hero {
  background: linear-gradient(180deg, var(--rl-midnight), var(--rl-navy));
  color: var(--rl-on-dark-2);
  padding: clamp(40px, 6vw, 72px) 0 clamp(88px, 10vw, 120px);
}
.rl-legal .lg-narrow { max-width: 880px; }
.rl-legal .lg-hero .eyebrow { color: var(--rl-copper); }
.rl-legal .lg-title { color: #fff; margin-top: 14px; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.022em; }
.rl-legal .lg-eff { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--rl-on-dark-2); }
.rl-legal .lg-related { margin-top: 10px; font-size: 15px; color: var(--rl-on-dark-2); }
.rl-legal .lg-related a { color: #fff; font-weight: 600; text-underline-offset: 3px; }

.rl-legal .lg-body { margin-top: clamp(-96px, -8vw, -64px); padding-bottom: clamp(56px, 8vw, 96px); }
.rl-legal .lg-card {
  background: var(--rl-paper); border: 1px solid var(--rl-line-cool); border-radius: var(--rl-radius-lg);
  box-shadow: var(--rl-shadow); padding: clamp(24px, 5vw, 56px);
}

/* Legal text */
.rl-legal .lg-content { max-width: 72ch; color: var(--rl-body); font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.rl-legal .lg-content > :first-child { margin-top: 0; }
.rl-legal .lg-content h1, .rl-legal .lg-content h2, .rl-legal .lg-content h3 { color: var(--rl-ink); scroll-margin-top: 96px; }
.rl-legal .lg-content h1 {
  font-size: clamp(22px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -0.015em;
  margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--rl-line-cool);
}
.rl-legal .lg-content h1:first-child { padding-top: 0; border-top: 0; }
.rl-legal .lg-content h2 { font-size: 19px; line-height: 1.3; margin: 30px 0 10px; }
.rl-legal .lg-content h3 { font-size: 17px; line-height: 1.35; margin: 24px 0 8px; }
.rl-legal .lg-content p { margin: 14px 0; }
.rl-legal .lg-content ul { list-style: disc; padding-left: 1.4rem; margin: 14px 0; }
.rl-legal .lg-content ol { list-style: decimal; padding-left: 1.5rem; margin: 14px 0; }
.rl-legal .lg-content li { margin: 8px 0; padding-left: 2px; }
.rl-legal .lg-content li > p { margin: 0; }
.rl-legal .lg-content li::marker { color: var(--rl-muted); }
.rl-legal .lg-content strong { color: var(--rl-ink); font-weight: 700; }
.rl-legal .lg-content a { color: var(--rl-copper-text); text-decoration: underline; text-underline-offset: 3px; }
.rl-legal .lg-content a:hover { color: var(--rl-ink); }
.rl-legal .lg-content hr { border: 0; height: 1px; background: var(--rl-line-cool); margin: 32px 0; }

/* Tables fit the measure; header labels wrap. On narrow screens a table scrolls inside itself
   instead of widening the page. */
.rl-legal .lg-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; line-height: 1.45; }
.rl-legal .lg-content th, .rl-legal .lg-content td { border: 1px solid var(--rl-line-cool); padding: 10px 12px; text-align: left; vertical-align: top; }
.rl-legal .lg-content th { background: var(--rl-mist); color: var(--rl-ink); font-weight: 700; }
.rl-legal .lg-content td { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) {
  .rl-legal .lg-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rl-legal .lg-content th { min-width: 96px; }
}

@media (max-width: 600px) {
  .rl-legal .lg-content { font-size: 16px; }
  .rl-legal .lg-card { padding: 22px 18px; }
}
@media print {
  .rl-legal .form-header, .rl-legal .form-footer { display: none; }
  .rl-legal .lg-hero { background: none; color: #000; padding: 0 0 12px; }
  .rl-legal .lg-title, .rl-legal .lg-eff { color: #000; }
  .rl-legal .lg-body { margin-top: 0; }
  .rl-legal .lg-card { box-shadow: none; border: 0; padding: 0; }
}
