/* Legal pages — the few prose rules /terms and /privacy need on top of the
   capture. Hand-maintained, not emitted by the port pipeline. Imported by those
   two pages alone (see astroPage in tools/04-generate.mjs); pairs with
   tools/fragments/legal-pages.mjs.

   This file was 124 lines until 2026-08-31, when cursor.com's own legal layout
   was captured as `cursor-clone/terms-of-service.html` and registered in
   TEMPLATES. Before that the pages rendered through the *support* capture,
   whose frozen Tailwind carries the class name `.prose` and none of its element
   rules, so every rule a 4,490-word document needs lived here under a
   `.legal-prose` namespace.

   `src/styles/terms-of-service.css` now carries the body of that: `.prose>p`,
   `.prose.prose--block>p`, `.prose ul`, `.prose strong`, `.prose ol>li::marker`
   and the captured `.prose a:not([class])` link treatment, all of them the same
   rules this file was restating. Those are gone from here; the wrapper is
   `class="prose prose--block col-span-full! legal-prose"` and the capture wins
   for everything below.

   What is left is what a *captured* legal page has no rule for, which is
   exactly the two things our documents have and cursor.com's does not:

     - **Headings.** Cursor's terms sets its section titles as bold paragraphs,
       so the compiled Tailwind for that page emits no heading sizing at all.
       Ours are real `h2`s — `promoteHeadings` in the fragment makes them, so
       the cross-references have something to point at — and unstyled they
       render at the browser's default 1.5em bold, which in a wall of small
       print reads as 26 essays. `--text-md-sm` (18px) is the same step the old
       sheet chose, for the same reason.
     - **Anchor links.** `renderDoc` emits the capture's hover-anchor markup on
       every heading. terms-of-service.css has the `:hover` half of those rules
       but not the `opacity: 0` base, having no heading to hang it on, so a `#`
       would sit permanently beside every section title. blog-post.css ends by
       hiding it outright and this does the same: the ids are what the documents'
       own cross-references resolve to, and nothing else needs them visible.

   Ordered lists keep a rule too — the capture styles `ul` and only `ol`'s
   marker, so an `ol` would lose its indent. Every token read here is declared
   in terms-of-service.css — checked, not assumed. */

.legal-prose > h2 {
  color: var(--color-theme-text);
  margin-top: var(--spacing-v1\.5);
  margin-bottom: var(--spacing-v6\/12);
  font-size: var(--text-md-sm);
  line-height: var(--leading-cozy);
  font-weight: var(--font-weight-bold);
  /* The header pins itself once scrolled (src/styles/header-pinned.css), so a
     jump to #<section> from a cross-reference would land under it. */
  scroll-margin-top: var(--spacing-v2);
}

/* The document opens on its first section; the shell above already spaced it. */
.legal-prose > h2:first-child {
  margin-top: 0;
}

/* The capture styles `ul` and only `ol`'s marker; this gives `ol` the same box. */
.legal-prose ol {
  margin-bottom: var(--spacing-v1);
  padding-left: var(--spacing-g2);
  list-style-type: decimal;
}

.legal-prose li {
  margin-bottom: var(--spacing-v6\/12);
  text-wrap: pretty;
}

.legal-prose li::marker {
  color: var(--prose-bullets);
}

.legal-prose hr {
  border-color: var(--prose-hr);
  border-top-width: 1px;
  margin-block: var(--spacing-v2);
}

.legal-prose blockquote {
  border-left: 1px solid var(--color-theme-border-01);
  padding-left: var(--spacing-g1);
  margin-bottom: var(--spacing-v1);
}

.legal-prose .anchor-heading {
  position: relative;
}

.legal-prose .anchor-link {
  display: none;
}
