/* Shared styles for legal pages (terms, privacy) */

.legal-page {
  justify-content: flex-start;
  padding-top: 40px;
  padding-bottom: 80px;
  max-width: 1100px;
}

.legal {
  margin-top: 40px;
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.65;
  width: 100%;
}

.legal h1 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
  margin: 0 0 8px;
}

.legal .last-updated {
  opacity: 0.5;
  font-size: 14px;
  margin-bottom: 40px;
}

/* Two-column section layout */
.section-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding-top: 8px;
}

.section-row + .section-row {
  margin-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 16px;
}

.gist {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.7;
  padding-top: 52px; /* align with content below h2 */
  position: sticky;
  top: 20px;
  align-self: start;
}

.toc-row .gist {
  padding-top: 0;
}

/* Legal text column */
.legal-text {
  max-width: 720px;
}

.legal h2 {
  font-size: clamp(18px, 3vw, 22px);
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.3;
}

.legal h3 {
  font-size: clamp(16px, 2.5vw, 18px);
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 24px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--ink); }

.legal .toc { list-style: decimal; padding-left: 20px; }
.legal .toc li { margin-bottom: 4px; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }

.legal em.short {
  display: block;
  opacity: 0.65;
  margin-bottom: 16px;
  font-style: italic;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal th, .legal td {
  border: 1px solid rgba(0,0,0,0.15);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th {
  font-weight: 600;
  background: rgba(0,0,0,0.04);
}

/* Mobile: stack gist above content */
@media (max-width: 900px) {
  .legal-page {
    padding-top: 30px;
    padding-bottom: 60px;
  }
  .legal { margin-top: 24px; }

  .section-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .gist {
    position: static;
    padding-top: 0;
    padding-bottom: 8px;
    font-size: 13px;
    opacity: 0.65;
    border-left: 2px solid rgba(0,0,0,0.1);
    padding-left: 12px;
    margin-bottom: 8px;
  }
}
