/* Estilos compartidos por todas las paginas de EcoBot. Tema oscuro, verde del logo. */
:root {
  color-scheme: dark;
  --fondo: #070a07;
  --panel: #0f150f;
  --borde: #233123;
  --texto: #d5e2d3;
  --suave: #93a691;
  --titulo: #f3fff0;
  --verde: #8cff3b;
  --verde-fuerte: #b8ff5c;
  --sobre-verde: #08130a;
  accent-color: var(--verde);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }
/* textos en dos idiomas fuera de las secciones (menu y pie) */
html[lang="es"] span[lang="en"], html[lang="en"] span[lang="es"] { display: none; }

h1, h2, h3 { color: var(--titulo); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .35rem; }
p, li { text-wrap: pretty; }
a { color: var(--verde); text-underline-offset: .18em; }
a:hover { color: var(--verde-fuerte); }
:focus-visible { outline: 3px solid var(--verde-fuerte); outline-offset: 3px; }

code {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 6px;
  padding: .08em .4em;
  font: .92em ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--titulo);
}

.ancho { width: min(100% - clamp(2rem, 6vw, 8rem), 112rem); margin-inline: auto; }
.lectura { max-width: 68rem; }

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--verde);
  color: var(--sobre-verde);
  padding: .5rem 1rem;
  border-radius: 8px;
  z-index: 2;
}
.saltar:focus { top: 1rem; color: var(--sobre-verde); }

/* --- cabecera --- */
.cabecera { position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--borde); background: rgb(7 10 7 / .92); backdrop-filter: blur(10px); }
.fin { display: flex; align-items: center; gap: .6rem; }
@media (max-width: 40rem) { .cabecera { position: static; } }
.cabecera .ancho {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: .8rem;
}
.marca {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--titulo);
  text-decoration: none;
}
.menu { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.menu a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 8px;
  color: var(--texto);
  text-decoration: none;
}
.menu a:hover { background: var(--panel); color: var(--titulo); }
.menu a[aria-current="page"] { color: var(--verde); background: var(--panel); }

.marca img { display: block; height: 2.8rem; width: auto; }
.idiomas { display: flex; align-items: center; margin-right: .4rem; }
.idiomas button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--suave);
  font: inherit;
  font-size: .9rem;
  padding: .3rem .15rem .15rem;
  cursor: pointer;
}
.idiomas button + button { margin-left: 1.3rem; position: relative; }
.idiomas button + button::before { content: ""; position: absolute; left: -.75rem; top: 25%; height: 55%; width: 1px; background: var(--borde); }
.idiomas button:hover { color: var(--titulo); }
.idiomas button[aria-pressed="true"] { color: var(--verde); border-bottom-color: var(--verde); }

main { flex: 1; padding-block: 2.5rem 4rem; }
main.inicio { padding-block: 0; }

/* --- botones --- */
.boton {
  display: inline-block;
  border: 1px solid var(--verde);
  border-radius: 10px;
  padding: .65rem 1.15rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(var(--verde-fuerte), var(--verde));
  color: var(--sobre-verde);
  box-shadow: 0 3px 0 #4f9c1c;
}
.boton:hover { color: var(--sobre-verde); filter: brightness(1.08); }
.boton.secundario { background: var(--panel); border-color: var(--borde); color: var(--titulo); box-shadow: none; }
.boton.grande { padding: .85rem 1.6rem; }
.boton.chico { padding: .35rem .9rem; font-size: .9rem; }
.boton:disabled { opacity: .6; cursor: progress; }

/* --- portada por franjas --- */
.banda { padding-block: clamp(2.75rem, 7vw, 5rem); border-bottom: 1px solid var(--borde); scroll-margin-top: 4rem; }
.banda:last-child { border-bottom: 0; }
.alterna { background: #0b100b; }
.banda h2 { margin: 0 0 .4rem; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 800; }
.sub { margin: 0 0 1.75rem; color: var(--suave); max-width: 48rem; }
.panel { background: var(--panel); border: 1px solid var(--borde); border-radius: 16px; }

.portada { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 68rem) { .portada { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(2rem, 3vw, 4rem); } }
.portada h1 { font-size: clamp(2.3rem, 1rem + 2.8vw, 4.5rem); font-weight: 850; letter-spacing: -.02em; line-height: 1.05; }
.portada h1 em { font-style: normal; color: var(--verde); }
.chapa { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; color: var(--suave); font-size: .92rem; }
.chapa::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--verde); box-shadow: 0 0 10px var(--verde); }
.entradilla { font-size: clamp(1.15rem, .9rem + .6vw, 1.5rem); max-width: 42rem; }
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.nota { color: var(--suave); font-size: .88rem; }


.vacio { color: var(--suave); text-align: center; }

/* --- dos columnas: pasos, chat y preguntas --- */
.columnas { display: grid; gap: clamp(2rem, 5vw, 6rem); align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

.preguntas { padding: .25rem 1.25rem; }
.preguntas details { border-top: 1px solid var(--borde); }
.preguntas details:first-child { border-top: 0; }
.preguntas summary { padding: .9rem 0; font-weight: 700; color: var(--titulo); cursor: pointer; }
.preguntas details p { margin: 0 0 1rem; color: var(--suave); }




/* --- formulario --- */
label { display: block; margin: 1.1rem 0; font-weight: 600; }
select, textarea, input {
  display: block;
  width: 100%;
  margin-top: .4rem;
  padding: .65rem .75rem;
  background: var(--panel);
  color: var(--texto);
  border: 1px solid #4b624b;
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
}
textarea { resize: vertical; }
textarea:user-invalid { border-color: #ff8a7a; }
.trampa { position: absolute; left: -9999px; }

/* --- pie --- */
.pie { border-top: 1px solid var(--borde); color: var(--suave); font-size: .9rem; }
.columnas-pie { display: grid; gap: 1.5rem 2rem; padding-block: 2.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.columnas-pie > div:first-child { grid-column: span 1; max-width: 22rem; }
.pie h2 { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.pie a { display: block; width: fit-content; padding: .2rem 0; color: var(--texto); text-decoration: none; }
.pie a:hover { color: var(--verde); }
.pie .marca { margin: 0 0 .5rem; }

@media (max-width: 30rem) {
  .menu { gap: 0; }
  .menu a { padding: .4rem .45rem; font-size: .92rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .voz, .boton { transition: border-color .15s, filter .15s; }
}

/* --- maqueta animada de una llamada de Discord --- */
.discord { width: 100%; min-width: 0; margin: 0; container-type: inline-size; }
.ventana {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 22rem;
  height: clamp(26rem, calc(100dvh - 12rem), 36rem);
  overflow: hidden;
  border: 1px solid #3f4147;
  border-radius: 14px;
  background: #313338;
  color: #dbdee1;
  text-align: left;
  font-size: .92rem;
  line-height: 1.4;
  box-shadow: 0 30px 80px rgb(0 0 0 / .6), 0 0 90px rgb(140 255 59 / .1);
}
.ventana p, .ventana ul { margin: 0; }
.ventana ul { padding: 0; list-style: none; }
.ventana svg { width: 1.15rem; height: 1.15rem; flex: none; }
.av { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-weight: 700; font-size: .8rem; color: #fff; }
.a1 { background: #e67e22; } .a2 { background: #3498db; } .a3 { background: #9b59b6; }
.c-a1 { color: #f4a05a; } .c-a2 { color: #6cc1ff; } .c-a3 { color: #d29cf0; } .c-bot { color: var(--verde); }

.d-lateral { display: flex; flex-direction: column; background: #2b2d31; color: #949ba4; min-height: 0; }
.d-servidor, .d-titulo { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid #1f2023; color: #f2f3f5; font-weight: 700; }
.d-grupo { padding: 1rem 1rem .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.d-canal { display: flex; align-items: center; gap: .4rem; margin: 1px .5rem !important; padding: .3rem .55rem; border-radius: 6px; }
.d-canal.activo { background: #404249; color: #f2f3f5; }
.d-lateral ul { padding-left: 1.9rem; }
.d-lateral li { display: flex; align-items: center; gap: .5rem; padding: .25rem; }
.d-lateral li .av { width: 1.4rem; height: 1.4rem; font-size: .7rem; border: 2px solid transparent; }
.d-lateral li.activo { color: #f2f3f5; }
.d-lateral li.activo .av { border-color: #23a55a; }
.d-conectado { margin-top: auto !important; padding: .7rem 1rem; background: #232428; color: #23a55a; font-weight: 700; }
.d-conectado small { display: block; color: #949ba4; font-weight: 400; }

.d-llamada { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #000; }
.d-llamada .d-titulo { background: #000; border: 0; }
.mosaicos { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .6rem; padding: 0 .75rem !important; min-height: 0; }
.mosaico { position: relative; display: grid; place-items: center; border-radius: 10px; border: 3px solid transparent; transition: border-color .15s; }
.t-a1 { background: #5a3a22; } .t-a2 { background: #1f3f56; } .t-a3 { background: #432a52; } .t-bot { background: #14240f; }
.mosaico.activo { border-color: #23a55a; }
.av.grande { width: clamp(3rem, 7vw, 5.5rem); height: clamp(3rem, 7vw, 5.5rem); font-size: 2rem; }
.mosaico.activo .av { animation: latido .9s ease-in-out infinite; }
@keyframes latido { 50% { box-shadow: 0 0 0 .55rem rgb(35 165 90 / .35); } }
.etiqueta { position: absolute; left: .5rem; bottom: .5rem; padding: .1rem .55rem; border-radius: 6px; background: rgb(0 0 0 / .6); color: #fff; font-size: .82rem; font-weight: 600; }
.subtitulo { margin: .6rem .75rem 0 !important; padding: .5rem .8rem; border-radius: 8px; background: #1e1f22; color: #fff; text-align: center; }
.controles { display: flex; justify-content: center; gap: .75rem; padding: .85rem; }
.controles span { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: #2b2d31; color: #dbdee1; }
.controles .colgar { background: #da373c; color: #fff; }

.d-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #313338; }
.mensajes { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; overflow: hidden; padding-bottom: .5rem; }
.msg { display: flex; flex: none; gap: .7rem; padding: .45rem 1rem; }
.msg .av { width: 2.3rem; height: 2.3rem; font-size: 1rem; }
.msg > div { min-width: 0; }
.quien { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.quien time { color: #949ba4; font-size: .72rem; }
.app { padding: 0 .3rem; border-radius: 4px; background: #5865f2; color: #fff; font-size: .65rem; font-weight: 700; }
.escribir { margin: 0 .75rem .75rem !important; padding: .7rem .9rem; border-radius: 8px; background: #383a40; color: #949ba4; white-space: nowrap; overflow: hidden; }
.escribir.tecleando { color: #f2f3f5; }
.escribir.tecleando::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: text-bottom; background: #f2f3f5; }
.msg.nuevo { animation: entrar .3s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(.6rem); } }

@container (max-width: 66rem) {
  .ventana { grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); }
  .d-lateral { display: none; }
  .av.grande { width: 3.5rem; height: 3.5rem; font-size: 1.4rem; }
  .controles span { width: 2.6rem; height: 2.6rem; }
}
@container (max-width: 31rem) {
  .ventana { grid-template-columns: minmax(0, 1fr); height: auto; }
  .d-llamada { height: 21rem; }
  .d-chat { height: 19rem; }
}
@media (prefers-reduced-motion: reduce) { .msg.nuevo, .mosaico.activo .av { animation: none; } }

/* la portada no necesita tanto margen: la llamada debe verse entera */
@media (min-width: 68rem) { .banda:first-child { padding-block: clamp(1.25rem, 4vh, 4rem); } }

/* tamaño de la llamada de ejemplo en la portada: compacta */
.discord { max-width: 44rem; justify-self: center; font-size: .92rem; }
.discord .ventana { height: clamp(22rem, calc(100dvh - 16rem), 27rem); font-size: .85rem; }
.discord .av.grande { width: 3rem; height: 3rem; font-size: 1.2rem; }
.discord .controles { padding: .6rem; }
.discord .controles span { width: 2.3rem; height: 2.3rem; }
.discord .msg .av { width: 1.9rem; height: 1.9rem; font-size: .85rem; }
@media (min-width: 68rem) { .portada { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@container (max-width: 66rem) { .discord .ventana { grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); } }
@container (max-width: 31rem) { .discord .ventana { grid-template-columns: minmax(0, 1fr); height: auto; } }

/* aire entre la portada y la franja de datos */
.banda:first-child { padding-bottom: clamp(3rem, 11vh, 8rem); }
@media (min-width: 68rem) { .banda:first-child { padding-bottom: clamp(3rem, 11vh, 8rem); } }

/* aire entre el menu y la portada */
.banda:first-child { padding-top: clamp(2.5rem, 9vh, 6.5rem); }

/* portada mas holgada */
.banda:first-child { padding-top: clamp(3.5rem, 15vh, 11rem); padding-bottom: clamp(4rem, 17vh, 12rem); }

/* margenes laterales algo mayores en todo el sitio */
.ancho { width: min(100% - clamp(2rem, 12vw, 16rem), 96rem); }

/* en pantallas estrechas no hace falta tanto aire */
@media (max-width: 68rem) { .banda:first-child { padding-block: 2.5rem 3rem; } }

/* --- movimiento de la portada --- */
/* La entrada va en la figura y el flotado en la ventana, para que no se pisen.
   Quien tiene las animaciones desactivadas ve todo quieto. */
@media (prefers-reduced-motion: no-preference) {
  .titular > * { animation: subir .7s cubic-bezier(.2, .7, .2, 1) backwards; }
  .titular > :nth-child(2) { animation-delay: .1s; }
  .titular > :nth-child(3) { animation-delay: .2s; }
  .titular > :nth-child(4) { animation-delay: .3s; }
  .titular > :nth-child(5) { animation-delay: .4s; }
  .discord { animation: entrar-ventana 1s cubic-bezier(.2, .7, .2, 1) .25s backwards; }
  .discord .ventana { animation: levitar 6s ease-in-out 1.25s infinite; }
}
@keyframes subir { from { opacity: 0; transform: translateY(1.5rem); } }
@keyframes entrar-ventana { from { opacity: 0; transform: translateX(4rem) scale(.94); } }
@keyframes levitar { 50% { transform: translateY(-14px); } }

/* --- letra del menu superior: Chakra Petch (licencia OFL, en fuentes/) --- */
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("fuentes/chakra-petch-600.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("fuentes/chakra-petch-700.woff2") format("woff2"); }
.cabecera .menu a, .cabecera .idiomas button, .boton {
  font-family: "Chakra Petch", system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.boton, .cabecera .idiomas button[aria-pressed="true"] { font-weight: 700; }


/* --- datos bajo los botones de la portada --- */
.datos { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--borde); list-style: none; }
.datos strong { display: block; color: #fff; font-size: 1.8rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.datos span { color: var(--suave); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) { .titular > :nth-child(6) { animation-delay: .5s; } }

img.inicial { object-fit: cover; background: var(--panel); }

/* --- biblioteca de voces --- */
#voces-es, #voces-en { padding-block: 3rem; }
.cabeza { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--borde); }
.cabeza h2 { margin: 0; }
.cabeza .sub { margin: .15rem 0 0; }
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.filtros { display: flex; gap: .35rem; }
.filtros button, .ver-todas { border: 1px solid var(--borde); border-radius: 8px; background: none; color: var(--suave); font: 600 .78rem "Chakra Petch", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.filtros button { padding: .45rem .8rem; }
.filtros button[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: var(--sobre-verde); }
.filtros button:not([aria-pressed="true"]):hover, .ver-todas:hover { border-color: var(--verde); color: var(--titulo); }
.barra .buscar { width: 13rem; margin: 0; padding: .4rem .8rem; border-radius: 8px; font-size: .88rem; }
.voces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 1.25rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.voces li { border-bottom: 1px solid rgb(35 49 35 / .6); padding-block: .2rem; }
.voces li[hidden] { display: none; }
.voz { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .4rem; background: none; border: 0; border-radius: 10px; color: var(--texto); font: inherit; text-align: left; cursor: pointer; }
.voz:hover, .voz.sonando { background: var(--panel); }
.voz > span:not(.usos) { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.voz strong { overflow: hidden; color: var(--titulo); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.voz small { color: var(--suave); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .76rem; }
.voz .usos { flex: none; color: var(--suave); font-size: .72rem; font-variant-numeric: tabular-nums; }
.voz:is(:hover, .sonando) small { color: var(--verde); }
.inicial { display: grid; place-items: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--verde); color: var(--sobre-verde); font-weight: 800; }
.voz.clasica .inicial { background: #2b3d2b; color: var(--verde); }
.voz.sonando .inicial { outline: 2px solid var(--verde); outline-offset: 2px; animation: pulsar .6s ease-in-out infinite alternate; }
.ver-todas { display: block; margin: 1.25rem auto 0; padding: .55rem 1.4rem; }
.ver-todas[hidden] { display: none; }
@keyframes pulsar { from { opacity: 1; } to { opacity: .6; } }
@media (max-width: 60rem) { .voces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .voces { grid-template-columns: 1fr; } .barra .buscar { width: 100%; } }

/* --- comandos: una lista simple, sin tarjetas --- */
.comandos { margin: 0; border-top: 1px solid var(--borde); }
.comandos div { display: grid; grid-template-columns: 13rem 1fr; gap: .25rem 1.5rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid rgb(35 49 35 / .6); }
.comandos dd { margin: 0; color: var(--suave); }
.comandos code { padding: 0; border: 0; background: none; color: var(--verde); font-size: .92rem; }
@media (max-width: 40rem) { .comandos div { grid-template-columns: 1fr; } }
.cabeza h2 em { font-style: normal; color: var(--verde); }
/* las fotos no se arrastran */
img, svg { -webkit-user-drag: none; -webkit-touch-callout: none; }

/* --- portada robotica: quien habla, y el elenco para oirlo ---
   Nada se anima sin parar: el glitch dura un instante cada vez que cambia la voz */
.banda:has(> .robot) { position: relative; isolation: isolate; overflow: hidden; }
.banda:has(> .robot)::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(rgb(140 255 59 / .07) 1px, transparent 1px) 0 0 / 3rem 3rem,
  linear-gradient(90deg, rgb(140 255 59 / .07) 1px, transparent 1px) 0 0 / 3rem 3rem; -webkit-mask-image: radial-gradient(75% 90% at 25% 45%, #000, transparent); mask-image: radial-gradient(75% 90% at 25% 45%, #000, transparent); }
.robot .titular { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.sistema { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; color: var(--verde); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }
.sistema i { width: .55rem; height: .55rem; background: var(--verde); }
.portada.robot h1 { font-family: "Chakra Petch", system-ui, sans-serif; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; }
.portada.robot h1 em { position: relative; display: block; width: fit-content; font-size: 1.25em; white-space: nowrap; text-shadow: .04em 0 rgb(255 45 110 / .55), -.04em 0 rgb(45 220 255 / .55); }
.turno::before, .turno::after { content: attr(data-texto); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.turno::before { color: #2ddcff; }
.turno::after { color: #ff2d6e; }
.turno.glitch::before { animation: corte-a .45s steps(1) 1; }
.turno.glitch::after { animation: corte-b .45s steps(1) 1; }
@keyframes corte-a {
  0% { opacity: .9; translate: -.09em 0; clip-path: inset(5% 0 62% 0); }
  33% { opacity: .9; translate: .07em 0; clip-path: inset(48% 0 22% 0); }
  66% { opacity: .9; translate: -.04em 0; clip-path: inset(72% 0 4% 0); }
  100% { opacity: 0; } }
@keyframes corte-b {
  0% { opacity: .9; translate: .09em 0; clip-path: inset(58% 0 12% 0); }
  33% { opacity: .9; translate: -.08em 0; clip-path: inset(12% 0 66% 0); }
  66% { opacity: .9; translate: .05em 0; clip-path: inset(36% 0 40% 0); }
  100% { opacity: 0; } }
.robot .entradilla { font-size: clamp(1rem, .85rem + .4vw, 1.2rem); }
.orden { padding: .15em .55em; border: 1px solid var(--borde); border-left: 3px solid var(--verde); background: var(--panel); color: var(--titulo); white-space: nowrap; }
.orden b { color: var(--verde); }
.orden::after { content: "_"; color: var(--verde); }
.elenco { margin-top: 1.5rem; }
.elenco ul { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
/* caras con esquinas cortadas y lineas de pantalla */
.elenco button { position: relative; display: block; padding: 2px; border: 0; background: var(--borde); cursor: pointer; transition: translate .18s, background .18s; clip-path: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%); }
.elenco button::after { content: ""; position: absolute; inset: 2px; background: repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .32) 2px 3px); pointer-events: none; }
.elenco img { display: block; width: 3.5rem; height: 3.5rem; object-fit: cover; filter: grayscale(1) contrast(1.15); clip-path: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%); }
.elenco button:hover { translate: 0 -3px; }
.elenco button:hover img, .elenco .elegida img { filter: none; }
.elenco .elegida { background: var(--verde); }
.elenco .elegida::after, .elenco button:hover::after { display: none; }
.elenco .sonando { background: #fff; }
.elenco p { margin: .6rem 0 0; color: var(--suave); font-size: .8rem; }
.elenco p::before { content: "> "; color: var(--verde); }
.robot .acciones .boton { border-radius: 0; clip-path: polygon(.8rem 0, 100% 0, 100% calc(100% - .8rem), calc(100% - .8rem) 100%, 0 100%, 0 .8rem); }
.robot .acciones .secundario { box-shadow: inset 0 0 0 1px var(--verde); }
.pie-portada { margin: 1.5rem 0 0; color: var(--suave); font-size: .82rem; }
.pie-portada strong { color: var(--verde); font-variant-numeric: tabular-nums; }

/* --- comandos y preguntas, con el mismo aire robotico de la portada --- */
.tec h2 { font-family: "Chakra Petch", system-ui, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.tec h2::before { content: "// "; color: var(--verde); }
.tec .sub { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9rem; }

.tec-comandos .comandos { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); border: 0; }
.tec-comandos .comandos > div { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: 1.1rem 1.1rem 2.6rem; border: 0; background: var(--panel); box-shadow: inset 0 0 0 1px var(--borde); clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 1.1rem, 100% 100%, 0 100%); transition: translate .18s, box-shadow .18s; }
/* la esquina cortada, marcada en verde */
.tec-comandos .comandos > div::after { content: ""; position: absolute; top: 0; right: 0; width: 1.1rem; height: 1.1rem; background: linear-gradient(45deg, var(--verde) 50%, transparent 50%); opacity: .5; }
.tec-comandos .comandos > div:hover, .tec-comandos .comandos > div:focus-within { translate: 0 -3px; box-shadow: inset 0 0 0 1px var(--verde); }
.tec-comandos .comandos code { font-size: 1.05rem; font-weight: 700; }
.tec-comandos .comandos code::before { content: "> "; color: var(--suave); }
.tec-comandos .comandos dd { font-size: .9rem; }
/* el boton cubre la tarjeta; su texto queda abajo a la derecha */
.tec-comandos .comandos button { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: .7rem 1rem; border: 0; background: none; color: var(--suave); font: 700 .72rem "Chakra Petch", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.tec-comandos .comandos > div:hover button { color: var(--verde); }

.tec-faq .preguntas { display: grid; gap: .6rem; padding: 0; border: 0; background: none; counter-reset: pregunta; }
.tec-faq .preguntas details { padding: 0 1.1rem; border: 0; border-left: 3px solid var(--borde); background: var(--panel); counter-increment: pregunta; transition: border-color .18s; }
.tec-faq .preguntas details:hover, .tec-faq .preguntas details[open] { border-left-color: var(--verde); }
.tec-faq .preguntas summary { display: flex; align-items: center; gap: .9rem; padding: 1rem 0; list-style: none; }
.tec-faq .preguntas summary::-webkit-details-marker { display: none; }
.tec-faq .preguntas summary::before { content: counter(pregunta, decimal-leading-zero); color: var(--verde); font: 700 .85rem ui-monospace, "Cascadia Code", Consolas, monospace; }
.tec-faq .preguntas summary::after { content: "+"; margin-left: auto; color: var(--verde); font: 700 1.3rem/1 ui-monospace, Consolas, monospace; }
.tec-faq .preguntas [open] summary::after { content: "−"; }
.tec-faq .preguntas details p { margin: 0; padding: 0 0 1.1rem 2.1rem; }
@media (prefers-reduced-motion: no-preference) { .tec-faq .preguntas [open] p { animation: respuesta .25s ease-out; } }
@keyframes respuesta { from { opacity: 0; translate: -.6rem 0; } }
.tec-faq .columnas > div:first-child a { display: inline-block; padding: .65rem 1.2rem; box-shadow: inset 0 0 0 1px var(--verde); font: 700 .82rem "Chakra Petch", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; clip-path: polygon(.7rem 0, 100% 0, 100% calc(100% - .7rem), calc(100% - .7rem) 100%, 0 100%, 0 .7rem); }

