/* DeveReader: blanco, gris claro y verde oliva. Claro por defecto; oscuro solo con data-theme="dark" (el botón de la luna). */
@font-face { font-family: "Inter"; src: url("vendor/fuentes/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("vendor/fuentes/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Claro (por defecto): blanco, gris claro y verde oliva. */
  --bg: #f4f5f1; --bg-2: #eceee7; --superficie: #ffffff; --superficie-2: #f7f8f4; --superficie-3: #eceee6;
  --borde: #e1e4da; --borde-fuerte: #cdd2c3; --texto: #1e2316; --texto-2: #4a5040; --texto-3: #747a68;
  --acento: #6b7f2a; --acento-2: #556b2f; --acento-fondo: rgba(107, 127, 42, .11);
  --marca: linear-gradient(120deg, #4f6228 0%, #6b7f2a 50%, #93a24f 100%); --sobre-marca: #ffffff;
  --ok: #4d7a26; --ok-fondo: rgba(77, 122, 38, .1); --aviso: #a16207; --aviso-fondo: rgba(161, 98, 7, .1);
  --peligro: #b42318; --peligro-fondo: rgba(180, 35, 24, .08); --info: #4f6a7a; --info-fondo: rgba(79, 106, 122, .1);
  /* Las categorías, en la familia del oliva (tierras y verdes apagados). */
  --c-tabla: #6b7f2a; --c-interpretado: #8a7524; --c-arbol: #4f7a3a; --c-especial: #4f6f68; --c-modelo: #7a6338;
  --c-inspeccion: #a0612a; --c-texto: #646b5a; --c-contenedor: #868a45; --c-cifrado: #9a4a3a; --c-binario: #8a8f84;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --radio: 12px; --sombra: 0 14px 40px -22px rgba(40, 48, 25, .32);
  /* colores del código (highlight.js) */
  --h-comentario: #8a8f80; --h-clave: #556b1f; --h-texto: #8a5a00; --h-numero: #a14d2a; --h-funcion: #2f5e6b;
  --h-tipo: #7a5c12; --h-atributo: #4d6b2f; --h-meta: #9b3b3b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* Oscuro (si se elige con el botón): grises oliva y el oliva más claro. */
  --bg: #15170f; --bg-2: #1b1e15; --superficie: #20241a; --superficie-2: #272b20; --superficie-3: #30352a;
  --borde: #33382b; --borde-fuerte: #454b3a; --texto: #eef0e6; --texto-2: #b9bead; --texto-3: #8a8f7e;
  --acento: #a3b25a; --acento-2: #8a9a4a; --acento-fondo: rgba(163, 178, 90, .14);
  --marca: linear-gradient(120deg, #7f9140 0%, #a3b25a 55%, #c5cf86 100%); --sobre-marca: #15170f;
  --ok: #9cc26b; --ok-fondo: rgba(156, 194, 107, .13); --aviso: #e0b44c; --aviso-fondo: rgba(224, 180, 76, .13);
  --peligro: #f0846f; --peligro-fondo: rgba(240, 132, 111, .13); --info: #9fb7c4; --info-fondo: rgba(159, 183, 196, .12);
  --c-tabla: #a3b25a; --c-interpretado: #d1b45a; --c-arbol: #8fbf6a; --c-especial: #8fb3a8; --c-modelo: #c4a574;
  --c-inspeccion: #e09a5f; --c-texto: #b0b6a2; --c-contenedor: #c3c27a; --c-cifrado: #e08a76; --c-binario: #9a9f92;
  --sombra: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --h-comentario: #7e8472; --h-clave: #b5c46a; --h-texto: #e0c07a; --h-numero: #e59a72; --h-funcion: #8fc0cf;
  --h-tipo: #d9b25f; --h-atributo: #a9c98a; --h-meta: #ef9a8e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--texto); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
a { color: var(--acento); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
code, pre, .mono { font-family: var(--mono); font-size: .86rem; }
.nota { color: var(--texto-3); font-size: .86rem; }
.degradado { background: var(--marca); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Botones ---------- */
.boton { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 1px solid var(--borde-fuerte); border-radius: 10px; background: var(--superficie-2); color: var(--texto); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.boton:hover { border-color: var(--acento); }
.boton svg { width: 18px; height: 18px; }
.boton.pequeno { min-height: 32px; padding: 5px 11px; font-size: .84rem; }
.boton-principal { border-color: transparent; background: var(--marca); color: var(--sobre-marca); }
.boton-principal:hover { filter: brightness(1.08); }
.boton:disabled { opacity: .5; cursor: default; }
.icono { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--borde-fuerte); border-radius: 10px; background: var(--superficie-2); cursor: pointer; }
.icono svg { width: 18px; height: 18px; }
.icono.pequeno { width: 32px; height: 32px; }
.icono:hover { border-color: var(--acento); }
.enlace { padding: 0; border: 0; background: none; color: var(--acento); cursor: pointer; text-decoration: underline; }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
  min-height: 36px; padding: 6px 10px; border: 1px solid var(--borde-fuerte); border-radius: 9px; background: var(--superficie); color: var(--texto); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* ---------- Desplegables ----------
 * Cerrados: el mismo aspecto en todos los navegadores (borde suave, flecha propia, anillo al enfocar).
 * Abiertos: en Chrome y Edge (también la app de escritorio, que va sobre Edge) la lista lleva el estilo de la app
 * (appearance: base-select); en los demás navegadores la lista abierta es la del sistema. */
select {
  -webkit-appearance: none; appearance: none; padding-right: 32px; font-weight: 500; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23747a68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9bead' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
select:hover { border-color: var(--acento); }
select:focus-visible { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-fondo); }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select, :root[data-theme="dark"] select { display: inline-flex; align-items: center; gap: 8px; padding-right: 10px; background-image: none; }
  select::picker-icon {
    content: ""; width: 14px; height: 14px; background: var(--texto-3); transition: rotate .2s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  select:open::picker-icon { rotate: 180deg; }
  select:open { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-fondo); }
  ::picker(select) {
    margin-block: 6px; padding: 5px; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--texto);
    box-shadow: 0 18px 44px -14px rgba(30, 35, 22, .38); max-height: min(360px, 60vh); overflow-y: auto;
    opacity: 0; translate: 0 -4px; transition: opacity .15s, translate .15s, display .15s allow-discrete, overlay .15s allow-discrete;
  }
  select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style { select:open::picker(select) { opacity: 0; translate: 0 -4px; } }
  option { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; cursor: pointer; }
  option:hover, option:focus-visible { outline: none; background: var(--acento-fondo); }
  option:checked { background: color-mix(in srgb, var(--acento) 16%, transparent); font-weight: 600; }
  option::checkmark { order: 1; margin-left: auto; color: var(--acento); content: "✓"; }
  option:disabled { opacity: .5; cursor: default; }
}

/* ---------- Barra ---------- */
.barra { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; border-bottom: 1px solid var(--borde); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; font-size: 1.15rem; letter-spacing: -.01em; }
.marca img { border-radius: 8px; }
.marca b { background: var(--marca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.barra-acciones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.idioma { min-height: 38px; padding: 6px 8px; font-weight: 600; }

/* ---------- Portada ---------- */
.portada { width: 100%; max-width: 1180px; margin: 0 auto; padding: 46px 20px 30px; }
.portada-cabeza { max-width: 820px; margin: 0 auto 26px; text-align: center; }
.logo-grande { display: block; width: clamp(104px, 14vw, 150px); height: auto; margin: 0 auto 18px; overflow: visible; filter: drop-shadow(0 16px 26px rgba(40, 62, 18, .28)); animation: flotar 6s ease-in-out 1.6s infinite; }
@keyframes flotar { 50% { transform: translateY(-7px); } }

/* El logo animado: las hojas entran una tras otra, el </> se escribe, después «respiran» abriéndose como un abanico
 * y un brillo cruza la hoja de delante. Al pasar el ratón se abren más. (Medidas en unidades del SVG.) */
.logo-animado .lg-entra { animation: lg-entrar .8s cubic-bezier(.2, .8, .2, 1) both; }
.logo-animado .lg-1 { animation-delay: .05s; }
.logo-animado .lg-2 { animation-delay: .2s; }
.logo-animado .lg-3 { animation-delay: .35s; }
@keyframes lg-entrar { from { opacity: 0; transform: translate(-110px, 60px) rotate(-4deg); } to { opacity: 1; transform: none; } }
.logo-animado .lg-respira { transition: transform .5s cubic-bezier(.2, .8, .2, 1); animation: 6s ease-in-out 1.4s infinite; }
.logo-animado .lg-r1 { animation-name: lg-r1; }
.logo-animado .lg-r2 { animation-name: lg-r2; }
.logo-animado .lg-r3 { animation-name: lg-r3; }
@keyframes lg-r1 { 50% { transform: translate(-30px, -18px); } }
@keyframes lg-r2 { 50% { transform: translate(-14px, -8px); } }
@keyframes lg-r3 { 50% { transform: translate(8px, 5px); } }
.logo-animado:hover .lg-respira { animation-play-state: paused; }
.logo-animado:hover .lg-r1 { transform: translate(-60px, -34px); }
.logo-animado:hover .lg-r2 { transform: translate(-28px, -16px); }
.logo-animado:hover .lg-r3 { transform: translate(14px, 8px); }
.logo-animado .lg-codigo path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lg-escribir .45s ease-out forwards; }
.logo-animado .lg-codigo path:nth-child(1) { animation-delay: .95s; }
.logo-animado .lg-codigo path:nth-child(3) { animation-delay: 1.15s; }
.logo-animado .lg-codigo path:nth-child(2) { animation-delay: 1.35s; }
@keyframes lg-escribir { to { stroke-dashoffset: 0; } }
.logo-animado .lg-brillo { animation: lg-brillo 7s ease-in-out 2.2s infinite; transform: translateX(-260px); }
@keyframes lg-brillo { 0% { transform: translateX(-260px); } 22%, 100% { transform: translateX(760px); } }
.marca img { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.marca:hover img { transform: rotate(-6deg) scale(1.08); }

/* ---------- Fondo animado (solo en la portada) ---------- */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
body.con-visor .fondo { display: none; }
.mancha { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.m1 { left: -14vw; top: -18vw; width: 52vw; height: 52vw; background: radial-gradient(circle, rgba(178, 204, 108, .55) 0%, transparent 68%); animation: deriva1 34s ease-in-out infinite alternate; }
.m2 { right: -16vw; top: 6vh; width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(130, 166, 70, .32) 0%, transparent 68%); animation: deriva2 42s ease-in-out infinite alternate; }
.m3 { left: 18vw; top: 58vh; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(214, 228, 168, .55) 0%, transparent 68%); animation: deriva3 48s ease-in-out infinite alternate; }
@keyframes deriva1 { to { transform: translate(18vw, 14vh) scale(1.18); } }
@keyframes deriva2 { to { transform: translate(-16vw, 22vh) scale(.9); } }
@keyframes deriva3 { to { transform: translate(-12vw, -26vh) scale(1.12); } }
.puntos { position: absolute; inset: -40px; background-image: radial-gradient(rgba(107, 127, 42, .22) 1.1px, transparent 1.6px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 12%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 75% 55% at 50% 12%, #000 25%, transparent 75%);
  animation: puntos 50s linear infinite; }
@keyframes puntos { to { transform: translate(26px, 26px); } }
.glifo { position: absolute; bottom: -8vh; left: var(--x); padding: 4px 9px; border: 1px solid rgba(107, 127, 42, .22); border-radius: 8px; background: rgba(255, 255, 255, .45);
  color: var(--acento); font: 600 .78rem var(--mono); opacity: 0; animation: subir var(--d) linear var(--r) infinite; }
@keyframes subir {
  0% { opacity: 0; transform: translateY(0) rotate(-8deg); }
  12% { opacity: .4; }
  80% { opacity: .28; }
  100% { opacity: 0; transform: translateY(-118vh) rotate(8deg); }
}
:root[data-theme="dark"] .m1 { background: radial-gradient(circle, rgba(110, 140, 50, .32) 0%, transparent 68%); }
:root[data-theme="dark"] .m2 { background: radial-gradient(circle, rgba(70, 100, 34, .30) 0%, transparent 68%); }
:root[data-theme="dark"] .m3 { background: radial-gradient(circle, rgba(140, 160, 70, .16) 0%, transparent 68%); }
:root[data-theme="dark"] .puntos { background-image: radial-gradient(rgba(163, 178, 90, .16) 1.1px, transparent 1.6px); }
:root[data-theme="dark"] .glifo { border-color: rgba(163, 178, 90, .22); background: rgba(32, 36, 26, .5); }
@media (prefers-reduced-motion: reduce) {
  .logo-grande, .logo-animado *, .mancha, .puntos { animation: none !important; }
  .logo-animado .lg-codigo path { stroke-dashoffset: 0; }
  .glifo { display: none; }
}

/* ---------- Privacidad ---------- */
.garantias-seccion { margin: 0 0 40px; }
.garantias { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.garantias li { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 16px; border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie); }
.garantias svg { grid-row: span 2; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--acento-fondo); color: var(--acento); }
.garantias b { font-size: .95rem; }
.garantias span { color: var(--texto-2); font-size: .84rem; line-height: 1.45; }
.garantias-nota { margin: 10px 0 0; text-align: center; color: var(--texto-3); font-size: .74rem; }
.portada h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.03em; }
.lema { margin: 0; color: var(--texto-2); font-size: 1.05rem; }
.zona { display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 820px; margin: 0 auto; padding: 38px 20px; border: 2px dashed var(--borde-fuerte); border-radius: 18px; background: var(--superficie); color: var(--texto-2); cursor: pointer; transition: border-color .2s, background .2s; }
.zona:hover, .zona.encima { border-color: var(--acento); background: var(--acento-fondo); }
.zona svg { width: 44px; height: 44px; color: var(--acento); }
.zona b { color: var(--texto); font-size: 1.15rem; }
.zona small { color: var(--texto-3); }
.privacidad { max-width: 820px; margin: 12px auto 30px; color: var(--texto-3); font-size: .86rem; text-align: center; }
.categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.categoria { padding: 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); }
.categoria h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1rem; }
.categoria h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.categoria p { margin: 0 0 10px; color: var(--texto-3); font-size: .84rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid var(--borde); border-radius: 999px; background: var(--superficie-2); color: var(--texto-2); font-size: .78rem; white-space: nowrap; }
a.chip { text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
a.chip:hover { border-color: var(--acento); background: var(--acento-fondo); color: var(--texto); }

/* ---------- Carrusel de formatos ---------- */
.carrusel { margin: 4px auto 34px; }
.carrusel-titulo { margin: 0 0 14px; text-align: center; color: var(--texto-3); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.carrusel-filas { display: grid; gap: 10px; }
.carrusel-fila { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.carrusel-pista { display: flex; width: max-content; animation: desfile var(--duracion, 120s) linear infinite; }
.carrusel-fila.inversa .carrusel-pista { animation-direction: reverse; }
.carrusel-filas:hover .carrusel-pista { animation-play-state: paused; }
@keyframes desfile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* margin y no gap: así las dos vueltas miden exactamente lo mismo y el -50 % no da salto */
.logo-formato { display: inline-flex; align-items: center; gap: 11px; margin-right: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie); white-space: nowrap; transition: border-color .2s, transform .2s; }
.logo-formato:hover { border-color: var(--borde-fuerte); transform: translateY(-1px); }
/* El logotipo siempre sobre blanco (también en oscuro), como un icono de app: así se ven bien sus colores. */
.logo-marca { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 1px solid rgba(30, 35, 22, .08); border-radius: 11px; background: #fff; }
.logo-marca img { width: 28px; height: 28px; object-fit: contain; }
.logo-textos { display: grid; gap: 1px; line-height: 1.2; }
.logo-textos b { color: var(--texto); font-size: .88rem; font-weight: 600; }
.logo-textos small { color: var(--texto-3); font-size: .74rem; }
.carrusel-nota { margin: 10px 0 0; text-align: center; color: var(--texto-3); font-size: .72rem; }
@media (prefers-reduced-motion: reduce) {
  .carrusel-pista { animation: none; }
  .carrusel-fila { overflow-x: auto; }
  .carrusel-pista [aria-hidden="true"] { display: none; }
}

/* ---------- Cifras y «Para quién es» ---------- */
.cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 980px; margin: 0 auto 34px; padding: 0; list-style: none; }
.cifras li { display: grid; align-content: start; justify-items: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--borde); border-radius: 14px;
  background: color-mix(in srgb, var(--superficie) 85%, transparent); backdrop-filter: blur(6px); text-align: center; }
.cifras b { background: var(--marca); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.1; letter-spacing: -.02em; }
.cifras span { color: var(--texto-2); font-size: .8rem; line-height: 1.3; }
.perfiles { margin: 0 0 40px; }
.perfiles-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 12px; }
.perfil { display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; border: 1px solid var(--borde); border-radius: 16px; background: var(--superficie);
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.perfil:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--borde)); box-shadow: var(--sombra); transform: translateY(-3px); }
.perfil-icono { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.perfil-icono svg { width: 22px; height: 22px; }
.perfil h3 { margin: 4px 0 0; font-size: 1.02rem; }
.perfil p { margin: 0; color: var(--texto-2); font-size: .88rem; line-height: 1.4; }
.perfil ul { display: grid; flex: 1; align-content: start; gap: 4px; margin: 0; padding-left: 1.1em; color: var(--texto-2); font-size: .82rem; line-height: 1.35; }
.perfil li::marker { color: var(--c); }
.perfil-ejemplo { align-self: flex-start; max-width: 100%; margin-top: 6px; white-space: normal; text-align: left; }
@media (max-width: 760px) { .cifras { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Vídeo ---------- */
.video-seccion { margin: 0 0 40px; }
.video-marco { max-width: 960px; margin: 0 auto; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--borde); border-radius: 18px; background: #e9ebe3; box-shadow: var(--sombra); }
.video-marco video { display: block; width: 100%; height: 100%; }

/* ---------- Ejemplos ---------- */
/* Una fila con scroll horizontal (y flechas): ocupa poco y se ven todos deslizando. */
.ejemplos { margin: 0 0 36px; }
.seccion-cabeza { max-width: 720px; margin: 0 auto 12px; text-align: center; }
.seccion-cabeza h2 { margin: 0 0 4px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); letter-spacing: -.02em; }
.seccion-cabeza p { margin: 0; color: var(--texto-2); font-size: .88rem; }
.filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 12px; }
.filtro { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid var(--borde); border-radius: 999px; background: var(--superficie); color: var(--texto-2); font: inherit; font-size: .78rem; cursor: pointer; }
.filtro[style*="--c"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.filtro:hover { border-color: var(--borde-fuerte); color: var(--texto); }
.filtro[aria-pressed="true"] { border-color: var(--acento); background: var(--acento-fondo); color: var(--texto); font-weight: 600; }
.ejemplos-marco { position: relative; }
.ejemplos-rejilla { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: thin; scrollbar-color: var(--borde-fuerte) transparent; }
.ejemplo { display: flex; flex: 0 0 214px; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: inherit; font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start; transition: border-color .2s, transform .2s, box-shadow .2s; }
.ejemplo:hover, .ejemplo:focus-visible { border-color: color-mix(in srgb, var(--c) 50%, var(--borde)); box-shadow: 0 8px 22px -14px rgba(40, 48, 25, .45); transform: translateY(-2px); }
.ejemplo-imagen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--borde); background: color-mix(in srgb, var(--c) 10%, var(--superficie-2)); }
.ejemplo-imagen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.ejemplo-imagen > b { color: var(--c); font: 700 1.3rem var(--mono); }
.ejemplo-abrir { position: absolute; right: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px; background: var(--marca); color: var(--sobre-marca); font-size: .72rem; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.ejemplo:hover .ejemplo-abrir, .ejemplo:focus-visible .ejemplo-abrir { opacity: 1; transform: none; }
.ejemplo-cuerpo { display: grid; gap: 3px; padding: 9px 11px 11px; }
.ejemplo-tipo { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; color: var(--texto-3); font-size: .64rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.ejemplo-tipo i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ejemplo-titulo { font-size: .9rem; }
.ejemplo-texto { display: -webkit-box; overflow: hidden; color: var(--texto-2); font-size: .76rem; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ejemplo-archivo { justify-self: start; margin-top: 2px; padding: 1px 6px; border-radius: 5px; background: var(--superficie-3); color: var(--texto-3); font: .68rem var(--mono); }
.ejemplos-flecha { position: absolute; top: 71px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--borde-fuerte); border-radius: 50%; background: var(--superficie); color: var(--texto); box-shadow: 0 6px 16px -8px rgba(30, 35, 22, .5); cursor: pointer; transform: translateY(-50%); transition: opacity .2s; }
.ejemplos-flecha svg { width: 18px; height: 18px; }
.ejemplos-flecha.izquierda { left: -12px; }
.ejemplos-flecha.derecha { right: -12px; }
.ejemplos-flecha:disabled { opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 760px) { .ejemplos-flecha { display: none; } .ejemplo-abrir { opacity: 1; transform: none; } }

/* ---------- Páginas de cada formato (para buscadores) ---------- */
.seo { width: 100%; max-width: 880px; margin: 0 auto; padding: 26px 20px 44px; }
.seo-migas { margin-bottom: 16px; color: var(--texto-3); font-size: .82rem; }
.seo-migas a { color: var(--texto-2); }
.seo-cabeza { margin-bottom: 22px; padding: 28px; border: 1px solid var(--borde); border-radius: 18px; background: color-mix(in srgb, var(--superficie) 90%, transparent); backdrop-filter: blur(6px); box-shadow: var(--sombra); }
.seo-cabeza h1 { margin: 12px 0 10px; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -.025em; }
.seo-cabeza .lema { margin: 0 0 18px; color: var(--texto-2); font-size: 1.02rem; }
.seo-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.boton.grande { min-height: 44px; padding: 10px 18px; font-size: .95rem; }
.seo-garantia { margin: 14px 0 0; color: var(--texto-3); font-size: .82rem; }
.seo-captura { margin: 0 0 22px; overflow: hidden; border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra); }
.seo-captura img { display: block; width: 100%; height: auto; }
.seo-bloque { margin: 0 0 18px; padding: 22px 24px; border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie); }
.seo-bloque h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.15rem; letter-spacing: -.01em; }
.seo-bloque p { margin: 0 0 8px; color: var(--texto-2); }
.seo-bloque p:last-child { margin-bottom: 0; }
.seo-lista, .seo-pasos { display: grid; gap: 6px; margin: 0; padding-left: 1.3em; color: var(--texto-2); }
.seo-lista li::marker, .seo-pasos li::marker { color: var(--acento); font-weight: 700; }
.seo-extensiones code { display: inline-block; margin: 2px 2px 0 0; padding: 1px 7px; border-radius: 6px; background: var(--superficie-3); font: .8rem var(--mono); }
.seo-preguntas details { padding: 10px 0; border-top: 1px solid var(--borde); }
.seo-preguntas details:first-child { border-top: 0; padding-top: 0; }
.seo-preguntas summary { font-weight: 600; cursor: pointer; }
.seo-preguntas details p { margin: 8px 0 0; }
.seo-enlaces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.seo-enlaces a { display: inline-block; padding: 5px 11px; border: 1px solid var(--borde); border-radius: 999px; background: var(--superficie-2); color: var(--texto-2); font-size: .84rem; text-decoration: none; }
.seo-enlaces a:hover { border-color: var(--acento); color: var(--texto); }
.seo-categoria h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.seo-indice { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.seo-indice li { display: grid; }
.seo-indice a { color: var(--texto); font-weight: 500; text-decoration: none; }
.seo-indice a:hover { color: var(--acento); text-decoration: underline; }
.seo-indice small { color: var(--texto-3); font: .74rem var(--mono); }

/* ---------- Donaciones y anuncios ---------- */
.apoyo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 28px; margin: 26px 0 0; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--acento) 30%, var(--borde)); border-radius: 16px; background: linear-gradient(120deg, var(--acento-fondo), transparent 70%), var(--superficie); }
.apoyo h2 { margin: 0 0 4px; font-size: 1.15rem; letter-spacing: -.01em; }
.apoyo p { margin: 0; max-width: 640px; color: var(--texto-2); font-size: .92rem; }
.apoyo-accion { display: grid; justify-items: center; gap: 6px; }
.apoyo-accion small { color: var(--texto-3); font-size: .75rem; }
.contacto { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; margin: 26px 0 0; padding: 22px 24px; border: 1px solid var(--borde); border-radius: 16px; background: var(--superficie); }
.contacto h2 { margin: 0 0 4px; font-size: 1.15rem; letter-spacing: -.01em; }
.contacto p { margin: 0; max-width: 620px; color: var(--texto-2); font-size: .92rem; }
.contacto-accion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.contacto-accion svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.boton-apoyar svg { color: var(--acento); }
/* Barra: con poco ancho, el café se queda en la taza (el texto va en el title). */
@media (max-width: 1200px) { .boton-apoyar span { display: none; } .boton-apoyar { padding-inline: 10px; } }
.anuncio { max-width: 820px; margin: 26px auto 0; text-align: center; }
.anuncio:not(.con-anuncio) { height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; }
.anuncio iframe { display: block; width: 100%; height: 0; border: 0; }
.anuncio-etiqueta { display: block; margin-bottom: 6px; color: var(--texto-3); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.anuncio-lateral { flex: none; margin: 0; padding: 10px; border-top: 1px solid var(--borde); }

/* ---------- Visor ---------- */
.visor { flex: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 0; }
.lateral { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--borde); background: var(--bg-2); }
.abiertos { flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 14px 10px; overflow-y: auto; }
.abiertos h3 { margin: 0 6px 6px; color: var(--texto-3); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.abierto { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 8px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--texto-2); text-align: left; cursor: pointer; }
.abierto:hover { background: var(--superficie); }
.abierto.activo { border-color: var(--borde-fuerte); background: var(--superficie-2); color: var(--texto); }
.abierto i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--c-binario)); }
.abierto span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.abierto small { color: var(--texto-3); font-size: .72rem; }
.visor-cuerpo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cabecera-archivo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 20px 10px; }
.migas { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; color: var(--texto-3); font-size: .82rem; }
.migas button { padding: 0; border: 0; background: none; color: var(--acento); cursor: pointer; }
.migas span::before { content: "/"; margin-right: 4px; color: var(--texto-3); }
.titulo-archivo { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.titulo-archivo h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.insignia { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); font-size: .78rem; font-weight: 700; }
.acciones-archivo { display: flex; align-items: center; gap: 8px; }
.menu-como { position: relative; }
.desplegable { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 200px; padding: 6px; border: 1px solid var(--borde-fuerte); border-radius: 10px; background: var(--superficie); box-shadow: var(--sombra); }
.desplegable button { padding: 8px 10px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; }
.desplegable button:hover { background: var(--superficie-2); }
.pestanas { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--borde); overflow-x: auto; scrollbar-width: thin; }
.pestanas button { position: relative; padding: 10px 14px; border: 0; background: none; color: var(--texto-3); font-weight: 600; font-size: .88rem; white-space: nowrap; cursor: pointer; }
.pestanas button:hover { color: var(--texto); }
.pestanas button[aria-selected="true"] { color: var(--texto); }
.pestanas button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--marca); }
.panel { flex: 1; min-height: 0; padding: 16px 20px 24px; overflow: auto; }

/* ---------- Tablas ---------- */
.barra-tabla { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.barra-tabla input[type="search"] { width: min(320px, 100%); }
.barra-tabla .nota { margin-right: auto; }
.marco-tabla { overflow: auto; max-height: calc(100dvh - 300px); min-height: 160px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); }
.datos { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.datos th, .datos td { padding: 6px 12px; border-bottom: 1px solid var(--borde); border-right: 1px solid var(--borde); text-align: left; vertical-align: top; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.datos thead th { position: sticky; top: 0; z-index: 2; background: var(--superficie-2); font-weight: 700; cursor: pointer; user-select: none; }
.datos thead th small { display: block; color: var(--texto-3); font: 500 .7rem var(--mono); text-transform: lowercase; }
.datos thead th[aria-sort="ascending"]::after { content: " ▲"; color: var(--acento); font-size: .7rem; }
.datos thead th[aria-sort="descending"]::after { content: " ▼"; color: var(--acento); font-size: .7rem; }
.datos td.num { text-align: right; font-family: var(--mono); font-size: .8rem; }
.datos td.nulo { color: var(--texto-3); font-style: italic; }
.datos td.json { font-family: var(--mono); font-size: .78rem; color: var(--texto-2); }
.datos td.indice, .datos th.indice { position: sticky; left: 0; z-index: 1; background: var(--superficie-2); color: var(--texto-3); font: 500 .74rem var(--mono); text-align: right; cursor: default; }
.datos thead th.indice { z-index: 3; }
.datos tbody tr:hover td { background: var(--superficie-2); }
.datos tbody tr.pulsable { cursor: pointer; }
.paginacion { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.paginacion select { min-height: 32px; padding: 3px 8px; }
.sql { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); }
.sql textarea { min-height: 76px; font-family: var(--mono); font-size: .86rem; resize: vertical; }
.sql-acciones { display: flex; align-items: center; gap: 8px; }
.rebanadas { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); }
.rebanadas input { width: 86px; }
.selector-cabeza { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.selector-cabeza select { min-width: 260px; max-width: 100%; }

/* ---------- Texto y hex ---------- */
.barra-texto { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.barra-texto .nota { margin-right: auto; }
.codigo { margin: 0; padding: 14px 0; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; max-height: calc(100dvh - 280px); counter-reset: linea; }
.codigo code { display: block; padding: 0 16px; line-height: 1.55; tab-size: 4; }
.codigo.ajustar code { white-space: pre-wrap; overflow-wrap: anywhere; }
.codigo.numeros code { padding-left: 0; }
.codigo .linea { display: block; padding-left: 64px; position: relative; min-height: 1.55em; }
.codigo .linea::before { counter-increment: linea; content: counter(linea); position: absolute; left: 0; width: 48px; color: var(--texto-3); text-align: right; user-select: none; }
.hljs-comment, .hljs-quote { color: var(--h-comentario); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in.hljs-keyword { color: var(--h-clave); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-tag { color: var(--h-texto); }
.hljs-number, .hljs-symbol, .hljs-bullet { color: var(--h-numero); }
.hljs-title, .hljs-section, .hljs-title.function_ { color: var(--h-funcion); }
.hljs-type, .hljs-class .hljs-title, .hljs-built_in { color: var(--h-tipo); }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-name, .hljs-selector-class, .hljs-selector-id { color: var(--h-atributo); }
.hljs-meta, .hljs-deletion, .hljs-tag { color: var(--h-meta); }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }
.hex { margin: 0; padding: 12px 16px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; max-height: calc(100dvh - 280px); font: .82rem/1.6 var(--mono); }
.hex .off { color: var(--texto-3); } .hex .asc { color: var(--acento); }

/* ---------- Árbol ---------- */
.arbol-marco { display: grid; grid-template-columns: minmax(260px, 38%) minmax(0, 1fr); gap: 14px; min-height: 0; }
.arbol-marco.solo { grid-template-columns: 1fr; }
.arbol { padding: 8px 6px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; max-height: calc(100dvh - 280px); font-size: .86rem; }
.arbol ul { margin: 0; padding-left: 16px; list-style: none; }
.arbol > ul { padding-left: 0; }
.nodo { display: flex; align-items: baseline; gap: 6px; width: 100%; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: var(--texto); text-align: left; cursor: pointer; }
.nodo:hover { background: var(--superficie-2); }
.nodo.activo { background: var(--acento-fondo); }
.nodo .flecha { flex-shrink: 0; width: 12px; color: var(--texto-3); font-size: .7rem; transition: transform .15s; }
.nodo[aria-expanded="true"] .flecha { transform: rotate(90deg); }
.nodo .clave { font-family: var(--mono); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.nodo .tipo { flex-shrink: 0; padding: 0 6px; border-radius: 5px; background: var(--superficie-3); color: var(--texto-3); font: 500 .68rem var(--mono); }
.nodo .resumen { min-width: 0; overflow: hidden; color: var(--texto-2); font-family: var(--mono); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.nodo .resumen.t-string { color: var(--h-texto); } .nodo .resumen.t-number { color: var(--h-numero); } .nodo .resumen.t-bool, .nodo .resumen.t-null { color: var(--h-clave); }
.detalle-arbol { min-width: 0; }
.detalle-arbol .vacio { padding: 30px; border: 1px dashed var(--borde-fuerte); border-radius: 10px; color: var(--texto-3); text-align: center; }

/* ---------- Propiedades, avisos, hallazgos ---------- */
.propiedades { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); gap: 14px; }
.grupo { border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: hidden; }
.grupo h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--borde); background: var(--superficie-2); font-size: .9rem; }
.grupo dl { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); margin: 0; }
.grupo dt, .grupo dd { margin: 0; padding: 7px 14px; border-bottom: 1px solid var(--borde); font-size: .86rem; }
.grupo dt { color: var(--texto-3); overflow-wrap: anywhere; }
.grupo dd { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 260px; overflow-y: auto; }
.grupo dl > :nth-last-child(-n+2) { border-bottom: 0; }
.estado { padding: 1px 8px; border-radius: 999px; font: 700 .72rem var(--sans); }
.estado.ok { background: var(--ok-fondo); color: var(--ok); } .estado.aviso { background: var(--aviso-fondo); color: var(--aviso); }
.estado.peligro { background: var(--peligro-fondo); color: var(--peligro); } .estado.info { background: var(--info-fondo); color: var(--info); }
.aviso { margin: 0 0 14px; padding: 12px 16px; border: 1px solid; border-radius: 10px; }
.aviso p { margin: 0; } .aviso pre { margin: 8px 0 0; white-space: pre-wrap; color: var(--texto-2); font-size: .78rem; }
.aviso.info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-fondo); }
.aviso.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-fondo); }
.aviso.aviso { border-color: color-mix(in srgb, var(--aviso) 45%, transparent); background: var(--aviso-fondo); }
.aviso.peligro { border-color: color-mix(in srgb, var(--peligro) 45%, transparent); background: var(--peligro-fondo); }
.veredicto { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid; border-radius: 12px; }
.veredicto b { font-size: 1.1rem; } .veredicto p { margin: 2px 0 0; color: var(--texto-2); }
.veredicto svg { flex-shrink: 0; width: 34px; height: 34px; }
.veredicto.peligro { border-color: var(--peligro); background: var(--peligro-fondo); color: var(--peligro); }
.veredicto.aviso { border-color: var(--aviso); background: var(--aviso-fondo); color: var(--aviso); }
.veredicto.ok { border-color: var(--ok); background: var(--ok-fondo); color: var(--ok); }
.hallazgos { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hallazgos li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 10px 14px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); }
.hallazgos li > div { grid-column: 2; color: var(--texto-2); font-size: .84rem; overflow-wrap: anywhere; }
.hallazgos code { padding: 1px 5px; border-radius: 5px; background: var(--superficie-3); }

/* ---------- .env ---------- */
.env { width: 100%; border-collapse: collapse; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; background: var(--superficie); font-family: var(--mono); font-size: .84rem; }
.env td { padding: 8px 12px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.env td:first-child { color: var(--h-atributo); font-weight: 600; white-space: nowrap; }
.env .valor { overflow-wrap: anywhere; } .env .oculto { color: var(--texto-3); letter-spacing: .1em; }
.env .comentario { color: var(--h-comentario); font-style: italic; }
.env td:last-child { width: 1%; white-space: nowrap; }

/* ---------- Contenedor ---------- */
.lista-entradas { width: 100%; border-collapse: collapse; font-size: .86rem; }
.lista-entradas th, .lista-entradas td { padding: 7px 12px; border-bottom: 1px solid var(--borde); text-align: left; }
.lista-entradas th { color: var(--texto-3); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.lista-entradas td.num { text-align: right; font-family: var(--mono); font-size: .8rem; color: var(--texto-2); }
.lista-entradas tbody tr { cursor: pointer; } .lista-entradas tbody tr:hover td { background: var(--superficie-2); }
.lista-entradas .ruta { font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }
.lista-entradas .ruta i { color: var(--texto-3); font-style: normal; }
.marco-lista { border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; max-height: calc(100dvh - 300px); }

/* ---------- Contraseña ---------- */
.contrasena { max-width: 460px; margin: 30px auto; padding: 24px; border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie); text-align: center; }
.contrasena svg { width: 40px; height: 40px; color: var(--acento); }
.contrasena form { display: flex; gap: 8px; margin-top: 14px; }
.contrasena input { flex: 1; }
.contrasena .error { color: var(--peligro); font-size: .86rem; }

/* ---------- Multimedia, documentos, mapa, 3D ---------- */
.lienzo-imagen { display: grid; place-items: center; min-height: 300px; padding: 16px; border: 1px solid var(--borde); border-radius: 10px; overflow: auto; max-height: calc(100dvh - 280px);
  background: repeating-conic-gradient(var(--superficie-2) 0 25%, var(--superficie) 0 50%) 0 0 / 20px 20px; }
.lienzo-imagen img { max-width: 100%; height: auto; image-rendering: auto; }
.lienzo-imagen.real img { max-width: none; }
.medio { display: grid; place-items: center; padding: 20px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); }
.medio video { max-width: 100%; max-height: calc(100dvh - 300px); border-radius: 8px; background: #000; }
.medio audio { width: min(640px, 100%); }
.marco-pdf { width: 100%; height: calc(100dvh - 240px); min-height: 420px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; }
.documento { max-width: 920px; padding: 8px 4px; line-height: 1.65; }
.documento h1, .documento h2, .documento h3 { line-height: 1.2; letter-spacing: -.01em; }
.documento h1 { font-size: 1.9rem; } .documento h2 { padding-bottom: 6px; border-bottom: 1px solid var(--borde); }
.documento pre { padding: 12px 14px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; }
.documento :not(pre) > code { padding: 1px 6px; border-radius: 5px; background: var(--superficie-3); font-size: .84em; }
.documento table { border-collapse: collapse; } .documento th, .documento td { padding: 6px 10px; border: 1px solid var(--borde); }
.documento blockquote { margin: 0; padding: 4px 16px; border-left: 3px solid var(--acento); color: var(--texto-2); }
.documento img { max-width: 100%; }
.mermaid-marco { padding: 16px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: auto; }
.mermaid-marco svg { max-width: 100%; height: auto; }
.celda { margin-bottom: 14px; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); overflow: hidden; }
.celda-cabeza { display: flex; gap: 8px; padding: 5px 12px; border-bottom: 1px solid var(--borde); background: var(--superficie-2); color: var(--texto-3); font: 500 .74rem var(--mono); }
.celda pre { margin: 0; padding: 10px 14px; overflow: auto; }
.celda .salida { border-top: 1px dashed var(--borde); }
.celda .salida pre { color: var(--texto-2); }
.celda .salida.error pre { color: var(--peligro); }
.celda .salida img { max-width: 100%; display: block; margin: 8px 14px; background: #fff; }
.celda .markdown { padding: 4px 16px; }
.mapa { height: calc(100dvh - 260px); min-height: 420px; border: 1px solid var(--borde); border-radius: 10px; }
.lienzo-3d { display: block; position: relative; height: calc(100dvh - 260px); min-height: 420px; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 40%, var(--superficie-2), var(--bg)); }
.lienzo-3d canvas { display: block; }
.lienzo-3d .ayuda-3d { position: absolute; left: 12px; bottom: 10px; color: var(--texto-3); font-size: .78rem; }

/* ---------- Carga, toast, diálogo, soltar ---------- */
.cargando { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 12px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); }
.ruedita { width: 38px; height: 38px; border: 3px solid var(--borde-fuerte); border-top-color: var(--acento); border-radius: 50%; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.toast { position: fixed; inset: auto 0 24px; margin: 0 auto; width: fit-content; max-width: min(640px, calc(100vw - 32px)); height: auto; padding: 11px 16px; border: 1px solid var(--borde-fuerte); border-radius: 12px; background: var(--superficie-2); color: var(--texto); box-shadow: var(--sombra); overflow: visible; }
.toast.error { border-color: var(--peligro); }
.dialogo { width: min(820px, calc(100vw - 32px)); max-height: 80dvh; padding: 0; border: 1px solid var(--borde-fuerte); border-radius: 14px; background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }
.dialogo::backdrop { background: rgba(0, 0, 0, .55); }
.dialogo-cabecera, .dialogo-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.dialogo-cabecera h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.valor-completo { margin: 0; padding: 14px; max-height: 60dvh; overflow: auto; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); white-space: pre-wrap; overflow-wrap: anywhere; }
.soltar { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(6px); pointer-events: none; }
.soltar div { display: grid; justify-items: center; gap: 10px; padding: 40px 60px; border: 2px dashed var(--acento); border-radius: 20px; background: var(--acento-fondo); font-size: 1.2rem; }
.soltar svg { width: 50px; height: 50px; color: var(--acento); }
.pie { padding: 14px 20px; border-top: 1px solid var(--borde); color: var(--texto-3); font-size: .8rem; text-align: center; }
body.con-visor .pie { display: none; }
/* La ventana que pide la clave de licencia (app de escritorio vendida en Gumroad) */
.dialogo-licencia { width: min(460px, calc(100vw - 32px)); }
.dialogo-licencia::backdrop { background: color-mix(in srgb, var(--bg) 70%, rgba(0, 0, 0, .5)); backdrop-filter: blur(4px); }
.licencia { display: grid; justify-items: center; gap: 12px; padding: 28px 26px 22px; text-align: center; }
.licencia-logo { width: 56px; height: 56px; }
.licencia h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }
.licencia p { margin: 0; color: var(--texto-2); font-size: .9rem; }
.licencia-clave { width: 100%; padding: 10px 12px; border: 1px solid var(--borde-fuerte); border-radius: 10px; background: var(--superficie-2); color: var(--texto); font: 600 .95rem/1.3 ui-monospace, Consolas, monospace; text-align: center; letter-spacing: .02em; }
.licencia-clave:focus { outline: 2px solid var(--acento); outline-offset: 1px; }
.licencia .licencia-error { color: var(--peligro, #b3261e); font-weight: 600; }
.licencia .boton { width: 100%; justify-content: center; }
.licencia .licencia-nota { color: var(--texto-3); font-size: .8rem; }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  .barra { padding: 10px 14px; }
  .barra-acciones .boton span { display: none; }
  /* En el móvil no se eligen carpetas ni se descarga la app de Windows: fuera, y la barra cabe en una línea. */
  #btn-carpeta, #btn-descargar { display: none; }
  .barra-acciones { flex-wrap: nowrap; gap: 6px; }
  .glifo { display: none; }
  .pagina-seo .barra-acciones .boton:first-child { display: none; }
  .seo-cabeza, .seo-bloque { padding: 18px; }
  /* filtros de los ejemplos: una fila que se desliza, en vez de cuatro */
  .filtros { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filtros::-webkit-scrollbar { display: none; }
  .filtro { flex: none; }
  .idioma { padding-inline: 8px; }
  .barra-acciones .boton { padding: 8px 10px; }
  .portada { padding: 28px 14px 20px; }
  .visor { grid-template-columns: 1fr; }
  .lateral { border-right: 0; border-bottom: 1px solid var(--borde); }
  .abiertos { flex-direction: row; overflow-x: auto; padding: 8px; }
  .anuncio-lateral { display: none; }
  .apoyo { padding: 18px; }
  .apoyo-accion { width: 100%; }
  .contacto { padding: 18px; }
  .contacto-accion, .contacto-accion .boton { width: 100%; justify-content: center; }
  .abiertos h3 { display: none; }
  .abierto { flex-shrink: 0; max-width: 200px; }
  .cabecera-archivo { grid-template-columns: 1fr; padding: 12px 14px 8px; }
  .panel { padding: 12px 14px 20px; }
  .arbol-marco { grid-template-columns: 1fr; }
  .marco-tabla, .codigo, .hex, .arbol { max-height: 70dvh; }
  .grupo dl { grid-template-columns: 1fr; } .grupo dt { padding-bottom: 0; border-bottom: 0; }
}
