/* =========================================================
   Legal pages — terms, privacy, text-message-terms (shared)
   Layout: header, then sticky "On this page" TOC + content column
   ========================================================= */
.legal {
  padding: 80px var(--pad-x) 112px;
  display: flex; flex-direction: column; gap: 56px;
}

/* Header */
.legal-header { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.legal-badge {
  display: inline-flex; align-items: center;
  background: var(--attention-subtle); color: var(--attention);
  border-radius: 9999px; padding: 2px 10px;
  font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.legal-title { font-weight: 300; font-size: 56px; line-height: 60px; letter-spacing: -1.4px; }

/* Body: TOC + content */
.legal-body { display: flex; gap: 80px; align-items: flex-start; }

.legal-toc {
  position: sticky; top: calc(var(--nav-h) + 32px);
  width: 240px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.legal-toc__list { display: flex; flex-direction: column; gap: 12px; }
.legal-toc__link {
  display: block; font-size: 12px; line-height: 16px;
  color: var(--muted-foreground);
  transition: color var(--dur-ui) ease;
}
.legal-toc__link[aria-current="true"] { color: var(--foreground); }
@media (hover: hover) and (pointer: fine) { .legal-toc__link:hover { color: var(--foreground); } }

.legal-content { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 40px; }

/* In plain words */
.legal-summary {
  background: var(--muted); border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.legal-summary__list { display: flex; flex-direction: column; gap: 12px; }
.legal-summary__item { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.legal-summary__item > span:last-child { flex: 1 1 0; min-width: 0; }

/* Sections */
.legal-section {
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 32px; border-bottom: 1px solid var(--border-subtle);
  overflow-wrap: break-word;
}
.legal-section__title { font-weight: 400; font-size: 24px; line-height: 30px; letter-spacing: -0.3px; }
.legal-section__lead, .legal-section__text { font-size: 14px; line-height: 20px; }
.legal-section__text { color: var(--muted-foreground); }

/* =========================================================
   Responsive — mobile frame has no TOC
   ========================================================= */
@media (max-width: 960px) {
  .legal { padding: 32px 20px 64px; gap: 28px; }
  .legal-header { gap: 12px; }
  .legal-title { font-size: 44px; line-height: 48px; letter-spacing: -1.2px; }
  .legal-toc { display: none; }
  .legal-content { gap: 32px; }
  .legal-summary { padding: 24px 20px; }
  .legal-section { padding-bottom: 24px; }
}
