/*
 * Shared prose layout for the portal's standalone policy pages — terms.php,
 * privacy.php, refund-policy.php and cancellation-policy.php. These are the
 * one place in the portal that renders long-form paragraphs rather than app
 * UI, so they get their own small sheet instead of bolting article typography
 * onto portal.css's list of components. Loaded via portal_header.php's
 * $extra_css hook, on top of chrome.css/portal.css, so it only ever adds
 * rules — never overrides the shared chrome.
 *
 * Every colour here is a token from tokens.css, same rule probe_portal_theme
 * holds every other sheet in the portal to, even though this file predates
 * that probe's fixed sheet list and so is not scanned by it today.
 */

.legal-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.legal-page__eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 8px;
}

.legal-page h1 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.legal-page__updated {
  color: var(--text3);
  font-size: 13px;
  margin: 0 0 32px;
}

.legal-page__toc {
  border: 1px solid var(--border);
  border-radius: var(--rl);
  background: var(--bg2);
  padding: 20px 24px;
  margin: 0 0 40px;
}
/* Qualified with the .legal-page ancestor, not just .legal-page__toc, so
   these outrank the general h2/ul/a rules below on specificity rather than
   on source order — the toc's own <h2> and <a> are themselves .legal-page
   descendants, so the general rules would otherwise win in a straight
   cascade tie and this box would inherit the body's serif heading size and
   link colour instead of its own quieter ones. */
.legal-page .legal-page__toc h2 {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text3);
}
.legal-page .legal-page__toc ol {
  margin: 0;
  padding-inline-start: 20px;
  font-size: 13.5px;
}
.legal-page .legal-page__toc li { margin-bottom: 6px; }
.legal-page .legal-page__toc a { color: var(--text2); text-decoration: none; }
.legal-page .legal-page__toc a:hover { color: var(--base); }

.legal-page__note {
  border-inline-start: 3px solid var(--amber);
  background: var(--amber-bg);
  padding: 14px 18px;
  border-radius: 0 var(--r) var(--r) 0;
  margin: 0 0 28px;
  color: var(--text2);
  font-size: 13.5px;
  line-height: 1.6;
}

.legal-page h2 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 12px;
  scroll-margin-top: 24px;
}
.legal-page h2:first-of-type { margin-block-start: 0; }

.legal-page h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.legal-page p {
  color: var(--text2);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 14px;
}

.legal-page ul, .legal-page ol {
  color: var(--text2);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 14px;
  padding-inline-start: 22px;
}
.legal-page li { margin-bottom: 6px; }

.legal-page a { color: var(--base); }
.legal-page strong { color: var(--text); }

.legal-page__related {
  margin-block-start: 48px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.legal-page__related a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color .18s ease, border-color .18s ease;
}
.legal-page__related a:hover { color: var(--base); border-color: var(--base); }

@media (max-width: 640px) {
  .legal-page { padding: 32px 20px 56px; }
  .legal-page h1 { font-size: 26px; }
}
