/* Long-form legal pages (privacy notice, future terms).
 *
 * Theme-aware only: every color comes from a --phoenix-* token so the page
 * reads correctly in both light and dark themes. No hard hex / bg-{color}.
 * The body HTML is rendered from admin Markdown through the blog pipeline, so
 * these rules style generic <h2>/<table>/<a> output rather than bespoke markup.
 */

.legal-doc {
  max-width: 52rem;
  margin-inline: auto;
}

.legal-doc-header h1 {
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Readable measure + rhythm for the rendered body. */
.legal-doc-body {
  color: var(--phoenix-body-color);
  line-height: 1.7;
  font-size: 1rem;
}

.legal-doc-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--phoenix-border-color-translucent);
  font-size: 1.35rem;
  font-weight: 700;
  scroll-margin-top: 5rem; /* so #anchor jumps clear the sticky-ish top nav */
}

.legal-doc-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  scroll-margin-top: 5rem;
}

.legal-doc-body p,
.legal-doc-body ul,
.legal-doc-body ol {
  margin-bottom: 1rem;
}

.legal-doc-body ul,
.legal-doc-body ol {
  padding-left: 1.5rem;
}

.legal-doc-body li {
  margin-bottom: 0.35rem;
}

.legal-doc-body a {
  color: var(--phoenix-primary-text-emphasis);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal-doc-body a:hover {
  color: var(--phoenix-primary);
}

/* "In short" lead-ins and the intro read a touch softer. */
.legal-doc-body strong {
  color: var(--phoenix-emphasis-color);
}

/* Styled table of contents: the #toc section is an ordered list of anchor
 * links. Lay it out as a tidy, scannable card. */
.legal-doc-body h2#toc + ol {
  list-style: none;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--phoenix-border-color-translucent);
  border-radius: 0.5rem;
  background-color: var(--phoenix-tertiary-bg);
  columns: 2;
  column-gap: 2rem;
}

.legal-doc-body h2#toc + ol li {
  break-inside: avoid;
  margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
  .legal-doc-body h2#toc + ol {
    columns: 1;
  }
}

/* Readable tables (the US "categories" table). */
.legal-doc-body table {
  width: 100%;
  margin: 1.25rem 0 1.75rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-doc-body th,
.legal-doc-body td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--phoenix-border-color-translucent);
  text-align: left;
  vertical-align: top;
}

.legal-doc-body thead th {
  background-color: var(--phoenix-secondary-bg);
  color: var(--phoenix-emphasis-color);
  font-weight: 700;
}

.legal-doc-body tbody tr:nth-child(odd) td {
  background-color: var(--phoenix-tertiary-bg);
}

/* Tables scroll horizontally rather than overflow on small screens. */
@media (max-width: 767.98px) {
  .legal-doc-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
