/* Páginas legales (con el estilo de la landing: styles.css + landing.css) y 404 */
.legal { padding: 64px 0 120px; }
.legal-hero { display: grid; gap: 18px; justify-items: start; max-width: 820px; margin-bottom: 48px; }
.legal-hero .eyebrow { justify-self: start; }
.legal-hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -0.055em; line-height: 1.02; }
.legal-date { display: inline-flex; align-items: center; gap: 8px; color: var(--graphite); font-family: var(--mono); font-size: 12.5px; }
.legal-date .icon { color: var(--growth); }

.legal-switch { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; margin-top: 6px; border-radius: var(--r-pill); background: rgba(12, 18, 23, 0.7); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.legal-switch a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--graphite); transition: color 0.2s var(--ease), background-color 0.2s var(--ease); }
.legal-switch a:hover { color: var(--white); }
.legal-switch a[aria-current="page"] { background: rgba(46, 242, 164, 0.14); color: var(--growth); box-shadow: inset 0 0 0 1px rgba(46, 242, 164, 0.4); }

.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.legal-toc { position: sticky; top: 96px; display: grid; gap: 12px; }
.toc-title { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--graphite); }
.legal-toc ol { display: grid; gap: 2px; counter-reset: toc; border-left: 1px solid var(--line-strong); }
.legal-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--graphite); transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.legal-toc a:hover { color: var(--white); }
.legal-toc a[aria-current="true"] { color: var(--growth); border-left-color: var(--growth); }

.legal-card { padding: clamp(24px, 4vw, 48px); max-width: 820px; }
.prose { color: var(--mist); font-size: 16px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { scroll-margin-top: 96px; display: flex; align-items: center; gap: 12px; color: var(--white); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; margin: 44px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.prose h2:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.prose h2::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--growth); box-shadow: 0 0 10px var(--growth); }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 4px; display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 22px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 2px; background: rgba(46, 242, 164, 0.7); }
.prose a { color: var(--growth); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--white); font-weight: 600; }
.callout { position: relative; padding: 20px 22px 20px 52px; border-radius: 14px; border: 1px solid rgba(255, 161, 108, 0.4); background: rgba(255, 161, 108, 0.07); color: var(--mist); margin-bottom: 32px; }
.callout::before { content: "!"; position: absolute; left: 18px; top: 20px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 161, 108, 0.2); color: #ffa16c; font: 700 13px/1 var(--font); }

@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; padding: 18px 20px; border-radius: var(--r-card); background: rgba(12, 18, 23, 0.7); border: 1px solid var(--line); }
  .legal-toc ol { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-left: 0; }
  .legal-toc a { padding: 5px 0; margin: 0; border-left: 0; }
}
@media (max-width: 600px) {
  .legal { padding: 40px 0 88px; }
  .legal-switch { width: 100%; border-radius: 16px; }
  .legal-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
  .legal-switch a { justify-content: center; padding: 0 6px; font-size: 13px; white-space: nowrap; }
  .legal-switch .icon { display: none; }
  .legal-toc { display: none; }
  .legal-card { padding: 22px 18px; }
  .prose { font-size: 15.5px; }
  .prose h2 { font-size: 19px; }
}

.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound-inner { display: grid; gap: 20px; justify-items: center; }
.notfound .code { font-size: clamp(88px, 18vw, 160px); font-weight: 700; letter-spacing: -0.08em; line-height: 1; }
.nf-brand { display: block; width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(160, 220, 255, 0.18), 0 18px 50px -12px rgba(56, 189, 248, 0.55); }
.nf-brand img { display: block; width: 100%; height: 100%; border-radius: 50%; }
