/* ==========================================================================
   NSR prototype - legal pages (privacy, terms)
   A dark title block, then the policy on a sheet of paper: the same zone treatment as the factual part of the home page, which also reads best
   for long text. The words are the live site's own (tools/build-legal.cjs); only the layout is new.
   ========================================================================== */
.doc-head { position: relative; background-color: var(--carbon); padding-top: clamp(150px, 22vh, 230px); padding-bottom: clamp(70px, 11vh, 130px); }
.doc-kicker { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.doc-kicker::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.doc-title { font-size: clamp(30px, 5.8vw, 104px); line-height: 1.02; max-width: 11.3522em; } /* 12ch of Unbounded 900 */
.doc-deck { max-width: 42rem; margin-top: clamp(24px, 4vh, 44px); }
.doc-back { margin-top: 34px; }

.doc-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: calc(var(--col) * 0.4); padding-top: clamp(80px, 12vh, 150px); padding-bottom: clamp(100px, 16vh, 190px); }
.doc-toc { grid-column: 1 / span 3; align-self: start; padding-right: 8px; }
.doc-toc ol { counter-reset: toc; margin: 16px 0 0; }
.doc-toc li { counter-increment: toc; border-top: 1px solid var(--hair); }
.doc-toc li:last-child { border-bottom: 1px solid var(--hair); }
.doc-toc a { display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline; padding: 9px 0; font-size: 15px; line-height: 1.3; color: var(--fg); transition: color 0.2s var(--e-ui); }
.doc-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-index); font-weight: var(--w-label); font-size: 12px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--meta); }
.doc-toc a:focus-visible, .doc-toc a.is-current { color: var(--accent-text); }
.doc-toc a.is-current { font-weight: 600; }
.doc-toc a.is-current::before { color: var(--accent-text); }
@media (hover: hover) and (pointer: fine) { .doc-toc a:hover { color: var(--accent-text); } }
.doc-toc { will-change: transform; }

.doc-prose { grid-column: 5 / span 7; max-width: 46rem; }
.doc-sec { scroll-margin-top: 110px; padding-top: 34px; margin-top: 48px; border-top: 1.5px solid var(--fg); }
.doc-sec:first-child { margin-top: 0; }
.doc-h2 { font-size: clamp(20px, 2.1vw, 34px); margin-bottom: 18px; }
.doc-sec .f-body { max-width: 44rem; font-size: 18px; line-height: 1.68; }
.doc-sec .f-body + .f-body { margin-top: 16px; }

.site-footer .legal a[aria-current="page"] { color: var(--accent-text); }

@media (max-width: 1024px) {
  .doc-toc { grid-column: 1 / span 12; margin-bottom: 56px; padding-right: 0; }
  .doc-prose { grid-column: 1 / span 12; }
}
@media (max-width: 768px) {
  .doc-head { padding-top: 132px; padding-bottom: 56px; }
  .doc-title { font-size: clamp(28px, 8.2vw, 46px); }
  .doc-layout { padding-top: 64px; padding-bottom: 80px; }
  .doc-sec .f-body { font-size: 17px; }
}

/* the sheet is a rounded card: the footer slides up under its bottom corners, as the dark sections do under the poster on the home page */
.doc-sheet { border-radius: var(--r-sheet); }
.doc-sheet + .site-footer { position: relative; z-index: 1; margin-top: calc(var(--r-sheet) * -1); padding-top: calc(72px + var(--r-sheet)); border-top: 0; }
.doc-sec:focus { outline: none; }

/* a document whose title is a sentence (the insights guide): same type, a smaller size so it does not fill four screens of display type */
.doc-title.doc-title-long { font-size: clamp(26px, 4.1vw, 64px); max-width: 18em; }
@media (max-width: 768px) { .doc-title.doc-title-long { font-size: clamp(24px, 6.6vw, 38px); max-width: none; } }
