/* Páginas legales y 404 */
.lg-hero { padding: calc(var(--top-h) + 46px) 0 30px; }
.lg-head { display: flex; gap: 24px; align-items: flex-start; }
.lg-ico { width: 72px; height: 72px; flex: none; border-radius: 22px; display: grid; place-items: center; background: var(--navy); color: #fff; box-shadow: var(--sombra-m); }
.lg-ico .ico { width: 34px; height: 34px; }
.lg-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: 12px; }
.lg-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: .8rem; font-weight: 600; color: var(--texto-suave); }
.lg-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-meta .ico { width: 16px; height: 16px; color: var(--naranja); }
.lg-print { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--linea); font-weight: 700; color: var(--navy); font-size: .78rem; transition: all .2s; }
.lg-print:hover { border-color: var(--naranja); color: var(--naranja); }
.lg-draft { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 94, 0, .08); color: #b84300; font-size: .8rem; font-weight: 700; }
.lg-draft .ico { width: 18px; height: 18px; }
.lg-grid { display: grid; grid-template-columns: 290px 1fr; gap: 40px; align-items: start; }
.lg-toc { position: sticky; top: calc(var(--top-h) + 20px); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 2px; }
.lg-toc > b, .lg-other b { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--acero); margin-bottom: 8px; }
.lg-toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .85rem; font-weight: 600; color: var(--texto-suave); transition: all .2s; }
.lg-toc a i { font-style: normal; font-weight: 800; color: var(--bruma); }
.lg-toc a:hover { color: var(--naranja); }
.lg-toc a.on { background: var(--navy); color: #fff; }
.lg-toc a.on i { color: var(--naranja); }
.lg-other { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--linea); }
.lg-other a .ico { width: 16px; height: 16px; color: var(--naranja); }
.lg-doc { max-width: 780px; }
.lg-sec { padding: 0 0 30px; margin-bottom: 30px; border-bottom: 1px solid var(--linea); scroll-margin-top: calc(var(--top-h) + 20px); }
.lg-sec h2 { display: flex; gap: 14px; align-items: baseline; font-size: 1.45rem; font-weight: 800; margin-bottom: 14px; }
.lg-sec h2 i { font-style: normal; font-size: .9rem; font-weight: 900; color: var(--naranja); }
.lg-sec p { color: var(--grafito); line-height: 1.8; margin-bottom: 12px; }
.lg-sec ul { margin: 0 0 12px; padding-left: 20px; color: var(--grafito); line-height: 1.8; }
.lg-sec li::marker { color: var(--naranja); }
.lg-table { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--linea); }
.lg-tr { display: grid; grid-template-columns: 140px 1fr 200px; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--linea); font-size: .86rem; color: var(--grafito); }
.lg-th { background: var(--niebla); border-top: 0; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acero); }
.lg-tr b { color: var(--navy); }
.lg-tr code { font-size: .76rem; color: var(--acero); word-break: break-word; }
.lg-prefs { display: flex; flex-direction: column; gap: 10px; }
.lg-pref { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 18px; border-radius: var(--r-m); background: #fff; border: 1px solid var(--linea); cursor: pointer; }
.lg-pref b { display: block; color: var(--navy); }
.lg-pref small { color: var(--texto-suave); font-size: .82rem; }
.lg-pref input { position: absolute; opacity: 0; }
.sw { width: 46px; height: 26px; flex: none; border-radius: 999px; background: var(--bruma); position: relative; transition: background .25s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sombra-s); transition: transform .25s var(--ease); }
.lg-pref input:checked + .sw { background: var(--naranja); }
.lg-pref input:checked + .sw::after { transform: translateX(20px); }
.lg-pref input:disabled + .sw { opacity: .55; }
.lg-pref-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
#ck-msg { font-size: .8rem; font-weight: 700; color: #138a55; }
.lg-contact { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--r-m); background: linear-gradient(120deg, var(--navy), var(--noche)); color: #fff; }
.lg-contact b { display: block; font-size: 1.05rem; }
.lg-contact span { opacity: .8; font-size: .86rem; }
@media (max-width: 900px) { .lg-grid { grid-template-columns: 1fr; } .lg-toc { position: relative; top: 0; } .lg-tr { grid-template-columns: 1fr; gap: 4px; } .lg-th { display: none; } .lg-head { flex-direction: column; } }
@media print { .topbar, .footer, .chat-fab, .chat-hello, .appbar, .lg-toc, .lg-print, .cookies, .infobar { display: none !important; } .lg-grid { grid-template-columns: 1fr; } .reveal { opacity: 1 !important; transform: none !important; } }

/* ===== 404 ===== */
.e404 { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--top-h) + 30px) 0 60px; overflow: hidden; }
.e404-in { text-align: center; position: relative; z-index: 1; }
.e404-num { font-size: clamp(7rem, 22vw, 16rem); font-weight: 900; letter-spacing: -.06em; line-height: .85; color: var(--navy); display: flex; justify-content: center; align-items: center; gap: .04em; }
.e404-num .zero { position: relative; width: .62em; height: .78em; display: inline-grid; place-items: center; }
.e404-num svg { width: 100%; height: 100%; overflow: visible; }
.e404 h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; margin: 22px 0 10px; }
.e404 h1 em { font-style: normal; color: var(--naranja); }
.e404 p { color: var(--texto-suave); max-width: 46ch; margin: 0 auto; }
.e404-acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.e404-links { display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; margin-top: 26px; font-size: .86rem; font-weight: 700; color: var(--navy); }
.e404-links a:hover { color: var(--naranja); }
.bob { animation: bob 4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8%) rotate(4deg); } }
.wave { animation: wave 6s linear infinite; }
@keyframes wave { to { transform: translateX(-50%); } }
