/*
 * The reading layer the two legal pages share (Privacy, Delete account), on `home.css` and
 * `page.css`: a section list that stays beside the reading column, and on a phone becomes a strip
 * of chips held under the bar. `legal.js` marks the section being read in it.
 */
/* ─── The opening: a two-line title, when it was last updated, what the page is ─ */
.page-copy {
  min-width: 0;
}

.page-copy h1 em {
  font-style: normal;
  color: var(--text-3);
}

.policy-date {
  margin-top: var(--s5);
}

.page-copy .lede {
  max-width: 520px;
}

/* ─── The reading: the section list beside the column ──────────────────── */
.legal {
  padding-top: var(--s9);
}

.legal-in {
  display: grid;
  grid-template-columns: 224px minmax(0, 680px);
  gap: var(--s9);
  align-items: start;
}

.legal-nav {
  position: sticky;
  top: var(--s9);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.legal-nav .label {
  padding: 0 0 var(--s3) var(--s4);
}

.legal-nav a {
  margin-left: -1px;
  padding: var(--s2) var(--s4);
  border-left: 1px solid transparent;
  font-size: 15px;
  line-height: 24px;
  color: var(--text-2);
  text-decoration: none;
  transition:
    color 160ms var(--ease),
    border-color 160ms var(--ease);
}

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

.legal-nav a[aria-current] {
  border-left-color: var(--ink);
  color: var(--text);
  font-weight: 560;
}

.legal .prose {
  max-width: none;
}

.legal .prose h2 {
  margin-top: var(--s8);
  scroll-margin-top: var(--s9);
}

.legal .prose section:first-child h2 {
  margin-top: 0;
}

.legal .prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--paper);
  font: 15px / 1 var(--font-mono);
  color: var(--text);
}

.legal .prose ul {
  list-style: disc;
}

.legal .prose li::marker {
  color: var(--text-3);
}

.legal .prose li strong {
  color: var(--text);
}

@media (width <= 1100px) {
  .legal-in {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s7);
  }

  /* The list becomes a strip of chips, held under the bar while the page is read */
  /* The second shadow paints the strip's white up to the top of the screen, so the text it
     holds back does not show between it and the bar */
  .legal-nav {
    top: 64px;
    z-index: 3;
    flex-direction: row;
    gap: var(--s2);
    margin: 0 calc(-1 * var(--gutter));
    padding: var(--s3) var(--gutter);
    overflow-x: auto;
    border: 0;
    background: var(--white);
    box-shadow:
      0 1px 0 var(--line),
      0 -48px 0 48px var(--white);
    scrollbar-width: none;
  }

  .legal-nav .label {
    display: none;
  }

  .legal-nav a {
    flex: none;
    margin: 0;
    padding: var(--s1) var(--s4);
    border: 0;
    border-radius: var(--r-pill);
    box-shadow: inset 0 0 0 1px var(--line-2);
  }

  .legal-nav a[aria-current] {
    background: var(--ink);
    color: var(--white);
  }

  .legal .prose h2 {
    scroll-margin-top: 144px;
  }
}

@media (width <= 720px) {
  .legal {
    padding-top: var(--s8);
  }

  .legal-nav {
    top: 56px;
  }

  .legal .prose h2 {
    scroll-margin-top: 128px;
  }
}
