/* Static & system pages — long-form legal template, 404 */

/* ---------- Legal (Privacy Policy, Terms) ---------- */
.page-legal .page { gap: 0; }
.legal { padding-top: 20px; padding-bottom: 24px; }
.legal__head .eyebrow { margin: 0; }
.legal__title { margin-top: 6px; font-family: var(--disp); font-weight: 400; font-size: 38px; line-height: 1.08; }
.legal__meta { margin-top: 8px; font-size: 15px; color: var(--tx3); }

.legal__short { margin-top: 20px; padding: 16px 18px; border-radius: 18px; background: var(--gold-soft); }
.legal__short-title { margin-bottom: 6px; font-size: 15px; font-weight: 800; color: var(--gold-ink); }
.legal__short p:last-child { font-size: 16px; line-height: 1.6; color: var(--tx); }

.legal__toc details { margin-top: 16px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line2); }
.legal__toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; border-radius: 18px; }
.legal__toc summary::-webkit-details-marker { display: none; }
.legal__toc summary svg { transition: transform var(--dur-2) var(--ease); }
.legal__toc details[open] summary svg { transform: rotate(180deg); }
.legal__toc ol { margin: 0; padding: 0 18px 14px 40px; list-style: decimal; font-size: 16px; line-height: 1.4; }
.legal__toc li { padding: 0; }
.legal__toc li::marker { color: var(--tx3); font-weight: 600; }
.legal__toc a { display: block; padding: 10px 0; color: var(--gold-ink); font-weight: 600; }

.legal__body { min-width: 0; }
.legal__body .divider-paisley { margin: 22px 0 0; }
.legal__body .divider-paisley svg { width: 200px; height: 28px; }
.legal__intro { margin-top: 26px; }
.legal .prose { font-size: 17px; line-height: 1.7; color: var(--tx2); max-width: 68ch; }
.legal .prose > * + * { margin-top: 14px; }
.legal .prose h2 { margin-top: 18px; font-family: var(--ui); font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--tx); scroll-margin-top: calc(var(--bar-h) + var(--safe-t) + 16px); }
.legal .prose h2 + * { margin-top: 10px; }
.legal__num { color: var(--gold-ink); }
.legal .prose ul { padding-left: 22px; }
.legal .prose li + li { margin-top: 6px; }
.legal .prose li::marker { color: var(--gold); }
.legal .prose a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal .prose strong { font-weight: 700; }

.legal__links { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.legal__links .ext-link { min-height: 64px; border-radius: 16px; background: var(--s1); }
.legal__links .ext-link > svg { flex: none; color: var(--tx3); }
.legal__link-icon { flex: none; display: inline-flex; color: var(--gold-ink); }
.legal__top { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 16px; font-size: 15px; font-weight: 700; color: var(--gold-ink); }
.legal__top svg { transform: rotate(180deg); }

@media (min-width: 1024px) {
  .legal { max-width: 1120px; padding-top: 48px; padding-bottom: 32px; }
  .legal__title { font-size: var(--fs-display); }
  .legal__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 8px; }
  .legal__side { position: sticky; top: 96px; }
  .legal__intro { margin-top: 20px; }
  .legal__links { flex-direction: row; }
  .legal__links .ext-link { flex: 1; }
  .legal__top { justify-content: flex-start; }
}

/* ---------- 404 ---------- */
.page-404 .page { justify-content: center; }
.nf { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: calc(var(--app-h) - var(--bar-h) - var(--safe-t) - var(--tab-h) - var(--safe-b) - 80px); padding-top: 24px; padding-bottom: 24px; text-align: center; }
.nf__glow { position: absolute; z-index: -1; left: 50%; top: 50%; width: min(460px, 100%); height: 460px; margin-top: -70px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(198,42,32,.35), rgba(198,42,32,0)); pointer-events: none; }
.nf__code { font-family: var(--disp); font-size: 120px; line-height: .95; color: var(--gold-ink); }
.nf__title { max-width: 520px; margin-top: 4px; font-family: var(--disp); font-weight: 400; font-size: 30px; line-height: 1.15; }
.nf__text { max-width: 420px; font-size: 16px; line-height: 1.55; color: var(--tx2); }
.nf__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; margin-top: 10px; }
.nf__actions .btn--primary { min-height: 54px; }
.nf__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nf__pair .btn { min-height: 50px; padding: 0 12px; font-size: 16px; font-weight: 700; }

@media (min-width: 1024px) {
  .nf { min-height: calc(var(--app-h) - 300px); padding-top: 48px; padding-bottom: 48px; }
  .nf__glow { width: 720px; height: 720px; margin-top: -60px; }
  .nf__code { font-size: 160px; }
  .nf__title { font-size: 40px; }
  .nf__text { font-size: 18px; }
}
