/*
 * Legal pages (/privacy, /terms, /dpa). Loads after /marketing.css and adds
 * only the reading layout: a sticky table of contents beside the text, and
 * the "In short" summary card. The legal text itself is untouched markup.
 */

.legal {
  display: grid;
  grid-template-columns: 15rem minmax(0, 46rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.legal--single { grid-template-columns: minmax(0, 46rem); }

.legal-body > :first-child { margin-top: 0; }
.legal-body .notice { margin: 0 0 2rem; }

/* Table of contents */
.toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  font-size: 0.92rem;
}
.toc-title {
  margin: 0 0 0.75rem;
  font: 700 0.75rem/1 var(--font-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid transparent;
  color: var(--ink-muted);
  text-decoration: none;
  line-height: 1.35;
  transition: color 160ms, border-color 160ms;
}
.sheet .toc a { text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--stamp); }

/* "In short": a paper card, clearly a summary rather than the policy. */
.in-short {
  margin: 0 0 1.75rem;
  padding: 1.4rem 1.5rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.prose .in-short h2 {
  margin: 0;
  font-size: 1.35rem;
}
.prose .in-short-note { margin: 0.3rem 0 0.9rem; font-size: 0.875rem; color: var(--ink-muted); }
.prose .in-short ul { margin: 0; padding-left: 1.15rem; }
.prose .in-short li { margin-bottom: 0.5rem; color: var(--ink); }
.prose .in-short li::marker { color: var(--stamp); }

@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .toc { position: static; max-height: none; overflow: visible; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 0.4rem; border-left: 0; }
  .toc a {
    margin: 0;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.85rem;
  }
  .toc a[aria-current="true"] { border-color: var(--ink); }
}
