/* ============================================================
   LEGAL PAGES
   These shipped as a narrow ribbon of prose floating in an empty
   canvas, with none of the site's grammar. Rebuilt to use the same
   devices as the main page: visible column rules, a margin-anchored
   index, numbered section rules, poster-scale title, one accent.
   The left margin carries a sticky contents list, which is the one
   thing a legal document genuinely benefits from and also gives the
   empty half of the screen a job.
   ============================================================ */

.legal-page { padding-top: clamp(7rem, 15vh, 10.5rem); padding-bottom: 0; }

/* ---------- masthead ---------- */
.legal-head { margin-bottom: clamp(3rem, 8vh, 5.5rem); }
.legal-head .lbl a { border-bottom: 1px solid var(--rule-2); }
.legal-head .lbl a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.legal-title {
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  line-height: .92;
  letter-spacing: -.045em;
  font-weight: 500;
  margin: 1.25rem 0 1.5rem;
}
.legal-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-2);
}

/* ---------- two columns: sticky index + document ---------- */
.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-bottom: var(--gut);
}

.legal-toc { position: sticky; top: calc(88px + 2rem); }
.legal-toc ol { list-style: none; margin-top: 1rem; border-top: 1px solid var(--rule); }
.legal-toc li { border-bottom: 1px solid var(--rule); }
.legal-toc a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .6rem;
  padding: .7rem 0;
  font-size: var(--fs-small);
  color: var(--text-dim);
  transition: color .2s var(--ease);
}
.legal-toc a i {
  font-family: var(--mono); font-style: normal;
  font-size: var(--fs-micro); color: var(--text-dim);
  transition: color .2s var(--ease);
}
.legal-toc a:hover { color: var(--text); }
.legal-toc a[aria-current="true"] { color: var(--text); }
.legal-toc a[aria-current="true"] i { color: var(--accent); }

/* ---------- the document ---------- */
.legal-doc { max-width: 68ch; }
.legal-lede {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-mid);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.legal-sec { padding-top: clamp(2rem, 5vh, 3rem); }
.legal-sec + .legal-sec { margin-top: clamp(2rem, 5vh, 3rem); border-top: 1px solid var(--rule); }
.legal-sec > .n {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: .14em;
  color: var(--accent);
  display: block;
  margin-bottom: .8rem;
}
.legal-sec h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: 1.1rem;
}
.legal-sec h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 1.9rem 0 .6rem;
}
.legal-sec p {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.legal-sec p strong { color: var(--text); font-weight: 500; }
.legal-sec a { color: var(--text-mid); border-bottom: 1px solid var(--rule-2); }
.legal-sec a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.legal-sec ul { list-style: none; margin: 1.1rem 0 1.25rem; }
.legal-sec ul li {
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-dim);
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: .7rem;
}
.legal-sec ul li::before {
  content: "";
  position: absolute; left: 0; top: .72em;
  width: 7px; height: 2px; background: var(--accent);
}

/* a pulled-out statement, for the one line that matters per page */
.legal-note {
  border-left: 2px solid var(--accent);
  padding: .25rem 0 .25rem 1.25rem;
  margin: 1.5rem 0;
}
.legal-note p { color: var(--text-mid); margin-bottom: 0; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  /* hide the whole contents block, not just the list: hiding only the
     <ol> left a "CONTENTS" heading standing over nothing. */
  .legal-toc { display: none; }
  .legal-doc { max-width: none; }
}
