/* ============================================================
   THE LEGAL DOCUMENT (Website list v1.0, item 8): the words of one of the
   four legal pages, rendered from its Markdown source by pages/legal.py
   inside the site's legal sheet (.legal-page, .legal-card: styles.css for
   the layout, notebook-account-skin.css for the colours). This sheet sets
   only the document's own type: the title, the clause headings, paragraphs,
   lists, tables and links. Tokens only, so both themes follow.
   ============================================================ */

.legal-doc {
  color: var(--nb-ink);
  font: var(--nb-type-prose);
  overflow-wrap: break-word;
}

.legal-doc > :first-child {
  margin-top: 0;
}

.legal-doc h1 {
  margin: 0 0 10px;
  font: var(--nb-type-headline);
  color: var(--nb-ink);
  text-wrap: balance;
}

/* The version and date line under the title: the document's own meta line,
   one step smaller, so it reads as a stamp rather than the first clause. */
.legal-doc h1 + p {
  margin-bottom: 18px;
  font-size: var(--nb-text-sm);
  font-weight: 500;
}

.legal-doc h2 {
  margin: 36px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--nb-border);
  font: var(--nb-type-title);
  color: var(--nb-ink);
  text-wrap: balance;
  scroll-margin-top: calc(var(--nb-chrome-h, 72px) + 16px);
}

.legal-doc h3 {
  margin: 24px 0 8px;
  font-family: var(--nb-sans);
  font-size: var(--nb-text-md);
  font-weight: 700;
  color: var(--nb-ink);
}

.legal-doc p,
.legal-doc li {
  margin: 0 0 12px;
  max-width: 70ch;
  line-height: 1.7;
  color: var(--nb-ink);
  text-wrap: pretty;
}

.legal-doc ul {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.legal-doc li {
  margin-bottom: 8px;
}

.legal-doc strong {
  font-weight: 700;
}

.legal-doc a {
  color: var(--nb-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-doc a:hover,
.legal-doc a:focus-visible {
  color: var(--nb-blue-strong);
}

/* A table scrolls inside its own box, never the page. */
.legal-doc .legal-doc-table {
  margin: 8px 0 20px;
  overflow-x: auto;
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-r-md, 8px);
}

.legal-doc table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--nb-text-sm);
  line-height: 1.55;
}

.legal-doc th,
.legal-doc td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--nb-border);
  text-align: left;
  vertical-align: top;
  color: var(--nb-ink);
}

.legal-doc th {
  font-weight: 700;
  background: color-mix(in srgb, var(--nb-ink) 5%, transparent);
}

.legal-doc tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 520px) {
  .legal-doc h2 {
    margin-top: 28px;
    padding-top: 18px;
  }
}
