/* ==========================================================================
   Legal pages (Terms of Service / Privacy Policy / Refund & Cancellation
   Policy): draft-status banner, table of contents, readable-width content
   typography, and the inline "needs owner review" placeholder marker.
   Loaded only on these three pages via @section Styles, after
   design-system.css, so every --ps-* token is already defined.
   ========================================================================== */

/* Draft/pending-review notice — visible on the page itself, not just in
   LEGAL_PAGES_REVIEW.md, so nobody mistakes a page with open placeholders
   for a finished policy. Removed (or its noindex lifted) once the business
   owner has resolved every [ ... — REVIEW REQUIRED] marker below. */
.legal-draft-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-left: 3px solid #f5a623;
  border-radius: var(--ps-radius);
  padding: 18px 22px;
  margin: 0 0 36px;
}
.legal-draft-banner__icon {
  flex-shrink: 0;
  color: #f5a623;
  font-size: 18px;
  line-height: 1;
}
.legal-draft-banner strong {
  color: var(--ps-text-primary);
  display: block;
  margin-bottom: 4px;
}
.legal-draft-banner p {
  margin: 0;
  color: var(--ps-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.legal-draft-banner code {
  /* Bootstrap 3's default <code> is a light pink pill (#f9f2f4/#c7254e) —
     jarring on this dark page. */
  background: var(--ps-bg-elevated);
  color: var(--ps-text-primary);
  border: 1px solid var(--ps-border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* Inline "needs a real decision" marker — used wherever the text itself
   couldn't be confirmed from the codebase/site rather than guessed. */
.legal-flag {
  display: inline-block;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #f5a623;
  font-weight: 600;
  font-size: 0.92em;
  padding: 1px 8px;
  border-radius: 4px;
  white-space: normal;
}

.legal-meta {
  color: var(--ps-text-muted);
  font-size: 13px;
  margin: -10px 0 30px;
}

/* Table of contents ---------------------------------------------------- */
.legal-toc {
  background: var(--ps-bg-card);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 22px 26px;
  margin: 0 0 40px;
}
.legal-toc h2 {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ps-accent);
  margin: 0 0 14px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}
.legal-toc li {
  margin-bottom: 8px;
  font-size: 14px;
  break-inside: avoid;
}
.legal-toc a {
  color: var(--ps-text-secondary);
}
.legal-toc a:hover {
  color: var(--ps-accent);
}

/* Readable content column ----------------------------------------------- */
.legal-content {
  color: var(--ps-text-secondary);
  font-size: 15px;
  line-height: 1.75;
}
.legal-content h2 {
  font-size: 22px;
  color: var(--ps-text-primary);
  margin: 46px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}
.legal-content h2:first-of-type {
  margin-top: 0;
}
.legal-content h3 {
  font-size: 17px;
  color: var(--ps-text-primary);
  margin: 26px 0 10px;
  scroll-margin-top: 100px;
}
.legal-content p {
  margin: 0 0 16px;
}
.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.legal-content li {
  margin-bottom: 8px;
}
.legal-content a {
  color: var(--ps-accent);
  text-decoration: underline;
  text-decoration-color: rgba(141, 255, 63, 0.35);
}
.legal-content a:hover {
  text-decoration-color: var(--ps-accent);
}
.legal-content strong {
  color: var(--ps-text-primary);
}
.legal-content hr {
  border: none;
  border-top: 1px solid var(--ps-border);
  margin: 40px 0;
}

@media (max-width: 600px) {
  .legal-toc ol {
    columns: 1;
  }
}
