/* Long documents: the privacy policy, the terms, and the download index.
   A sticky contents list on the left, one readable column on the right.
   Layout only, on top of brand.css. */

.legal { display: grid; grid-template-columns: 220px minmax(0, 720px); justify-content: space-between; gap: var(--s-7); padding-block: var(--s-8) var(--s-6); }
.legal-single { grid-template-columns: minmax(0, 720px); justify-content: start; }

.toc { position: sticky; top: calc(var(--header-h) + var(--s-5)); align-self: start; max-height: calc(100vh - var(--header-h) - var(--s-7)); overflow-y: auto; font-size: var(--t-xs); }
.toc p { margin-bottom: var(--s-3); font-weight: 550; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: var(--border); }
.toc a { display: block; padding: 5px 0 5px var(--s-3); margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-3); line-height: 1.4; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink-4); }

.legal-body h1 { font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; letter-spacing: var(--track-display); }
.legal-body .intro { margin-top: var(--s-4); padding-bottom: var(--s-6); border-bottom: var(--border); font-size: var(--t-md); color: var(--ink-2); }
.legal-body section { padding-top: var(--s-6); scroll-margin-top: calc(var(--header-h) + var(--s-3)); }
.legal-body h2 { margin-bottom: var(--s-3); font-size: var(--t-xl); letter-spacing: -.02em; }
.legal-body p { font-size: var(--t-sm); line-height: 1.7; color: var(--ink-2); }
.legal-body p + p { margin-top: var(--s-3); }
.legal-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.legal-body a:hover { text-decoration-color: currentColor; }

/* Numbered clauses: the number in ink, the text in body grey. */
.clauses { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.clauses li { font-size: var(--t-sm); line-height: 1.7; color: var(--ink-2); }
.clauses li > strong:first-child { font-weight: 600; color: var(--ink); }

/* Download index: a table of files. */
.downloads-card { margin-top: var(--s-6); border: var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.downloads-card .table a { color: var(--ink); text-decoration: none; }
.downloads-card .table a:hover { color: var(--accent); }
.downloads-card code { font-size: var(--t-xs); background: none; padding: 0; }
.legal-body .after { margin-top: var(--s-5); }

@media (max-width: 900px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: var(--s-7); }
  .toc { display: none; }
}
@media (max-width: 600px) {
  .legal { padding-top: var(--s-6); }
}
