/* ==========================================================================
   Privacy / Terms / About — long-form admin-managed text pages.
   Reuses styles.css tokens (sky world, navy panels, gold borders, .shell);
   this file only adds the reading layout and the typography for whatever
   rich text the admin's editor produced (see sanitizeOptions on the
   backend — p, br, ul/ol/li, blockquote, h1-h6, code/pre, img, a, b/i/em/
   strong/u are the only tags that can ever arrive here).
   ========================================================================== */

.legal-section {
  padding: clamp(28px, 6vw, 72px) 0 clamp(60px, 9vw, 110px);
}

.legal-card {
  background: var(--panel);
  border: var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--panel-shadow);
  padding: clamp(28px, 6vw, 52px) clamp(20px, 6vw, 56px);
  color: #fff;
}

.legal-card > h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 40px);
  color: var(--gold);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
  margin: 0 0 28px;
}

/* The state message shown while #legalContent is loading or failed —
   swapped out for the real content the moment the fetch resolves. */
.legal-state {
  color: var(--text-muted);
  font-size: 15.5px;
  text-align: center;
  padding: 40px 0;
}
.legal-state-error { color: var(--accent-rose); }

/* Typography for the fetched rich text itself. Admin content varies: some
   is real HTML (p/h2/ul/…), some is plain text with blank-line paragraph
   breaks and no markup at all — pre-wrap keeps the latter readable (real
   line breaks render) without affecting the former (HTML already supplies
   its own block spacing; preserved whitespace between tags is harmless). */
.legal-content {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
  font-family: var(--font-display);
  color: var(--gold);
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}
.legal-content h1 { font-size: clamp(22px, 3.2vw, 28px); }
.legal-content h2 { font-size: clamp(19px, 2.6vw, 23px); }
.legal-content h3 { font-size: 18px; }
.legal-content h4,
.legal-content h5,
.legal-content h6 { font-size: 16px; color: #fff; }
.legal-content > :first-child { margin-top: 0; }

.legal-content p { margin: 0 0 1.1em; }
.legal-content ul,
.legal-content ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.legal-content li { margin: 0 0 0.45em; }
.legal-content blockquote {
  margin: 0 0 1.1em;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--gold-line);
  color: #fff;
}
.legal-content a {
  color: var(--accent-sky);
  text-decoration: underline;
  text-decoration-color: rgba(92, 200, 255, 0.4);
}
.legal-content a:hover { text-decoration-color: currentColor; }
.legal-content code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.92em;
}
.legal-content pre {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 1.1em;
}
.legal-content pre code { background: none; padding: 0; }
.legal-content img { max-width: 100%; border-radius: var(--radius-sm); }
.legal-content strong, .legal-content b { color: #fff; }
