/* ============================================================
   legal.css — Styles for legal.php and ai-disclosure.php
   ============================================================ */

/* ── Table of Contents ─────────────────────────────────────── */

.legal-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.legal-toc li {
  font-size: .9rem;
}

.legal-toc a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity .2s;
}

.legal-toc a:hover,
.legal-toc a:focus {
  opacity: .75;
  text-decoration: underline;
}

/* ── Section layout ─────────────────────────────────────────── */

.legal-container {
  max-width: 780px;
}

.legal-header {
  margin-bottom: 2rem;
}

.legal-header .sec-title {
  margin-top: .5rem;
  margin-bottom: .25rem;
}

.legal-effective {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Body text ──────────────────────────────────────────────── */

.legal-body {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: .95rem;
}

.legal-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

.legal-body h4 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 .35rem;
}

.legal-body p {
  margin: 0 0 .85rem;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.5rem;
  margin: 0 0 .85rem;
}

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

.legal-body a {
  color: var(--accent);
  text-decoration: none;
}

.legal-body a:hover,
.legal-body a:focus {
  text-decoration: underline;
}

/* ── Tables ─────────────────────────────────────────────────── */

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin: .75rem 0 1.25rem;
  overflow-x: auto;
  display: block;
}

.legal-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.legal-table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* ── Back to top ────────────────────────────────────────────── */

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: .4rem .9rem;
  transition: color .2s, border-color .2s;
  margin-top: 1rem;
}

.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .legal-body {
    font-size: .9rem;
  }

  .legal-table th,
  .legal-table td {
    padding: .45rem .5rem;
    font-size: .8rem;
  }
}
