/* SITIO · lo que necesita una página real y las maquetas no traen: el envoltorio de contenedor, la cabecera
   fija, el menú del móvil, el carrito lateral, el visor, los estados y unas pocas utilidades.
   Los componentes están en dist/assets/keen.css, que el build copia tal cual de diseno/project/keen*.css:
   aquí no se repite ninguna regla de allí. Los colores salen de sus tokens (var(--…)). */

/* ---------- envoltorio: el <body class="k"> es el contenedor «k» de las consultas de móvil ---------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body.k { margin: 0; min-height: 100vh; overflow-x: clip; }
body.sin-scroll { overflow: hidden; }
[hidden] { display: none !important; }
.k img { max-width: 100%; }
:where(.bt) { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.saltar { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: #fff; color: var(--ink); box-shadow: var(--sh-2); }
.saltar:focus { top: 12px; }
.k :focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.sec-head:last-child { margin-bottom: 0; }
/* En keen.css «.k a { color: inherit }» pisa el color de un botón cuando es un enlace (en las maquetas eran <span>).
   Se le devuelve el suyo con los mismos tokens. */
.k a.btn--light, .k a.btn--ghost, .k a.btn--text { color: var(--ink); }
.k a.btn--dark { color: var(--fg); }
.k a.btn--cyan { color: var(--night); }
.k .on-dark a.btn--ghost, .k a.btn--ghost-d, .k .on-dark a.btn--text { color: var(--fg); }
.k a.bubble { color: #fff; }
/* Y «.k button { font: inherit }» pisa el tamaño y el grosor de las piezas cuando son <button>. */
.k button.btn { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1; }
.k button.btn--sm { font-size: 13px; }
.k button.btn--lg { font-size: 15.5px; }
.k button.filter-chip { font-size: 13.5px; }
.k button.bubble { font-size: 14px; font-weight: 500; }
.k a.rung--d { color: var(--fg); }
/* Tarjeta de módulo sin captura (versión pública): la etiqueta deja de flotar sobre el título. */
.mod:not(:has(> .mod-shot)) > .mod-tags { position: static; align-self: flex-start; }
.lic-opt b { padding-right: 24px; }

/* ---------- cabecera: oscura sobre el hero, clara, fija y translúcida al bajar ---------- */
.cab { position: sticky; top: 0; z-index: 50; color: var(--fg); transition: background-color .25s, box-shadow .25s; }
.cab--sobre { margin-bottom: -72px; }
.cab--clara, .cab.is-solida { background: rgba(245,246,248,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--rule); }
.cab .wrap { position: relative; }
.cab-hueco { height: 72px; }
.bm-p { fill: #fff; } .bm-k { stroke: #0b0d12; } .bm-d { fill: #1a8fcb; }
.nav--light .bm-p { fill: #0b0d12; } .nav--light .bm-k { stroke: #fff; } .nav--light .bm-d { fill: #37bdf8; }
.nav-desp { display: inline-flex; align-items: center; gap: 5px; }
.nav-desp svg { transition: transform .2s; }
.nav-desp[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-links a:hover > span, .nav-links .nav-desp:hover { color: #fff; }
.nav--light .nav-links a:hover > span, .nav--light .nav-links .nav-desp:hover { color: var(--ink); }
.mega-sitio { position: absolute; left: 40px; right: 40px; top: calc(100% + 8px); z-index: 60; }
.icon-btn { cursor: pointer; }
.icon-btn.m-show { justify-content: center; }

/* Campos de búsqueda de verdad dentro de .search, .ask-field y .bigsearch */
.search input, .ask-field input, .bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; outline: 0; }
.search input::placeholder { color: inherit; opacity: 1; }
.ask-field input, .bigsearch input { color: var(--ink); }
.ask-field input::placeholder, .bigsearch input::placeholder { color: var(--ink-3); opacity: 1; }
.k input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.ask-field .send, .bigsearch .btn { flex: none; }
.ask-sugg a, .goal a { display: inline-flex; }

/* ---------- menú del móvil, a pantalla completa ---------- */
.menu-movil { position: fixed; inset: 0; z-index: 90; overflow-y: auto; background: var(--night); color: #fff; }
.mm-top { height: 64px; padding: 0 18px; }
.mm-cuerpo { display: flex; flex-direction: column; padding: 8px 18px 32px; }
.mm-fila { height: 52px; border-bottom: 1px solid rgba(255,255,255,.09); font-size: 17px; cursor: pointer; list-style: none; }
.mm-fila::-webkit-details-marker { display: none; }
.mm-grupo[open] > .mm-fila svg { transform: rotate(180deg); }
.mm-sub { display: flex; flex-direction: column; padding: 6px 0 12px 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
.mm-sub a { padding: 9px 0; font-size: 15px; color: var(--fg-2); }

/* ---------- carrito lateral ---------- */
.cesta { position: fixed; inset: 0; z-index: 100; visibility: hidden; transition: visibility 0s .3s; }
.cesta.is-open { visibility: visible; transition: none; }
.cesta-velo { position: absolute; inset: 0; background: rgba(6,8,16,.5); opacity: 0; transition: opacity .3s; }
.cesta.is-open .cesta-velo { opacity: 1; }
.cesta .drawer { position: absolute; top: 0; right: 0; bottom: 0; max-width: 100%; transform: translateX(100%); transition: transform .3s ease; }
.cesta.is-open .drawer { transform: none; }
.cesta .drawer-b { flex: 1; overflow-y: auto; }
.cesta .line .bt { margin-top: 4px; }

/* ---------- burbuja flotante y barra fija ---------- */
.burbuja-sitio { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; transition: bottom .3s; }
.bubble { cursor: pointer; }
.bubble--icon .bubble-txt { display: none; }
body.con-mbar .burbuja-sitio { bottom: 96px; }
.mbar { transition: transform .3s ease; }
.mbar.is-oculta { transform: translateY(110%); }
.toc { top: 72px; }
/* Zona de decisión: la galería (o la portada) acompaña a la caja de compra mientras se lee. */
@container k (min-width: 1101px) { .pdp > :first-child { position: sticky; top: 96px; } }

/* ---------- visor de capturas y galería con imágenes reales ---------- */
.visor { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 32px; background: rgba(6,8,16,.92); }
.visor img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.visor-x { position: absolute; top: 20px; right: 20px; }
.gal-main img, .gal-th img, .mod-shot img, .fr-body img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal-th { cursor: pointer; }

/* Portada generada: la zona de decisión sigue completa mientras no haya capturas */
.portada { position: absolute; inset: 0; display: grid; place-items: center; }
.portada-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; text-align: center; }
.portada-glifo { width: 88px; height: 88px; border-radius: 24px; margin-bottom: 6px; }
.portada-t { color: #fff; }
.portada-marca { position: absolute; left: 20px; top: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; }

/* ---------- tarjetas enlazadas: toda la tarjeta lleva a la ficha y el botón sigue siendo un botón ---------- */
.mod-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mod .btn, .mod-list .btn { position: relative; z-index: 2; }
.mod-list { position: relative; }
.mod, .mod-list, .card, .sol, .rung, .mega-item, .btn { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }

/* ---------- preguntas, registro de cambios y listas de la tabla técnica ---------- */
.faq-q { cursor: pointer; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-i .i-menos, .faq-i[open] .i-mas { display: none; }
.faq-i[open] .i-menos { display: block; }
.log-mas > summary { list-style: none; cursor: pointer; margin-top: 16px; }
.log-mas > summary::-webkit-details-marker { display: none; }
.log-mas[open] > summary { display: none; }
.spec-lista { display: flex; flex-direction: column; gap: 6px; }

/* ---------- catálogo: filtros con casillas de verdad, orden y vista ---------- */
.fopt, .choice { cursor: pointer; }
.fopt:has(input:focus-visible), .choice:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }
.filter-chip { cursor: pointer; }
.filter-chip select { -webkit-appearance: none; appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; }
.goal [aria-pressed="true"] > span { background: #fff; color: var(--ink); border-color: #fff; }
.slider input[type="range"] { position: absolute; left: -11px; top: -12px; width: calc(100% + 22px); height: 30px; margin: 0; opacity: 0; cursor: pointer; }

/* ---------- textos legales ---------- */
.legal-indice { position: sticky; top: 96px; align-self: start; }
.legal-nav a { color: var(--ink-2); }
.legal-nav a:hover { color: var(--ink); }
.legal > .lbl:first-child { display: block; margin-bottom: 8px; }
.legal h3 { scroll-margin-top: 110px; }
.legal h4 { margin: 22px 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.legal ul, .legal ol { margin: 12px 0 0; padding-left: 1.25em; }
.legal ul { list-style: disc; } .legal ol { list-style: decimal; }
.legal li + li { margin-top: 6px; }
.legal ul + p, .legal ol + p { margin-top: 12px; }
.legal a { color: var(--cyan-ink); border-bottom: 1px solid currentColor; }

/* ---------- huecos que se quedan sin contenido en la versión pública ---------- */
.hero-cols > :only-child { grid-column: 1 / -1; max-width: 860px; }
.split > :only-child { grid-column: 1 / -1; max-width: 780px; }
.g12 > :only-child { grid-column: 1 / -1 !important; }
.voces > .col:only-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@container k (min-width: 761px) {
  :is(.facts, .keyfacts, .seals, .case-nums, .support, .timeline):has(> :last-child:nth-child(1)) { grid-template-columns: minmax(0, 1fr); }
  :is(.facts, .keyfacts, .seals, .case-nums, .support, .timeline):has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.facts, .keyfacts, .seals, .case-nums, .support, .timeline):has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :is(.facts, .keyfacts, .seals, .case-nums, .support, .timeline):has(> :last-child:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- tableta (761–1100 px): las maquetas solo fijan 1440 y 390 ---------- */
@container k (min-width: 761px) and (max-width: 1100px) {
  .wrap { padding: 0 28px; }
  .nav { gap: 20px; }
  .nav-links { gap: 18px; }
  .search { display: none; }
  .mega-sitio { left: 28px; right: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
  .hero-cols, .closing-cols, .split, .feat, .authority, .calc, .pdp, .sec-head { grid-template-columns: minmax(0, 1fr) !important; }
  .feat--rev > :first-child { order: 0; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .rung { grid-template-columns: 48px minmax(0, 1fr) 140px; }
  .rung > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .rung > .rung-p { grid-row: 1 / span 2; grid-column: 3; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .buy { position: static !important; }
  .plate { transform: none; }
}

/* ---------- móvil (≤ 760 px) ---------- */
@container k (max-width: 760px) {
  .cab--sobre { margin-bottom: -64px; }
  .cab-hueco { height: 64px; }
  .toc { top: 64px; }
  .cesta .drawer { width: 100%; border-radius: 0; }
  .burbuja-sitio { right: 16px; bottom: 16px; }
  body.con-mbar .burbuja-sitio { bottom: 92px; }
  .cat-layout > .filters { display: none; }
  .cat-layout.ver-filtros > .filters { display: flex; padding: 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--rule); }
  .legal-indice { position: static; }
  .voces > .col:only-child { grid-template-columns: minmax(0, 1fr); }
  :is(.facts, .keyfacts, .seals, .timeline) > :last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .buy { position: static !important; }
  .mega-sitio { display: none !important; }
  /* Las maquetas fijan columnas con estilo en línea en algunos héroes y cierres; en el móvil van en una. */
  .hero-cols, .closing-cols { grid-template-columns: minmax(0, 1fr) !important; }
  .portada-glifo { width: 56px; height: 56px; border-radius: 16px; margin: 0; }
  .portada-in { gap: 8px; }
  .portada-marca { display: none; }
}

/* ---------- borrador: lo que falta se ve con borde naranja y no sale en la versión pública ---------- */
.es-borrador [data-pendiente] { outline: 2px dashed var(--warm); outline-offset: 3px; }
.es-borrador::after { content: 'Borrador: lo marcado en naranja no sale en la web pública'; position: fixed; left: 12px; bottom: 12px; z-index: 300; padding: 8px 12px; border-radius: 10px; background: var(--warm); color: var(--night); font: 600 12px/1.3 var(--sans); pointer-events: none; }
