/* Legal pages (/privacy, /terms-of-service). The head row has the title and a
   meta column. The body row has the article and a sticky table of contents.
   /assets/js/legal-toc.js marks the current section in the contents. */

.lh-m {
  padding: 64px var(--pad) 56px;
}
.lh h1 {
  margin: 0 0 24px;
  font: 500 clamp(48px, 6.4vw, 96px) / 0.95 var(--font-display);
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.lh .dek {
  max-width: 58ch;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.meta {
  display: flex;
  flex-direction: column;
}
.meta > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px var(--pad-r);
  border-bottom: 1px solid var(--hair);
}
.meta .v {
  font: 13px var(--font-mono);
  color: var(--apx-ink);
}
.meta a:hover {
  color: var(--apx-blue-deep);
}

.lb-m {
  min-width: 0;
  padding: 56px var(--pad) 96px;
}
.toc {
  position: sticky;
  top: var(--hdr);
  max-height: calc(100vh - var(--hdr));
  overflow: auto;
}
.toc > .k {
  display: block;
  padding: 14px var(--pad-r);
  border-bottom: 1px solid var(--hair);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: i;
}
.toc li {
  counter-increment: i;
}
.toc a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 9px var(--pad-r);
  border-bottom: 1px solid var(--hair);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  transition: background var(--d-fast);
}
.toc a::before {
  content: counter(i, decimal-leading-zero);
  padding-top: 2px;
  font: 10px var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.toc a:hover {
  background: var(--apx-mist);
  color: var(--apx-ink);
}
.toc a.active {
  background: var(--apx-paper);
  color: var(--apx-ink);
  box-shadow: inset 2px 0 0 var(--apx-ink);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--apx-graphite);
}
.prose .lede {
  margin: 0 0 40px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--apx-ink);
}
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 56px 0 16px;
  font: 500 26px / 1.15 var(--font-display);
  letter-spacing: -0.012em;
  color: var(--apx-ink);
  scroll-margin-top: calc(var(--hdr) + 24px);
}
.prose h2:first-of-type {
  margin-top: 40px;
}
.prose .lede + h2 {
  margin-top: 0;
}
.prose h2 .num {
  min-width: 28px;
  font: 500 11px var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.prose h3 {
  margin: 28px 0 10px;
  font: 500 18px / 1.3 var(--font-display);
  color: var(--apx-ink);
}
.prose p {
  margin: 0 0 16px;
}
.prose strong {
  font-weight: 600;
  color: var(--apx-ink);
}
.prose a {
  color: var(--apx-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:hover {
  color: var(--apx-blue-deep);
}
.prose ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.prose ul li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}
.prose ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  font: 13px var(--font-mono);
  color: var(--apx-ink);
}
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.prose ol li {
  margin-bottom: 8px;
}

/* When the rows stack, the contents come first and do not stick. */
@media (max-width: 1080px) {
  .rw.lb > .sd {
    order: -1;
    border-top: 0;
    border-bottom: 1px solid var(--apx-ink);
  }
  .toc {
    position: static;
    max-height: none;
  }
}
@media (max-width: 720px) {
  .lh-m {
    padding: 40px var(--pad) 36px;
  }
  .lb-m {
    padding: 40px var(--pad) 64px;
  }
  .prose h2 {
    margin-top: 44px;
    font-size: 22px;
  }
}
