/* ================================================================ legal pages (/privacy, /terms, /notice)
   The landing page's voice for long text: a mono kicker and a heavy display title, the three documents as
   a quiet mono row, then the text in one readable column with a sticky contents list beside it (the
   landing's "How it works" band). Sections are separated by hairlines, not cards. Tokens: diorama.css. */
.legal { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 72px; }

.legal-hero { padding: clamp(16px, 4vh, 48px) 0 28px; border-bottom: 1px solid var(--line); }
.legal-kicker, .legal-docs a, .legal-toc-title, .legal-toc li::before {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.legal-kicker { margin: 0; font-size: 11px; color: var(--accent-ink); }
.legal-title {
  margin-top: 14px; font: 800 clamp(2.6rem, 5.2vw, 4.6rem)/.96 var(--font-display); letter-spacing: -.048em;
  font-variation-settings: "opsz" 96; text-wrap: balance;
}
.legal-lede { margin-top: 18px; max-width: 38em; font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* The three documents, in the caption row's voice: the current one is underlined in ink. */
.legal-docs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; }
.legal-docs a { display: inline-block; padding: 3px 0; font-size: 11.5px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; }
.legal-docs a:hover, .legal-docs a:focus-visible { color: var(--ink); border-color: var(--line-3); }
.legal-docs a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

/* Contents beside the text, like the landing's band head. */
.legal-grid { display: grid; grid-template-columns: minmax(180px, 4fr) minmax(0, 8fr); gap: 72px; align-items: start; }
.legal-toc { position: sticky; top: 32px; padding-top: 44px; }
.legal-toc-title { margin: 0 0 14px; font-size: 11px; color: var(--ink-3); }
.legal-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.legal-toc li { counter-increment: toc; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: baseline; }
.legal-toc li::before { content: counter(toc, decimal-leading-zero); font-size: 10.5px; color: var(--accent-ink); }
.legal-toc a { display: block; padding: 5px 0; font-size: 15px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover, .legal-toc a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* The text: one column of about 68 characters. */
.legal-body { max-width: 68ch; min-width: 0; }
.legal-section { padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.legal-section:first-child { border-top: 0; }
.legal-section h2 {
  margin: 0 0 14px; font: 700 clamp(1.45rem, 1.9vw, 1.8rem)/1.15 var(--font-display); letter-spacing: -.03em;
  text-wrap: balance;
}
.legal-section p, .legal-section li { font-size: 17px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; text-wrap: pretty; }
.legal-section p + p { margin-top: 14px; }
.legal-section b { color: var(--ink); }
.legal-section a { color: var(--accent-ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* Lists: a small block as the marker. */
.legal-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.legal-list li { position: relative; padding-left: 24px; }
.legal-list li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 7px; height: 7px; border-radius: 1.5px; background: var(--accent); }

/* A short summary at the top of a document sits on paper of its own. */
.legal-summary { margin-top: 40px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.legal-summary + .legal-section { border-top: 0; }

/* Contact line at the end of the text. */
.legal-contact { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.legal-contact a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* Footer: the landing footer's links, without the console's theme swatches. */
.legal-foot { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 32px; }
.legal-foot-row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); }
.legal-foot .small-print { margin: 0; font-size: 13px; }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal-toc { display: none; }
  .legal-title { font-size: clamp(2.35rem, 11vw, 3.4rem); }
  .legal-lede { font-size: 16.5px; margin-top: 14px; }
  .legal-docs { margin-top: 22px; }
  .legal-section { padding: 30px 0; }
  .legal-section h2 { font-size: 1.4rem; }
  .legal-section p, .legal-section li { font-size: 16px; line-height: 1.65; }
  .legal-summary { margin-top: 28px; padding: 22px 20px; border-radius: var(--r-md); }
}
