/* Páginas legales: Política de Privacidad y Términos de Servicio (prefijo lg-).
   El texto legal va tal cual de la página vigente; aquí solo cambia la presentación. */

/* ── Portada ─────────────────────────────────────────────── */
.lg-h1 { font-size: clamp(2.5rem, 4.4vw, 4.25rem); }
.lg-meta { display: inline-flex; align-items: flex-start; gap: .55em; margin-top: 14px; padding: 9px 16px 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); font-size: var(--t-small); line-height: 1.4; color: #c8d1dc; }
.lg-meta svg { flex: none; width: 18px; height: 18px; margin-top: .1em; color: var(--lime); }
.lg-lead strong { font-weight: 600; color: #ffffff; }
.lg-lead a { color: #dfe65a; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Escena: una hoja del documento con su sello */
html:not(.ph-oscura) .lg-stage { min-height: clamp(420px, 36vw, 540px); }
.lg-3d { width: clamp(96px, 9vw, 140px); right: clamp(14px, 2vw, 32px); top: clamp(10px, 1.4vw, 22px); }
.lg-doc { position: relative; z-index: 2; width: min(100%, 420px); padding: 22px 22px 24px; border-radius: 22px; font-size: 1rem; box-shadow: 0 30px 70px rgba(0, 0, 0, .34); }
.stage-white .lg-doc { box-shadow: 0 26px 60px rgba(29, 42, 61, .18); }
.lg-doc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lg-doc-top b { display: block; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.012em; }
.lg-doc-top small { display: block; margin-top: 2px; font-size: .8125rem; color: var(--ui-soft); }
.lg-doc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--navy); color: var(--lime); }
.lg-doc-ico svg { width: 22px; height: 22px; }
.lg-line { display: block; width: var(--w, 80%); height: 9px; border-radius: 6px; background: var(--ui-line); transform-origin: 0 50%; }
.lg-line + .lg-line { margin-top: 9px; }
.lg-doc-rows { display: grid; gap: 11px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ui-line); }
.lg-doc-row { display: flex; align-items: center; gap: 10px; }
.lg-doc-row .lg-line { flex: none; }
.lg-doc-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--lime); color: var(--on-lime); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lg-sign { display: flex; flex-direction: column; margin-top: 18px; padding-top: 10px; border-top: 1px dashed #b9c1cc; }
.lg-sign svg { width: 190px; height: 48px; }
.lg-sign-path { stroke: var(--navy); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lg-sign small { font-size: .8125rem; color: var(--ui-soft); }
.lg-seal { position: absolute; z-index: 4; left: clamp(14px, 2.4vw, 40px); bottom: clamp(18px, 2.4vw, 36px); display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .3); }
.lg-seal b { display: block; font-weight: 600; font-size: 1rem; }
.lg-seal small { display: block; font-size: .8125rem; color: var(--ui-soft); }
.lg-seal-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }
.lg-seal-ico svg { width: 20px; height: 20px; }

/* ── Documento: índice lateral y hoja de lectura ──────────── */
.lg-sec { --sec: clamp(40px, 4.6vw, 72px); }
.lg-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); max-width: 1180px; margin-inline: auto; align-items: start; }
.lg-side { position: sticky; top: 76px; display: grid; gap: var(--gap); }

.lg-toc { border-radius: 20px; background: var(--tile); padding: 18px 14px 12px; transition: background-color .25s ease; }
.lg-toc > summary { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; list-style: none; cursor: default; }
.lg-toc > summary::-webkit-details-marker { display: none; }
.lg-toc > summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 12px; }
.lg-toc-t { min-width: 0; flex: 1; }
.lg-toc-t small { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); }
.lg-toc-t b { display: none; }
.lg-chev { display: none; width: 20px; height: 20px; flex: none; transition: rotate .25s var(--ease-out); }
.lg-ring { width: 30px; height: 30px; flex: none; }
.lg-ring svg { width: 100%; height: 100%; rotate: -90deg; }
.lg-ring circle { fill: none; stroke-width: 4; }
.lg-ring-bg { stroke: var(--surface); }
.lg-ring-val { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 0 100; }
.lg-toc-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lg-toc-list a { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; padding: 9px 10px; border-radius: 12px; color: var(--soft); font-size: .9375rem; line-height: 1.3; transition: background-color .2s ease, color .2s ease; }
.lg-toc-n { flex: none; display: grid; place-items: center; min-width: 24px; height: 22px; border-radius: 7px; background: var(--surface); color: var(--ink); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color .2s ease, color .2s ease; }
.lg-toc-list a:hover { background: var(--surface); color: var(--ink); }
.lg-toc-list a.is-on { background: var(--lime); color: var(--on-lime); font-weight: 600; }
.lg-toc-list a.is-on .lg-toc-n { background: var(--navy); color: var(--lime); }
.lg-toc-list a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.lg-other { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 14px; border-radius: 20px; background: var(--navy); color: #f2f5f8; transition: translate .2s var(--ease-out); }
.lg-other small { display: block; font-size: .8125rem; color: #aeb9c7; }
.lg-other b { display: block; font-weight: 600; }
.lg-other-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--lime); }
.lg-other-ico svg { width: 20px; height: 20px; }
.lg-other-go { width: 20px; height: 20px; margin-left: auto; color: var(--lime); transition: translate .2s var(--ease-out); }
.lg-other:hover { translate: 0 -3px; }
.lg-other:hover .lg-other-go { translate: 3px 0; }

/* Hoja: ancho de lectura cómodo y buen interlineado */
.lg-sheet { min-width: 0; padding: clamp(24px, 4.2vw, 64px) clamp(20px, 4.6vw, 72px); border-radius: var(--tile-r); background: var(--tile); color: var(--ink); font-size: clamp(1.0625rem, 1rem + .2vw, 1.15rem); line-height: 1.72; transition: background-color .25s ease; }
.lg-part > * + * { margin-top: 1em; }
.lg-part > p, .lg-part > ul { max-width: 68ch; }
.lg-part + .lg-part { margin-top: clamp(32px, 3.6vw, 48px); padding-top: clamp(32px, 3.6vw, 48px); border-top: 1px solid var(--border); }
.lg-h { display: flex; align-items: center; gap: 14px; font-size: clamp(1.375rem, 1.15rem + .8vw, 1.875rem); font-weight: 600; letter-spacing: -0.026em; line-height: 1.15; text-wrap: balance; scroll-margin-top: 92px; }
.lg-part > .lg-h + * { margin-top: .9em; }
.lg-n { flex: none; display: inline-grid; place-items: center; min-width: 50px; height: 42px; padding: 0 10px; border-radius: 13px; background: var(--lime); color: var(--on-lime); font-size: 1.0625rem; letter-spacing: 0; font-variant-numeric: tabular-nums; transform-origin: 50% 60%; }
.lg-sheet strong { font-weight: 600; }
.lg-sheet a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.lg-sheet a:hover { text-decoration-thickness: 2px; }
.lg-sheet code { padding: .1em .4em; border-radius: 6px; background: var(--surface); font-size: .86em; white-space: nowrap; }

/* Listas */
.lg-part ul { display: grid; gap: .5em; padding: 0; list-style: none; }
.lg-part ul > li { position: relative; padding-left: 1.6em; }
.lg-part ul > li::before { content: ''; position: absolute; left: .2em; top: .64em; width: .55em; height: .55em; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 30%, transparent); }
.lg-part ul.lg-rights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: none; }
.lg-part ul.lg-rights > li { padding: 14px 16px 14px 18px; border-radius: 14px; background: var(--bg); line-height: 1.5; font-size: .96em; }
.lg-part ul.lg-rights > li::before { left: 0; top: 14px; bottom: 14px; width: 4px; height: auto; border-radius: 0 4px 4px 0; box-shadow: none; }
.lg-part ul.lg-rights > li:last-child { grid-column: 1 / -1; }
.lg-part ul.lg-ways { gap: 8px; }
.lg-part ul.lg-ways > li { display: flex; align-items: center; gap: 12px; padding-left: 0; }
.lg-part ul.lg-ways > li::before { display: none; }
.lg-ways svg { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--navy); color: var(--lime); }
.lg-end { display: flex; align-items: center; gap: .55em; margin-top: clamp(32px, 3.6vw, 48px); padding-top: 18px; border-top: 1px solid var(--border); font-size: var(--t-small); color: var(--soft); }
.lg-end svg { flex: none; width: 18px; height: 18px; color: var(--brand); }

/* Tablas */
.lg-table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--border); }
.lg-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; line-height: 1.5; }
.lg-table th { padding: 12px 14px; background: var(--navy); color: #f2f5f8; text-align: left; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.lg-table td { padding: 13px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.lg-table td:first-child { font-weight: 500; }
.lg-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface) 42%, transparent); }
.lg-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: #e3e9f1; color: #1d2a3d; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.lg-tag.is-need { background: var(--surface); color: var(--ink); }
.lg-tag.is-ads { background: var(--lime); color: var(--on-lime); }
html.dark .lg-tag:not(.is-need):not(.is-ads) { background: #1d2b42; color: #dbe6f5; }

/* ── Enlace cruzado al otro documento ─────────────────────── */
.lg-next { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(20px, 3vw, 48px); max-width: 1180px; margin-inline: auto; transition: translate .2s var(--ease-out), background-color .25s ease, color .25s ease; }
.lg-next-copy .h-tile { margin-top: 10px; }
.lg-next-copy .kicker { color: var(--brand); }
.lg-next-p { margin-top: 12px; max-width: 34em; color: var(--soft); line-height: 1.45; }
.lg-next-go { display: inline-flex; align-items: center; gap: .45em; margin-top: 20px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 600; }
.lg-next-go svg { width: 18px; height: 18px; transition: translate .2s var(--ease-out); }
.lg-next:hover { translate: 0 -4px; }
.lg-next:hover .lg-next-go svg { translate: 4px 0; }
.lg-next:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.lg-next-art { position: relative; display: grid; place-items: center; min-height: 260px; padding: 36px 24px; border-radius: calc(var(--tile-r) - 8px); background: var(--c-lime, #eff3cf); }
.lg-next-3d { width: clamp(84px, 8vw, 120px); right: clamp(8px, 1.4vw, 20px); top: clamp(-8px, -.4vw, 0px); }
.lg-mini { position: relative; z-index: 2; display: block; width: min(100%, 300px); padding: 18px; border-radius: 18px; box-shadow: 0 18px 44px rgba(29, 42, 61, .14); }
.lg-mini-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lg-mini-top svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--navy); color: var(--lime); }
.lg-mini-top b { font-weight: 600; }
html.dark .lg-next-art { background: #1d2410; }

/* ── Tablet y celular ─────────────────────────────────────── */
@media (max-width: 1023px) {
  .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* El índice queda fijo arriba como un desplegable con la sección actual. */
  .lg-side { top: 64px; z-index: 6; }
  .lg-other { display: none; }
  .lg-toc { position: relative; padding: 0; box-shadow: 0 10px 30px rgba(29, 42, 61, .12); }
  .lg-toc > summary { min-height: 58px; padding: 10px 16px 10px 12px; cursor: pointer; }
  .lg-toc-t small { font-size: .8125rem; font-weight: 500; color: var(--soft); }
  .lg-toc-t b { display: block; overflow: hidden; font-weight: 600; font-size: .9375rem; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
  .lg-chev { display: block; }
  .lg-toc[open] .lg-chev { rotate: 180deg; }
  .lg-toc-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(62vh, 460px); overflow-y: auto; padding: 8px; border-radius: 18px; background: var(--tile); box-shadow: 0 24px 50px rgba(29, 42, 61, .22); }
  html.dark .lg-toc, html.dark .lg-toc-list { box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
  .lg-h { scroll-margin-top: 140px; }
  .lg-next { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .lg-h1 { font-size: clamp(2.25rem, 10vw, 2.75rem); }
  .lg-meta { padding: 8px 12px 8px 10px; }
  .lg-3d { width: 72px; right: 10px; top: 8px; }
  .lg-doc { padding: 18px; }
  .lg-seal { left: 10px; bottom: 14px; padding: 10px 14px 10px 10px; }
  .lg-seal-ico { width: 36px; height: 36px; }
  .lg-sheet { padding: 24px 18px 28px; line-height: 1.68; }
  .lg-h { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lg-n { min-width: 42px; height: 36px; font-size: .9375rem; border-radius: 11px; }
  .lg-part ul.lg-rights { grid-template-columns: minmax(0, 1fr); }
  /* Las tablas pasan a fichas: cada fila es una tarjeta con sus etiquetas. */
  .lg-table-wrap { overflow: visible; border-radius: 0; box-shadow: none; }
  .lg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lg-table, .lg-table tbody, .lg-table tr, .lg-table td { display: block; width: 100%; }
  .lg-table tbody { display: grid; gap: 10px; }
  .lg-table tr { padding: 4px 16px; border-radius: 16px; background: var(--bg); }
  .lg-table tbody tr:nth-child(even) td { background: none; }
  .lg-table td { padding: 10px 0; }
  .lg-table td:first-child { border-top: 0; font-size: 1rem; }
  .lg-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .8125rem; font-weight: 600; color: var(--soft); }
  .lg-next-art { min-height: 210px; }
}
