/* Utility surfaces owned by the SEO/plumbing slice: the legacy legal pages,
   the 404s and /thanks/. Tokens only — no literal colours. Loaded per-page via
   the `extraCss` front-matter hook, so it never touches the sitewide budget. */

/* ---------------------------------------------------------------- legal --- */
/* Long-form legal prose: a narrow measure, generous section rhythm, and a
   numbered anchor on every H2 so support replies can deep-link a clause. */

.legal { max-width: 44rem; }
.legal > h1 { margin-bottom: .25em; }
.legal-meta { font-size: .875rem; color: var(--text-muted); margin-bottom: 32px; }

.legal-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-s); padding: 24px; }
@media (min-width: 700px) { .legal-body { padding: 40px; } }

.legal-body > :first-child { margin-top: 0; }
.legal-body > :last-child { margin-bottom: 0; }
.legal-body p, .legal-body li { max-width: 38rem; }
.legal-body h2 { font-size: 1.125rem; margin-top: 2em; scroll-margin-top: 88px; }
.legal-body h3 { font-size: 1rem; margin-top: 1.6em; }
.legal-body ul, .legal-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.legal-body li { margin-bottom: .35em; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body a { word-break: break-word; }
.legal-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.legal-body blockquote { margin: 1.5em 0; padding-left: 16px; border-left: 3px solid var(--leaf); color: var(--text); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .9375rem; margin: 0 0 1.5em; }
.legal-body :is(th, td) { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-body th { color: var(--ink); font-weight: 600; }
.legal-body code { background: var(--surface-alt); border-radius: 4px; padding: 1px 5px; font-size: .9em; }

.legal-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal-foot h2 { font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin: 24px 0 .8em; }
/* Deliberately NOT .lang-list — that class is the header's absolutely
   positioned dropdown in main.css, and sharing it dragged this in-page list
   out of flow and off the right edge of every legal page. */
.legal-lang-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-lang-list a { text-decoration: none; }
.legal-lang-list a:hover { text-decoration: underline; }
.legal-lang-list [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ 404 --- */

.notfound { max-width: 44rem; margin-inline: auto; text-align: center; padding-top: 32px; }
.notfound .overline { letter-spacing: .16em; }
.spill { width: 168px; height: 168px; margin: 0 auto 8px; display: block; }
.notfound p { margin-inline: auto; }
.recover { margin-top: 40px; text-align: left; }
.recover h2 { font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin: 0 0 16px; }
.recover-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.recover-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 14px 16px; font-weight: 500; text-decoration: none; color: var(--ink); transition: box-shadow 150ms var(--ease), transform 150ms var(--ease); }
.recover-grid a:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }

/* --------------------------------------------------------------- thanks --- */

.thanks { max-width: 44rem; margin-inline: auto; }
.thanks-card { text-align: center; }
.thanks-card h1 { margin-top: 0; }
.thanks-card p { margin-inline: auto; }
.btn-download { margin: 24px 0 12px; }
.thanks-note { font-size: .875rem; color: var(--text-muted); }
.thanks-back { display: block; margin-top: 32px; text-align: center; font-size: .875rem; }

/* Legal text is imported prose: it carries long URLs, email addresses and
   regulation references that have no break opportunity, and at 320px those
   pushed the page sideways. */
.legal-body { overflow-wrap: anywhere; }
.legal-body table { display: block; overflow-x: auto; }
