/* ==========================================================================
   Elevate 360 — Documents (10/9): Privacy, Terms, Accessibility, and the
   404. A plain reading page: a short head on paper, then a small table of
   contents beside the text at desktop. Reads from tokens.css.
   ========================================================================== */

/* --- Head ------------------------------------------------------------------ */
.doc__head { padding-block: var(--space-3xl) var(--space-2xl); background: var(--paper); border-bottom: 1px solid var(--rule); }
.doc__title {
  margin: var(--space-sm) 0 0;
  font-size: var(--step-4);
  font-weight: var(--weight-regular);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.doc__lede { margin: var(--space-lg) 0 0; max-width: 52ch; font-size: var(--step-1); line-height: var(--leading-snug); color: var(--text-muted); }
.doc__updated { margin: var(--space-lg) 0 0; font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-meta); }

/* --- Body ------------------------------------------------------------------ */
.doc { padding-block: var(--space-2xl) var(--section-y); background: var(--paper); }
.doc__grid { display: grid; gap: var(--space-2xl); }
.doc__toc { align-self: start; }
.doc__toc-label { margin: 0 0 var(--space-sm); font-size: var(--step--1); font-weight: var(--weight-medium); font-stretch: var(--width-narrow); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.doc__toc-list { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; }
.doc__toc-list li { counter-increment: toc; border-top: 1px solid var(--rule); }
.doc__toc-list a {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: baseline;
  padding: 0.5rem 0;
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), padding-left var(--dur-base) var(--ease-emph);
}
.doc__toc-list a::before { content: counter(toc, decimal-leading-zero); font-size: var(--step--2); font-weight: var(--weight-medium); font-stretch: var(--width-narrow); letter-spacing: 0.08em; color: var(--text-meta); transition: color var(--dur-fast) var(--ease-out); }
.doc__toc-list a:hover, .doc__toc-list a.is-active { color: var(--ink); }
.doc__toc-list a:hover::before, .doc__toc-list a.is-active::before { color: var(--gold); }
.doc__toc-list a::after { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform 500ms var(--ease-emph); }
.doc__toc-list a.is-active::after { transform: scaleX(1); }

.doc__body { max-width: 66ch; }
.doc__section { padding-block: var(--space-xl) var(--space-lg); border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h-lg, 72px) + var(--space-lg)); }
.doc__section:first-child { padding-top: 0; border-top: 0; }
.doc__h { margin: 0 0 var(--space-md); font-size: var(--step-2); font-weight: var(--weight-regular); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.doc__section p { margin: 0 0 var(--space-md); color: var(--text-muted); line-height: var(--leading-normal); }
.doc__section p:last-child { margin-bottom: 0; }
.doc__section strong { font-weight: var(--weight-medium); color: var(--ink); }
.doc__section a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--gold); transition: color var(--dur-fast) var(--ease-out); }
.doc__section a:hover { color: var(--gold); }
.doc__section ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-sm); }
.doc__section ul li { position: relative; padding-left: 1.4rem; color: var(--text-muted); line-height: var(--leading-normal); }
.doc__section ul li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.75rem; height: 1px; background: var(--gold); }

@media (min-width: 1024px) {
  .doc__head { padding-block: var(--space-4xl) var(--space-3xl); }
  .doc__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); column-gap: var(--space-4xl); align-items: start; }
  .doc__toc { position: sticky; top: calc(var(--header-h-lg, 72px) + var(--space-xl)); }
}
@media (max-width: 1023px) {
  .doc__toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-lg); }
}

/* --- 404 --------------------------------------------------------------------- */
.nf { display: grid; align-content: center; min-height: calc(100vh - var(--header-h-lg, 72px)); padding-block: var(--section-y); background: var(--paper); }
.nf__inner { display: grid; justify-items: start; }
.nf__num { margin: 0 0 var(--space-md); font-size: clamp(5rem, 4rem + 8vw, 11rem); font-weight: var(--weight-light); line-height: 0.85; letter-spacing: -0.05em; color: var(--navy-100); font-variant-numeric: tabular-nums; }
.nf__title { margin: var(--space-sm) 0 0; max-width: 16ch; font-size: var(--step-4); font-weight: var(--weight-regular); line-height: 1.02; letter-spacing: -0.03em; color: var(--ink); }
.nf__title em { font-style: italic; }
.nf__lede { margin: var(--space-lg) 0 0; max-width: 44ch; font-size: var(--step-1); line-height: var(--leading-snug); color: var(--text-muted); }
.nf__links { margin: var(--space-2xl) 0 0; padding: 0; list-style: none; display: grid; width: 100%; max-width: 56rem; border-top: 1px solid var(--rule); }
.nf__link { position: relative; display: grid; gap: 0.15rem; padding: var(--space-md) 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: padding-left var(--dur-base) var(--ease-emph); }
.nf__link::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform 500ms var(--ease-emph); }
.nf__link:hover { padding-left: var(--space-sm); }
.nf__link:hover::before { transform: scaleX(1); }
.nf__link-t { font-size: var(--step-1); font-weight: var(--weight-medium); color: var(--ink); transition: color var(--dur-fast) var(--ease-out); }
.nf__link:hover .nf__link-t { color: var(--navy); }
.nf__link-s { font-size: var(--step--1); color: var(--text-meta); }
@media (min-width: 768px) {
  .nf__links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-2xl); border-top: 0; }
  .nf__link { border-top: 1px solid var(--rule); border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .doc__toc-list a, .doc__toc-list a::after, .nf__link, .nf__link::before { transition: none; }
}
