@import url("/site/dark.css") screen and (prefers-color-scheme: dark);
/* The legal documents, dressed as the rest of the site — without a byte of them changing.

   terms.html is bound by its sha256 to every acceptance receipt (`ct.authapp.legal`), so these pages
   cannot take the site's header, its theme script or its switch: everything they share with the landing
   comes from site.css and from here. Their own `<nav>` — the brand first, then the other documents —
   becomes the site's header bar, and the palette is the site's, dark included.

   The dark palette is NOT imported by this file: the server puts that `@import` in front of it per
   visitor (`website.legal_css`) — outright or not at all when the visitor chose a theme on the site
   (theme.js keeps the choice in a cookie for exactly this), else under the device's
   `prefers-color-scheme`. Always `screen`: a document printed in the navy theme would be white ink on
   white paper. */

.legal-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* --- the header bar ------------------------------------------------------------------------------------
   The site's `.top`, drawn from the documents' own nav: as wide as the site's header, so the brand stands
   where it stood on the page the visitor came from, above a narrower reading column. It bleeds to the
   window's edges through its border-image, which paints outside the box without taking layout room —
   a `100vw` box would count the scrollbar and scroll the page sideways — and carries the bar's bottom
   rule in the same gradient. */

.legal-page > nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  width: min(100vw - 40px, var(--w));
  min-height: var(--top-h);
  margin-bottom: clamp(36px, 7vw, 72px);
  margin-left: 50%;
  padding: 12px 0;
  transform: translateX(-50%);
  border-image: linear-gradient(to top, var(--line) 1px, var(--page) 1px) fill 0 / 0 / 0 100vmax;
}

.legal-page > nav a {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
}

.legal-page > nav a:hover {
  color: var(--accent-ink);
}

.legal-page > nav a:first-child:hover {
  color: var(--ink);
}

/* The brand: the site's mark and wordmark, the link home. The mark is the favicon file itself, so it is
   drawn once for every page and every theme. */
.legal-page > nav a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-right: auto;
  padding-left: 42px;
  background: url("/site/logo.svg") left center / 32px 32px no-repeat;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* A phone: the brand keeps its line and the documents share the next, and the bar scrolls away with the
   page — two lines held on screen would cost a long document a sixth of its window. */
@media (max-width: 640px) {
  .legal-page > nav {
    position: static;
    gap: 6px 18px;
    padding: 12px 0 14px;
  }

  .legal-page > nav a:first-child {
    flex-basis: 100%;
    margin-bottom: 4px;
  }

  .legal-page > nav a {
    font-size: 0.9rem;
  }
}

/* --- the document ------------------------------------------------------------------------------------ */

.legal-page h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5.2vw, 3rem);
  line-height: 1.12;
}

.legal-page .legal-version {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-page h2 {
  margin: 52px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.25;
}

.legal-page h3 {
  margin: 32px 0 8px;
  font-size: 1.12rem;
  line-height: 1.3;
}

.legal-page p,
.legal-page li {
  color: var(--ink-2);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.legal-page ul {
  padding-left: 1.3em;
}

.legal-page li + li {
  margin-top: 6px;
}

.legal-page strong {
  color: var(--ink);
  font-weight: 650;
}

.legal-page a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-page a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.legal-page footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-page footer p {
  color: inherit;
}

@media print {
  .legal-page {
    max-width: none;
    padding: 0;
    color: black;
    background: white;
  }

  .legal-page a,
  .legal-page p,
  .legal-page li,
  .legal-page .legal-version {
    color: black;
  }

  .legal-page nav {
    display: none;
  }

  .legal-page h1 {
    margin-top: 0;
  }
}
