/* Open Lambda Core — componentes y conexiones (componentes.html).
   Se carga después de sitio.css y docs.css: usa el marco oscuro de la simulación (.sim) y la cabecera de Docs.
   Un color por tipo de señal, y nada más: el resto es el negro, el blanco y el ámbar de la telemetría. */

main.cxp {
  display: block; width: min(100% - 2 * var(--pad), var(--ancho)); margin-inline: auto;
  padding: clamp(104px, 11vw, 140px) 0 clamp(72px, 9vw, 128px);
}
.cxp__cabeza { border-bottom: 0; }
.cxp__cabeza .bajada { max-width: 62ch; }
.cxp__cabeza .rotulo a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--ed-tinta); text-underline-offset: 3px; }
.cxp__cabeza .rotulo a:hover { color: var(--ed-tinta); }
.nav__enlace[aria-current="true"] { background: var(--tarjeta); }

.cx {
  --pot: #FF6A45; --ana: #FFB300; --dig: #F4F2EE; --mot: #B68CFF; --enc: #3FD97B; --bus: #5AA2FF;
  --raya: #242932; --fondo: #0F1318;
}
.cx__cuerpo, .cx__franja { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(330px, 1fr); }
.cx__cuerpo { min-height: 724px; }

/* ───────── La escena: el robot desde arriba ───────── */
.cx__escena {
  position: relative; overflow: hidden; container-type: inline-size; user-select: none; display: grid; align-items: center;
  background: radial-gradient(110% 90% at 50% 0%, #1B2028 0%, #0B0E12 72%);
}
.cx__lienzo { position: relative; aspect-ratio: 2080 / 1872; }
.cx__img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .45s var(--suave), filter .35s var(--suave); }
.cx__img--base { filter: drop-shadow(0 2.4cqw 3.2cqw rgba(0, 0, 0, .5)); }
.cx--rx .cx__img--escudo { opacity: .13; }
/* con una pieza elegida, el robot se apaga un poco y los cables quedan adelante */
.cx--foco .cx__img--base { filter: drop-shadow(0 2.4cqw 3.2cqw rgba(0, 0, 0, .5)) brightness(.66) saturate(.85); }
.cx--foco .cx__img--escudo { filter: brightness(.66) saturate(.85); }

/* la pieza elegida, las que trabajan con ella y la que está bajo el cursor: la misma foto, recortada a su silueta */
.cx__luz { position: absolute; inset: 0; display: none; pointer-events: none; }
.cx__luz.ver { display: block; }
.cx__luz img { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.cx__luz--principal { filter: drop-shadow(0 0 1.5px var(--telemetria)) drop-shadow(0 0 9px rgba(255, 179, 0, .5)); }
.cx__luz--sobre { filter: brightness(1.14) drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 7px rgba(255, 255, 255, .4)); }

.cx__cables, .cx__puntos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cx__cables { overflow: visible; }
.cx__cable { opacity: 0; transition: opacity .3s var(--suave); color: var(--c); }
.cx__cable.ver { opacity: 1; }
.cx__cable--pot, .cx__rotulo--pot, .cx__color--pot, .cx__gpio--pot, .cx__tipo[data-tipo="pot"] { --c: var(--pot); }
.cx__cable--ana, .cx__rotulo--ana, .cx__color--ana, .cx__gpio--ana, .cx__tipo[data-tipo="ana"] { --c: var(--ana); }
.cx__cable--dig, .cx__rotulo--dig, .cx__color--dig, .cx__gpio--dig, .cx__tipo[data-tipo="dig"] { --c: var(--dig); }
.cx__cable--mot, .cx__rotulo--mot, .cx__color--mot, .cx__gpio--mot, .cx__tipo[data-tipo="mot"] { --c: var(--mot); }
.cx__cable--enc, .cx__rotulo--enc, .cx__color--enc, .cx__gpio--enc, .cx__tipo[data-tipo="enc"] { --c: var(--enc); }
.cx__cable--bus, .cx__rotulo--bus, .cx__color--bus, .cx__gpio--bus, .cx__tipo[data-tipo="bus"] { --c: var(--bus); }
.cx__cable path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.cx__funda { stroke: #0B0E12; stroke-width: 5px; opacity: .62; }
.cx__hilo { stroke: currentColor; stroke-width: 2px; }
.cx__flujo { stroke: #0B0E12; stroke-width: 2px; stroke-dasharray: 2 14; opacity: .55; }
/* cada red es una pista: al pasar por ella se queda sola y dice de qué pin a qué pin va */
.cx__toque { stroke: transparent; stroke-width: 11px; }
.cx__cable.ver .cx__toque { pointer-events: stroke; }
.cx__red { transition: opacity .15s var(--suave); }
.cx--realce .cx__cable.ver .cx__red:not(.realce) { opacity: .22; }
.cx--realce .cx__cable.ver .cx__funda { opacity: .2; }
.cx__red.realce .cx__hilo { stroke-width: 3px; }
.cx__cable.ver .cx__flujo { animation: cx-flujo 1s linear infinite; }
.cx__cable--bus.ver .cx__flujo { animation-duration: 1.6s; animation-direction: alternate; animation-timing-function: ease-in-out; }
@keyframes cx-flujo { to { stroke-dashoffset: -16; } }
.cx__cabo { fill: currentColor; stroke: #0B0E12; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.cx__nudo { fill: currentColor; }
.cx__pin { fill: #fff; stroke: currentColor; stroke-width: 2px; vector-effect: non-scaling-stroke; }
/* lo que va por la placa que no se está mirando: punteado, como la línea oculta de un plano */
.cx:not(.cx--rx) .cx__cable[data-capa="b"] .cx__hilo, .cx--rx .cx__cable[data-capa="e"] .cx__hilo { stroke-dasharray: .1 5; }
.cx:not(.cx--rx) .cx__cable[data-capa="b"] .cx__flujo, .cx--rx .cx__cable[data-capa="e"] .cx__flujo { display: none; }
.cx:not(.cx--rx) .cx__cable[data-capa="b"] .cx__funda, .cx--rx .cx__cable[data-capa="e"] .cx__funda { opacity: .5; }
.cx--muchos .cx__hilo, .cx--muchos .cx__flujo { stroke-width: 1.5px; }
.cx--muchos .cx__funda { stroke-width: 3.6px; }
.cx--muchos .cx__red.realce .cx__hilo { stroke-width: 2.6px; }

/* el nombre de la pieza elegida, sobre ella; y qué lleva cada cable, sobre el cable */
.cx__nombre, .cx__rotulo, .cx__etiqueta {
  position: absolute; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s var(--suave);
  font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .62em .75em; border-radius: 4px; background: rgba(13, 16, 20, .94);
}
.cx__nombre { translate: 12px -50%; z-index: 3; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }
.cx__nombre--izq { translate: calc(-100% - 12px) -50%; }
.cx__nombre--abajo { translate: -50% 16px; }
.cx__rotulo { translate: -50% -50%; color: var(--c); font-size: 9.5px; letter-spacing: .08em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.cx__nombre.ver, .cx__rotulo.ver, .cx__etiqueta.ver { opacity: 1; }
.cx--realce .cx__rotulo.ver, .cx--realce .cx__nombre.ver { opacity: .25; }
/* la que sigue al cursor: el nombre de la pieza, o de qué pin a qué pin va una pista */
.cx__etiqueta { z-index: 5; left: 0; top: 0; text-transform: none; letter-spacing: .02em; font-size: 11.5px; color: rgba(255, 255, 255, .86); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 6px 18px rgba(0, 0, 0, .45); transition: opacity .12s var(--suave); }
.cx__etiqueta b { font-weight: 500; color: var(--telemetria); }

.cx__capa {
  position: absolute; right: clamp(12px, 1.8vw, 22px); top: clamp(10px, 1.6vw, 16px);
  display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: background-color .14s var(--suave), color .14s var(--suave), box-shadow .14s var(--suave);
}
.cx__capa::before { content: ""; width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px currentColor; background: linear-gradient(currentColor, currentColor) 50% 100% / 100% 0% no-repeat; transition: background-size .2s var(--suave); }
.cx__capa:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); color: #fff; }
.cx__capa[aria-pressed="true"] { background: #fff; color: var(--negro); box-shadow: none; }
.cx__capa[aria-pressed="true"]::before { background-size: 100% 100%; }

.cx__clave {
  position: absolute; left: clamp(12px, 1.8vw, 22px); bottom: clamp(10px, 1.6vw, 16px); display: flex; gap: 18px; pointer-events: none;
  font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); opacity: 0; transition: opacity .3s var(--suave);
}
.cx--foco .cx__clave { opacity: 1; }
.cx__clave span { display: flex; align-items: center; gap: 8px; }
.cx__clave i { width: 22px; border-top: 2.4px solid rgba(255, 255, 255, .8); }
.cx__clave i.otra { border-top-style: dotted; }

/* ───────── El panel ───────── */
.cx__lado { position: relative; background: var(--fondo); border-left: 1px solid var(--raya); min-width: 0; }
.cx__panel {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 26px 28px;
  display: grid; gap: 14px; align-content: start; scrollbar-width: thin; scrollbar-color: #343A42 transparent;
  mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
}
.cx__panel .rotulo { color: rgba(255, 255, 255, .5); font-size: 10.5px; line-height: 1.5; }
.cx__panel h2 { font: italic 900 clamp(25px, 2.3vw, 33px)/1.04 var(--sans); letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.cx__panel h3 { margin-top: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.cx__modelo { margin-top: -6px; font: 500 12.5px/1.35 var(--mono); letter-spacing: .04em; color: var(--telemetria); }
.cx__texto { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .84); text-wrap: pretty; }
.cx__volver { justify-self: start; display: flex; align-items: center; gap: 8px; height: 26px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .58); transition: color .14s var(--suave); }
.cx__volver::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; rotate: 45deg; }
.cx__volver:hover { color: #fff; }
.cx__tabla { width: 100%; border-collapse: collapse; font: 400 12.5px/1.45 var(--mono); }
.cx__tabla th, .cx__tabla td { padding: 8px 0; border-top: 1px solid var(--raya); vertical-align: top; text-align: left; }
.cx__tabla tr:last-child > * { border-bottom: 1px solid var(--raya); }
.cx__tabla th { padding-right: 14px; font-weight: 500; color: #fff; white-space: nowrap; }
.cx__tabla td { color: rgba(255, 255, 255, .68); }
.cx__color { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--c, #5C6470); }
.cx__api { display: flex; flex-wrap: wrap; gap: 6px; }
.cx__api code { padding: 6px 9px; border-radius: 4px; background: #1A1F27; font: 500 12px/1 var(--mono); color: #E8EAEE; }
.cx__nota { padding: 12px 14px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--raya); font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .7); text-wrap: pretty; }

/* la galería: cada pieza, sola */
.cx__galeria { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cx__mini {
  display: grid; align-content: start; gap: 3px; padding: 5px 4px 8px; border-radius: 8px; text-align: center; min-width: 0;
  background: radial-gradient(120% 80% at 50% 0%, #212731 0%, #13171D 72%); box-shadow: inset 0 0 0 1px var(--raya);
  transition: box-shadow .14s var(--suave), translate .14s var(--suave);
}
.cx__mini img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.cx__mini span { font: 500 11.5px/1.2 var(--sans); color: rgba(255, 255, 255, .74); text-wrap: balance; transition: color .14s var(--suave); }
.cx__mini:hover, .cx__mini:focus-visible { box-shadow: inset 0 0 0 1px var(--telemetria); translate: 0 -1px; }
.cx__mini:hover span, .cx__mini:focus-visible span { color: #fff; }
.cx__foto {
  margin: 0; display: grid; justify-items: center; gap: 2px; padding: 4px 14px 12px; border-radius: 10px;
  background: radial-gradient(110% 80% at 50% 0%, #232A34 0%, #12161C 74%); box-shadow: inset 0 0 0 1px var(--raya);
}
.cx__foto img { width: min(100%, 236px); height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.cx__foto figcaption { font: 400 11px/1.45 var(--mono); color: rgba(255, 255, 255, .52); text-align: center; text-wrap: balance; }

.cx__recorridos, .cx__pasos { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--raya); }
.cx__recorridos button, .cx__pasos button {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 6px; width: 100%; padding: 9px 0; text-align: left; border-top: 1px solid var(--raya);
}
.cx__recorridos i, .cx__pasos i { grid-row: span 2; font: 500 11px/1.8 var(--mono); font-style: normal; letter-spacing: .08em; color: var(--telemetria); }
.cx__recorridos b, .cx__pasos b { font: 600 15px/1.3 var(--sans); color: rgba(255, 255, 255, .9); transition: color .14s var(--suave); }
.cx__recorridos button { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; }
.cx__recorridos i { flex: none; width: 20px; }
.cx__recorridos b { flex: none; }
.cx__recorridos small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .5); }
.cx__recorridos button[aria-pressed="true"] b { color: var(--telemetria); }
.cx__recorridos button:hover b, .cx__pasos button:hover b { color: var(--telemetria); }
.cx__pasos li:not(.actual) b { color: rgba(255, 255, 255, .55); font-weight: 500; }
.cx__pasos li:not(.actual):not(.hecho) i { color: rgba(255, 255, 255, .35); }
.cx__pasos li.actual b { color: #fff; }
.cx__pasos p { padding: 0 0 14px 36px; font-size: 14.5px; line-height: 1.55; color: rgba(255, 255, 255, .8); text-wrap: pretty; }
.cx__nav { display: flex; gap: 8px; margin-top: 4px; }
.cx__btn { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); color: #fff; }
.cx__btn:hover { background: rgba(255, 255, 255, .1); }
.cx__btn:disabled { opacity: .3; pointer-events: none; }

/* ───────── La franja de abajo: los pines del módulo y los tipos de señal ───────── */
.cx__franja { gap: 1px; background: var(--raya); border-top: 1px solid var(--raya); }
.cx__franja .sim__celda { align-content: start; }
.cx__modulo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.cx__pines { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.cx__gpio {
  position: relative; height: 40px; border-radius: 5px; display: grid; align-content: center; justify-items: center; gap: 4px; min-width: 0;
  background: #161B22; color: #fff; box-shadow: inset 0 0 0 1px #2A303A; transition: background-color .14s var(--suave), color .14s var(--suave), box-shadow .14s var(--suave);
}
.cx__gpio:nth-child(n+17):nth-child(-n+24) { margin-top: 10px; }
.cx__gpio b { font: 500 13px/1 var(--mono); }
.cx__gpio small { max-width: 100%; overflow: hidden; font: 400 8.5px/1 var(--mono); letter-spacing: .03em; text-transform: uppercase; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.cx__gpio[class*="cx__gpio--"]:not(.cx__gpio--libre)::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 2px 2px 0; background: var(--c); }
.cx__gpio--libre { color: rgba(255, 255, 255, .4); box-shadow: inset 0 0 0 1px #20252D; background: none; cursor: default; }
.cx__gpio--libre small { color: rgba(255, 255, 255, .28); }
.cx__gpio:not(.cx__gpio--libre):hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.cx__gpio.activo { background: var(--c); color: var(--negro); box-shadow: none; }
.cx__gpio.activo small { color: rgba(11, 14, 18, .72); }
.cx__gpio.activo::before { display: none; }
.cx__usb { writing-mode: vertical-rl; display: grid; place-items: center; width: 26px; border-radius: 5px; box-shadow: inset 0 0 0 1px #2A303A; font: 500 9.5px/1 var(--mono); letter-spacing: .2em; color: rgba(255, 255, 255, .5); }
.cx__lectura { min-height: 2.9em; font: 400 12px/1.45 var(--mono); color: rgba(255, 255, 255, .58); text-wrap: pretty; }
.cx__lectura b { font-weight: 500; color: var(--telemetria); }
.cx__lista-tipos { display: flex; flex-wrap: wrap; gap: 6px; }
.cx__franja .rotulo + .cx__lista-tipos, .cx__franja .cx__recorridos + .rotulo { margin-top: 2px; }
.cx__tipo {
  display: flex; align-items: center; height: 32px; padding: 0 13px 0 11px; border-radius: 999px;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: background-color .14s var(--suave), color .14s var(--suave), box-shadow .14s var(--suave);
}
.cx__tipo:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); color: #fff; }
.cx__tipo[aria-pressed="true"] { background: #fff; color: var(--negro); box-shadow: none; }
.cx__tipo[aria-pressed="true"] .cx__color { box-shadow: 0 0 0 1px rgba(11, 14, 18, .5); }

/* ───────── Bajo el explorador ───────── */
.cxp__notas { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.cxp__notas h2 { font: 600 19px/1.25 var(--sans); }
.cxp__notas p { margin-top: 8px; font-size: 15.5px; line-height: 1.55; color: var(--acero); text-wrap: pretty; }
.cxp__notas a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--ed-tinta); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cxp__notas a:hover { color: var(--ed-tinta); }

@media (max-width: 940px) {
  .cx__cuerpo, .cx__franja { grid-template-columns: minmax(0, 1fr); }
  .cx__cuerpo { min-height: 0; }
  .cx__lado { border-left: 0; border-top: 1px solid var(--raya); }
  .cx__panel { position: static; overflow: visible; padding: 22px 20px 26px; mask-image: none; }
  .cxp__notas { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 560px) {
  .cx__rotulo { display: none; }
  .cx__nombre { font-size: 9.5px; }
}
@media (max-width: 640px) {
  .cx__escena { padding: 46px 0 30px; }
  .cx__capa { font-size: 10px; height: 30px; }
  .cx__gpio { height: 36px; }
  .cx__gpio b { font-size: 11.5px; }
  .cx__gpio small { font-size: 7px; letter-spacing: 0; }
  .cx__hilo, .cx__flujo { stroke-width: 1.5px; }
  .cx__funda { stroke-width: 3.4px; }
  .cx__galeria { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cx__mini span { font-size: 11px; }
  .cx__recorridos small { display: none; }
}

/* ───────── En la ficha: el paso a «Cómo funciona» ───────── */
.cx__mas {
  justify-self: start; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px 0 13px; border-radius: 999px;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--telemetria);
  box-shadow: inset 0 0 0 1px rgba(255, 179, 0, .45); transition: background-color .14s var(--suave), color .14s var(--suave);
}
.cx__mas::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: 45deg; }
.cx__mas:hover { background: var(--telemetria); color: var(--negro); }
.cxp__cabeza .bajada a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--ed-tinta); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cxp__cabeza .bajada a:hover { color: var(--ed-tinta); }

/* ───────── Cómo funciona: cada pieza explicada desde cero (componentes-explica.js) ─────────
   El texto va sobre el papel, como en Docs; la prueba, en el marco oscuro de la simulación. */
.cxf { margin-top: clamp(56px, 7vw, 104px); }
.cxf__cabeza { display: grid; gap: 14px; }
.cxf__cabeza .rotulo, .cxf__cuerpo h4, .cxf__compra h4 { color: var(--ed-tinta); }
.cxf__cabeza h2 { font: italic 900 clamp(28px, 3.1vw, 44px)/1.04 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.cxf__cabeza .bajada { max-width: 66ch; }
.cxf a:not([target]) { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--ed-tinta); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cxf a:not([target]):hover { color: var(--ed-tinta); }
.cxf code { padding: 2px 6px; border-radius: 4px; background: var(--tarjeta); font: 500 .86em/1.4 var(--mono); color: var(--tinta); white-space: nowrap; }

.cxf__piezas { position: relative; margin-top: clamp(22px, 2.6vw, 32px); display: flex; flex-wrap: wrap; gap: 6px; }
.cxf__chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grafito);
  box-shadow: inset 0 0 0 1px var(--linea); transition: background-color .14s var(--suave), color .14s var(--suave), box-shadow .14s var(--suave);
}
.cxf__chip:hover { box-shadow: inset 0 0 0 1px var(--tinta); color: var(--tinta); }
.cxf__chip[aria-pressed="true"] { background: var(--negro); color: #fff; box-shadow: none; }

.cxf__leccion {
  margin-top: clamp(22px, 2.6vw, 32px); padding-top: clamp(26px, 3vw, 40px); border-top: 1px solid var(--linea);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .94fr); column-gap: clamp(28px, 4.4vw, 64px); align-items: start;
  grid-template-areas: "cab demo" "cuerpo demo" "cuerpo compra" "nav nav"; grid-template-rows: auto auto 1fr auto;
}
.cxf__cab { grid-area: cab; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; }
.cxf__cab img { width: 112px; height: 84px; padding: 5px; object-fit: contain; border-radius: 12px; background: radial-gradient(120% 80% at 50% 0%, #212731 0%, #13171D 72%); }
.cxf__cab .rotulo { font-size: 11px; line-height: 1.5; }
.cxf__cab h3 { margin-top: 6px; font: italic 900 clamp(30px, 3.2vw, 44px)/1 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.cxf__frase { margin-top: 10px; font: 500 clamp(17px, 1.5vw, 20px)/1.35 var(--sans); color: var(--tinta); text-wrap: balance; }

.cxf__cuerpo { grid-area: cuerpo; min-width: 0; }
.cxf__cuerpo h4, .cxf__compra h4 { margin-top: 30px; font: 500 11.5px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.cxf__cuerpo > * { max-width: 640px; }
.cxf__cuerpo p { margin-top: 10px; font-size: 16.5px; line-height: 1.62; color: var(--grafito); text-wrap: pretty; }
.cxf__pasos { margin-top: 12px; padding: 0; list-style: none; display: grid; counter-reset: paso; }
.cxf__pasos li { counter-increment: paso; display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 12px 0; border-top: 1px solid var(--linea); }
.cxf__pasos li:last-child { border-bottom: 1px solid var(--linea); }
.cxf__pasos li::before { content: counter(paso, decimal-leading-zero); grid-row: span 2; font: 500 12px/1.9 var(--mono); color: var(--ed-tinta); }
.cxf__pasos b { font: 600 16px/1.4 var(--sans); color: var(--tinta); }
.cxf__pasos span { font-size: 15.5px; line-height: 1.55; color: var(--grafito); text-wrap: pretty; }
.cxf__ejemplo { margin-top: 26px; padding: 18px 20px 20px; border-radius: 14px; background: var(--tarjeta); }
.cxf__ejemplo h4 { margin-top: 0; }
.cxf__ejemplo p { font-size: 16px; color: var(--tinta); }
.cxf__ejemplo code { background: #fff; }
.cxf__cuerpo .cxf__ojo { margin-top: 14px; padding: 12px 16px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--linea); font-size: 15px; line-height: 1.55; }
.cxf__ojo b { color: var(--ed-tinta); }
.cxf__palabras { margin-top: 12px; display: grid; }
.cxf__palabras div { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr); gap: 2px 18px; padding: 10px 0; border-top: 1px solid var(--linea); }
.cxf__palabras div:last-child { border-bottom: 1px solid var(--linea); }
.cxf__palabras dt { font: 600 15px/1.5 var(--sans); color: var(--tinta); }
.cxf__palabras dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--grafito); text-wrap: pretty; }

/* dónde comprarla */
.cxf__compra { grid-area: compra; margin-top: 20px; padding: 0 22px 20px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--linea); }
.cxf__compra h4 { margin-top: 22px; }
.cxf__compra ul { margin-top: 4px; padding: 0; list-style: none; display: grid; }
.cxf__compra li { padding: 14px 0; border-bottom: 1px solid var(--linea); }
.cxf__compra li a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.cxf__compra li a b { font: 600 16.5px/1.3 var(--sans); color: var(--tinta); transition: color .14s var(--suave); }
.cxf__compra li a span {
  display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta);
  text-decoration: underline; text-decoration-color: var(--ed-tinta); text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.cxf__compra li a svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cxf__compra li a:hover b, .cxf__compra li a:hover span { color: var(--ed-tinta); }
.cxf__compra li p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--grafito); text-wrap: pretty; }
.cxf__compra li p i { font-style: normal; font-weight: 600; color: var(--tinta); }
.cxf__letra { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--acero); text-wrap: pretty; }
.cxf__sin { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--grafito); text-wrap: pretty; }

.cxf__nav { grid-area: nav; margin-top: clamp(32px, 4vw, 52px); padding-top: 22px; border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.cxf__nav .btn { gap: 10px; }
.cxf__nav .btn span { opacity: .55; }

/* la prueba */
.cxf__demo { grid-area: demo; border-radius: 18px; overflow: hidden; background: #0F1318; color: #fff; --raya: #242932; }
.cxf__demo--foto { display: grid; place-items: center; padding: 22px; background: radial-gradient(110% 80% at 50% 0%, #232A34 0%, #12161C 74%); }
.cxf__demo--foto img { width: min(100%, 380px); height: auto; }
.cxf__instr { display: grid; gap: 9px; padding: 18px 20px 16px; font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .86); text-wrap: pretty; }
.cxf__instr .rotulo { font-size: 10.5px; color: var(--telemetria); }
.cxf__tablero { padding: 16px; border-block: 1px solid var(--raya); background: radial-gradient(110% 90% at 50% 0%, #1B2028 0%, #0B0E12 72%); }
.cxf__svg { display: block; width: 100%; height: auto; overflow: visible; }
.cxf__datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 1px; background: var(--raya); border-bottom: 1px solid var(--raya); }
.cxf__dato { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 12px 16px 13px; background: #0F1318; }
.cxf__dato small { font: 500 10px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.cxf__dato b { font: 500 16.5px/1.25 var(--mono); color: var(--telemetria); font-variant-numeric: tabular-nums; }
.cxf__dato b i { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.cxf__dato b.alerta { color: var(--error); }
.cxf__dato code { padding: 0; background: none; font: inherit; color: inherit; }
.cxf__mandos { display: grid; gap: 14px; padding: 16px 20px 20px; }
.cxf__fila { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cxf__pie { font: 400 11.5px/1.45 var(--mono); color: rgba(255, 255, 255, .52); }
.cxf__desliza { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; }
.cxf__desliza span { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.cxf__desliza output { font: 500 12.5px/1.2 var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.cxf__desliza input { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: none; cursor: pointer; }
.cxf__desliza input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.cxf__desliza input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.cxf__desliza input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--telemetria); border: 4px solid #0F1318; box-shadow: 0 0 0 1.5px var(--telemetria); }
.cxf__desliza input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--telemetria); border: 4px solid #0F1318; box-shadow: 0 0 0 1.5px var(--telemetria); }
.cxf__desliza input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.cxf__bit { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 8px 0 13px; border-radius: 8px; color: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: box-shadow .14s var(--suave), color .14s var(--suave); }
.cxf__bit small { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; }
.cxf__bit b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: #1A1F27; font: 500 16px/1 var(--mono); transition: background-color .14s var(--suave), color .14s var(--suave); }
.cxf__bit:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.cxf__bit[aria-pressed="true"] { color: #fff; box-shadow: inset 0 0 0 1px var(--telemetria); }
.cxf__bit[aria-pressed="true"] b { background: var(--telemetria); color: var(--negro); }
.cxf__pulsa { user-select: none; touch-action: none; }
.cxf__pulsa:active { background: var(--telemetria); }

/* las partes de los dibujos */
.cxf__svg .pista { fill: #050608; }
.cxf__svg .blanco, .cxf__svg .muro, .cxf__svg .tapa { fill: #F4F2EE; }
.cxf__svg .t { font: 500 10.5px var(--mono); letter-spacing: .04em; fill: rgba(255, 255, 255, .6); }
.cxf__svg .t.n { fill: #fff; }
.cxf__svg .t.s { font-size: 9.5px; fill: rgba(255, 255, 255, .8); }
.cxf__svg .tv { font: 500 14px var(--mono); fill: var(--telemetria); }
.cxf__svg .regla, .cxf__svg .aro { fill: none; stroke: rgba(255, 255, 255, .26); stroke-width: 1; }
.cxf__svg .hilo { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cxf__svg .hilo.on { stroke: var(--telemetria); }
.cxf__svg .hilo.e { stroke: #FF6A45; }
.cxf__svg .nodo { fill: #0F1318; stroke: rgba(255, 255, 255, .5); stroke-width: 1.4; }
.cxf__svg .nodo.on { fill: var(--telemetria); stroke: none; }
.cxf__svg .caja, .cxf__svg .motor, .cxf__svg .luz { fill: #161B22; stroke: rgba(255, 255, 255, .24); stroke-width: 1.2; }
.cxf__svg .luz.on { fill: rgba(255, 179, 0, .2); stroke: var(--telemetria); }
.cxf__svg .barra-f { fill: rgba(255, 255, 255, .09); }
.cxf__svg .barra { fill: #F4F2EE; }
.cxf__canal .hilo, .cxf__canal .t, .cxf__canal .barra { transition: stroke .14s var(--suave), fill .14s var(--suave); }
.cxf__canal.on .hilo { stroke: var(--telemetria); }
.cxf__canal.on .nodo { fill: var(--telemetria); stroke: none; }
.cxf__canal.on .barra, .cxf__canal.on .t { fill: var(--telemetria); }
.cxf__svg .sensor { fill: #1B2028; stroke: rgba(255, 255, 255, .62); stroke-width: 1.2; }
.cxf__svg .sensor.on { fill: var(--telemetria); stroke: #fff; }
.cxf__svg .silueta { fill: rgba(165, 107, 240, .2); stroke: #A56BF0; stroke-width: 1.4; stroke-linejoin: round; }
.cxf__svg .frente, .cxf__svg .flecha { fill: none; stroke: var(--telemetria); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cxf__svg .rueda, .cxf__svg .goma { fill: #2A3038; stroke: rgba(255, 255, 255, .45); stroke-width: 1.2; }
.cxf__svg .llanta { fill: #F4F2EE; }
.cxf__svg .aspa { fill: none; stroke: rgba(255, 255, 255, .72); stroke-width: 2.4; stroke-linecap: round; }
.cxf__svg .llanta + .aspa { stroke: #0B0E12; }
.cxf__svg .iman { fill: #FF6A45; }
.cxf__svg .estela { fill: none; stroke: var(--telemetria); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .1 7; }
.cxf__svg [data-g="puntos"] circle, .cxf__svg .pulso { fill: var(--telemetria); }
.cxf__svg .pulso { filter: drop-shadow(0 0 4px rgba(255, 179, 0, .8)); }
.cxf__svg .llave { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cxf__svg .llave.on { stroke: var(--telemetria); }
.cxf__svg .corriente { fill: none; stroke: var(--telemetria); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .1 11; animation: cxf-fluye 1.2s linear infinite; }
.cxf__svg .corriente.corto { stroke: #fff; stroke-dasharray: none; opacity: .5; animation: none; }
.cxf__svg .onda { fill: none; stroke: var(--telemetria); stroke-width: 2; stroke-linejoin: round; }
.cxf__svg .onda.b { stroke: #5AA2FF; }
.cxf__bloque.este .caja { stroke: var(--telemetria); stroke-width: 1.8; }
.cortado .cxf__svg .hilo.e { stroke: rgba(255, 255, 255, .2); }
.cortado .cxf__bloque:not([data-g="bateria"]) .tv { fill: rgba(255, 255, 255, .4); }
.cxf__ondas { opacity: .4; }
.suena .cxf__ondas { opacity: 1; animation: cxf-suena .16s linear infinite alternate; }
.suena .cxf__ondas .hilo { stroke: var(--telemetria); }
@keyframes cxf-fluye { to { stroke-dashoffset: -22.2; } }
@keyframes cxf-suena { to { translate: 3px 0; } }

@media (max-width: 940px) {
  .cxf__leccion { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cab" "demo" "cuerpo" "compra" "nav"; grid-template-rows: none; }
  .cxf__demo { margin-top: 24px; }
  .cxf__cuerpo > * { max-width: none; }
}
@media (max-width: 640px) {
  .cxf__piezas { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); scrollbar-width: none; }
  .cxf__piezas::-webkit-scrollbar { display: none; }
  .cxf__cab { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .cxf__cab img { width: 84px; height: 63px; }
  .cxf__palabras div { grid-template-columns: minmax(0, 1fr); }
  .cxf__datos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cxf__dato:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cxf__svg .t { font-size: 12px; }
  .cxf__svg .t.s { font-size: 10px; }
  .cxf__tablero { padding: 12px 10px; }
  .cxf__instr, .cxf__mandos { padding-inline: 16px; }
  .cxf__compra { padding-inline: 16px; }
  .cxf__nav .btn { flex: 1 1 100%; }
}
