/* Long-form legal documents (Privacy, Terms). Plain core blocks inside one core/group.legal-doc,
   so the owner edits everything freely: a kicker, a title, a "last updated" line, an intro, a
   Callout group ("The short version"), an "On this page" jump list, then numbered H2 sections as a
   flat run of anchored headings, paragraphs and lists. Loaded only on a page whose content carries
   the `legal-doc` or `is-style-adams-callout` class (Adams_Page_Assets). Values are from
   the approved mockup.

   Selectors are descendant, not child, on purpose: in the editor canvas the blocks sit one wrapper
   deeper than on the front end. Classed paragraphs and lists beat the plain ones by specificity. */

/* WordPress adds flow-layout classes to a core/group at render time, and may cap the width of its
   children. Neutralize that here so the document column is the one this file sets. */
.legal-band .wp-block-group__inner-container { max-width: none; margin: 0; padding: 0; }
.legal-band, .legal-band > .wrap, .legal-doc { max-width: none; }
.legal-doc { max-width: 46rem; margin-inline: 0; padding: 0; }
.legal-doc > *, .legal-doc .wp-block-group__inner-container > * { max-width: none; margin-inline: 0; }
.legal-band > .wrap { margin-inline: auto; max-width: 80rem; padding-block: 0; } /* the band already pads; .band-in's own padding doubled the gap */
/* Page hero spacing as on About: projects.css (not loaded here) sets it for the other inner pages. */
section.adams-phero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem); }

.legal-doc p.eyebrow { margin: 0; }
/* 4rem at every width, as the mockup sets inline (base.css would drop .display to 3.25rem on phones). */
.legal-doc .legal-title { margin: 1rem 0 0; font-size: 4rem; }
.legal-doc p.legal-meta { margin: 1rem 0 0; color: var(--ink-muted); }
.legal-doc p.legal-intro { margin: 2rem 0 0; }

/* Body text. The mockup's section paragraphs and list items use text-wrap: pretty. */
.legal-doc p, .legal-doc li { text-wrap: pretty; }
.legal-doc p { margin: 0 0 1rem; }
.legal-doc p.legal-meta, .legal-doc p.legal-intro { text-wrap: balance; }
.legal-doc ul, .legal-doc ol { margin: 0 0 1rem; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.legal-doc a { border-bottom: 1px solid var(--accent); }

/* Numbered section headings: the jump-link targets. The mockup's `.h2` class was never defined, so
   these take the browser default for an H2 at the body size (1.5em, bold), set out here. */
.legal-doc h2 { margin: 2.5rem 0 1rem; padding: 2.5rem 0 0; border-top: 1px solid var(--hairline); font-family: var(--font-text); font-size: 1.875rem; font-weight: 700; line-height: 1.6; text-wrap: balance; scroll-margin-top: 5rem; }

/* "The short version": the Callout block style on a core/group. */
.legal-doc .is-style-adams-callout, .is-style-adams-callout { margin: 3rem 0; padding: 2rem; border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: linear-gradient(0deg, var(--accent-wash), transparent 60%), var(--surface-200); scroll-margin-top: 5rem; }
.legal-doc .is-style-adams-callout h2 { margin: 0 0 1.25rem; padding: 0; border-top: 0; font-family: var(--font-display); font-size: 1.625rem; font-weight: 500; line-height: 1.3; }
.legal-doc .is-style-adams-callout ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.legal-doc .is-style-adams-callout li { position: relative; padding-left: 1.5rem; }
.legal-doc .is-style-adams-callout li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.75rem; height: 2px; background: var(--accent); }

/* "On this page": the jump list. */
.legal-doc p.legal-toc-label { margin: 0 0 1rem; }
.legal-doc ol.legal-toc { margin: 0 0 3rem; padding: 0; list-style: none; display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
.legal-doc ol.legal-toc a { color: var(--ink-muted); border-bottom: 1px solid transparent; }
.legal-doc ol.legal-toc a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.legal-doc a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }


/* Editor canvas only (.editor-styles-wrapper exists nowhere on the front end): every block is a
   .wp-block that the editor centres and caps at the content width. Put the document column back. */
.editor-styles-wrapper .legal-band .wp-block { max-width: none; margin-inline: 0; }
.editor-styles-wrapper .legal-band .wrap.wp-block { max-width: 80rem; margin-inline: auto; }
.editor-styles-wrapper .legal-band .legal-doc.wp-block { max-width: 46rem; }
