/* ================================================================ 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-meta { margin-top: 14px; font: 500 12px/1.4 var(--font-mono); letter-spacing: .02em; color: var(--ink-3); }
.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, .legal-section p + .legal-list, .legal-section .legal-list + 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: 10px 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); }
}

/* ================================================================ fine print (/privacy, /terms)
   Read like the legal pages of most sites: a plain-words summary on its own paper, then the full text in
   small type with numbered sections (1., 9.3) and no hairline between sections. The hosting notice keeps
   the larger one-page layout above. */
.legal-fine .legal-title { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.legal-fine .legal-toc li { display: block; }
.legal-fine .legal-toc li::before { content: none; }
.legal-fine .legal-toc a { padding: 4px 0; font-size: 14px; }
.legal-fine .legal-body { max-width: 72ch; }

.legal-fine .legal-summary { margin-top: 44px; }
.legal-fine .legal-summary h2 { margin: 0 0 14px; font: 700 1.3rem/1.2 var(--font-display); letter-spacing: -.02em; }
.legal-fine .legal-summary li { font-size: 16px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.legal-fine .legal-summary a { color: var(--accent-ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-summary-note { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.legal-fine .legal-text { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--line); }
.legal-fine .legal-section { padding: 22px 0 6px; border-top: 0; }
.legal-fine .legal-section h2 { margin: 0 0 10px; font: 600 17px/1.35 var(--font-body); letter-spacing: 0; color: var(--ink); }
.legal-fine .legal-section h3 { margin: 20px 0 6px; font: 600 15px/1.4 var(--font-body); color: var(--ink); scroll-margin-top: 16px; }
.legal-fine .legal-section p, .legal-fine .legal-section li { font-size: 15px; line-height: 1.65; }
.legal-fine .legal-section p + p, .legal-fine .legal-section p + .legal-list, .legal-fine .legal-section .legal-list + p { margin-top: 10px; }
.legal-fine .legal-list { gap: 8px; }
.legal-fine .legal-list li { padding-left: 18px; }
.legal-fine .legal-list li::before { left: 1px; top: .68em; width: 5px; height: 5px; border-radius: 1px; background: var(--ink-3); }
.legal-num { margin-right: .3em; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-3); }

@media (max-width: 900px) {
  .legal-fine .legal-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .legal-fine .legal-summary { margin-top: 28px; }
  .legal-fine .legal-summary li { font-size: 15px; }
  .legal-fine .legal-text { margin-top: 28px; }
  .legal-fine .legal-section h2 { font-size: 16.5px; }
  .legal-fine .legal-section p, .legal-fine .legal-section li { font-size: 14.5px; }
}

/* ================================================================ guides (/guides/*)
   Same column as the legal text; numbered steps, comparison tables and inline code. */
.legal-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.legal-table { margin-top: 14px; overflow-x: auto; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-table th, .legal-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); }
.legal-table th { color: var(--ink); font-weight: 600; }
.legal-section code { font: 500 .9em var(--font-mono); overflow-wrap: anywhere; }
.legal-fine .legal-summary p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
