/* ============================================================================
   LEGAL PAGES - clean document style (owner request 2026-08-06: Apple-legal look)
   Loaded ONLY by the 9 legal pages (terms, privacy, refund-policy, ip-policy,
   cookie-policy, community-guidelines, payment-terms, prohibited-uses,
   trust-safety).

   Contract with site-customization.js renderLegal(): it mounts admin-written
   copy into `.ed-prose` and stamps the date into `.ed-hero-meta span:last-child`.
   Both hooks are styled here and MUST keep existing.

   The document font is deliberately different from the site chrome: Inter with
   the native system stack behind it (SF Pro on Apple devices, Segoe UI on
   Windows). It is scoped to the legal content only - the navbar and footer keep
   the site-wide Inter/Inter identity.
   ========================================================================== */

body.fp-ed .sdx {
  --lgx-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lgx-ink: #1d1d1f;      /* headings */
  --lgx-body: #333336;     /* running text */
  --lgx-mute: #6e6e73;     /* subtitles, meta */
  --lgx-line: #d2d2d7;     /* hairlines */
  --lgx-link: #0066cc;     /* document links */
}

body.fp-ed .sdx .ed-container { padding-top: 10px; }

/* Apple-plain canvas: the site-wide lavender wash reads as decoration here */
body.fp-ed { background: #fff; }
body.fp-ed .sdx { background: #fff; }

/* ---- document header: centered title, quiet meta -------------------------- */
body.fp-ed .sdx .ed-hero {
  position: static;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  padding: 46px 16px 10px;
  margin: 0 0 30px;
  text-align: center;
  animation: none;
}
body.fp-ed .sdx .ed-hero-in { padding: 0 !important; margin-inline: auto !important; max-width: 760px; text-align: center; }
body.fp-ed .sdx .ed-hero .ed-kicker { display: none; }
body.fp-ed .sdx .ed-hero .ed-h1 {
  font-family: var(--lgx-font);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--lgx-ink);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
body.fp-ed .sdx .lgx-sub {
  font-family: var(--lgx-font);
  font-size: 16px;
  font-weight: 400;
  color: var(--lgx-mute);
  margin: 12px 0 0;
}
/* the base theme draws a blue top rule + grey bottom rule on this bar - strip both */
body.fp-ed .sdx .ed-hero-meta { display: flex; justify-content: center; gap: 8px; margin: 10px 0 0; padding: 0; border: 0; background: none; }
body.fp-ed .sdx .ed-hero-meta span {
  font-family: var(--lgx-font);
  font-size: 13px;
  font-weight: 400;
  color: var(--lgx-mute);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
}
/* the "Legal" chip is redundant under the subtitle; the DATE span must remain
   last-child for renderLegal's stamp */
body.fp-ed .sdx .ed-hero-meta span:first-child { display: none; }

/* ---- the document body ---------------------------------------------------- */
body.fp-ed .sdx .ed-prose {
  font-family: var(--lgx-font);
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--lgx-body);
  max-width: 680px !important;
  margin: 0 auto;
  font-variant-numeric: tabular-nums;
}
body.fp-ed .sdx .ed-prose > p:first-child { font-size: 16.5px; color: var(--lgx-body); }
body.fp-ed .sdx .ed-prose p { margin: 0 0 14px; }

body.fp-ed .sdx .ed-prose h2 {
  font-family: var(--lgx-font);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--lgx-ink);
  line-height: 1.3;
  margin: 36px 0 10px;
  padding: 0;
  border: 0;
}
body.fp-ed .sdx .ed-prose h2:first-of-type { margin-top: 8px; }
body.fp-ed .sdx .ed-prose h3 {
  font-family: var(--lgx-font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--lgx-ink);
  margin: 24px 0 8px;
}
body.fp-ed .sdx .ed-prose h4 {
  font-family: var(--lgx-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--lgx-ink);
  margin: 18px 0 6px;
}

body.fp-ed .sdx .ed-prose a {
  color: var(--lgx-link);
  font-weight: inherit;
  text-decoration: none;
  border-bottom: 0;
}
body.fp-ed .sdx .ed-prose a:hover { text-decoration: underline; color: var(--lgx-link); border-bottom: 0; }
body.fp-ed .sdx .ed-prose strong, body.fp-ed .sdx .ed-prose b { font-weight: 600; color: var(--lgx-ink); }

/* plain, classic lists - no decorative markers */
body.fp-ed .sdx .ed-prose ul { margin: 0 0 16px; padding-left: 24px; list-style: disc; }
body.fp-ed .sdx .ed-prose ol { margin: 0 0 16px; padding-left: 26px; list-style: decimal; counter-reset: none; }
body.fp-ed .sdx .ed-prose ul li,
body.fp-ed .sdx .ed-prose ol li { position: static; padding: 0; margin: 0 0 8px; color: var(--lgx-body); }
body.fp-ed .sdx .ed-prose ul li::before,
body.fp-ed .sdx .ed-prose ol li::before { content: none; }
body.fp-ed .sdx .ed-prose li::marker { color: var(--lgx-mute); }

body.fp-ed .sdx .ed-prose blockquote {
  margin: 0 0 16px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--lgx-line);
  background: none;
  border-radius: 0;
  color: var(--lgx-mute);
}
body.fp-ed .sdx .ed-prose hr { border: 0; border-top: 1px solid var(--lgx-line); margin: 30px 0; }

body.fp-ed .sdx .ed-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; }
body.fp-ed .sdx .ed-prose th, body.fp-ed .sdx .ed-prose td {
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--lgx-line);
  vertical-align: top;
}
body.fp-ed .sdx .ed-prose th {
  background: none;
  font-family: var(--lgx-font);
  font-weight: 600;
  color: var(--lgx-ink);
  font-size: 13.5px;
}
body.fp-ed .sdx .ed-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  background: #f5f5f7;
  border: 0;
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--lgx-ink);
}

/* wide tables scroll inside their own box, never the page */
body.fp-ed .sdx .ed-prose .lgx-scroll { overflow-x: auto; }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 700px) {
  /* long storage-key names make the cookie table wider than a phone; the table
     scrolls inside its own box so the PAGE never scrolls sideways */
  body.fp-ed .sdx .ed-prose table { display: block; overflow-x: auto; }
  body.fp-ed .sdx .ed-prose td, body.fp-ed .sdx .ed-prose th { min-width: 120px; }
}
@media (max-width: 600px) {
  body.fp-ed .sdx .ed-hero { padding: 30px 8px 6px; margin-bottom: 22px; }
  body.fp-ed .sdx .ed-prose { font-size: 16px; }
}
