/* Site v2 long-form layout (privacy, terms, security, press releases and the
   team profiles): round 4's centred head over the page glow, then a sticky
   contents rail beside Inter prose at 16/1.65 on white. */

/* The glow stays behind the header and the document head only: it fades out
   before the prose, so paragraphs sit on plain white. */
:root {
  --glow-h: min(520px, 70vh);
}

/* ---------- Document head: round 4's centred hero ---------- */
.v2-doc-head {
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: clamp(32px, 4vw, 48px);
  text-align: center;
}
.v2-doc-head .v2-wrap {
  display: grid;
  justify-items: center;
}
.v2-doc-head__label {
  margin-bottom: var(--space-4);
}
.v2-doc-head__title {
  max-width: 22ch;
}
.v2-doc-head__lead {
  max-width: 560px;
  margin-top: var(--space-4);
}
/* Last updated and reading time: round 4's small ringed chips. */
.v2-doc-head__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.v2-doc-head__meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--ring);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.33;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Body: the contents rail beside the article ---------- */
.v2-doc {
  display: grid;
  gap: var(--space-8);
  padding-block: clamp(16px, 3vw, 40px) var(--section);
}
.v2-doc__article {
  min-width: 0;
  max-width: 720px;
}
.v2-doc--no-toc {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
@media (min-width: 1024px) {
  .v2-doc:not(.v2-doc--no-toc) {
    grid-template-columns: 240px minmax(0, 720px);
    justify-content: center;
    column-gap: clamp(48px, 6vw, 88px);
  }
}

/* Contents rail. Phones and tablets: a ringed disclosure above the article.
   Wide screens: a sticky list, the section in view on a soft purple pill. */
.v2-toc__box {
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--ring);
}
.v2-toc__box > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-4);
  list-style: none;
  cursor: pointer;
}
.v2-toc__box > summary::-webkit-details-marker {
  display: none;
}
.v2-toc__box > summary svg {
  color: var(--muted);
  transition: transform var(--dur) var(--ease);
}
.v2-toc__box[open] > summary svg {
  transform: rotate(180deg);
}
.v2-toc .v2-toc__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 var(--space-1) var(--space-2);
  list-style: none;
}
.v2-toc__list a {
  display: block;
  padding: 6px var(--space-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  line-height: 1.43;
  color: var(--muted);
  text-decoration: none;
  transition:
    color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}
.v2-toc__list .is-sub a {
  padding-left: var(--space-6);
  font-size: var(--fs-caption);
}
.v2-toc__list a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.v2-toc__list a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
/* Inside the scrolling rail an outer focus ring would be clipped. */
.v2-toc__list a:focus-visible {
  outline-offset: -2px;
}
@media (max-width: 1023px) {
  .v2-toc__list a {
    min-height: 40px;
    padding-block: 10px;
  }
}
@media (min-width: 1024px) {
  .v2-toc {
    position: sticky;
    top: calc(var(--header-h) + var(--space-8));
    align-self: start;
    max-height: calc(100vh - var(--header-h) - var(--space-16));
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .v2-toc__box {
    background: none;
    box-shadow: none;
  }
  .v2-toc__box > summary {
    min-height: 0;
    padding: 0 0 var(--space-3) var(--space-3);
    pointer-events: none;
  }
  .v2-toc__box > summary svg {
    display: none;
  }
  .v2-toc .v2-toc__list {
    padding: 0;
  }
}

/* ---------- Prose: Inter at 16/1.65, zinc text, ink headings ---------- */
.v2-prose {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink-2);
}
.v2-prose > * + * {
  margin-top: 1.05em;
}
.v2-prose h2,
.v2-prose h3,
.v2-prose h4 {
  position: relative;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + var(--space-6));
}
.v2-prose h2 {
  margin-top: 2em;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: -0.025em;
}
.v2-prose h2:first-child {
  margin-top: 0;
}
.v2-prose h3 {
  margin-top: 2em;
  font-size: var(--fs-h3);
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.v2-prose h4 {
  margin-top: 1.5em;
  font-size: var(--fs-h4);
}
.v2-prose h2 + *,
.v2-prose h3 + *,
.v2-prose h4 + * {
  margin-top: 0.6em;
}
.v2-prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  transition:
    color var(--dur-fast) var(--ease),
    text-decoration-color var(--dur-fast) var(--ease);
}
.v2-prose a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}
.v2-prose ul,
.v2-prose ol {
  display: grid;
  gap: 0.45em;
  padding-left: 1.3em;
}
.v2-prose ul {
  list-style: disc;
}
.v2-prose li::marker {
  color: var(--subtle);
}
.v2-prose strong,
.v2-prose b {
  font-weight: 600;
  color: var(--ink);
}
.v2-prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
}
.v2-prose address {
  font-style: normal;
}
/* Quotes: round 4's white card with a 1px ring, not a rule. */
.v2-prose blockquote {
  padding: var(--space-5) var(--space-6);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--ring);
}
.v2-prose blockquote + blockquote {
  margin-top: var(--space-4);
}
@media (max-width: 559px) {
  .v2-prose blockquote {
    padding: var(--space-4) var(--space-5);
  }
}
.v2-prose .v2-anchor {
  position: absolute;
  right: 100%;
  padding-right: 0.4em;
  color: var(--subtle);
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.v2-prose h2:hover .v2-anchor,
.v2-prose h3:hover .v2-anchor {
  opacity: 1;
}
.v2-doc__top {
  margin-top: var(--space-12);
  color: var(--muted);
}
@media (max-width: 1023px) {
  .v2-doc__top {
    min-height: 40px;
  }
}
