/* Legal pages (privacy, terms) and 404 */
.topbar.compact .inner { height: 72px; }
.topbar.compact .logo-word { font-size: 32px; }
.topbar.compact .logo-mark { width: 30px; height: 32px; }
.top-lang { color: #fff; font-size: 15px; padding: 8px 12px; border-radius: 8px; transition: background .2s; }
.top-lang:hover { background: rgba(255,255,255,.1); }

.legal-main { max-width: 820px; margin: 0 auto; padding: 48px 24px 96px; }
.legal-main h1 { font-size: 36px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.updated { color: var(--muted-text); font-size: 14px; margin-top: 8px; }
.draft { margin: 24px 0 8px; background: #fff7e6; border: 1px solid #f3d9a4; color: #7a4e00; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.6; }
.toc { margin: 28px 0 8px; background: var(--white); border-radius: 14px; padding: 18px 20px; }
.toc b { font-size: 13px; color: var(--muted-text); }
.toc ol { margin: 10px 0 0; padding-inline-start: 22px; columns: 2; column-gap: 28px; font-size: 15px; line-height: 1.9; }
.toc a { color: var(--primary-text); }
.toc a:hover { color: var(--orange); }
.legal-main section { margin-top: 36px; scroll-margin-top: 24px; }
.legal-main h2 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.legal-main p, .legal-main li { font-size: 16px; line-height: 1.85; color: var(--secondary-text); max-width: 68ch; }
.legal-main p + p { margin-top: 10px; }
.legal-main ul { padding-inline-start: 22px; margin-top: 8px; }
.legal-main li + li { margin-top: 4px; }
.legal-main a { color: var(--orange); }
.ph { background: #fff1d6; border-radius: 4px; padding: 0 4px; color: #8a5a00; font-weight: 600; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[data-lang][hidden] { display: none !important; }

/* 404 */
.nf { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 48px 24px; text-align: center; }
.nf-inner { max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nf-code { font-family: "Clash Display", sans-serif; font-weight: 600; font-size: clamp(96px, 20vw, 160px); line-height: 1; color: var(--primary-text); position: relative; }
.nf-code span { color: var(--orange); text-shadow: 0 0 40px rgba(253,97,27,.45); display: inline-block; animation: nfBob 2.4s ease-in-out infinite; }
@keyframes nfBob { 50% { transform: translateY(-10px); } }
.nf h1 { font-size: 26px; font-weight: 700; }
.nf p { color: var(--tertiary-text); font-size: 16px; line-height: 1.7; }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.nf-actions .btn { width: auto; min-width: 160px; }
.btn-light { background: var(--white); color: var(--primary-text); border-color: #e3e5e8; font-weight: 600; }

@media (max-width: 600px) {
  .legal-main { padding: 28px 16px 72px; }
  .legal-main h1 { font-size: 28px; }
  .toc ol { columns: 1; }
  .topbar.compact .inner { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { .nf-code span { animation: none; } }
