:root {
    /* Marca Apicca — acentos extraídos del logo */
    --apicca-red: #ff0000;
    --apicca-blue: #0000ff;

    /* EP-133 K.O. II — Paleta industrial */
    --primary-yellow: #f4c500;
    /* amarillo cálido, más apagado que el neón */
    --primary-black: #1c1c1c;
    --primary-white: #eeeeee;
    /* blanco grisáceo industrial */

    /* EP-133 K.O. II Core Palette */
    --ep133-bg: var(--primary-white);
    --ep133-surface: #d0d0d0;
    /* superficie de panel / cuerpo del dispositivo */
    --ep133-mid: #b0b0b0;
    /* gris medio — sombras de botones */
    --ep133-dark: #1c1c1c;
    /* casi negro — texto principal */
    --ep133-red: var(--apicca-red);
    /* rojo del logo Apicca — acento principal */
    --ep133-orange: #ff5500;
    /* naranja vibrante de los knobs/accents (secundario) */
    --ep133-display-bg: #141414;
    /* fondo del display LCD */
    --ep133-display-text: #ddddcc;
    /* texto del display (blanco cálido) */
    --ep133-display-accent: var(--apicca-red);
    /* indicadores rojos del display — rojo del logo */
    --ep133-header: var(--ep133-bg);
    /* header / footer — mismo gris de la página */
    --ep133-border: #999999;
    /* bordes y separadores */
    --ep133-white: #f0f0f0;
    /* blanco puro para botones claros */

    /* Aliases hacia atrás — mantiene compatibilidad con clases existentes */
    --ep40-orange: var(--apicca-red);
    --ep40-cream: #d8d8d8;
    --ep40-green: #1c1c1c;
    --ep40-black: #1c1c1c;
    --ep40-grey: #b0b0b0;
    --ep40-white: #f0f0f0;
    --ep40-lcd-bg: #141414;
    --ep40-lcd-text: #ddddcc;
    --ep40-red-accent: var(--apicca-red);
    --ep40-button-shadow: #909090;
    --header-footer-bg: #c8c8c8;

    /* Ejes semánticos — colores del teclado EP-133 */
    --eje-agua: #4598ff;
    --eje-alimento: #00cc77;
    --eje-cobijo: #ff5500;
    --eje-energia: #e53000;
    --eje-comunicacion: #ff8800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--ep133-bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(20, 20, 20, 0.06) 1px, transparent 0);
    background-size: 18px 18px;
    color: var(--ep133-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 1000;
    background-color: var(--primary-white);
    min-height: 80px;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 62px;
    width: auto;
}

.site-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--ep133-dark, #000);
    transition: transform 0.15s ease;
}

.site-brand-link:hover {
    transform: scale(1.02);
}

.brand-chip {
    width: 32px;
    height: 32px;
    background-color: var(--ep133-orange, #f45d22);
    color: #000;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.brand-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: #71717a;
    letter-spacing: -0.2px;
}

.brand-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: #000;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.4px;
}

.in {
    font-weight: normal;
    color: var(--ep133-orange, #f45d22);
}

.menu-container {
    position: relative;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 24px;
    align-items: center;
    padding: 2px 0;
}

.menu-bar {
    height: 5px;
    width: 5px;
    background-color: var(--ep133-dark);
    border-radius: 0;
}

.menu-container nav {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--ep133-white);
    width: 200px;
    display: none;
    box-shadow: 0 4px 0 var(--ep133-mid), 0 6px 12px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    border-radius: 0;
    border: 1px solid var(--ep133-border);
}

.menu-container nav.active {
    display: block;
}

.menu-container nav ul {
    list-style: none;
}

.menu-container nav ul li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.menu-container nav ul li:last-child {
    border-bottom: none;
}

.menu-container nav ul li a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--ep133-dark);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    transition: background-color 0.15s, color 0.15s;
}

.menu-container nav ul li a:hover {
    background-color: var(--ep133-dark);
    color: var(--ep133-white);
}

/* Submenú para Documentación */
.menu-container nav ul li ul {
    list-style: none;
    background-color: var(--ep133-surface);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 0;
    padding: 0;
}

.menu-container nav ul li ul li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0;
}

.menu-container nav ul li ul li:last-child {
    border-bottom: none;
}

.menu-container nav ul li ul li a {
    padding-left: 2rem;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--ep133-dark);
}

.menu-container nav ul li ul li a:hover {
    background-color: var(--ep133-dark);
    color: var(--ep133-white);
}

.menu-container nav ul li ul li a.active {
    background-color: var(--ep133-dark);
    color: var(--ep133-white);
    font-weight: 600;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
    position: relative;
    /* Needed for canvas positioning */
    overflow: hidden;
    /* Contain canvas */
}

/* Fondo como pseudo-elemento (z-index negativo para quedar detrás del contenido) */
main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: -1;
}

/* Animación de entrada: fade + scale */
@keyframes matriozEntry {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


.glyph {
    position: absolute;
    width: 8.5%;
    /* Adjusted size based on grid fit */
    height: auto;
    z-index: 10;
}

/* Positioning based on the provided image */

/* Sponsors Section */

/* Footer */
footer {
    padding: 1.5rem 2rem;
    text-align: center;
    background-color: var(--ep133-header);
    /* border-top: 1px solid var(--ep133-border); */
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-text {
    font-size: 0.7rem;
    color: var(--ep133-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

.supporters-logos {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.supporter-logo-1 {
    height: 30px;
    width: auto;
    filter: brightness(0) saturate(0%) invert(20%);
}

.supporter-logo-2 {
    height: 18px;
    width: auto;
    filter: brightness(0) saturate(0%) invert(20%);
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    header {
        padding: 3rem 5rem;
        min-height: 140px;
    }

    .logo-img {
        height: 75px;
    }

    .menu-toggle {
        height: 36px;
        width: 36px;
    }

    .menu-bar {
        height: 7px;
        width: 7px;
    }

    footer {
        padding: 4rem 5rem;
    }

    .footer-text {
        font-size: 1.2rem;
    }

    .supporter-logo-1 {
        height: 55px;
    }

    .supporter-logo-2 {
        height: 34px;
    }

    .supporters-logos {
        gap: 4rem;
        margin-top: 1rem;
    }
}

/* Resetario Cards & Page Containers */

.page-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Contact Info */
.contact-info {
    max-width: 700px;
    margin: 2rem auto 0;
    text-align: center;
    background-color: var(--ep40-white);
    padding: 2.5rem 2rem;
    border-radius: 0;
    box-shadow: 0 4px 0 var(--ep40-button-shadow), 0 5px 8px rgba(0, 0, 0, 0.08);
}

.contact-info p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #535353;
    margin-bottom: 1.5rem;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info a {
    color: var(--ep40-green);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--ep40-green);
    transition: border-color 0.15s ease;
}

.contact-info a:hover {
    border-color: var(--ep40-orange);
    color: var(--ep40-orange);
}

.telegram-link {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 67, 50, 0.15);
}

.telegram-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ep40-green);
    font-weight: 700;
    text-decoration: none;
    border: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    padding: 0.75rem 1.5rem;
    background-color: var(--ep40-white);
    border-radius: 0;
    box-shadow: 0 3px 0 var(--ep40-button-shadow), 0 4px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.telegram-link a:hover {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--ep40-button-shadow), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.telegram-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.telegram-link span {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

/* Loading Container */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.resetario-title {
    font-family: 'Rubik', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ep133-dark);
    margin-bottom: 2rem;
    text-align: center;
    background-color: transparent;
    padding: 0.5rem 1rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

/* Manual metodológico – Documentación */
.manual-section {
    margin: 0 auto 3rem auto;
    max-width: 900px;
}

.manual-card {
    background-color: var(--ep133-white);
    border-radius: 0;
    padding: 1.8rem 1.6rem 1.9rem;
    box-shadow: 0 4px 0 var(--ep133-mid), 0 5px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--ep133-border);
}

.manual-content {
    display: block;
}

.manual-text {
    flex: 1;
}

.manual-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 0.9rem;
}

.manual-description {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #535353;
    margin-bottom: 1.4rem;
}

.manual-download {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid #333333;
    color: #333333;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.manual-download:hover {
    background-color: #333333;
    color: var(--primary-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.manual-download-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

.manual-download-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Imagen del manual */
.manual-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.2rem auto;
}

.manual-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

@media (min-width: 768px) {
    .manual-card {
        padding: 2.2rem 2.4rem 2.3rem;
    }

    .manual-image-wrapper {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1.4rem;
    }

    .manual-title {
        font-size: 1.9rem;
    }

    .manual-description {
        font-size: 1.05rem;
    }
}

/* Resetario IA – panel display oscuro tipo EP-133 */

/* Variante clara del panel Resetario IA */

/* Disposición general del “dispositivo” TP-7 */

/* Panel izquierdo tipo blueprint basado en patrón de cuadrícula recursiva */

/* Capa para dibujar glyphs dentro del círculo */

/* Colores de glyph según eje (tinte por filtros) */

/* Pantalla del dispositivo */

.resetario-ai-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Switch de tema claro/oscuro */

.tp7-submit-button:disabled,
.tp7-submit-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.4);
}

.resetario-ai-answer {
    position: relative;
    margin-top: 0.4rem;
}

.resetario-ai-answer h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #bdbdbd;
    margin-bottom: 0.75rem;
}

/* Sección de respuesta, centrada bajo el aparato */
/* Sección de respuesta simple bajo el aparato */
.resetario-ai-answer-section {
    margin-top: 0.5rem;
    padding: 1.2rem 1rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.resetario-ai-answer {
    width: 100%;
    max-width: 1200px;
    background: transparent;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.2rem 2rem;
}

.resetario-ai-answer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fee71c;
    margin-bottom: 0.75rem;
}

.resetario-ai-answer-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--primary-white);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Modo información inicial: comportamiento original, sin carrusel */

/* Carrusel solo para las tarjetas de tácticas dentro del aparato */
.tactics-carousel {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-snap-type: none;
}

.tactics-nav {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-white);
}

.tactics-nav-button {
    min-width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(220, 222, 232, 0.8);
    background: rgba(8, 10, 16, 0.9);
    color: var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
}

.tactics-nav-button:disabled {
    opacity: 0.35;
    cursor: default;
}

.tactics-nav-button:not(:disabled):hover {
    background: rgba(230, 231, 236, 0.18);
}

.tactics-nav-button:not(:disabled):active {
    /* No animation */
}

.tactics-counter {
    opacity: 0.8;
    letter-spacing: 0.08em;
}

/* Ocultar barra de navegación de tácticas cuando se muestra la tarjeta de info */

.resetario-ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* ===========================
   Re(s)etario output (barras)
   =========================== */
.resetario-output {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 14px;
    /* Reducimos padding superior para que las barras toquen casi el borde */
    padding: 0.4rem 1.4rem 0.9rem;
    /* Fondo blanco primario como en el diseño */
    background: var(--primary-white);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    color: #000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

@keyframes ejectFromDevice {
    0% {
        opacity: 0;
        transform: translateY(calc(-100% + 30px));
        clip-path: inset(calc(100% - 30px) -20px -20px -20px);
    }

    8% {
        opacity: 1;
        transform: translateY(calc(-100% + 40px));
        clip-path: inset(calc(100% - 40px) -20px -20px -20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(-50% -50% -50% -50%);
        /* Restores visibility for shadows */
    }
}

.resetario-output-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 0;
    /* Franja gris superior, misma estética que el footer */
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    margin-top: -0.4rem;
    padding: 0.8rem 1.4rem 0.75rem;
    background: #535353;
    border-radius: 14px 14px 0 0;
}

.resetario-output-title-main {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-white);
}

.resetario-output-title-sub {
    font-family: 'Rubik', sans-serif;
    font-size: 0.7rem;
    opacity: 0.9;
    color: var(--primary-white);
    margin-top: 0.2rem;
}

.resetario-output-body {
    display: block;
    margin-top: 0.6rem;
}

.resetario-sections {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resetario-section {
    padding: 0.45rem 0 0.55rem;
}

.resetario-section+.resetario-section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.resetario-section-label {
    font-family: 'Rubik', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 0.25rem;
}

.resetario-section-content {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

.resetario-section-content p {
    margin: 0;
}

.resetario-section-empty {
    font-size: 0.85rem;
    color: #999;
}

.resetario-output-text {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

.resetario-output-text h4 {
    font-family: 'Rubik', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
    color: #1c1c1c;
}

.resetario-output-text h4:first-child {
    margin-top: 0;
}

.resetario-output-text p {
    margin-bottom: 0.8rem;
}

.resetario-output-text ul,
.resetario-output-text ol {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
}

.resetario-output-text li {
    margin-bottom: 0.4rem;
}

.resetario-output-text strong {
    font-weight: 700;
}

.resetario-output-bars {
    /* Ocultamos temporalmente las barras del Resetario */
    display: none;
}

.resetario-tactic-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.resetario-tactics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.resetario-bar {
    width: 10px;
    border-radius: 0 0 3px 3px;
    background: rgba(255, 255, 255, 0.1);
}

.resetario-bar-red {
    background: linear-gradient(180deg, #fd7a7a 0%, #fd0202 100%);
}

.resetario-bar-blue {
    background: linear-gradient(180deg, #7fb3ff 0%, #4598ff 100%);
}

.resetario-bar-green {
    background: linear-gradient(180deg, #6ce3b0 0%, #00d084 100%);
}

.resetario-bar-yellow {
    background: linear-gradient(180deg, #ffef7a 0%, #fee71c 100%);
}

.resetario-bar-orange {
    background: linear-gradient(180deg, #ffb36e 0%, #ff6b35 100%);
}

.resetario-bar-neutral {
    background: linear-gradient(180deg, #ffffff 0%, #cccccc 100%);
}

.resetario-output-footer {
    margin-top: 0.8rem;
    /* Extender la franja gris hasta los bordes del contenedor blanco */
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    margin-bottom: -0.9rem;
    padding: 0.6rem 1.4rem; /* Altura del footer reducida */
    background: #535353;
    border-radius: 0 0 14px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.resetario-output-hash {
    font-family: 'Rubik', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--primary-white);
}

@media (max-width: 768px) {

    .resetario-output {
        max-width: 100%;
        padding: 1rem 1rem 0.8rem;
    }

    /* Ajustar las franjas grises para que coincidan con el padding del contenido */
    .resetario-output-header,
    .resetario-output-footer {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .resetario-output-body {
        align-items: flex-end;
    }
}

/* Tarjeta de información inicial del Re(s)etario AI */
.resetario-ai-info-card {
    width: 100%;
    max-width: 920px;
}

.resetario-ai-info-front {
    width: 100%;
    border-radius: 16px;
    background: linear-gradient(180deg, #3d3f45 0%, #23252a 55%, #181a1f 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    padding: 2.8rem 2.6rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
}

.resetario-ai-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    opacity: 0.95;
}

.resetario-ai-info-label {
    font-family: 'Rubik', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: capitalize;
    color: var(--primary-white);
}

@media (max-width: 768px) {
    .page-container {
        padding: 1.25rem;
    }

    .resetario-ai-info-card {
        max-width: 100%;
    }

    .resetario-ai-info-front {
        padding: 1.6rem 1.4rem;
    }

    .resetario-ai-info-label {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .resetario-ai-answer-section {
        margin-top: 1rem;
        padding: 1.25rem 0 3rem;
    }

    .resetario-ai-answer {
        padding: 1.25rem 0;
    }
}

/* Tarjeta de respuesta tipo flip card */

#resetario-ai-answer-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #f3f3f3;
}


/* Barra de transporte inferior (tres teclas) */

/* Colores por defecto (claros) para cada eje */

/* Estado activo: versión más oscura del mismo color */

.tp7-submit-button {
    margin-top: 1rem;
    width: 100%;
    /* Estilo industrial gris oscuro */
    background: #333333 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 0 #000000, 0 6px 14px rgba(0, 0, 0, 0.5) !important;
}

.tp7-submit-button:hover {
    background: #444444 !important;
}

/* Fila de controles (Esc + Re(s)et) */

/* Layout responsive del panel IA */

/* Grafo de colores */

@keyframes fadeInCard {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reset-card {
    width: 100%;
    /* Un poco más pequeñas en desktop */
    max-width: 280px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    perspective: 1000px;
    cursor: pointer;
    animation: fadeInCard 0.6s ease forwards;
}

.reset-card.active {
    opacity: 1;
}

.card-inner {
    position: relative;
    width: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.reset-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    width: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    background: transparent;
}

.card-front {
    position: relative;
    transform: rotateY(0deg);
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-white) 0%, #e0e0e0 100%);
    justify-content: center;
    align-items: center;
    padding: 2.6rem 2.2rem;
    border-radius: 12px;
    overflow: hidden;
}

.card-back-content {
    text-align: center;
    color: #2d2d2d;
}

.card-back-content h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
}

.card-back-content p {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* Estilos para tarjeta de información */

/* Spinner de carga */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Teclado Teenage Engineering Style */

/* Display de Glyphs */

/* Sectores del teclado */
/* S1 - ESC y ALT (izquierda vertical) */

/* S2 - Teclas de color (arriba centro) */

/* S3 - Teclas Glyph (centro grande) */

/* S4 - Barra espaciadora (abajo centro) */

/* S5 - Enter (derecha vertical) */

.key {
    width: 100%;
    aspect-ratio: 1;
    max-width: 70px;
    background: var(--ep40-white);
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 0 var(--ep40-button-shadow), 0 5px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.08s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.key:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c0c0c0, 0 3px 6px rgba(0, 0, 0, 0.15);
}

.key:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #c0c0c0, 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Teclas con glifos */

/* Teclas de colores */

/* Teclas especiales (ESC, ALT, ENTER) */

/* Teclas vacías */

/* Barra espaciadora */

/* Responsive para el teclado */

@media (max-width: 768px) {

    .key {
        max-width: 50px;
        border-radius: 3px;
        box-shadow: 0 3px 0 #c0c0c0, 0 4px 6px rgba(0, 0, 0, 0.15);
    }
}

.reset-card:hover .card-front,
.reset-card:hover .card-back {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.card-top {
    background: linear-gradient(135deg, #4598ff 0%, #3580e6 100%);
    padding: 2.4rem 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 170px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Tarjeta de instrucciones */

.card-glyph {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
    margin: 0;
}

.card-bottom {
    background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
    padding: 2rem 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 130px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.card-number {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Responsive para tarjetas */
@media (max-width: 768px) {

    .resetario-title,
    .page-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .reset-card {
        max-width: 280px;
    }

    .card-top {
        padding: 2rem 1.5rem;
        min-height: 150px;
    }

    .card-glyph {
        width: 80px;
        height: 80px;
        object-fit: contain;
    }

    .card-bottom {
        padding: 1.5rem 1.5rem;
        min-height: 100px;
    }

    .card-number {
        font-size: 2.5rem;
    }

    .card-back-content h3 {
        font-size: 1.3rem;
    }

    .card-back-content p {
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {

    .resetario-title,
    .page-title {
        font-size: 3rem;
        margin-bottom: 4rem;
    }

    .contact-info {
        padding: 3.5rem 3rem;
        margin-top: 3rem;
    }

    .contact-info p {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

    .telegram-link {
        margin-top: 3rem;
        padding-top: 2.5rem;
    }

    .telegram-link a {
        padding: 1rem 2rem;
    }

    .telegram-icon {
        width: 28px;
        height: 28px;
    }

    .telegram-link span {
        font-size: 1.1rem;
    }
}

/* Sección de Opciones */

/* Título específico del contenedor de tácticas del aparato */

/* Las cartas de combinaciones usan el mismo estilo que reset-card */
.combination-card .card-glyph {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Estilos específicos para colores en combinaciones */

/* Responsive para combinaciones */

/* ==========================================================================
   UX IMPROVEMENTS - Visual Feedback
   ========================================================================== */

/* Estado activo para tecla Alt */

/* Animación de pulso sutil */
@keyframes pulsate {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(0) scale(1.05);
    }
}

/* Estado seleccionado para teclas de color - hundida */

/* Indicador de color pendiente en el display */

@keyframes borderPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Etiqueta de color pendiente */

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animación de entrada para glyphs en el display */

@keyframes glyphEnter {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Feedback visual al presionar teclas */

@keyframes keyPress {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }

    100% {
        transform: translateY(2px);
    }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible styles for keyboard navigation */
.key:focus-visible {
    outline: 3px solid #4598ff;
    outline-offset: 3px;
    z-index: 10;
}

/* Better focus for navigation links */
.menu-container nav a:focus-visible {
    outline: 2px solid #4598ff;
    outline-offset: 2px;
    background-color: #f0f0f0;
}

/* Focus visible for color nodes */

/* Focus visible for cards */
.reset-card:focus-visible {
    outline: 3px solid #4598ff;
    outline-offset: 4px;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .key {
        border: 2px solid #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visual indicator for keyboard mode */

/* ==========================================================================
   DOCUMENTATION PAGE STYLES
   ========================================================================== */

/* Introduction Section */

/* Responsive — manual-card sigue en uso en /resetario/documentacion.html */
@media (max-width: 768px) {
    .manual-section {
        max-width: 100%;
        margin: 0 0 3rem 0;
    }

    .manual-card {
        margin-left: -2rem;
        margin-right: -2rem;
        width: calc(100% + 4rem);
        border-radius: 0;
    }
}

/* ==========================================================================
   EP-133 K.O. II DESIGN SYSTEM — Home, API, Mesa Comun
   ========================================================================== */

/* --- Home Page Main Override --- */
.home-main {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow: visible;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    padding: 4rem 2rem 4rem;
    position: relative;
    z-index: 1;
    background: var(--ep133-bg);
    box-sizing: border-box;
    overflow: hidden;
}

.hero-content {
    max-width: 560px;
    flex: 1;
    min-width: 0;
}

/* Navegación sobre el Hero */

.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 700;
    color: var(--ep133-dark);
    margin-bottom: 1.5rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    background: var(--ep133-red);
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 0;
    text-transform: lowercase;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    box-shadow: 0 4px 0 #9a1f00, 0 5px 8px rgba(0, 0, 0, 0.25);
}

.cta-primary:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #9a1f00, 0 3px 6px rgba(0, 0, 0, 0.2);
}

.cta-primary:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #9a1f00, 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ep133-dark);
    background: var(--ep133-white);
    border: none;
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 0;
    text-transform: lowercase;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    box-shadow: 0 4px 0 var(--ep133-mid), 0 5px 8px rgba(0, 0, 0, 0.12);
}

.cta-secondary:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--ep133-mid), 0 3px 6px rgba(0, 0, 0, 0.12);
}

.hero-visual {
    flex: 1;
    max-width: 500px;
    min-width: 0;
}

/* --- Section Titles --- */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: 0.14em;
    color: var(--ep133-dark);
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
}

/* --- About Section (LCD Panel — display oscuro del EP-133) --- */
.about-section {
    background: var(--ep133-display-bg);
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
}

.about-section .section-title {
    color: var(--ep133-display-text);
}

.about-content {
    max-width: 980px;
    margin: 0 auto;
}

.about-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #aaaaaa;
    line-height: 1.8;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.about-text strong {
    font-weight: 700;
    color: var(--ep133-display-text);
}

/* --- Ejes Grid — botones de pad del EP-133 --- */
.ejes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 980px;
    margin: 0 auto;
}

/* --- Concepts Section (Device Button Grid — botones del EP-133) --- */

/* --- Page Title (shared across new pages) --- */
.page-title {
    font-family: 'Rubik', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--ep133-dark);
    margin-bottom: 2rem;
    text-align: center;
    background-color: transparent;
    padding: 0.5rem 1rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

/* --- Filter Buttons (shared pattern — botones de teclado EP-133) --- */

.filter-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ep133-dark);
    background: var(--ep133-white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0;
    cursor: pointer;
    text-transform: lowercase;
    box-shadow: 0 3px 0 var(--ep133-mid), 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.filter-btn:hover {
    transform: translateY(1px);
    box-shadow: 0 2px 0 var(--ep133-mid), 0 3px 5px rgba(0, 0, 0, 0.1);
}

.filter-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 var(--ep133-mid), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: var(--ep133-dark);
    color: var(--ep133-white);
    box-shadow: 0 3px 0 #000000, 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* --- Responsive: Home EP-40 --- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        gap: 2rem;
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }



    .hero-visual {
        max-width: 300px;
    }

    .ejes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-section {
        padding: 3rem 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ejes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   API Visualization Page
   ======================================== */

/* Detail Panel */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-detail-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ep40-black);
    line-height: 1;
    padding: 0.25rem;
}

.api-detail-close:hover {
    color: var(--ep40-orange);
}

.detail-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ep40-black);
    margin-bottom: 0.75rem;
}

.detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.eje-badge,
.estado-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.detail-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #535353;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.detail-date {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
}

/* Legend */


/* --- Apices Section & 3D Cube --- */
.apices-main {
    padding-top: 1rem;
    /* Match Re(s)etario main padding */
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.apices-section {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apices-header {
    text-align: center;
    margin-bottom: 14rem;
}

.cube-container {
    perspective: 1000px;
    width: 300px;
    height: 300px;
    margin: 4rem auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(45deg);
    animation: rotateCube 15s infinite linear;
}

.cube:hover {
    animation-play-state: paused;
}

.face {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.15);
    /* Glass effect */
    border: 3px solid #141414;
    /* Rigid hardware frame */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    transition: background 0.3s ease;
}

.face:hover {
    background: rgba(255, 255, 255, 0.25);
}

.front {
    transform: rotateY(0deg) translateZ(150px);
}

.right {
    transform: rotateY(90deg) translateZ(150px);
}

.back {
    transform: rotateY(180deg) translateZ(150px);
}

.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.top {
    /* Top face removed for greenhouse effect */
    display: none;
}

.bottom {
    transform: rotateX(-90deg) translateZ(150px);
    background: #141414;
    /* Dark solid base */
}

.cube-soil {
    position: absolute;
    width: 294px;
    /* Slightly smaller to fit inside */
    height: 294px;
    left: 3px;
    top: 3px;
    transform: rotateX(90deg) translateZ(-110px);
    /* Positioned near the bottom */
    background:
        radial-gradient(circle, #e53000 2px, transparent 2px),
        radial-gradient(circle, #1c1c1c 3px, transparent 3px);
    background-size: 20px 20px, 35px 35px;
    background-position: 0 0, 15px 15px;
    background-color: #d0d0d0;
    border: 3px solid #1c1c1c;
}

.cube-branches {
    position: absolute;
    width: 500px;
    height: 600px;
    top: -300px;
    left: -100px;
    transform: translateZ(0) rotateY(45deg);
    transform-origin: center center;
}

.cube-branches.alt {
    transform: translateZ(0) rotateY(-45deg);
    /* Slightly fade or alter one angle for depth perception */
    opacity: 0.9;
}

@keyframes rotateCube {
    0% {
        transform: rotateX(-15deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(-15deg) rotateY(360deg);
    }
}

.apices-info {
    text-align: center;
    margin-top: 4rem;
    font-family: 'Outfit', sans-serif;
    color: #444444;
    max-width: 600px;
    font-size: 1rem;
}

/* --- home.css --- */
/* =========================================================
   home.css — Home rediseñado con lenguaje visual Teenage
   Engineering / EP-133 K.O. II. Chasis crema, pads negros,
   display LCD, LEDs de color, fader y knob.
   Scope estricto: body.te-home  (no afecta otras páginas).
   ========================================================= */

body.te-home {
    /* paleta local — silver chassis (K.O. II) */
    --cream: var(--primary-white);
    /* fondo página igual al header */
    --cream-deep: #b8b8b8;
    /* silver medio — sombras del chasis */
    --bone: #ececec;
    /* silver muy claro — superficies elevadas */
    --panel: #d0d0d0;
    /* silver del panel del aparato */
    --ink: #141414;
    --ink-soft: #2b2b2b;
    --rule: #9c9c9c;

    --te-orange: #ff5a00;
    --te-yellow: #f5c500;
    --te-red: var(--apicca-red);
    --te-blue: #4598ff;
    --te-green: #00b56b;

    --pad-black: #1a1a1a;
    --pad-black-edge: #050505;
    --pad-light: #ececec;
    --lcd-bg: #121310;
    --lcd-text: #e8e2cc;
    --lcd-grid: rgba(232, 226, 204, 0.06);

    --m-agua: var(--te-blue);
    --m-alimento: var(--te-green);
    --m-cobijo: var(--te-yellow);
    --m-energia: var(--te-red);
    --m-comunic: var(--te-orange);

    background-color: var(--cream);
    color: var(--ink);
    font-family: 'Rubik', system-ui, sans-serif;
}

body.te-home .home-main {
    background: transparent;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

/* ============================================================
   NAV / TOPBAR — barra de estado tipo "OUTPUT / INPUT / SYNC"
   ============================================================ */
body.te-home .hero {
    background: transparent;
    padding: 0;
    display: block;
    position: relative;
    min-height: 0;
}

/* Removidos los overrides del menú para usar el dropdown global de styles.css */

/* ============================================================
   HERO LAYOUT
   ============================================================ */
body.te-home .hero-content {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 32px;
    padding: 0;
    align-items: stretch;
    margin: 0 0 56px;
    max-width: none;
    width: 100%;
    flex: none;
}

body.te-home .hero-copy {
    min-width: 0;
    padding-top: 8px;
}

body.te-home .hero-content::before {
    content: none;
}

body.te-home .hero-subtitle {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-transform: lowercase;
    color: var(--ink);
    max-width: 18ch;
    margin: 0 0 32px;
}

body.te-home .hero-subtitle::after {
    content: "·";
    display: inline-block;
    margin-left: 6px;
    color: var(--te-orange);
}



/* ============================================================
   KO-II OUTPUT — tarjetas de respuesta fuera del dispositivo
   ============================================================ */
body.te-home .ko-ii-output {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 0 8px;
    animation: te-rise 400ms cubic-bezier(.2, .7, .2, 1) both;
}

body.te-home .ko-ii-output .resetario-ai-answer-text {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ============================================================
   DEVICE — chasis tipo K.O. II
   ============================================================ */
body.te-home .device {
    position: relative;
    background:
        linear-gradient(180deg, var(--panel) 0%, var(--cream-deep) 100%);
    border: 1.5px solid var(--ink);
    border-radius: 16px;
    box-shadow:
        6px 6px 0 var(--ink),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 -3px 0 rgba(0, 0, 0, 0.05);
    padding: 16px 18px 18px;
    display: grid;
    grid-template-columns: 36px 1fr 60px;
    grid-template-rows: auto auto auto auto auto auto;
    grid-template-areas:
        "brand   brand   brand"
        "io      io      io"
        "screen  screen  screen"
        "fns     fns     fns"
        "pads    pads    pads"
        "pads    pads    pads";
    gap: 12px 14px;
    min-height: 520px;
    overflow: hidden;
}

/* tornillos en esquinas (detalle TE) */
body.te-home .device::before,
body.te-home .device::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #555, #1a1a1a 60%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

body.te-home .device::before {
    top: 8px;
    left: 8px;
}

body.te-home .device::after {
    bottom: 8px;
    right: 8px;
}

/* ---------- I/O top bar ---------- */
body.te-home .device-branding {
    grid-area: brand;
    font-family: 'Rubik', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.025em;
    text-transform: lowercase;
    text-align: left;
    margin-bottom: -4px;
}

body.te-home .device-io {
    grid-area: io;
    display: flex;
    gap: 6px;
    align-items: center;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

body.te-home .io-pill-with-btn {
    position: relative;
    overflow: visible;
}

body.te-home .orange-btn {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: 14px;
    height: 10px;
    background: linear-gradient(180deg, #ff8c00 0%, #e53000 100%);
    border: 1px solid var(--ink);
    border-radius: 2px;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        0 1px 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    padding: 0;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
    z-index: 10;
}

body.te-home .orange-btn:active {
    transform: translate(-50%, 1px);
    box-shadow: 
        inset 0 1px 1px rgba(0, 0, 0, 0.4),
        0 0 0 rgba(0, 0, 0, 0.1);
}

body.te-home .io-pill {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    padding: 4px 9px 4px 16px;
    border-radius: 3px;
    border: 1.25px solid var(--ink);
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    min-width: 18px;
}

body.te-home .io-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

body.te-home #io-input {
    background: var(--ink);
    color: var(--cream);
}

body.te-home .io-pill.is-on {
    background: var(--ink);
    color: var(--cream);
}

body.te-home .io-pill:not(#io-input):not(:last-child).is-on {
    background: transparent;
    color: var(--ink);
}

body.te-home .io-pill.is-on::before {
    background: var(--te-red);
    box-shadow: 0 0 6px var(--te-red);
}

body.te-home .io-pill:not(#io-input):not(:last-child).is-on::before {
    background: var(--te-green);
    box-shadow: 0 0 6px var(--te-green);
}

body.te-home .io-pill:empty {
    border: 0;
    flex: 1;
    min-width: 0;
}

body.te-home .io-pill:empty::before {
    content: none;
}

/* ---------- Display screen (LCD) ---------- */
body.te-home .device-screen {
    grid-area: screen;
    background: var(--lcd-bg);
    border: 1.5px solid var(--ink);
    border-radius: 6px;
    padding: 12px 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 380px;
    min-height: 380px;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

body.te-home .device-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 6px 6px;
    mix-blend-mode: difference;
    z-index: 9999;
}

/* Línea de estado superior dentro de la pantalla LCD del K=-II */
body.te-home .ko-ii-status {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 14px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lcd-text);
    text-shadow: 0 0 6px rgba(232, 226, 204, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    padding-bottom: 14px;
    margin-bottom: 8px;
    opacity: 0.55;
    transition: opacity 0.18s ease-out;
}

body.te-home .ko-ii-status::before {
    content: "▸";
    font-size: 9px;
    color: var(--te-red);
    text-shadow: 0 0 6px rgba(229, 48, 0, 0.6);
    flex-shrink: 0;
}

body.te-home .ko-ii-status:not(:empty) {
    opacity: 1;
}

body.te-home .ko-ii-status.is-busy::before {
    animation: te-led 0.9s ease-in-out infinite;
}

body.te-home .screen-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lcd-text);
    opacity: 0.7;
}

body.te-home .screen-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

body.te-home .screen-rec {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--te-red);
    box-shadow:
        0 0 0 2px rgba(229, 48, 0, 0.25),
        0 0 14px rgba(229, 48, 0, 0.7);
    animation: te-led 2s ease-in-out infinite;
}

/* Controles de selección de tácticas en la pantalla */
body.te-home .device-screen .tactics-nav {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    display: block;
    pointer-events: none;
}

body.te-home .device-screen .tactics-nav-button {
    pointer-events: auto;
    position: absolute;
    bottom: 10px;
    width: 16px;
    height: 16px;
    font-size: 10px;
    z-index: 10;
}

body.te-home .device-screen #resetario-ai-tactics-prev {
    right: 44px;
}

body.te-home .device-screen #resetario-ai-tactics-next {
    right: 10px;
}

body.te-home .device-screen .tactics-counter {
    pointer-events: auto;
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    min-width: auto;
    text-align: left;
}

@keyframes te-led {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

/* ---------- Brand block "K.O.II / サンプラー" ---------- */

/* ---------- Function row (KEYS / FADER / EDIT / COPY...) ---------- */
body.te-home .device-functions {
    grid-area: fns;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

body.te-home .fn-key {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--pad-light);
    border: 1.5px solid var(--ink);
    border-radius: 4px;
    padding: 7px 4px;
    text-align: center;
    box-shadow: 0 2px 0 var(--ink), inset 0 -2px 0 rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

body.te-home .fn-key:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 var(--ink), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.te-home .fn-key.is-active {
    background: var(--pad-light);
    color: var(--ink);
    font-weight: 700;
}

/* ---------- Pad grid ---------- */
body.te-home .device-pads {
    grid-area: pads;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 7px;
    min-height: 160px;
}

body.te-home .pad {
    position: relative;
    background: var(--pad-black);
    background-image: linear-gradient(180deg, #232323 0%, #0c0c0c 100%);
    border: 1px solid var(--pad-black-edge);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 8px 9px 7px;
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -3px 6px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

body.te-home .pad::before {
    /* LED de color en esquina superior */
    content: "";
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

body.te-home .pad.has-card[data-led="red"]::before {
    background: var(--te-red);
    box-shadow: 0 0 8px var(--te-red);
}

body.te-home .pad.has-card[data-led="green"]::before {
    background: var(--te-green);
    box-shadow: 0 0 8px var(--te-green);
}

body.te-home .pad.has-card[data-led="yellow"]::before {
    background: var(--te-yellow);
    box-shadow: 0 0 8px var(--te-yellow);
}

body.te-home .pad.has-card[data-led="orange"]::before {
    background: var(--te-orange);
    box-shadow: 0 0 8px var(--te-orange);
}

body.te-home .pad.has-card[data-led="blue"]::before {
    background: var(--te-blue);
    box-shadow: 0 0 8px var(--te-blue);
}

body.te-home .pad:hover {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

body.te-home .pad-num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--lcd-text);
    letter-spacing: -0.02em;
    opacity: 0.95;
}

body.te-home .pad-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lcd-text);
    opacity: 0.7;
    align-self: stretch;
    text-align: left;
}

body.te-home #device-pad-esc {
    background-image: linear-gradient(180deg, #555555 0%, #2a2a2a 100%);
    border-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

body.te-home #device-pad-esc .pad-num {
    display: none;
}

body.te-home #device-pad-esc .pad-label {
    color: #e0e0e0;
    align-self: center;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0;
}

body.te-home #device-pad-esc::before {
    display: none;
}


body.te-home .pad-light {
    background-image: linear-gradient(180deg, #f0f0f0 0%, #bababa 100%);
    border-color: rgba(0, 0, 0, 0.35);
}

body.te-home .pad-light .pad-num,
body.te-home .pad-light .pad-label {
    color: var(--ink);
    opacity: 0.85;
}

body.te-home .pad-rec {
    background-image:
        radial-gradient(circle at 50% 45%, #ff2a2a 0%, #d11000 60%, #8a0a00 100%);
    border-color: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 0;
}

body.te-home .pad-rec .pad-num {
    display: none;
}

body.te-home .pad-rec .pad-label {
    color: #fff;
    opacity: 0.95;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: lowercase;
    text-align: center;
    align-self: center;
}

body.te-home .pad-rec::before {
    content: none;
}

body.te-home .tp7-dimension-button.active::before {
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* ---------- Fader (izquierda) ---------- */
body.te-home .device-fader {
    grid-area: fader;
    background: var(--bone);
    border: 1.25px solid var(--ink);
    border-radius: 6px;
    padding: 10px 4px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.te-home .fader-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

body.te-home .fader-track {
    flex: 1;
    width: 4px;
    background: var(--ink);
    border-radius: 2px;
    position: relative;
    margin: 4px 0;
    min-height: 80px;
}

body.te-home .fader-handle {
    position: absolute;
    left: 50%;
    top: 32%;
    transform: translateX(-50%);
    width: 22px;
    height: 14px;
    background: linear-gradient(180deg, #ececec 0%, #a8a8a8 100%);
    border: 1px solid var(--ink);
    border-radius: 3px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

body.te-home .fader-handle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 1.5px;
    background: var(--ink);
}

/* ---------- Knob (derecha) ---------- */
body.te-home .device-knob {
    grid-area: knob;
    background: var(--bone);
    border: 1.25px solid var(--ink);
    border-radius: 6px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.te-home .knob-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

body.te-home .knob-dial {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #f0f0f0 0%, #a0a0a0 70%, #555555 100%);
    border: 1.5px solid var(--ink);
    position: relative;
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

body.te-home .knob-tick {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5px;
    height: 9px;
    background: var(--ink);
    border-radius: 1px;
}

body.te-home .knob-val {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--ink);
    background: var(--lcd-bg);
    color: var(--lcd-text);
    padding: 2px 5px;
    border-radius: 2px;
}

/* ============================================================
   SECTION HEADERS (terminal-like)
   ============================================================ */
body.te-home .section-eyebrow {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: lowercase;
    color: var(--ink);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.te-home .section-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--ink);
    display: inline-block;
}

body.te-home .section-eyebrow .count {
    background: var(--ink);
    color: var(--cream);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
}

body.te-home .section-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    letter-spacing: -0.018em;
    text-transform: lowercase;
    margin: 0 0 28px;
    color: var(--ink);
}

/* ============================================================
   ABOUT
   ============================================================ */
body.te-home .about-section {
    background: transparent;
    padding: 56px 0 64px;
    margin: 0;
    border-top: 1.5px dashed var(--rule);
}

body.te-home .about-content {
    max-width: none;
    padding: 0;
}

body.te-home .about-text {
    font-family: 'Rubik', sans-serif;
    font-size: 1.15rem;
    line-height: 1.55;
    max-width: 62ch;
    margin-bottom: 44px;
    color: var(--ink-soft);
}

body.te-home .about-text strong {
    color: var(--ink);
    font-weight: 700;
    background: var(--te-yellow);
    padding: 0 4px;
    border-radius: 2px;
}

/* ============================================================
   EJES GRID — cada card es un "módulo" tipo pad K.O. II
   Faceplate negra con LED de color + pictograma blanco.
   ============================================================ */
body.te-home .ejes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 8px;
}

body.te-home .eje-card {
    position: relative;
    background: var(--bone);
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--ink);
    padding: 0;
    border-left: 1.5px solid var(--ink) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
    opacity: 0;
    transform: translateY(8px);
    animation: te-rise 460ms cubic-bezier(.2, .7, .2, 1) forwards;
    /* reset de <button> — la card es un control de tablist */
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
}

body.te-home .eje-card:focus-visible {
    outline: 2px solid var(--apicca-blue);
    outline-offset: 3px;
}

body.te-home .eje-card:nth-child(1) {
    animation-delay: 0.05s;
}

body.te-home .eje-card:nth-child(2) {
    animation-delay: 0.10s;
}

body.te-home .eje-card:nth-child(3) {
    animation-delay: 0.15s;
}

body.te-home .eje-card:nth-child(4) {
    animation-delay: 0.20s;
}

body.te-home .eje-card:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes te-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.te-home .eje-card:hover {
    transform: translate(-2px, -3px);
    box-shadow: 6px 7px 0 var(--ink);
}

/* faceplate negra estilo pad — LED de color en la esquina */
body.te-home .eje-card .faceplate {
    background: var(--pad-black);
    background-image: linear-gradient(180deg, #232323 0%, #0d0d0d 100%);
    padding: 14px 14px 12px;
    border-bottom: 1.5px solid var(--ink);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 130px;
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

body.te-home .eje-card .faceplate .serial {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lcd-text);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 7px;
    border-radius: 3px;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.85;
}

/* LED de color por eje */
body.te-home .eje-card .faceplate .led {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--m-color, var(--te-orange));
    border: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow:
        0 0 10px var(--m-color, var(--te-orange)),
        0 0 0 2px rgba(0, 0, 0, 0.4);
    animation: te-led 2.6s ease-in-out infinite;
}

body.te-home .eje-card .faceplate .pictogram {
    width: 48px;
    height: 48px;
    align-self: flex-end;
    margin-top: auto;
    color: var(--lcd-text);
    opacity: 0.92;
}

body.te-home .eje-card .faceplate .pictogram svg {
    width: 100%;
    height: 100%;
}

/* iconos en blanco sobre el pad negro */
body.te-home .eje-card .faceplate .pictogram svg path,
body.te-home .eje-card .faceplate .pictogram svg circle {
    stroke: var(--lcd-text) !important;
}

body.te-home .eje-card[data-eje="agua"] {
    --m-color: var(--m-agua);
}

body.te-home .eje-card[data-eje="alimento"] {
    --m-color: var(--m-alimento);
}

body.te-home .eje-card[data-eje="cobijo"] {
    --m-color: var(--m-cobijo);
}

body.te-home .eje-card[data-eje="energia"] {
    --m-color: var(--m-energia);
}

body.te-home .eje-card[data-eje="comunicacion"] {
    --m-color: var(--m-comunic);
}

/* franja de color delgada bajo la faceplate (acento del módulo) */
body.te-home .eje-card .faceplate::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 4px;
    background: var(--m-color, var(--ink));
}

body.te-home .eje-card .body {
    padding: 16px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bone);
}

body.te-home .eje-card .eje-title {
    font-family: 'Rubik', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: lowercase;
    color: var(--ink);
    margin: 0;
    display: block;
}

body.te-home .eje-card .eje-blurb {
    font-family: 'Rubik', sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--ink-soft);
    margin: 0;
    display: block;
}

body.te-home .eje-card .module-tag {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1.25px dashed var(--rule);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.te-home .eje-card .module-tag::after {
    content: "ok";
    background: var(--ink);
    color: var(--cream);
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 9px;
    letter-spacing: 0.12em;
}

/* ---------- CARD ACTIVA — pad presionado, LED brillante ---------- */
body.te-home .eje-card.is-active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
    border-color: var(--m-color, var(--ink));
}

body.te-home .eje-card.is-active .faceplate {
    background-image: linear-gradient(180deg, #2c2c2c 0%, #141414 100%);
    box-shadow:
        inset 0 -2px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px color-mix(in srgb, var(--m-color, transparent) 35%, transparent);
}

body.te-home .eje-card.is-active .faceplate::after {
    height: 7px;
    box-shadow: 0 0 12px var(--m-color, transparent);
}

body.te-home .eje-card.is-active .faceplate .led {
    width: 12px;
    height: 12px;
    box-shadow:
        0 0 16px var(--m-color, var(--te-orange)),
        0 0 6px var(--m-color, var(--te-orange)),
        0 0 0 2px rgba(0, 0, 0, 0.5);
    animation: none;
}

body.te-home .eje-card.is-active .faceplate .serial {
    color: var(--m-color, var(--lcd-text));
    border-color: color-mix(in srgb, var(--m-color, white) 45%, transparent);
    background: color-mix(in srgb, var(--m-color, white) 12%, rgba(0, 0, 0, 0.35));
    opacity: 1;
}

body.te-home .eje-card.is-active .module-tag::after {
    content: "on";
    background: var(--m-color, var(--ink));
    color: var(--ink);
}

body.te-home .eje-card.is-active:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

/* ============================================================
   EJE DOC PANEL — documentación integrada al rack como display
   ============================================================ */
body.te-home .eje-doc-panel {
    max-width: 980px;
    margin: 22px auto 0;
    position: relative;
    /* cable de "patch" decorativo conectando rack y panel */
    padding-top: 14px;
}

body.te-home .eje-doc-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 6px;
    background:
        radial-gradient(circle at 1px 1px, var(--ink) 1px, transparent 1.5px) repeat-x;
    background-size: 14px 6px;
    opacity: 0.35;
}

body.te-home .eje-doc-screen {
    position: relative;
    background: var(--bone);
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--ink);
    overflow: hidden;
    min-height: 320px;
}

body.te-home .eje-doc {
    display: none;
    animation: te-doc-fade 320ms cubic-bezier(.2, .7, .2, 1);
}

body.te-home .eje-doc.is-active {
    display: block;
}

body.te-home .eje-doc[data-eje="agua"] {
    --m-color: var(--m-agua);
}

body.te-home .eje-doc[data-eje="alimento"] {
    --m-color: var(--m-alimento);
}

body.te-home .eje-doc[data-eje="cobijo"] {
    --m-color: var(--m-cobijo);
}

body.te-home .eje-doc[data-eje="energia"] {
    --m-color: var(--m-energia);
}

body.te-home .eje-doc[data-eje="comunicacion"] {
    --m-color: var(--m-comunic);
}

@keyframes te-doc-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.te-home .eje-doc-head {
    position: relative;
    background: var(--pad-black);
    background-image: linear-gradient(180deg, #232323 0%, #0d0d0d 100%);
    padding: 18px 24px 20px;
    border-bottom: 1.5px solid var(--ink);
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

body.te-home .eje-doc-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 6px;
    background: var(--m-color, var(--ink));
    box-shadow: 0 0 14px var(--m-color, transparent);
}

body.te-home .eje-doc-serial {
    display: inline-block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--m-color, var(--lcd-text));
    background: color-mix(in srgb, var(--m-color, white) 12%, rgba(0, 0, 0, 0.35));
    border: 1px solid color-mix(in srgb, var(--m-color, white) 40%, transparent);
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}

body.te-home .eje-doc-title {
    font-family: 'Rubik', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: lowercase;
    color: var(--lcd-text);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px;
}

body.te-home .eje-doc-tagline {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    color: color-mix(in srgb, var(--m-color, var(--lcd-text)) 80%, var(--lcd-text));
    opacity: 0.85;
}

body.te-home .eje-doc-body {
    padding: 22px 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

body.te-home .eje-doc-body > section {
    position: relative;
}

body.te-home .eje-doc-body h4 {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1.25px dashed var(--rule);
}

body.te-home .eje-doc-body h4::before {
    content: "■ ";
    color: var(--m-color, var(--ink));
    margin-right: 4px;
    letter-spacing: 0;
}

body.te-home .eje-doc-body p {
    font-family: 'Rubik', sans-serif;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 12px;
}

body.te-home .eje-doc-body p:last-child {
    margin-bottom: 0;
}

body.te-home .eje-doc-body p strong {
    color: var(--ink);
    font-weight: 700;
    background: color-mix(in srgb, var(--m-color, var(--te-yellow)) 22%, transparent);
    padding: 0 4px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    body.te-home .eje-doc-body {
        grid-template-columns: 1fr;
        padding: 22px 18px 24px;
        gap: 22px;
    }

    body.te-home .eje-doc-head {
        padding: 16px 18px 18px;
    }

    body.te-home .eje-doc-title {
        font-size: 1.5rem;
        gap: 8px;
    }

    body.te-home .eje-doc-tagline {
        font-size: 10px;
    }
}

/* ============================================================
   CONCEPTOS (3 módulos)
   ============================================================ */



/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {


    body.te-home .device {
        grid-template-columns: 30px 1fr 54px;
    }
}

@media (max-width: 880px) {
    body.te-home .hero-content {
        grid-template-columns: 1fr;
    }

    body.te-home .hero-copy {
        order: -1;
    }

    body.te-home .device {
        min-height: 0;
    }
}

@media (max-width: 540px) {
    body.te-home .home-main {
        padding: 18px 16px 60px;
    }



    body.te-home .menu-container nav ul {
        gap: 0;
    }

    body.te-home .menu-container nav ul li a {
        padding: 8px 10px;
    }

    body.te-home .device {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "io"
            "screen"
            "fns"
            "pads"
            "fader"
            "knob";
    }

    body.te-home .device-fader,
    body.te-home .device-knob {
        flex-direction: row;
        min-height: 60px;
    }

    body.te-home .fader-track {
        width: auto;
        height: 4px;
        flex: 1;
    }

    body.te-home .fader-handle {
        top: 50%;
        left: 32%;
        transform: translateY(-50%);
    }

    body.te-home .device-functions {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- resetario.css --- */
/* =========================================================
   resetario.css — Re(s)etario rediseñado con lenguaje visual
   Teenage Engineering / EP-133 K.O. II. Chasis silver, pads
   negros, display LCD, LEDs de color, Rubik + JetBrains Mono.
   Scope estricto: body.te-resetario (no afecta otras páginas).
   ========================================================= */

body.te-resetario {
    /* paleta local — silver chassis (K.O. II) */
    --cream: var(--primary-white);
    --cream-deep: #b8b8b8;
    --bone: #ececec;
    --panel: #d0d0d0;
    --ink: #141414;
    --ink-soft: #2b2b2b;
    --rule: #9c9c9c;

    --te-orange: #ff5a00;
    --te-yellow: #f5c500;
    --te-red: var(--apicca-red);
    --te-blue: #4598ff;
    --te-green: #00b56b;

    --pad-black: #1a1a1a;
    --pad-black-edge: #050505;
    --pad-light: #ececec;
    --lcd-bg: #121310;
    --lcd-text: #e8e2cc;
    --lcd-grid: rgba(232, 226, 204, 0.06);

    --m-agua: var(--te-blue);
    --m-alimento: var(--te-green);
    --m-cobijo: var(--te-yellow);
    --m-energia: var(--te-red);
    --m-comunic: var(--te-orange);

    background-color: var(--cream);
    color: var(--ink);
    font-family: 'Rubik', system-ui, sans-serif;
}

/* Header global heredado de styles.css */

/* ============================================================
   PAGE CONTAINER / TITLE
   ============================================================ */
body.te-resetario main {
    display: block;
}

body.te-resetario .page-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 48px 24px 64px; /* Reduced top padding from 80px to 48px for better layout spacing */
    background: transparent;
}

body.te-resetario .resetario-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4.6vw, 3.8rem);
    letter-spacing: -0.025em;
    text-transform: lowercase;
    color: var(--ink);
    margin: 12px 0 32px;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

body.te-resetario .resetario-title::after {
    content: "v0.3 · 2026";
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: var(--ink);
    background: var(--bone);
    border: 1.25px solid var(--ink);
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 400;
}

body.te-resetario .resetario-title::before {
    content: "·";
    color: var(--te-orange);
    font-weight: 900;
}

/* ============================================================
   DEVICE — el módulo Re(s)etario AI como chasis K.O. II
   ============================================================ */

body.te-resetario #ko-ii-device {
    max-width: 680px;
    margin: 0 auto 16px auto;
}

/* tornillos en las esquinas */

/* ---------- Top row: disk (knob) + screen (LCD) ---------- */

/* DISK → knob/dial TE con anillo de glyphs */

/* tick del knob — apunta a las 12 */

/* glyphs alrededor del disk — anillo de íconos */

/* SCREEN → LCD verdadero */

@keyframes te-led {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

/* ============================================================
   MIDDLE — área de controles del dispositivo
   ============================================================ */

body.te-resetario .resetario-ai-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Theme toggle como switch TE ---------- */

/* ---------- Bloque de respuesta (carousel tácticas) ---------- */
body.te-resetario .resetario-ai-answer {
    background: var(--lcd-bg);
    border: 1.5px solid var(--ink);
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow:
        inset 0 0 24px rgba(0, 0, 0, 0.5),
        0 2px 0 rgba(0, 0, 0, 0.2);
    background-image:
        linear-gradient(var(--lcd-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--lcd-grid) 1px, transparent 1px);
    background-size: 6px 6px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.te-resetario .resetario-ai-answer-text,
body.te-resetario .resetario-ai-answer-text.tactics-carousel,
body.te-resetario #resetario-ai-answer-text,
body.te-resetario #resetario-ai-response-text {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11.5px;
    letter-spacing: 0.02em;
    color: var(--lcd-text);
    line-height: 1.55;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    text-transform: none;
    width: 100%;
}

body.te-resetario .resetario-ai-answer h3 {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lcd-text);
    opacity: 0.85;
    margin: 0 0 6px;
    border-bottom: 1px dashed rgba(232, 226, 204, 0.2);
    padding-bottom: 4px;
}

body.te-resetario .device-screen .screen-display {
    padding-top: 20px;
    padding-bottom: 10px;
}

body.te-resetario .device-screen .resetario-ai-info-card {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.te-resetario .device-screen .resetario-ai-info-front {
    padding: 1.5rem 1.5rem;
    flex: 1;
    min-height: 320px;
}




body.te-resetario .tactics-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px dashed rgba(232, 226, 204, 0.2);
}

body.te-resetario .tactics-nav-button {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid var(--ink);
    background: var(--pad-light);
    color: var(--ink);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.te-resetario .tactics-nav-button:not(:disabled):hover {
    background: #ffffff;
}

body.te-resetario .tactics-nav-button:not(:disabled):active {
    /* No animation */
}

body.te-resetario .tactics-nav-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

body.te-resetario .tactics-counter {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lcd-text);
    opacity: 0.7;
    min-width: 50px;
    text-align: center;
}

/* ---------- Bloque de inputs (dimensiones) ---------- */

/* ---------- Transport bar — 5 ejes como pads negros ---------- */

/* ---------- Control row: Esc + Re(s)et como function keys ---------- */

body.te-resetario .tp7-submit-button {
    background: var(--te-orange);
    color: var(--ink);
    font-weight: 600;
}

body.te-resetario .tp7-submit-button::before {
    content: "▸";
    font-family: inherit;
    font-size: 11px;
}

body.te-resetario .tp7-submit-button:disabled,
body.te-resetario .tp7-submit-button.tp7-submit-disabled {
    opacity: 0.45;
    pointer-events: none;
    background: var(--cream-deep);
    color: var(--ink-soft);
    box-shadow: 2px 2px 0 var(--ink);
}

/* ============================================================
   RESPUESTA AI (sección debajo del aparato)
   ============================================================ */
body.te-resetario .resetario-ai-answer-section {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 32px 0 56px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

body.te-resetario .resetario-ai-answer-section .resetario-ai-answer {
    min-height: 200px;
    padding: 20px 22px;
}

/* ============================================================
   EJES SECTION — tabs como banco de pads
   ============================================================ */

/* eliminar la "caja de color" original — solo dejar LED */

/* ============================================================
   SPONSORS + FOOTER
   ============================================================ */



/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 540px) {
    body.te-resetario .page-container {
        padding: 0 16px 48px;
    }

    body.te-resetario .resetario-title {
        font-size: 2rem;
    }
}

/* --- matrix.css --- */
/* Matrix Grid Animation Styles */
.matrix-grid {
    position: relative;
    width: 100%;
    gap: 3px;
    /* Space between main blocks */
}

.matrix-cell {
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeInBlock 0.6s ease-out forwards;
}

/* Subdivided blocks */
.subdivided-block {
    padding: 1.5px;
    background-color: transparent;
}

.subdivision-2x2 {
    /* 2x2 subdivision - medium sized blocks */
    gap: 3px;
}

.subdivision-4x4 {
    /* 4x4 subdivision - smaller blocks */
    gap: 2px;
}

.subdivision-8x8 {
    /* 8x8 subdivision - very fine detail blocks */
    gap: 1px;
}

.sub-cell {
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeInSubCell 0.5s ease-out forwards;
}

.cell-black {
    background-color: var(--ep40-green);
}

.cell-empty {
    background-color: transparent;
}

/* Animation for main blocks */
@keyframes fadeInBlock {
    from {
        opacity: 0;
        transform: scale(0.85) rotate(-2deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Animation for sub-cells within subdivided blocks */
@keyframes fadeInSubCell {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ensure glyphs stay on top of the generated grid */
.glyph {
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through to grid if needed */
}

/* ============================================================
   HERO VISUAL — Transport strip + step sequencer
   Inspirado en EP-133 / K.O. II. Acentos rojos y azules.
   ============================================================ */
body.te-home .hero-visual {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: stretch;
    min-width: 0;
    justify-content: center;
}

body.te-home .te-strip {
    position: relative;
    background-image: linear-gradient(180deg, #1f1f1f 0%, #0a0a0a 100%);
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    box-shadow:
        5px 5px 0 var(--ink),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body.te-home .te-strip::before {
    content: "";
    position: absolute;
    top: -1.5px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--te-red) 0%, var(--te-red) 40%, var(--te-blue) 60%, var(--te-blue) 100%);
    border-radius: 0 0 2px 2px;
}

body.te-home .ts-lcd {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    background: var(--lcd-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 12px 8px;
    border-radius: 4px;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
    min-width: 78px;
}

body.te-home .ts-lcd-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--te-red);
    background: rgba(229, 48, 0, 0.12);
    padding: 1px 6px;
    border-radius: 2px;
    line-height: 1.2;
}

body.te-home .ts-lcd-num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--lcd-text);
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 10px rgba(232, 226, 204, 0.4);
}

body.te-home .ts-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
}

body.te-home .ts-stereo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

body.te-home .ts-stereo-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 7.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 226, 204, 0.55);
}

body.te-home .ts-stereo-rings {
    display: inline-flex;
    position: relative;
    width: 28px;
    height: 16px;
}

body.te-home .ts-ring {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid var(--lcd-text);
    box-sizing: border-box;
    background: transparent;
}

body.te-home .ts-ring-b {
    left: 0;
    border-color: var(--te-blue);
    box-shadow: 0 0 6px rgba(69, 152, 255, 0.5);
}

body.te-home .ts-ring-y {
    right: 0;
    border-color: var(--te-red);
    box-shadow: 0 0 6px rgba(229, 48, 0, 0.5);
}

body.te-home .ts-cmyk {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: conic-gradient(var(--te-red) 0deg 90deg,
            var(--te-blue) 90deg 180deg,
            #b51e00 180deg 270deg,
            #1a5fc4 270deg 360deg);
    border: 1.5px solid var(--ink);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.te-home .ts-arrow {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--te-blue);
}

body.te-home .ts-arrow svg {
    width: 100%;
    height: 100%;
}

body.te-home .ts-pad {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.te-home .ts-pad-light {
    background: linear-gradient(180deg, #f4f4f4 0%, #c0c0c0 100%);
    color: var(--ink);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.te-home .ts-pad-pink {
    background: linear-gradient(180deg, #ff4f5a 0%, #b81a2a 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.te-home .ts-tag {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
    padding: 4px 9px;
    border-radius: 3px;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, 0.4);
}

body.te-home .ts-tag-cyan {
    background: var(--te-blue);
    color: var(--ink);
}

body.te-home .ts-transport {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

body.te-home .ts-rec {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--te-red);
    box-shadow:
        0 0 10px var(--te-red),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: te-led 2s ease-in-out infinite;
}

body.te-home .ts-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent var(--lcd-text);
}

body.te-home .ts-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(232, 226, 204, 0.75);
}

body.te-home .ts-stripes {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

body.te-home .ts-stripes span {
    display: block;
    width: 14px;
    height: 3px;
    border-radius: 1px;
}

body.te-home .ts-stripes span:nth-child(1) {
    background: var(--te-blue);
}

body.te-home .ts-stripes span:nth-child(2) {
    background: var(--lcd-text);
    opacity: 0.5;
}

body.te-home .ts-stripes span:nth-child(3) {
    background: var(--te-red);
}

body.te-home .ts-knob {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #444 0%, #1a1a1a 80%);
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 2px var(--te-red),
        0 0 8px rgba(229, 48, 0, 0.4);
}

body.te-home .ts-knob-letter {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--lcd-text);
    text-transform: uppercase;
}

body.te-home .ts-knob::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: var(--te-red);
    border-radius: 1px;
    box-shadow: 0 0 4px var(--te-red);
}

body.te-home .ts-sound {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

body.te-home .ts-sound-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--lcd-text);
    padding: 4px 8px;
    border-radius: 2px;
}

body.te-home .ts-swing {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

body.te-home .ts-swing svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(69, 152, 255, 0.35));
}

body.te-home .ts-swing-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 226, 204, 0.55);
}

body.te-home .te-hero-nav {
    background: var(--bone);
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--ink);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
}

body.te-home .te-hero-nav-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    min-width: 64px;
}

body.te-home .te-hero-nav-meta strong {
    background: var(--te-red);
    padding: 3px 7px;
    border-radius: 2px;
    color: var(--cream);
    font-weight: 700;
    align-self: flex-start;
    letter-spacing: 0.12em;
}

body.te-home .te-hero-nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

body.te-home .te-hero-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-image: linear-gradient(180deg, #2a2a2a 0%, #0a0a0a 100%);
    border: 1px solid #050505;
    border-radius: 6px;
    text-decoration: none;
    color: var(--lcd-text);
    position: relative;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08), 
        inset 0 -2px 4px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

body.te-home .te-hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.12), 
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

body.te-home .te-hero-btn:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 1px 0 rgba(0, 0, 0, 0.2), 
        inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

body.te-home .te-btn-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s, box-shadow 0.3s;
}

body.te-home .te-btn-led.led-red {
    background: var(--te-red);
    box-shadow: 0 0 6px var(--te-red);
}

body.te-home .te-btn-led.led-blue {
    background: var(--te-blue);
    box-shadow: 0 0 6px var(--te-blue);
}

body.te-home .te-btn-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

body.te-home .te-btn-num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--lcd-text);
    opacity: 0.4;
}

body.te-home .hero-subtitle::after {
    color: var(--te-red);
}

body.te-home .about-section .section-eyebrow .count {
    background: var(--te-red);
    color: var(--cream);
}

@media (max-width: 880px) {
    body.te-home .te-strip {
        gap: 10px;
        padding: 14px;
    }

    body.te-home .ts-swing {
        margin-left: 0;
    }

    body.te-home .te-hero-nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    body.te-home .te-strip {
        justify-content: center;
    }

    body.te-home .te-hero-nav-buttons {
        grid-template-columns: 1fr;
    }
}


/* Sponsors Section Re-added for Resetario */
.sponsors-section {
    width: 100%;
    max-width: 800px;
    margin: 60px auto 0 auto;
    border-top: 1px dashed rgba(0, 0, 0, 0.2);
    padding-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.sponsors-content {
    width: 100%;
}

.footer-beca-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.6;
}

.sponsors-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.sponsor-logo {
    max-height: 45px;
    object-fit: contain;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .footer-beca-text {
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 30px;
    }
    .footer-beca-text br {
        display: none;
    }
    .sponsors-logos {
        gap: 20px;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
    }
    .sponsor-logo {
        max-height: 35px;
        max-width: 30%;
        width: auto;
        object-fit: contain;
    }
}

/* 
 * =========================================
 *  DYNAMIC COLOR CLASSES RESTORED
 * ========================================= 
 */
.card-red .card-top, .combination-card.card-red .card-top {
    background: linear-gradient(135deg, #fd0202 0%, #cc0000 100%) !important;
}

.card-green .card-top, .combination-card.card-green .card-top {
    background: linear-gradient(135deg, #00d084 0%, #00b370 100%) !important;
}

.card-yellow .card-top, .combination-card.card-yellow .card-top {
    background: linear-gradient(135deg, #fee71c 0%, #fdd800 100%) !important;
}

.card-orange .card-top, .combination-card.card-orange .card-top {
    background: linear-gradient(135deg, #ff6b35 0%, #e6551c 100%) !important;
}

.card-blue .card-top, .combination-card.card-blue .card-top {
    background: linear-gradient(135deg, #4598ff 0%, #3580e6 100%) !important;
}

.combination-card.card-standard .card-top {
    background: var(--primary-white) !important;
}

.combination-card.card-standard .card-glyph {
    filter: brightness(0);
}

.resetario-tactic-badge-blue {
    background: linear-gradient(135deg, rgba(69, 152, 255, 0.75) 0%, rgba(53, 128, 230, 0.75) 100%);
}

.resetario-tactic-badge-green {
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.75) 0%, rgba(0, 168, 105, 0.75) 100%);
}

.resetario-tactic-badge-yellow {
    background: linear-gradient(135deg, rgba(254, 231, 28, 0.8) 0%, rgba(253, 216, 0, 0.8) 100%);
    color: #333;
}

.resetario-tactic-badge-red {
    background: linear-gradient(135deg, rgba(253, 2, 2, 0.8) 0%, rgba(204, 0, 0, 0.8) 100%);
}

.resetario-tactic-badge-orange {
    background: linear-gradient(135deg, rgba(255, 132, 53, 0.95) 0%, rgba(255, 90, 0, 0.95) 100%);
}

.resetario-tactic-badge-neutral {
    background: #e0e0e0;
    color: #555;
}

/* ============================================================
   MOBILE OPTIMIZATIONS — Fase 1 (Home) + Fase 2 (Resetario)
   ============================================================ */

/* Tap targets mínimos accesibles */
@media (max-width: 768px) {

    /* --- Estructura global --- */
    main {
        padding: 1rem;
    }

    .page-container {
        padding: 1rem;
    }

    /* --- Home: hero visual ocupa todo el ancho disponible --- */
    body.te-home .hero {
        padding: 2rem 1rem 3rem;
    }

    body.te-home .hero-visual {
        max-width: 100%;
        width: 100%;
    }

    /* Strip: distribuir contenido para que ocupe el ancho */
    body.te-home .te-strip {
        gap: 10px 14px;
        padding: 14px 16px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    /* Hero nav: usar todo el ancho disponible */
    body.te-home .te-hero-nav {
        width: 100%;
    }


    /* --- Ejes grid: override del repeat(5,1fr) específico de te-home --- */
    body.te-home .ejes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    body.te-home .eje-card .eje-title {
        font-size: 1.15rem;
        overflow-wrap: anywhere;
    }

    body.te-home .eje-card .eje-blurb {
        font-size: 0.8rem;
    }

    body.te-home .eje-card .faceplate .serial {
        font-size: 8px;
    }

    /* --- Resetario: chasis 1-col adelantado a 768px --- */
    body.te-home .device {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "io"
            "screen"
            "fns"
            "pads";
        gap: 10px 0;
        min-height: 0;
        padding: 14px 14px 16px;
    }

    /* I/O bar: pills más compactas y wrap controlado */
    body.te-home .device-io {
        gap: 3px;
        padding: 24px 18px 12px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    body.te-home .device-io .io-pill {
        font-size: 7px;
        padding: 3px 6px 3px 13px;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }

    body.te-home .device-io .io-pill::before {
        width: 5px;
        height: 5px;
        left: 4px;
    }

    /* Pantalla LCD: altura adaptada a móvil */
    body.te-home .device-screen {
        height: auto;
        min-height: 280px;
        padding: 10px 12px;
    }

    /* Más padding inferior en las tarjetas dentro del display */
    body.te-resetario .device-screen .screen-display {
        padding-bottom: 28px;
    }

    body.te-resetario .device-screen .resetario-ai-info-front {
        padding-bottom: 2.4rem;
    }

    body.te-resetario .device-screen .card-bottom {
        padding-bottom: 2.2rem;
    }

    /* Fn-keys: 7 cols se mantienen pero más altas para tap */
    body.te-home .device-functions {
        gap: 4px;
    }

    body.te-home .fn-key {
        min-height: 36px;
        padding: 8px 2px;
        font-size: 8.5px;
    }

    /* Pads 5×2: tap target mínimo y label legible */
    body.te-home .device-pads {
        gap: 6px;
        min-height: 0;
    }

    body.te-home .pad {
        min-height: 64px;
        padding: 7px 7px 6px;
    }

    body.te-home .pad-label {
        font-size: 7.5px;
        letter-spacing: 0.1em;
    }

    body.te-home .pad-num {
        font-size: 0.95rem;
    }

    /* Carrusel de tácticas: evitar desbordes en pantallas estrechas */
    .tactics-carousel,
    .resetario-ai-answer-text {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Branding del device en móvil: más discreto */
    body.te-home .device-branding {
        font-size: 1rem;
    }

}

/* ============================================================
   Carta de respuesta: asoma por debajo del KO-II (móvil + desktop)
   ============================================================ */
body.te-home .page-container {
    position: relative;
    overflow: visible;
}

body.te-home .device {
    position: relative;
    z-index: 2;
}

body.te-home .resetario-ai-answer-section {
    position: relative;
    z-index: 1;
    margin-top: -44px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    width: 85%;
    height: 32px;
    overflow: hidden;
    pointer-events: none;
    animation: peekSlideDown 2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.te-home #ko-ii-output[hidden] ~ .resetario-ai-answer-section:not(.is-full) {
    margin-top: -16px;
}

body.te-home .resetario-ai-answer-section.is-full {
    height: auto;
    overflow: visible;
    pointer-events: auto;
    margin-top: -44px;
    padding: 60px 1rem 2.5rem;
    animation: none;
}

body.te-home .resetario-ai-answer-section #resetario-ai-response-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: auto;
}

.resetario-output-footer-peek {
    text-align: center;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    margin: 0;
    animation: peekSlideDown 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.te-home .resetario-ai-answer-section.is-full .resetario-peek-only {
    position: absolute !important;
    top: 0 !important;
    left: 0;
    right: 0;
    margin: 0 auto !important;
    z-index: 10;
}



.resetario-output.is-final {
    position: relative;
    z-index: 5;
    margin-bottom: -1rem;
    animation: slideOutFull 6.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
}



.resetario-output.is-final:nth-child(1) { z-index: 50; }
.resetario-output.is-final:nth-child(2) { z-index: 49; }
.resetario-output.is-final:nth-child(3) { z-index: 48; }
.resetario-output.is-final:nth-child(4) { z-index: 47; }
.resetario-output.is-final:nth-child(5) { z-index: 46; }
.resetario-output.is-final:nth-child(6) { z-index: 45; }
.resetario-output.is-final:nth-child(7) { z-index: 44; }
.resetario-output.is-final:nth-child(8) { z-index: 43; }
.resetario-output.is-final:nth-child(9) { z-index: 42; }
.resetario-output.is-final:nth-child(10) { z-index: 41; }

@keyframes slideOutFull {
    0% {
        transform: translateY(calc(-100% - 39px));
        clip-path: inset(calc(100% - 40px) -20px -20px -20px);
    }
    100% {
        transform: translateY(0);
        clip-path: inset(-50% -50% -50% -50%);
    }
}

.resetario-output-peek-arrow {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--primary-white);
    display: inline-block;
}

body.te-home .resetario-ai-answer-section.is-full #resetario-ai-response-text {
    position: static;
}

@keyframes peekSlideDown {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

body.te-home .ko-ii-output {
    position: relative;
    z-index: 1;
}

body.te-home .ko-ii-output[hidden],
.resetario-ai-answer-section[hidden] {
    display: none !important;
}

/* Móvil pequeño (<540): refinamientos extra */
@media (max-width: 540px) {

    main {
        padding: 0.5rem;
    }

    body.te-resetario .page-container {
        padding: 0 12px 32px;
    }

    /* I/O bar: ocultar pills decorativas que no aportan en móvil */
    body.te-home .device-io .io-pill:nth-child(5) {
        display: none;
    }

    /* Strip del hero: ocultar adornos puramente decorativos */
    body.te-home .ts-cmyk,
    body.te-home .ts-stripes,
    body.te-home .ts-divider {
        display: none;
    }

    /* Pads: aún más compactos sin sacrificar tap target */
    body.te-home .pad {
        min-height: 56px;
        padding: 6px 5px 5px;
    }

    body.te-home .device-pads {
        gap: 4px;
    }

    body.te-home .pad-label {
        font-size: 6.5px;
        letter-spacing: 0.06em;
    }

    /* Re(s)et pad: reducir label que estaba a 0.8rem */
    body.te-home .pad-rec .pad-label {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
    }

    /* Esc pad: alinear tamaño con el resto */
    body.te-home #device-pad-esc .pad-label {
        font-size: 0.7rem;
    }

    /* Hero visual más contenido */
    .hero-visual {
        max-width: 100%;
    }
}

/* ==========================================================
   Página de Contacto — hero editorial + canales
   ========================================================== */

.contacto-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.contacto-hero {
    border-top: 2px solid var(--ep133-dark);
    border-bottom: 1px solid var(--ep133-border);
    padding: 2.5rem 0 3rem;
    margin-bottom: 4rem;
}

.contacto-eyebrow {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--apicca-red);
    margin-bottom: 1.75rem;
}

.contacto-manifiesto {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--ep133-dark);
    text-transform: none;
    margin: 0 0 2rem;
    max-width: 22ch;
}

.contacto-manifiesto em {
    font-style: italic;
    font-weight: 800;
    color: var(--ep133-dark);
}

.contacto-manifiesto mark {
    background: transparent;
    color: inherit;
    padding: 0;
}

.contacto-invitacion {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #535353;
    margin: 0;
}

.contacto-canales {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.canal {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 1.25rem;
    row-gap: 0.4rem;
    align-items: start;
    padding: 2rem 1.75rem 1.75rem;
    background: var(--ep40-white);
    color: var(--ep133-dark);
    text-decoration: none;
    border: 1px solid var(--ep133-border);
    box-shadow: 0 4px 0 var(--ep40-button-shadow), 0 6px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    overflow: hidden;
}

.canal::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--apicca-red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.18s ease;
}

.canal:hover,
.canal:focus-visible {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--ep40-button-shadow), 0 3px 6px rgba(0, 0, 0, 0.1);
    outline: none;
}

.canal:hover::before,
.canal:focus-visible::before {
    transform: scaleY(1);
}

.canal-num {
    grid-row: 1 / span 3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--apicca-red);
    letter-spacing: 0.1em;
    padding-top: 0.25rem;
}

.canal-label {
    grid-column: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #6b6b6b;
}

.canal-valor {
    grid-column: 2;
    font-family: 'Rubik', sans-serif;
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ep133-dark);
    word-break: break-word;
    margin-top: 0.15rem;
}

.canal-cta {
    grid-column: 2;
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--apicca-red);
}

.canal-cta span[aria-hidden="true"] {
    transition: transform 0.18s ease;
}

.canal:hover .canal-cta span[aria-hidden="true"],
.canal:focus-visible .canal-cta span[aria-hidden="true"] {
    transform: translateX(4px);
}

.canal-icono {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .contacto-page {
        padding: 2rem 1.25rem 3.5rem;
    }

    .contacto-hero {
        padding: 1.75rem 0 2.25rem;
        margin-bottom: 2.5rem;
    }

    .contacto-eyebrow {
        margin-bottom: 1.25rem;
    }

    .contacto-manifiesto {
        max-width: none;
    }

    .contacto-canales {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .canal {
        padding: 1.5rem 1.25rem 1.4rem;
    }
}

/* ============================================================
   BIBLIOTECA DE RE(S)ETS
   ============================================================ */

.biblioteca-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.biblioteca-header {
    text-align: center;
    margin-bottom: 2rem;
}

.biblioteca-section {
    min-width: 0;
}

.biblioteca-activity {
    display: block;
    text-align: center;
    margin-bottom: 1.75rem;
    max-width: 100%;
    overflow-x: auto;
}

.activity-legend {
    justify-content: center;
    margin-top: 0.5rem;
}

.biblioteca-activity:empty {
    display: none;
}

.activity-heatmap {
    display: inline-block;
}

.activity-months {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: #999;
}

.activity-month {
    width: 13px;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
}

.activity-weeks {
    display: flex;
    gap: 3px;
}

.activity-week {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.activity-cell {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0;
    background: #ebedf0;
}

button.activity-cell {
    cursor: pointer;
}

button.activity-cell:hover {
    outline: 1px solid var(--primary-black);
    outline-offset: 1px;
}

.activity-cell.is-empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.activity-cell.is-selected {
    outline: 2px solid var(--primary-black);
    outline-offset: 1px;
}

.activity-l0 { background: #ebedf0; }
.activity-l1 { background: #0000ff; }
.activity-l2 { background: #5500aa; }
.activity-l3 { background: #aa0055; }
.activity-l4 { background: #ff0000; }

.activity-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: #999;
}

.activity-legend .activity-cell {
    cursor: default;
}

.biblioteca-search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.biblioteca-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    margin-bottom: 1.75rem;
}

.biblioteca-filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.biblioteca-filter-label {
    font-family: 'Rubik', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #888;
}

.biblioteca-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.biblioteca-select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.35rem 1.6rem 0.35rem 0.7rem;
    border: 1px solid var(--ep133-border);
    border-radius: 999px;
    background: var(--ep133-white);
    color: #444;
    cursor: pointer;
    max-width: 240px;
}

.biblioteca-select:hover {
    border-color: var(--primary-black);
}

.biblioteca-input-search {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.35rem 1rem;
    border: 1px solid var(--ep133-border);
    border-radius: 999px;
    background: var(--ep133-white);
    color: var(--primary-black);
    width: 200px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.biblioteca-input-search:hover {
    border-color: var(--primary-black);
}

.biblioteca-input-search:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.biblioteca-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--ep133-border);
    border-radius: 999px;
    background: var(--ep133-white);
    color: #444;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.biblioteca-chip:hover {
    border-color: var(--primary-black);
}

.biblioteca-chip.is-active {
    background: var(--primary-black);
    color: var(--primary-white);
    border-color: var(--primary-black);
}

.biblioteca-chip[data-color="blue"].is-active { background: var(--eje-agua); border-color: var(--eje-agua); }
.biblioteca-chip[data-color="green"].is-active { background: var(--eje-alimento); border-color: var(--eje-alimento); }
.biblioteca-chip[data-color="yellow"].is-active { background: #f5c500; border-color: #f5c500; color: var(--primary-black); }
.biblioteca-chip[data-color="red"].is-active { background: var(--eje-energia); border-color: var(--eje-energia); }
.biblioteca-chip[data-color="orange"].is-active { background: var(--eje-comunicacion); border-color: var(--eje-comunicacion); }

.biblioteca-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: #888;
    text-align: center;
    margin-bottom: 1.5rem;
}

.biblioteca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.biblioteca-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    padding: 1.4rem 1.4rem 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.biblioteca-card .resetario-output-text h4 {
    font-size: 0.95rem;
    margin-top: 1rem;
}

.biblioteca-card-header {
    margin-top: -1.4rem;
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    margin-bottom: 1rem;
    padding: 0.6rem 1.4rem;
    background: #535353;
    border-radius: 14px 14px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.biblioteca-card-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--primary-white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.biblioteca-card-footer {
    margin-top: 1rem;
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    padding: 0.6rem 1.4rem;
    background: #535353;
    border-radius: 0 0 14px 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.biblioteca-card-hash {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--primary-white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.biblioteca-card-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #bbb;
    white-space: nowrap;
}

.biblioteca-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
}

.biblioteca-pager:empty {
    display: none;
}

.biblioteca-page-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    min-width: 2rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--ep133-border);
    border-radius: 8px;
    background: var(--ep133-white);
    color: #444;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.biblioteca-page-btn:hover:not(:disabled) {
    border-color: var(--primary-black);
}

.biblioteca-page-btn.is-active {
    background: var(--primary-black);
    color: var(--primary-white);
    border-color: var(--primary-black);
}

.biblioteca-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

@media (max-width: 600px) {
    .biblioteca-grid {
        grid-template-columns: 1fr;
    }
}
