/* Legal (§7.49): páginas /privacidad /terminos /cookies, casilla de consentimiento, lector lateral, aviso de cookies. Solo variables de _theme.twig. */

/* ---------- página ---------- */
.lg-page { background: var(--bg); color: var(--text-2); }
.lg-main { padding-top: 0; }
.lg-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.lg-hero { padding: 44px 0 30px; border-bottom: 1px solid var(--border); background: var(--card); }
.lg-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); margin-bottom: 22px; max-width: 100%; }
.lg-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; white-space: nowrap; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--text-2) !important; text-decoration: none; opacity: 1 !important; transition: background .15s, color .15s; }
.lg-tabs a:hover { background: var(--card-2); color: var(--text) !important; }
.lg-tabs a.is-on { background: var(--accent-fill); color: #fff !important; }
.lg-tabs i { font-size: 14px; }
.lg-hero h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 10px; color: var(--text); text-wrap: balance; }
.lg-resumen { font-size: 17px; line-height: 1.55; max-width: 62ch; margin: 0 0 20px; color: var(--text-2); }
.lg-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.lg-meta-row .lg-meta { font-size: 13.5px; color: var(--muted); margin: 0; }
.lg-meta-row .lg-meta code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text-2); background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.lg-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.lg-chip i { font-size: 14px; color: var(--accent); }
.lg-chip.-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 500; letter-spacing: .01em; }
.lg-chip.-btn { cursor: pointer; color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.lg-chip.-btn:hover { background: var(--accent-fill); color: #fff; } .lg-chip.-btn:hover i { color: #fff; }
.lg-body { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 48px; padding: 40px 24px 72px; align-items: start; }
.lg-toc { position: sticky; top: 120px; }
.lg-toc-title { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.lg-toc li { margin: 0; }
.lg-toc a { display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.35; color: var(--text-2) !important; text-decoration: none; opacity: 1 !important; transition: color .15s, border-color .15s; }
.lg-toc a:hover { color: var(--text) !important; }
.lg-toc a.is-on { color: var(--accent) !important; border-left-color: var(--accent); font-weight: 700; }

/* ---------- artículo ---------- */
.lg-doc { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.lg-doc p, .lg-doc li, .lg-doc dd { color: var(--text-2); }
.lg-doc .lg-lead { font-size: 18.5px; line-height: 1.6; color: var(--text); padding: 20px 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); margin: 0 0 34px; }
/* padding: 0 anula el `section { padding: 130px 0 }` del tema del sitio, que también carga en el lector. */
.lg-doc section { margin: 0 0 38px; padding: 0; scroll-margin-top: 120px; }
.lg-doc h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 24px; line-height: 1.2; letter-spacing: -.015em; color: var(--text); margin: 0 0 14px; scroll-margin-top: 120px; }
.lg-doc h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 17.5px; color: var(--text); margin: 24px 0 8px; }
.lg-doc p { margin: 0 0 14px; }
.lg-doc ul, .lg-doc ol { margin: 0 0 16px; padding-left: 22px; }
.lg-doc li { margin: 0 0 8px; }
.lg-doc li::marker { color: var(--accent); font-weight: 700; }
.lg-doc a:not(.btn) { color: var(--accent) !important; font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; opacity: 1 !important; }
.lg-doc a:hover { text-decoration-color: var(--accent); }
.lg-doc strong { color: var(--text); font-weight: 700; }
.lg-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.lg-dl { margin: 0 0 16px; display: grid; gap: 4px; }
.lg-dl dt { font-weight: 700; color: var(--text); margin-top: 10px; }
.lg-dl dd { margin: 0; padding: 0 0 8px 0; }
.lg-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 6px 0 18px; font-size: 15px; line-height: 1.5; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.lg-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--card-2); padding: 11px 14px; border-bottom: 1px solid var(--border); }
.lg-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table td:first-child { color: var(--text); font-weight: 600; }
.lg-doc-foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.lg-doc-foot p { color: var(--muted); margin-bottom: 8px; }
.lg-otros a { color: var(--accent) !important; font-weight: 600; text-decoration: none; }
@media (max-width: 900px) {
    .lg-body { grid-template-columns: 1fr; gap: 20px; padding: 26px 16px 56px; }
    .lg-toc { position: static; }
    .lg-toc ol { border-left: 0; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
    .lg-toc ol::-webkit-scrollbar { display: none; }
    .lg-toc a { flex: 0 0 auto; scroll-snap-align: start; padding: 7px 12px; margin: 0; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 12.5px; white-space: nowrap; }
    .lg-toc a.is-on { border-color: var(--accent); background: var(--accent-soft); }
    .lg-hero { padding: 26px 0 22px; } .lg-wrap { padding: 0 16px; }
    .lg-tabs { display: flex; } .lg-tabs a { flex: 1; padding: 0 8px; font-size: 13px; } .lg-tabs a i { display: none; }
    .lg-doc { font-size: 16px; } .lg-doc .lg-lead { font-size: 17px; padding: 16px 18px; }
    .lg-table { display: block; overflow-x: auto; }
}
@media print {
    .lg-main { padding-top: 0; } header, .cuenta-footer, .lg-toc, .lg-tabs, .lg-chip.-btn, .lg-reader, .lg-cookies { display: none !important; }
    .lg-body { display: block; padding: 0; } .lg-hero { background: none; border: 0; padding: 0 0 12px; }
    .lg-doc { font-size: 12pt; color: #000; } .lg-doc p, .lg-doc li, .lg-doc dd, .lg-doc td { color: #000; } .lg-doc h2, .lg-doc h3, .lg-doc strong, .lg-doc .lg-lead { color: #000; }
    .lg-doc .lg-lead, .lg-table, .lg-doc code { background: none; border-color: #999; }
    .lg-doc a { color: #000 !important; text-decoration: none; }
    .lg-doc section { break-inside: avoid-page; }
}

/* ---------- casilla de consentimiento ---------- */
.lg-consent { margin: 18px 0 10px; font-size: 14px; line-height: 1.5; text-align: left; max-width: 64ch; }
.lg-consent.-compacto { margin: 14px 0 10px; font-size: 13.5px; }
.lg-consent .lg-txt { color: var(--text-2, #555); margin: 0; font-weight: 400; line-height: 1.5; }
.lg-consent p.lg-txt { padding-left: 0; }
.lg-consent .lg-txt a { color: var(--accent, #0058ee) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; opacity: 1 !important; }
/* label.lg-check con !important: los formularios anfitriones (drawer de compra, asistente) estilizan sus <label> en bloque y negritas. */
label.lg-check { display: grid !important; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; cursor: pointer; margin: 0 !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: inherit !important; }
.lg-check .lg-box { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.lg-mark { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--muted, #8b95a7); background: var(--input-bg, #fff); display: grid; place-items: center; transition: background .15s, border-color .15s, transform .15s; margin-top: 1px; }
.lg-mark svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.lg-check:hover .lg-mark { border-color: var(--accent, #0058ee); }
.lg-box:focus-visible + .lg-mark { box-shadow: 0 0 0 4px var(--accent-soft, rgba(0,88,238,.18)); }
.lg-box:checked + .lg-mark { background: var(--accent-fill, #0058ee); border-color: var(--accent-fill, #0058ee); }
.lg-box:checked + .lg-mark svg { opacity: 1; transform: scale(1); }
.lg-consent.is-error .lg-mark { border-color: var(--danger, #b02a37); animation: lgShake .4s ease; }
.lg-consent .lg-err { margin: 6px 0 0 32px; font-size: 13px; font-weight: 600; color: var(--danger, #b02a37); }
.lg-consent.-oscuro .lg-txt { color: rgba(255,255,255,.82); } .lg-consent.-oscuro .lg-txt a { color: #fff !important; } .lg-consent.-oscuro .lg-mark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
@keyframes lgShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
a[data-legal-gate].is-blocked { opacity: .55; cursor: not-allowed; }

/* ---------- lector lateral ---------- */
.lg-reader { position: fixed; inset: 0; z-index: 10050; display: flex; justify-content: flex-end; }
.lg-reader-bg { position: absolute; inset: 0; background: rgba(6, 10, 22, .55); backdrop-filter: blur(2px); animation: lgFade .2s ease; }
.lg-reader-panel { position: relative; width: min(720px, 100%); height: 100%; background: var(--card, #fff); color: var(--text-2, #555); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.35); animation: lgSlide .28s cubic-bezier(.2,.8,.2,1); }
.lg-reader-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border, #e6e9ef); }
.lg-reader-head h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; margin: 0; color: var(--text, #232323); flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lg-reader-head h2 small { font-family: inherit; font-size: 12px; font-weight: 500; color: var(--muted, #8b95a7); }
.lg-reader-panel.-kiosco { width: 100%; }
.lg-reader-head a, .lg-reader-head button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border, #e6e9ef); background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2, #555) !important; cursor: pointer; text-decoration: none; opacity: 1 !important; }
.lg-reader-head a:hover, .lg-reader-head button:hover { border-color: var(--accent, #0058ee); color: var(--accent, #0058ee) !important; }
.lg-reader-body { flex: 1; overflow: auto; padding: 22px 26px 40px; overscroll-behavior: contain; }
.lg-reader-body .lg-doc { font-size: 15.5px; }
.lg-reader-body .lg-doc h2 { font-size: 20px; }
.lg-reader-body .lg-doc .lg-lead { font-size: 16px; padding: 14px 16px; }
.lg-reader-load { padding: 40px; text-align: center; color: var(--muted, #8b95a7); }
.lg-reader-foot { padding: 12px 18px; border-top: 1px solid var(--border, #e6e9ef); display: flex; justify-content: flex-end; }
.lg-reader-foot button { height: 42px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--accent-fill, #0058ee); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@keyframes lgSlide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lgFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) { .lg-reader-panel { width: 100%; animation-name: lgUp; } .lg-reader-body { padding: 16px; } }
@keyframes lgUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lg-reader-panel, .lg-reader-bg, .lg-cookies { animation: none; } .lg-consent.is-error .lg-mark { animation: none; } }

/* ---------- pie mínimo ---------- */
.lg-pie { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 18px 12px 26px; font-size: 12.5px; color: var(--muted, #8b95a7); }
.lg-pie a { color: var(--muted, #8b95a7) !important; text-decoration: none; font-weight: 600; opacity: 1 !important; }
.lg-pie a:hover { color: var(--accent, #0058ee) !important; }
.lg-pie.-claro, .lg-pie.-claro a { color: #5f6b7d !important; }

/* ---------- aviso de cookies ---------- */
.lg-cookies { position: fixed; left: 16px; bottom: 16px; z-index: 10040; width: min(380px, calc(100vw - 32px)); background: var(--card, #fff); color: var(--text-2, #555); border: 1px solid var(--border, #e6e9ef); border-radius: 18px; padding: 16px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.28); font-size: 14px; line-height: 1.5; animation: lgUp .3s ease; }
.lg-cookies p { margin: 0 0 12px; color: var(--text-2, #555); }
.lg-cookies p strong { color: var(--text, #232323); }
.lg-cookies .row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.lg-cookies a { color: var(--accent, #0058ee) !important; font-weight: 600; text-decoration: none; margin-right: auto; opacity: 1 !important; }
.lg-cookies button { height: 38px; padding: 0 18px; border-radius: 11px; border: 0; background: var(--accent-fill, #0058ee); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
