/* The privacy and terms pages: the homepage's paper, nav and type, set for
   reading. Loaded after style.css, which supplies the tokens and the bar. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The home frame's curves, still, fading out before the text begins. */
.legal-circles {
  position: absolute;
  height: 100vh;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 65%);
  mask-image: linear-gradient(#000 30%, transparent 65%);
}

.bar-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc {
  position: relative;
  z-index: 1;
  width: var(--frame);
  margin-inline: auto;
  padding: calc(var(--bar) + clamp(28px, 6vh, 54px)) 8px 96px;
}

.doc-head {
  margin: clamp(40px, 12vh, 112px) 0 clamp(48px, 10vh, 96px);
}

.doc-head .lede { max-width: 38em; }

.doc-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* ---------- contents ---------- */

.doc-toc {
  position: sticky;
  top: calc(var(--bar) + 32px);
  max-height: calc(100dvh - var(--bar) - 64px);
  overflow-y: auto;
  font: 400 11px/1.4 var(--mono);
}

.doc-toc .caps {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.doc-toc ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-toc a {
  color: var(--muted);
  text-decoration: none;
}

.doc-toc a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- text ---------- */

.doc-text {
  max-width: 680px;
  font: 400 15px/1.7 var(--sans);
  color: var(--ink);
}

.doc-text section {
  padding-top: 40px;
  scroll-margin-top: calc(var(--bar) + 8px);
}

.doc-text section:first-child { padding-top: 0; }

.doc-text h2 {
  margin: 0 0 14px;
  font: 400 21px/1.35 var(--sans);
  color: var(--ink);
}

.doc-text p { margin: 0 0 14px; }

.doc-text ul {
  margin: 0 0 14px;
  padding-left: 1.2em;
}

.doc-text li { margin-bottom: 6px; }
.doc-text li::marker { color: var(--muted); }

.doc-text a {
  color: var(--teal-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--teal-ink) 40%, transparent);
  text-underline-offset: 3px;
}

.doc-text a:hover { text-decoration-color: currentColor; }

/* Tables read like the index sheet on the homepage. */
.table-wrap {
  margin: 4px 0 18px;
  overflow-x: auto;
}

.doc-text table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font: 400 13px/1.5 var(--sans);
}

.doc-text thead th {
  padding: 8px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  font: 400 10px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.doc-text tbody td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.doc-text tbody td:first-child { font-weight: 500; }
.doc-text tbody tr:last-child td { border-bottom: 0; }

/* ---------- closing note ---------- */

.colophon {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.colophon p { margin: 0 0 8px; }

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 16px;
  font: 400 10px/1.3 var(--mono);
  letter-spacing: 1px;
}

.colophon nav a {
  color: var(--ink);
  text-decoration: none;
}

.colophon nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .doc-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .doc-toc {
    position: static;
    max-height: none;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--rule);
  }
}

@media (max-width: 640px) {
  .doc-head { margin-top: 36px; }
  .doc-head .headline { font-size: 36px; }
}
