/* knowledge-hub/generador/marco.css — la hoja del documento del Knowledge Hub (`marco.ts`): la del diseño
 * aprobado, regla a regla, con los mismos valores. Pinta con var(--…) de Venuz DS (venuz-ds-tokens.css) y de la paleta
 * de abajo, el único sitio de la hoja donde se escribe un color: los que llevan transparencia, que Venuz DS no tiene.
 * Lo comprueba la construcción (aspecto.ts). Nada de aquí entra en `.art` (el cuerpo de una guía tiene su hoja), salvo
 * los universales que nombra `marco-fuera-del-cuerpo.test.ts`: caja, foco, selección, `[hidden]` y sin animación. */
:root {
  --kh-fondo-05: color-mix(in srgb, var(--grey-1000) 5%, transparent);
  --kh-fondo-60: color-mix(in srgb, var(--grey-1000) 60%, transparent);
  --kh-fondo-82: color-mix(in srgb, var(--grey-1000) 82%, transparent);
  --kh-fondo-85: color-mix(in srgb, var(--grey-1000) 85%, transparent);
  --kh-fondo-86: color-mix(in srgb, var(--grey-1000) 86%, transparent);
  --kh-acento-06: color-mix(in srgb, var(--accent-500) 6%, transparent);
  --kh-acento-07: color-mix(in srgb, var(--accent-500) 7%, transparent);
  --kh-acento-10: color-mix(in srgb, var(--accent-500) 10%, transparent);
  --kh-acento-12: color-mix(in srgb, var(--accent-500) 12%, transparent);
  --kh-acento-13: color-mix(in srgb, var(--accent-500) 13%, transparent);
  --kh-acento-14: color-mix(in srgb, var(--accent-500) 14%, transparent);
  --kh-acento-16: color-mix(in srgb, var(--accent-500) 16%, transparent);
  --kh-acento-30: color-mix(in srgb, var(--accent-500) 30%, transparent);
  --kh-acento-35: color-mix(in srgb, var(--accent-500) 35%, transparent);
  --kh-negro: rgb(0 0 0);
  --kh-negro-50: rgb(0 0 0 / 0.5);
  --kh-negro-60: rgb(0 0 0 / 0.6);
  --kh-negro-70: rgb(0 0 0 / 0.7);
  --kh-negro-80: rgb(0 0 0 / 0.8);
  --kh-negro-85: rgb(0 0 0 / 0.85);
  --kh-negro-90: rgb(0 0 0 / 0.9);
  --kh-velo-60: rgb(6 7 10 / 0.6);
  --kh-blanco: rgb(255 255 255);
  --ease: cubic-bezier(.2, .7, .2, 1); --t1: 120ms; --t2: 200ms;
}

/* ---------- base ---------- */
/* Lo que casa por etiqueta lleva `:where(:not(.art *))` (no suma prioridad): el cuerpo de una guía no lo recibe. */
html.vds-root { letter-spacing: 0; scroll-behavior: auto; scroll-padding-top: 0; scrollbar-gutter: stable; }
html.bloq, html:has(.cajon:popover-open) { overflow: hidden; }
body { margin: 0; background: var(--surface-primary); color: var(--text-body); font-family: var(--font-family-body);
  font-size: 16px; line-height: 26px; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a:where(:not(.art *)) { color: inherit; text-decoration: none; }
:is(h1, h2, h3, h4):where(:not(.art *)) { font-family: var(--font-family-heading); color: var(--text-heading); font-weight: 600; margin: 0; }
svg.ic:where(:not(.art *)) { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
button:where(:not(.art *)) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
:is(a, button, summary, input, textarea):where(:not(.art *)) { -webkit-tap-highlight-color: transparent; }
a[href]:where(:not(.art *)), :is(button, summary):where(:not(.art *)) { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
::selection { background: var(--kh-acento-30); }
[hidden] { display: none !important; }
.kh-skip { position: absolute; left: var(--space-4); top: calc(-1 * var(--space-18)); z-index: var(--z-top); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-m); background: var(--action-primary-bg); color: var(--action-primary-text); }
.kh-skip:focus { top: var(--space-4); }

/* ---------- cabecera ---------- */
.top { position: sticky; top: 0; z-index: 30; height: 60px; background: var(--kh-fondo-86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-800); transition: box-shadow var(--t2); view-transition-name: kh-cabecera; }
.cabecera-sombra .top { box-shadow: 0 10px 30px -16px var(--kh-negro-90); }
.top-in { height: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; transition: opacity var(--t1); }
.brand:hover { opacity: 0.85; }
.brand img { height: 22px; width: auto; display: block; }
.brand span { padding-left: 12px; border-left: 1px solid var(--grey-600); font-size: 14px; font-weight: 500; color: var(--grey-200); white-space: nowrap; }
.top-search { flex: 1; max-width: 440px; margin: 0 auto; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--grey-900); border: 1px solid var(--grey-700); border-radius: 10px; color: var(--grey-400); font-size: 14px;
  transition: opacity var(--t2), transform var(--t2) var(--ease), border-color var(--t1), box-shadow var(--t2); }
.top-search kbd { margin-left: auto; font: 500 12px/18px var(--font-family-body); padding: 0 7px; border: 1px solid var(--grey-600);
  border-radius: 6px; color: var(--grey-300); }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; color: var(--grey-300); }
.top-search:not([hidden]) + .top-nav { margin-left: 0; }
.top-nav > a:not(.btn) { transition: color var(--t1); }
.top-nav > a:not(.btn):hover { color: var(--grey-100); }
.top-icons { display: none; margin-left: auto; gap: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--grey-200); transition: background var(--t1); }
.icon-btn:hover, .icon-btn:active { background: var(--grey-800); }
.icon-btn svg.ic { width: 20px; height: 20px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background var(--t1), border-color var(--t1), transform var(--t1), color var(--t1); user-select: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-500); color: var(--grey-1000); }
.btn-primary:hover { background: var(--accent-400); }
.btn-ghost { border: 1px solid var(--grey-600); color: var(--grey-100); background: var(--grey-900); }
.btn-ghost:hover { background: var(--grey-800); border-color: var(--grey-500); }
.btn svg.ic { width: 16px; height: 16px; }

/* ---------- buscador ---------- */
.buscador { position: relative; cursor: text; transition: border-color var(--t1), box-shadow var(--t2), background var(--t1); }
.buscador input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--grey-100); font: inherit; letter-spacing: 0; padding: 0; appearance: none; }
.buscador input::placeholder { color: var(--grey-400); }
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador:hover { border-color: var(--grey-500); }
.buscador:focus-within { border-color: var(--accent-500); box-shadow: 0 0 0 4px var(--kh-acento-14); }
.buscador kbd { transition: opacity var(--t1); }
.buscador:focus-within kbd { opacity: 0; }
.buscador:focus-within .sr-p kbd { opacity: 1; }
.sr { position: absolute; z-index: 25; top: calc(100% + 8px); left: 0; right: 0; min-width: min(520px, 92vw); padding: 6px; text-align: left;
  background: var(--grey-900); border: 1px solid var(--grey-600); border-radius: 14px; box-shadow: 0 24px 60px -12px var(--kh-negro-85);
  max-height: min(70vh, 520px); overflow: auto; animation: baja 140ms var(--ease) both; cursor: default; }
@keyframes baja { from { opacity: 0; transform: translateY(-6px); } }
.sr-h { padding: 8px 10px 4px; font-size: 11px; line-height: 16px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--grey-400); }
.sr-i { display: flex; align-items: flex-start; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--grey-200); }
.sr-i.on { background: var(--grey-800); }
.sr-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--grey-800); border: 1px solid var(--grey-700); color: var(--grey-300); }
.sr-i.on .sr-ic { border-color: var(--accent-500); color: var(--accent-500); background: var(--kh-acento-10); }
.sr-ic svg.ic { width: 15px; height: 15px; }
.sr-t { min-width: 0; flex: 1; display: block; }
.sr-t b { display: block; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--grey-100); }
.sr-t small { font-size: 13px; line-height: 19px; color: var(--grey-400); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-t small i { font-style: normal; color: var(--grey-300); }
.sr mark { background: none; color: var(--accent-400); font-weight: 600; }
.sr-i > kbd { align-self: center; opacity: 0; font: 500 12px/18px var(--font-family-body); padding: 0 6px; border: 1px solid var(--grey-600); border-radius: 6px; color: var(--grey-300); }
.sr-i.on > kbd { opacity: 1; }
.sr-v { padding: 22px 16px; text-align: center; font-size: 14px; line-height: 22px; color: var(--grey-300); }
.sr-v b { display: block; color: var(--grey-100); font-weight: 500; font-size: 15px; }
.sr-v a { color: var(--accent-500); text-decoration: underline; text-underline-offset: 3px; }
.sr-app { margin: 4px 4px 6px; padding: 12px 14px; border: 1px solid var(--grey-700); border-radius: 10px; background: var(--grey-800); font-size: 13px; line-height: 19px; color: var(--grey-300); }
.sr-app b { display: block; margin-bottom: 2px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--grey-100); }
.sr-app a { color: var(--accent-500); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.sr-p { display: flex; gap: 14px; padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--grey-800); font-size: 12px; line-height: 18px; color: var(--grey-400); }
.sr-p kbd { font: 500 11px/16px var(--font-family-body); padding: 0 5px; border: 1px solid var(--grey-600); border-radius: 5px; color: var(--grey-300); margin-right: 4px; }

/* hoja de búsqueda a pantalla completa (móvil) */
.hoja { position: fixed; inset: 0; z-index: 55; background: var(--surface-primary); display: flex; flex-direction: column; animation: sube 220ms var(--ease) both; }
@keyframes sube { from { opacity: 0; transform: translateY(12px); } }
.hoja.saliendo { opacity: 0; transition: opacity 140ms ease; }
.hoja-top { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 6px; border-bottom: 1px solid var(--grey-800); }
.hoja .buscador { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--grey-900); border: 1px solid var(--grey-600); border-radius: 12px; font-size: 16px; position: static; }
.hoja .sr { position: static; flex: 1; border: 0; border-radius: 0; box-shadow: none; background: none; max-height: none; min-width: 0; animation: none; padding: 8px; }
.hoja .sr-p { display: none; }
.hoja-res { flex: 1; overflow: auto; }

/* ---------- cajón del móvil (popover nativo: abre y cierra sin JavaScript) ---------- */
.cajon { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(340px, 88vw); height: 100%; max-width: none; max-height: none; border: 0;
  border-left: 1px solid var(--grey-700); background: var(--grey-900); color: inherit; flex-direction: column; overflow: hidden; transform: translateX(100%);
  transition: transform 200ms ease-in, display 200ms allow-discrete, overlay 200ms allow-discrete; }
.cajon:popover-open { display: flex; transform: none; transition: transform 260ms var(--ease), display 260ms allow-discrete, overlay 260ms allow-discrete; }
@starting-style { .cajon:popover-open { transform: translateX(100%); } }
.cajon::backdrop { background: var(--kh-velo-60); opacity: 0; transition: opacity 200ms ease, display 200ms allow-discrete, overlay 200ms allow-discrete; }
.cajon:popover-open::backdrop { opacity: 1; transition: opacity 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
@starting-style { .cajon:popover-open::backdrop { opacity: 0; } }
.cajon-top { height: 56px; flex: none; display: flex; align-items: center; padding: 0 8px 0 18px; border-bottom: 1px solid var(--grey-800); font-weight: 600; color: var(--grey-100); }
.cajon-top .icon-btn { margin-left: auto; }
.cajon nav { flex: 1; overflow: auto; padding: 10px; }
.cajon nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--grey-100); }
.cajon nav a:active { background: var(--grey-800); }
.cajon nav a svg.ic { color: var(--grey-400); }
.cajon nav a.on { background: var(--grey-800); }
.cajon nav a.on svg.ic { color: var(--accent-500); }
.cajon nav a em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--grey-400); font-weight: 400; }
.cajon nav hr { border: 0; border-top: 1px solid var(--grey-800); margin: 8px 0; }
.cajon-pie { flex: none; padding: 14px; border-top: 1px solid var(--grey-800); display: grid; gap: 10px; }
.cajon-pie .btn { justify-content: center; height: 44px; }

/* ---------- portada ---------- */
.hero { position: relative; padding: 72px 0 56px; text-align: center; overflow: visible; }
.hero::before { content: ""; position: absolute; inset: -40% 10% auto 10%; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, var(--kh-acento-13), transparent 70%); }
.hero > * { position: relative; }
.hero h1 { font-size: 44px; line-height: 52px; letter-spacing: -0.02em; }
.hero p { margin: 12px auto 0; max-width: 520px; color: var(--grey-300); }
.hero-search { margin: 28px auto 0; max-width: 620px; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: var(--grey-900); border: 1px solid var(--grey-600); border-radius: 14px; color: var(--grey-400); font-size: 16px;
  box-shadow: 0 0 0 4px var(--kh-acento-06), 0 16px 40px -12px var(--kh-negro-60); }
.hero-search.buscador:focus-within { box-shadow: 0 0 0 4px var(--kh-acento-16), 0 16px 40px -12px var(--kh-negro-60); }
.hero-search svg.ic { width: 20px; height: 20px; color: var(--grey-300); }
.hero-search kbd { margin-left: auto; font: 500 12px/18px var(--font-family-body); padding: 0 7px; border: 1px solid var(--grey-600);
  border-radius: 6px; color: var(--grey-300); }
.hero-a-la-vista .top-search { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 13px; color: var(--grey-400);
  transition: opacity 140ms ease, visibility 0s linear 140ms; }
.hero:has(.hero-search:focus-within) .chips { opacity: 0; visibility: hidden; }
.chip { padding: 5px 12px; border: 1px solid var(--grey-700); border-radius: 999px; background: var(--grey-900); color: var(--grey-200); font-weight: 500; line-height: 20px;
  transition: background var(--t1), border-color var(--t1), color var(--t1); }
.chip:hover { background: var(--grey-800); border-color: var(--grey-500); color: var(--grey-100); }
.chip.on { background: var(--kh-acento-14); border-color: var(--accent-500); color: var(--accent-400); }

.sec { padding: 28px 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.sec-head h2 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.sec-head small { font-size: 13px; color: var(--grey-400); }
.sec-head a { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--accent-500); display: inline-flex; gap: 6px; align-items: center; }
.sec-head a svg.ic { transition: transform var(--t2) var(--ease); }
.sec-head a:hover svg.ic { transform: translateX(3px); }

/* la imagen de un tema o del camino: una captura de la app (`_hub.json`) que llena su hueco */
.shot:where(:not(.art *)) { position: relative; display: block; width: 100%; overflow: hidden; background: var(--grey-1000); }

/* camino de inicio */
.start { display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid var(--grey-700); border-radius: 16px; overflow: hidden; background: var(--grey-900);
  transition: border-color var(--t2), transform var(--t2) var(--ease), background var(--t2), box-shadow var(--t2); }
.start-media { position: relative; min-height: 340px; background: radial-gradient(120% 90% at 0% 0%, var(--kh-acento-16), transparent 60%), var(--grey-800); overflow: hidden; }
.start-media .shot { position: absolute; left: 36px; top: 36px; width: 118%; aspect-ratio: 12 / 7; border-radius: 10px 0 0 0; border: 1px solid var(--grey-600); box-shadow: 0 24px 60px -10px var(--kh-negro-70); }
.start-body { padding: 28px 32px; display: flex; flex-direction: column; }
.start-body h3 { margin-top: 6px; font-size: 22px; line-height: 30px; letter-spacing: -0.01em; }
.path { list-style: none; margin: 16px 0 0; padding: 0; }
.path li { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 11px 10px; border-radius: 8px; border-top: 1px solid var(--grey-800);
  font-size: 15px; line-height: 22px; color: var(--grey-200); cursor: pointer; transition: background var(--t1); }
.path li:first-child { border-top: 0; }
.path li a { flex: 1; }
.path li a::after { content: ""; position: absolute; inset: 0; }
.path li:hover { background: var(--grey-800); color: var(--grey-100); }
.path li:hover + li, .path li:hover { border-top-color: transparent; }
.path b { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--grey-600); font-size: 12px; font-weight: 600; color: var(--grey-300); }
.path li:hover b { border-color: var(--accent-500); color: var(--accent-400); }
.path li.next { color: var(--grey-100); font-weight: 500; }
.path li.next b { background: var(--accent-500); border-color: var(--accent-500); color: var(--grey-1000); }
.path li.next:hover b { color: var(--grey-1000); }
.path em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--grey-400); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.path em svg.ic { width: 13px; height: 13px; }

/* temas */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat { position: relative; border: 1px solid var(--grey-700); border-radius: 14px; background: var(--grey-900); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--t2), transform var(--t2) var(--ease), background var(--t2), box-shadow var(--t2); }
.cat:hover { border-color: var(--grey-500); transform: translateY(-3px); box-shadow: 0 18px 40px -18px var(--kh-negro-80); }
.cat-media { display: block; padding: 18px 18px 0; background: radial-gradient(110% 120% at 100% 0%, var(--kh-acento-10), transparent 55%), var(--grey-800); border-bottom: 1px solid var(--grey-700); }
.cat-media .shot { aspect-ratio: 16 / 7; border-radius: 8px 8px 0 0; border: 1px solid var(--grey-600); border-bottom: 0; box-shadow: 0 -6px 30px -8px var(--kh-negro-60);
  transition: transform 320ms var(--ease); transform-origin: 50% 100%; }
.cat:hover .cat-media .shot { transform: translateY(-4px) scale(1.015); }
.cat-body { padding: 18px 20px 16px; display: flex; flex-direction: column; flex: 1; }
.cat-title { display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 24px; font-weight: 600; color: var(--grey-100); transition: color var(--t1); }
.cat-title::after { content: ""; position: absolute; inset: 0; }
.cat:hover .cat-title { color: var(--accent-400); }
.cat-title svg.ic { color: var(--accent-500); width: 19px; height: 19px; }
.cat-desc { margin: 6px 0 12px; font-size: 14px; line-height: 21px; color: var(--grey-300); }
.cat ul { list-style: none; margin: 0 0 12px; padding: 0; }
.cat li { padding: 0; border-top: 1px solid var(--grey-800); font-size: 14px; line-height: 21px; color: var(--grey-200); display: flex; gap: 8px; align-items: baseline; }
.cat li a { position: relative; z-index: 1; flex: 1; display: flex; gap: 8px; align-items: baseline; padding: 8px 0; transition: color var(--t1); }
.cat li a:hover { color: var(--accent-400); }
.cat li svg.ic { width: 12px; height: 12px; color: var(--grey-500); position: relative; top: 1px; }
.cat li a:hover svg.ic { color: var(--accent-500); }
.cat-more { margin-top: auto; font-size: 13px; font-weight: 500; color: var(--accent-500); display: inline-flex; align-items: center; gap: 6px; }
.cat-more .largo2 { margin-right: -2px; }
.cat-more svg.ic { width: 14px; height: 14px; transition: transform var(--t2) var(--ease); }
.cat:hover .cat-more svg.ic { transform: translateX(3px); }

/* vídeos */
.vids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.vid { display: block; width: 100%; align-self: start; text-align: left; }
.vid .shot { aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--grey-700);
  transition: border-color var(--t2), transform var(--t2) var(--ease), background var(--t2), box-shadow var(--t2); }
.vid .shot img, .video .shot img, .start-media .shot img, .cat-media .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vid:hover .shot { border-color: var(--grey-500); transform: translateY(-2px); }
.vid h4 { margin-top: 10px; font-size: 14px; line-height: 21px; font-weight: 500; color: var(--grey-100); transition: color var(--t1); }
.vid:hover h4 { color: var(--accent-400); }
.vid small { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--grey-400); }
.vids-3 { margin-top: 28px; grid-template-columns: repeat(3, 1fr); gap: 24px 20px; }
.play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--kh-fondo-05) 40%, var(--kh-fondo-60)); }
.play b { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-500); display: grid; place-items: center; box-shadow: 0 6px 24px var(--kh-negro-50);
  transition: transform var(--t2) var(--ease), background var(--t1); }
.play b::after { content: ""; border-left: 13px solid var(--grey-1000); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.vid:hover .play b { transform: scale(1.1); background: var(--accent-400); }
.play span { position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-weight: 600; line-height: 18px; padding: 1px 7px; border-radius: 6px; background: var(--kh-fondo-85); color: var(--grey-100); }

/* lo de dentro de la capa de un vídeo (la capa, `.velo`, es de la hoja del cuerpo) */
.luz video { display: block; width: 100%; max-height: calc(100vh - 150px); aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--grey-700); background: var(--kh-negro); }
.luz video::cue { font: 500 16px/1.4 Poppins, sans-serif; background: var(--kh-fondo-82); color: var(--kh-blanco); }
.luz-pie { margin-top: 14px; display: flex; align-items: center; gap: 16px; }
.luz-pie > div { min-width: 0; }
.luz-pie strong { font-size: 17px; line-height: 24px; font-weight: 600; color: var(--grey-100); }
.luz-pie small { display: block; font-size: 13px; color: var(--grey-400); }
.luz-pie .btn { margin-left: auto; }

/* contacto */
.help { margin: 28px 0 0; padding: 24px 28px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--grey-700); border-radius: 14px;
  background: linear-gradient(90deg, var(--kh-acento-07), transparent 45%), var(--grey-900); }
.help h3 { font-size: 17px; line-height: 24px; }
.help p { margin: 2px 0 0; font-size: 14px; line-height: 21px; color: var(--grey-300); }
.help .btn { margin-left: auto; }

/* ---------- menú lateral y rejilla de las páginas con él ---------- */
.doc { max-width: 1360px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 268px minmax(0, 1fr) 216px; gap: 56px; }
.doc-cat { grid-template-columns: 268px minmax(0, 1fr); }
.side { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow: auto; padding: 28px 0 28px; font-size: 14px; line-height: 20px;
  scrollbar-width: thin; scrollbar-color: var(--grey-700) transparent; interpolate-size: allow-keywords; }
.side-home { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 10px; color: var(--grey-300); font-weight: 500; border-radius: 8px; transition: color var(--t1); }
.side-home:hover { color: var(--grey-100); }
.side-home svg.ic { width: 15px; height: 15px; }
.side-cat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--grey-200); font-weight: 500; list-style: none;
  transition: background var(--t1), color var(--t1); }
.side-cat::-webkit-details-marker { display: none; }
.side-cat:hover { background: var(--grey-900); color: var(--grey-100); }
.side-cat svg.ic { width: 17px; height: 17px; color: var(--grey-400); }
.side-cat .chev { margin-left: auto; width: 14px; height: 14px; color: var(--grey-500); transition: transform var(--t2) var(--ease); }
.side-g[open] > .side-cat { color: var(--grey-100); }
.side-g[open] > .side-cat svg.ic:first-child { color: var(--accent-500); }
.side-g[open] > .side-cat .chev { transform: rotate(90deg); }
.side-g::details-content { block-size: 0; overflow: hidden; transition: block-size 220ms var(--ease), content-visibility 220ms allow-discrete; }
.side-g[open]::details-content { block-size: auto; }
.side-arts { list-style: none; margin: 2px 0 10px 18px; padding: 0; border-left: 1px solid var(--grey-700); }
.side-arts a { display: block; padding: 6px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--grey-300); transition: color var(--t1), border-color var(--t1); }
.side-arts a:hover { color: var(--grey-100); border-left-color: var(--grey-400); }
.side-arts a.on { border-left: 2px solid var(--accent-500); padding-left: 11px; color: var(--accent-500); font-weight: 500; }
.side-arts a.on:hover { color: var(--accent-400); border-left-color: var(--accent-500); }
.side-arts a.todo { color: var(--grey-400); font-size: 13px; }
.side-foot { margin-top: 18px; padding: 16px 10px 0; border-top: 1px solid var(--grey-800); }
.side-foot .btn { width: 100%; justify-content: center; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--grey-400); }
.crumbs a { transition: color var(--t1); }
.crumbs a:hover { color: var(--grey-100); }
.crumbs svg.ic { width: 12px; height: 12px; }
.badge { padding: 2px 9px; border-radius: 999px; background: var(--kh-acento-12); color: var(--accent-400); font-size: 12px; font-weight: 600; line-height: 18px; }

/* ---------- página de tema ---------- */
.cat-page { min-width: 0; max-width: 860px; padding: 32px 0 0; }
.cat-page h1 { font-size: 36px; line-height: 44px; letter-spacing: -0.02em; }
.cat-page .help, .guia .help { margin-top: 20px; }
.cat-page .help h3, .guia .help h3 { margin-top: 28px; line-height: 26px; }
.cat-page .help p, .guia .help p { margin-top: 14px; }
.cat-head { margin-top: 18px; display: flex; gap: 18px; align-items: flex-start; }
.cat-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--kh-acento-12); border: 1px solid var(--kh-acento-35); color: var(--accent-500); }
.cat-ico svg.ic { width: 24px; height: 24px; }
.cat-head .lede { margin-top: 6px; font-size: 17px; line-height: 27px; }
.cat-count { margin-top: 22px; padding-bottom: 12px; font-size: 13px; color: var(--grey-400); border-bottom: 1px solid var(--grey-800); display: flex; gap: 8px; align-items: center; }
.filtros { margin-left: auto; display: flex; gap: 6px; }
.filtros .chip { font-size: 12px; padding: 3px 10px; }
.rows { margin-top: 6px; }
.rows .vacio { margin: 20px 0 0; color: var(--grey-400); }
.row { display: flex; align-items: center; gap: 16px; padding: 16px 12px; margin: 0 -12px; border-radius: 12px; border-bottom: 1px solid transparent; position: relative;
  transition: border-color var(--t2), transform var(--t2) var(--ease), background var(--t2), box-shadow var(--t2); }
.row + .row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--grey-800); }
.row:hover { background: var(--grey-900); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.row-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--grey-900); border: 1px solid var(--grey-700); color: var(--grey-300); transition: border-color var(--t1), color var(--t1), background var(--t1); }
.row:hover .row-ico { border-color: var(--accent-500); color: var(--accent-500); background: var(--kh-acento-10); }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--grey-100); transition: color var(--t1); }
.row:hover .row-main strong { color: var(--accent-400); }
.row-main span { margin-top: 2px; font-size: 14px; line-height: 21px; color: var(--grey-300); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; line-height: 18px; color: var(--grey-400); white-space: nowrap; }
.row-meta em { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }
.row-meta em svg.ic { width: 12px; height: 12px; }
.row > svg.ic { width: 16px; height: 16px; color: var(--grey-500); transition: transform var(--t2) var(--ease); }
.row:hover > svg.ic { transform: translateX(3px); color: var(--grey-200); }

/* ---------- guía (el cuerpo, dentro de `.art`, es de la hoja del cuerpo) ---------- */
.guia { min-width: 0; max-width: 736px; padding: 32px 0 0; }
.guia > h1 { margin-top: 14px; font-size: 36px; line-height: 44px; letter-spacing: -0.02em; }
.guia .lede { margin-top: 14px; }
.meta { margin-top: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--grey-800); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--grey-300); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.ic { width: 14px; height: 14px; color: var(--grey-400); }
.meta .btn { margin-left: auto; height: 30px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.meta .btn .hecho, .meta .btn.copiado .ic:not(.hecho) { display: none; }
.meta .btn.copiado .hecho { display: block; }
.video { margin-top: 24px; scroll-margin-top: 84px; }
.video .poster { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--grey-700); cursor: pointer; transition: border-color var(--t2); }
.video .poster:hover { border-color: var(--grey-500); }
.video .poster:hover .play b { transform: scale(1.1); background: var(--accent-400); }
.video .play b { width: 68px; height: 68px; }
.video .play b::after { border-left-width: 20px; border-top-width: 12px; border-bottom-width: 12px; margin-left: 6px; }
.video .play em { position: absolute; left: 16px; bottom: 14px; font-style: normal; font-size: 14px; font-weight: 500; color: var(--grey-100); display: inline-flex; gap: 8px; align-items: center; }
.video .play span { right: 14px; bottom: 14px; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--grey-700); background: var(--kh-negro); animation: aparece 200ms ease both; }
@keyframes aparece { from { opacity: 0; } }
@media (scripting: none) { .video .poster { display: none; } }
.guia > h2.sigue { margin: 44px 0 0; font-size: 24px; line-height: 32px; letter-spacing: -0.015em; scroll-margin-top: 84px; }
.next3 { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.next3 a, .pn a { transition: border-color var(--t2), transform var(--t2) var(--ease), background var(--t2), box-shadow var(--t2); }
.next3 a:hover, .pn a:hover { border-color: var(--grey-500); background: var(--grey-800); transform: translateY(-2px); }
.next3 a { padding: 14px 16px; border: 1px solid var(--grey-700); border-radius: 12px; background: var(--grey-900); display: flex; flex-direction: column; gap: 8px; }
.next3 small { font-size: 12px; line-height: 18px; color: var(--grey-400); display: inline-flex; gap: 6px; align-items: center; }
.next3 small svg.ic { width: 13px; height: 13px; }
.next3 strong, .pn strong { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--grey-100); transition: color var(--t1); }
.next3 a:hover strong, .pn a:hover strong { color: var(--accent-400); }
/* «Did this answer your question?» (solo con `feedbackApi`; sin JavaScript sigue `hidden`) */
.fb { margin-top: 48px; padding: 16px 20px; display: block; border: 1px solid var(--grey-700); border-radius: 12px; background: var(--grey-900); font-weight: 500; color: var(--grey-100); }
.fb-q { display: flex; align-items: center; gap: 10px; }
.fb .btn:first-of-type, .fb-q .btn:first-of-type { margin-left: auto; }
.fb-no, .fb-ok { animation: kh-entra 220ms var(--ease) both; }
.fb-no > span { display: block; }
.fb-ops { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-ops .chip { font-size: 13px; }
.fb textarea { margin-top: 12px; width: 100%; min-height: 72px; resize: vertical; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--grey-600); background: var(--grey-1000);
  color: var(--grey-100); font: 400 15px/23px var(--font-family-body); letter-spacing: 0; transition: border-color var(--t1), box-shadow var(--t2); }
.fb textarea:focus { border-color: var(--accent-500); box-shadow: 0 0 0 4px var(--kh-acento-14); }
.fb-env { margin-top: 12px; display: flex; align-items: center; gap: 14px; }
.fb-ok { display: flex; align-items: center; gap: 10px; }
.fb-ok svg.ic { color: var(--success-300); }
.fb-ok:focus { outline: none; }
.fb-error { margin: 10px 0 0; font-size: 13px; line-height: 19px; font-weight: 400; color: var(--danger-300); }
.fb .btn:disabled, .fb .chip:disabled { opacity: 0.6; cursor: default; }
.lnk { color: var(--grey-300); font-size: 14px; text-decoration: underline; text-decoration-color: var(--grey-600); text-underline-offset: 3px; transition: text-decoration-color var(--t1); }
.lnk:hover { color: var(--grey-100); }
.pn { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pn a { padding: 14px 16px; border: 1px solid var(--grey-800); border-radius: 12px; }
.pn a:last-child { text-align: right; }
.pn small { display: block; font-size: 12px; line-height: 18px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-400); }
.toc { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow: auto; scrollbar-width: none; padding: 36px 0; font-size: 13px; line-height: 19px; }
.toc h2 { font-size: 11px; line-height: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-400); font-weight: 600; margin-bottom: 10px; }
.toc a { display: block; padding: 5px 12px; border-left: 1px solid var(--grey-700); color: var(--grey-300); transition: color var(--t1), border-color var(--t1); }
.toc a:hover { color: var(--grey-100); }
.toc a.on { border-left: 2px solid var(--accent-500); padding-left: 11px; color: var(--grey-100); font-weight: 500; }
.toc a.toc-vid { margin-top: 20px; padding: 12px; border: 1px solid var(--grey-700); border-radius: 10px; background: var(--grey-900); display: flex; gap: 10px; align-items: center; color: var(--grey-200);
  transition: border-color var(--t1), background var(--t1); }
.toc a.toc-vid:hover { border-color: var(--grey-500); background: var(--grey-800); }
.toc-vid b { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent-500); display: grid; place-items: center; }
.toc-vid b::after { content: ""; border-left: 9px solid var(--grey-1000); border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; margin-left: 3px; }
.m-bar { display: none; }
.m-bar a { display: inline-flex; align-items: center; gap: 8px; }
.m-indice { margin-left: auto; }
.m-indice summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; font-size: 13px; font-weight: 400; color: var(--grey-300); cursor: pointer; }
.m-indice summary::-webkit-details-marker { display: none; }
.m-indice summary svg.ic { color: var(--grey-400); transform: rotate(90deg); width: 14px; height: 14px; transition: transform var(--t2) var(--ease); }
.m-indice[open] summary svg.ic { transform: rotate(-90deg); }
.m-toc { position: absolute; left: 0; right: 0; top: 100%; background: var(--grey-900); border-bottom: 1px solid var(--grey-700); padding: 6px 16px 12px; box-shadow: 0 24px 40px -16px var(--kh-negro-90); animation: baja 160ms var(--ease) both; }
.m-toc a { display: block; padding: 10px 12px; border-left: 1px solid var(--grey-700); font-size: 14px; line-height: 21px; font-weight: 400; color: var(--grey-200); }
.m-toc a.on { border-left: 2px solid var(--accent-500); padding-left: 11px; color: var(--grey-100); font-weight: 500; }

/* ---------- páginas sueltas y pie ---------- */
.wrap { max-width: 1208px; margin: 0 auto; padding: 0 24px; }
.pag { padding-top: 32px; }
.pag h1 { margin-top: 14px; font-size: 36px; line-height: 44px; letter-spacing: -0.02em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-500); }
.lede { margin: 12px 0 0; font-size: 18px; line-height: 29px; color: var(--grey-200); }
body:has(> .no-esta) { min-height: 100dvh; display: flex; flex-direction: column; }
.pag.no-esta { flex: 1 0 auto; width: 100%; text-align: center; padding-top: 96px; }
.no-esta .lede { max-width: 480px; margin: 12px auto 0; }
.no-esta .accion { margin: 24px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.foot { margin-top: 64px; border-top: 1px solid var(--grey-800); background: var(--grey-900); }
.foot-in { max-width: 1208px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; gap: 24px; font-size: 13px; color: var(--grey-400); }
.foot-in img { height: 20px; width: auto; }
.foot-in nav { margin-left: auto; display: flex; gap: 22px; color: var(--grey-300); }
.foot-in nav a { transition: color var(--t1); }
.foot-in nav a:hover { color: var(--grey-100); }

/* ---------- cambio de página: View Transitions entre documentos (sale 110 ms, entra 240 ms subiendo 8 px) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: kh-sale 110ms ease-out both; }
::view-transition-new(root) { animation: kh-entra 240ms var(--ease) 110ms both; }
::view-transition-group(kh-cabecera), ::view-transition-new(kh-cabecera) { animation: none; }
::view-transition-old(kh-cabecera) { display: none; }
@keyframes kh-sale { to { opacity: 0; } }
@keyframes kh-entra { from { opacity: 0; transform: translateY(8px); } }

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  .top { height: 56px; }
  .top-in { padding: 0 16px; }
  .top-search, .top-nav { display: none; }
  .top-icons { display: flex; }
  .brand span { display: none; }
  .wrap { padding: 0 16px; }
  .pag { padding-top: 20px; }
  .pag h1 { font-size: 28px; line-height: 36px; }
  .lede { font-size: 17px; line-height: 27px; }
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 32px; line-height: 40px; }
  .hero-search { height: 50px; margin-top: 20px; }
  .hero-search kbd { display: none; }
  .chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .hero:has(.hero-search:focus-within) .chips { opacity: 1; visibility: visible; }
  .chip { white-space: nowrap; }
  .sec { padding: 20px 0; }
  .sec-head { flex-wrap: wrap; gap: 4px 12px; }
  .sec-head h2 { font-size: 20px; }
  .start { grid-template-columns: 1fr; }
  /* a una columna todo va en proporción al ancho, así el encuadre es el mismo en cualquier móvil o tableta: el 59 % del ancho
     y el 51 % del alto de la imagen (el resumen entero y el título del gráfico, sin el botón Day · Week · Month ni la leyenda a medias) */
  .start-media { min-height: 0; aspect-ratio: 15 / 8; }
  .start-media .shot { left: 5%; top: 10%; width: 160%; }
  .start-body { padding: 20px; }
  .cats { grid-template-columns: 1fr; gap: 10px; }
  .cat-media, .cat ul, .cat-desc, .largo2 { display: none; }
  .cats .cat:hover { transform: none; box-shadow: none; }
  .cat:hover .cat-title { color: var(--grey-100); }
  .cat:active { background: var(--grey-800); }
  .cat-body { flex-direction: row; align-items: center; padding: 14px 16px; }
  .cat-title { font-size: 16px; }
  .cat-more { margin: 0 0 0 auto; color: var(--grey-300); font-weight: 400; white-space: nowrap; }
  .vids { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vids-3 { gap: 16px 12px; }
  .help { flex-direction: column; align-items: flex-start; padding: 20px; gap: 12px; }
  .help .btn { margin-left: 0; }
  .luz-pie { flex-wrap: wrap; }
  .luz-pie .btn { margin-left: 0; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 16px; }
  .foot-in nav { margin-left: 0; }
  .doc { display: block; padding: 0 16px; }
  .side { display: none; }
  .crumbs { margin-top: 18px; flex-wrap: wrap; }
  .cat-page { padding-top: 20px; }
  .cat-page h1 { font-size: 28px; line-height: 36px; }
  .cat-page .crumbs { margin-top: 0; }
  .cat-head { gap: 14px; }
  .cat-ico { width: 44px; height: 44px; border-radius: 12px; }
  .row { gap: 12px; padding: 14px 12px; }
  .row-ico { width: 36px; height: 36px; }
  .row-meta .badge, .row > svg.ic, .filtros { display: none; }
  .toc, .meta .btn, .video .play em { display: none; }
  .m-bar { display: flex; position: sticky; top: 56px; z-index: 20; margin: 0 -16px; padding: 0 16px; height: 44px; align-items: center; gap: 8px;
    background: var(--grey-900); border-bottom: 1px solid var(--grey-800); font-size: 14px; font-weight: 500; color: var(--grey-100); }
  .m-bar > a svg.ic { width: 16px; height: 16px; color: var(--accent-500); }
  .guia { padding-top: 0; }
  .guia > h1 { font-size: 28px; line-height: 36px; }
  .guia > h2.sigue { margin-top: 36px; font-size: 21px; line-height: 28px; scroll-margin-top: 112px; }
  .video { scroll-margin-top: 112px; }
  .next3 { grid-template-columns: 1fr; }
  .fb, .fb-q { flex-wrap: wrap; }
  .fb .btn:first-of-type, .fb-q .btn:first-of-type { margin-left: 0; }
  .fb span, .fb-q span { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after, ::backdrop { animation-duration: 0s !important; transition-duration: 0s !important; }
}
