/* Legal pages (privacy policy, terms): long-form reading on top of styles.css. The markup comes
   from Termly through scripts/sync-legal.mjs. */
.legal {
  max-width: 46rem;
  margin-left: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.legal h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}

.legal h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: 1rem;
}

.legal p,
.legal li {
  max-width: none;
  margin: 0 0 0.9rem;
  font-size: 1rem;
  color: var(--ink);
}

.legal ul,
.legal ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal li > p {
  margin: 0;
}

.legal a {
  color: var(--purple-text);
}

/* Link targets from the policy's own table of contents. */
.legal [id] {
  scroll-margin-top: 1rem;
}

/* Wide tables scroll inside their box instead of widening the page. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.legal table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

.legal th {
  background: rgb(255 255 255 / 0.6);
  font-weight: 600;
}

.legal td p {
  margin: 0;
}

/* Table cells wrap between words; the first column keeps room for its label. */
.legal th,
.legal td {
  overflow-wrap: normal;
}

.legal th:first-child,
.legal td:first-child {
  min-width: 8rem;
}
