.subpage--legal {
  --doc-measure: 68ch;
}

/* ------------------------------------------------------------------ docbar
   Sticky + blurred, same recipe as the phone .topbar in styles.css (rgb(11
   13 12 / 0.88) + blur(12px)) so this reads as the same product, not a
   different page pasted in. Full-bleed so the border runs edge to edge;
   .docbar__inner carries the 900px measure. Sticky at every width, not just
   phone — these are the longest-scrolling pages on the site, and "back" /
   the jump-to-section list should stay one tap away the whole way down.
*/

.docbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(11 13 12 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.docbar__inner {
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.docbar__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 10px;
  margin-inline-start: -10px;
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color .2s var(--ease);
}
.docbar__back:hover { color: var(--accent); }

.docbar__back .icon { width: 17px; height: 17px; }

.docbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.95rem;
}
.docbar__logo { width: 25px; height: 25px; flex: none; }

.docwrap {
  max-width: 900px;
  margin-inline: auto;
  padding: 40px 20px 90px;
}

.doc { max-width: var(--doc-measure); }

.dockicker {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.doctitle {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin-bottom: 16px;
}

.docmeta {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.docmeta strong { color: var(--text); font-weight: 600; }

.doclede {
  color: var(--text);
  font-size: 1.06rem;
  margin-bottom: 8px;
}

/* -------------------------------------------------------------- jump list
   A plain anchor list — no JS, no scrollspy, just <a href="#id">. On a page
   this long that is the difference between "usable on phone" and a wall of
   text you fight to scroll through. scroll-margin-top on the headings below
   keeps a jumped-to section clear of the sticky bar.
*/

.doctoc {
  max-width: var(--doc-measure);
  margin-top: 28px;
}

.doctoc__label {
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.doctoc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.doctoc__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  color: var(--text-dim);
  font-size: 0.84rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease);
}
.doctoc__list a:hover {
  border-color: var(--accent-line);
  background: var(--bg-2);
  color: var(--accent);
}

.docbody {
  counter-reset: doc-section;
  color: var(--text-dim);
  margin-top: 34px;
}

.docbody > * + * { margin-top: 1.05em; }

/* Numbered accent badge instead of a plain rule above each heading — same
   mono-numeral language as .stat__value, and it turns the jump list above
   into a real map of the page instead of a guess. */
.docbody h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2.4em;
  padding-top: 1.3em;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  scroll-margin-top: calc(var(--bar-h) + 24px);
}
.docbody h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.docbody h2::before {
  counter-increment: doc-section;
  content: counter(doc-section);
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.docbody ul,
.docbody ol {
  padding-inline-start: 1.35em;
  list-style: revert;
}
.docbody li + li { margin-top: 0.6em; }
.docbody li::marker { color: var(--accent); }

.docbody strong { color: var(--text); font-weight: 600; }

.docbody a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.docbody a:hover { text-decoration-thickness: 2px; }

.docbody code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85em;
}

.docnext {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--doc-measure);
  min-height: 44px;
  margin-top: 48px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  color: var(--text);
  font-weight: 600;
  transition: transform .2s var(--ease), border-color .2s var(--ease),
              background-color .2s var(--ease);
}
.docnext:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--bg-2);
}

.docnext__label {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 0.9rem;
}

.docnext__arrow {
  width: 17px;
  height: 17px;
  margin-inline-start: auto;
  fill: var(--accent);
  transform: scaleX(-1);
}

/* Smooth anchor jumps for the TOC above — scoped to these two pages only
   and gated on prefers-reduced-motion. index.html deliberately skips a
   global scroll-behavior (see styles.css) because its router already
   animates the jump itself; these pages have no router and no JS at all,
   so there's no race to lose. */
@media (prefers-reduced-motion: no-preference) {
  html:has(.subpage--legal) { scroll-behavior: smooth; }
}

/* ============================================================== responsive
   Nothing above breaks at any width — .doc's max-width is a cap, not a
   fixed size, and .docbar__inner / .doctoc__list already wrap. This just
   tightens the rhythm once there's less room.
*/
@media (max-width: 640px) {
  .docwrap { padding: 28px 18px 70px; }
  .docbody h2 { gap: 11px; }
  .docbody h2::before { width: 26px; height: 26px; font-size: 0.74rem; }
}

/* .doccta and .notice lived here until 2026-08-25. They styled connect.html's
   CTA row and its highlighted "we never do this" box, and connect.html was the
   only page that ever used either — removed with it. */
