/* Sojo legal pages: a calm reading column on top of the landing's tokens. */
.legal-nav .nav-row { justify-content: space-between; }
.legal { padding: 48px 0 80px; }
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.legal-head { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.legal-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.legal-head p { color: var(--text2); margin-top: 12px; max-width: 68ch; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.legal-meta span { background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: .88rem; color: var(--text2); }
.legal-tabs { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.legal-tabs a { text-decoration: none; padding: 11px 18px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 600; font-size: .95rem; color: var(--text2); min-height: 44px; display: inline-flex; align-items: center; }
.legal-tabs a:hover { color: var(--text); border-color: #cfcfd6; }
.legal-tabs a[aria-current=page] { background: var(--text); border-color: var(--text); color: #fff; }

.toc { position: sticky; top: 96px; max-height: calc(100dvh - 120px); overflow-y: auto; font-size: .93rem; }
.toc h2 { font: 600 .74rem/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text2); line-height: 1.35; }
.toc a::before { content: counter(toc) "."; flex: none; min-width: 1.5em; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--surface); color: var(--text); }

.doc { max-width: 74ch; counter-reset: sec; }
.doc section { scroll-margin-top: 96px; padding-top: 8px; margin-bottom: 40px; counter-increment: sec; counter-reset: par; }
.doc h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.doc h2::before { content: counter(sec) ". "; color: var(--brand); }
.doc h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.doc p, .doc li { color: #2b2c33; }
.doc p { margin: 0 0 12px; }
.doc p.n { counter-increment: par; padding-left: 3.1em; position: relative; }
.doc p.n::before { content: counter(sec) "." counter(par) "."; position: absolute; left: 0; color: var(--text2); font-variant-numeric: tabular-nums; }
.doc ul { margin: 0 0 12px; padding-left: 4.4em; }
.doc ul.flat { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--brand); text-underline-offset: 3px; }
.doc strong { font-weight: 600; color: var(--text); }
.note { background: var(--tint); border-radius: 16px; padding: 18px 20px; margin: 0 0 16px; }
.note p:last-child { margin-bottom: 0; }
.todo { background: #fff3c4; color: #5c4400; border-radius: 4px; padding: 1px 5px; }
.table-scroll { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 16px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--surface); font-weight: 600; font-size: .86rem; color: var(--text2); }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 600; color: var(--text); width: 24%; }

@media (max-width: 900px) {
  .legal { padding: 28px 0 56px; }
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
  .doc p.n { padding-left: 0; }
  .doc p.n::before { position: static; margin-right: 6px; }
  .doc ul { padding-left: 1.3em; }
}
@media print {
  .nav, .toc, .footer, .legal-tabs, .skip { display: none !important; }
  .legal-grid { display: block; }
  .doc { max-width: none; }
  body { font-size: 11pt; }
}
