        /* --- Tema visual adaptado al estilo cyber/neón del index.html --- */
        @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

        :root {
            --bg-1: #00111a;
            --bg-2: #001f33;
            --neon-green: #00ff88;
            --neon-blue: #00a3ff;
            --muted: #9fc6ff;
            --card-bg: rgba(0, 0, 0, 0.55);
            --glass: rgba(0, 0, 0, 0.45);
            --accent: rgba(0, 163, 255, 0.95);
            --accent-2: rgba(0, 255, 136, 0.95);
            --radius: 12px;
            --shadow-cyber: 0 10px 30px rgba(0, 163, 255, 0.08), inset 0 0 20px rgba(0, 255, 136, 0.03);
            --max-width: 1100px;
            --base-size: 16px;
            --line-height: 1.6;
            --prose-max: 70ch;
            --touch-min: 48px;

            /* Variables adicionales para replicar el estilo del index.html sin alterar otras cards */
            --primary-green: #00ff88;
            --primary-blue: #0088ff;
            --dark-green: #004422;
            --dark-blue: #002244;
            --cyber-glow: rgba(0, 255, 136, 0.3);
            --glass-bg: rgba(0, 0, 0, 0.4);
            --border-glow: rgba(0, 255, 136, 0.6);
        }

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

        html {
            font-size: var(--base-size);
            -webkit-text-size-adjust: 100%;
            scroll-behavior: smooth;
        }

        @media (prefers-reduced-motion: reduce) {
            html {
                scroll-behavior: auto;
            }
        }

        /* Body y fondo */
        body {
            margin: 0;
            min-height: 100%;
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            color: #e6f7ff;
            background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            line-height: var(--line-height);
            display: flex;
            justify-content: center;
            padding: 32px 16px;
            position: relative;
            overflow-x: hidden;
        }

        /* sutil fondo "matriz" */
        .digital-bg {
            position: fixed;
            inset: 0;
            z-index: -2;
            background-image:
                linear-gradient(90deg, rgba(0, 163, 255, 0.03) 1px, transparent 1px),
                linear-gradient(180deg, rgba(0, 255, 136, 0.02) 1px, transparent 1px);
            background-size: 20px 20px, 20px 20px;
            opacity: 0.9;
            pointer-events: none;
            transform: translateZ(0);
            filter: blur(0.6px);
        }

        .wrap {
            width: 100%;
            max-width: var(--max-width);
        }

        /* Skip link accesible */
        .skip-link {
            position: absolute;
            left: -999px;
            top: auto;
            width: 1px;
            height: 1px;
            overflow: hidden;
        }

        .skip-link:focus {
            left: 16px;
            top: 16px;
            width: auto;
            height: auto;
            padding: 8px 12px;
            background: var(--neon-blue);
            color: #001;
            border-radius: 8px;
            z-index: 9999;
        }

        /* HEADER: estilo idéntico al index.html (solo afecta al elemento header) */
        header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 30px;
            flex-wrap: wrap;
            background: var(--glass-bg);
            border: 2px solid var(--border-glow);
            box-shadow: var(--shadow-cyber);
            padding: 20px;
            position: relative;
            border-radius: 0;
        }

        /* efecto de borde glow igual que en index.html */
        header:hover::before {
            content: '';
            position: absolute;
            inset: -2px;
            background: linear-gradient(45deg,
                    rgba(0, 255, 136, 0.8),
                    rgba(0, 136, 255, 0.8),
                    rgba(0, 68, 102, 0.8),
                    rgba(0, 255, 136, 0.8));
            z-index: -1;
            animation: border-glow 2s ease-in-out;
        }

        @keyframes border-glow {

            0%,
            100% {
                opacity: 0.6;
            }

            50% {
                opacity: 1;
            }
        }

        /* Header-left: espaciado igual al index */
        .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        /* Icono del header: tamaño y estilo igual al index */
        .header-icon {
            height: 56px;
            width: auto;
            object-fit: contain;
            border-radius: 8px;
            /* coincide con el estilo del index para el icono */
            border: 2px solid rgba(0, 255, 136, 0.4);
            padding: 4px;
            background: rgba(0, 0, 0, 0.6);
            box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
            flex: 0 0 auto;
        }

        /* BRAND / TITULO: tipografía y efectos replicando el index.html */
        .brand h1 {
            font-size: 1.1rem;
            margin: 0;
            color: var(--primary-blue);
            font-family: 'Press Start 2P', monospace;
            text-shadow:
                2px 2px 0px var(--dark-blue),
                0 0 5px var(--primary-green);
            line-height: 1.4;
        }

        .brand h1:hover {
            animation: neon-breathe 1.5s ease-in-out;
        }

        @keyframes neon-breathe {

            0%,
            100% {
                text-shadow:
                    2px 2px 0px var(--dark-blue),
                    0 0 5px var(--primary-green);
            }

            50% {
                text-shadow:
                    2px 2px 0px var(--dark-blue),
                    0 0 8px var(--primary-green),
                    0 0 16px var(--primary-green);
            }
        }

        /* Subtítulo con tamaño y color igual al index */
        .brand p {
            margin: 8px 0 0 0;
            color: #ccffcc;
            font-size: 0.6rem;
            line-height: 1.6;
            text-shadow: 1px 1px 0px #000000;
            font-family: 'Press Start 2P', cursive;
            font-weight: 400;
            letter-spacing: 0;
        }

        /* Botón índice: por defecto oculto; en móvil se muestra como botón flotante abajo-derecha */
        .toc-toggle {
            display: none;
            background: transparent;
            border: 1px solid rgba(0, 163, 255, 0.12);
            color: var(--neon-blue);
            padding: 8px 10px;
            border-radius: 8px;
            font-weight: 700;
            cursor: pointer;
            backdrop-filter: blur(4px);
            min-height: var(--touch-min);
            align-items: center;
            justify-content: center;
        }

        .toc-toggle:focus {
            outline: 3px solid rgba(0, 163, 255, 0.12);
            outline-offset: 3px;
            border-radius: 8px;
        }

        @media (max-width:880px) {

            /* Mostrar siempre como botón flotante en la esquina inferior derecha */
            .toc-toggle {
                display: inline-flex !important;
                position: fixed !important;
                right: 14px !important;
                bottom: 14px !important;
                z-index: 10003 !important;
                padding: 14px 16px !important;
                border-radius: 14px !important;
                background: linear-gradient(180deg, rgba(0, 26, 42, 0.95), rgba(0, 18, 28, 0.95)) !important;
                border: 1px solid rgba(0, 163, 255, 0.12) !important;
                box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
                font-size: 0.95rem !important;
                gap: 8px !important;
                -webkit-tap-highlight-color: transparent;
                touch-action: manipulation;
            }

            /* Evitar que el botón quede oculto por el back-button (si existe) */
            .back-button {
                left: 14px;
                bottom: 14px;
            }
        }

        /* Mantener el estilo original de las demás cards (no tocar) */
        .card {
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.35));
            border-radius: var(--radius);
            padding: 20px;
            box-shadow: var(--shadow-cyber);
            border: 1px solid rgba(0, 163, 255, 0.06);
            margin-bottom: 14px;
        }

        /* Tipografía y encabezados */
        h1,
        h2,
        h3,
        h4 {
            margin: 0 0 10px 0;
            color: var(--neon-blue);
            line-height: 1.15;
        }

        h1 {
            font-size: 1.5rem;
        }

        h2.section-title {
            font-size: 1.125rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            padding-bottom: 8px;
            margin-bottom: 12px;
            color: var(--neon-green);
        }

        h3 {
            font-size: 1rem;
            margin-top: 8px;
            color: var(--neon-blue);
        }

        p {
            margin: 0 0 12px 0;
            color: #dff7ff;
        }

        .lead-paragraph {
            color: var(--muted);
            margin-bottom: 12px;
        }

        .muted {
            color: #9fbff6;
        }

        ol,
        ul {
            margin: 0 0 12px 1.1rem;
        }

        li {
            margin-bottom: 8px;
        }

        a {
            color: var(--neon-blue);
            text-decoration: none;
        }

        a:hover,
        a:focus {
            text-decoration: underline;
        }

        /* Grid principal */
        .content-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
        }

        @media (min-width:880px) {
            .content-grid {
                grid-template-columns: 1fr 320px;
                align-items: start;
            }

            .aside-card {
                position: sticky;
                top: 24px;
            }
        }

        /* Tabla de contenidos */
        nav ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        nav li {
            margin-bottom: 8px;
        }

        nav a {
            display: inline-block;
            padding: 8px 10px;
            border-radius: 8px;
            color: var(--neon-green);
            min-height: var(--touch-min);
            line-height: 1.2;
        }

        nav a:hover,
        nav a:focus {
            background: rgba(0, 163, 255, 0.04);
            outline: none;
        }

        nav a[aria-current="true"] {
            font-weight: 700;
            background: rgba(0, 255, 136, 0.06);
        }

        /* Summary / details styling */
        details.collapsible {
            margin-bottom: 12px;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid rgba(0, 163, 255, 0.04);
        }

        details summary {
            cursor: pointer;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            background: linear-gradient(90deg, rgba(0, 163, 255, 0.03), rgba(0, 255, 136, 0.02));
            border-bottom: 1px solid rgba(255, 255, 255, 0.02);
            font-weight: 700;
            border-radius: 8px;
            color: var(--neon-blue);
        }

        details summary::-webkit-details-marker {
            display: none;
        }

        details summary::after {
            content: "▸";
            margin-left: auto;
            transform: rotate(0deg);
            transition: transform .18s ease;
            color: var(--neon-green);
        }

        details[open] summary::after {
            transform: rotate(90deg);
        }

        details .details-body {
            padding: 12px;
            background: transparent;
            color: #dff7ff;
        }

        /* Aside controls */
        .aside-controls {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 12px;
        }

        .toggle-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            border: 1px solid rgba(0, 163, 255, 0.12);
            color: var(--neon-blue);
            padding: 6px 10px;
            border-radius: 8px;
            font-weight: 700;
            cursor: pointer;
        }

        .toggle-btn.active {
            background: var(--neon-blue);
            color: #001;
            border-color: var(--neon-blue);
            box-shadow: 0 6px 18px rgba(0, 163, 255, 0.12);
        }

        .toggle-btn:focus {
            outline: 3px solid rgba(0, 163, 255, 0.12);
            outline-offset: 3px;
            border-radius: 8px;
        }

        /* Arrow icon rotation for expand/collapse */
        .toggle-btn .arrow {
            display: inline-block;
            width: 16px;
            height: 16px;
            transform-origin: 50% 50%;
            transition: transform .18s ease;
        }

        /* Default: arrow points down (0deg). When active (everything expanded) rotate to point up */
        .toggle-btn.active .arrow {
            transform: rotate(180deg);
        }

        .icon-back {
            width: 16px;
            height: 16px;
            vertical-align: middle;
            margin-right: 8px;
            fill: currentColor;
            display: inline-block;
        }

        /* Mobile overlay behavior for aside */
        @media (max-width:879px) {
            .aside-card {
                display: none;
            }

            .aside-card.open {
                display: block;
                position: fixed;
                inset: 72px 12px 12px 12px;
                z-index: 10001;
                overflow: auto;
                padding: 16px;
                background: rgba(0, 0, 0, 0.92);
                backdrop-filter: blur(6px);
                border-radius: 12px;
                box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
            }

            .aside-backdrop {
                position: fixed;
                inset: 0;
                z-index: 10000;
                background: rgba(0, 0, 0, 0.6);
                opacity: 0;
                transition: opacity .18s ease;
                pointer-events: none;
            }

            .aside-backdrop.show {
                opacity: 1;
                pointer-events: auto;
            }

            nav a {
                display: block;
                padding: 12px 14px;
            }

            /* Mantener apariencia más simple en móvil para las cards */
            .card {
                box-shadow: none;
                border: 1px solid rgba(0, 163, 255, 0.04);
            }
        }

        .prose {
            max-width: var(--prose-max);
        }

        @media (max-width:640px) {
            body {
                padding: 20px 12px;
            }

            .card {
                padding: 16px;
            }
        }

        /* Back button (móvil) */
        .back-button {
            display: none;
            position: fixed;
            left: 12px;
            bottom: 12px;
            z-index: 10002;
            background: #001a2a;
            color: var(--neon-blue);
            border: 1px solid rgba(0, 163, 255, 0.12);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
            padding: 10px 12px;
            border-radius: 12px;
            font-weight: 700;
            text-decoration: none;
            align-items: center;
            gap: 6px;
            font-size: 0.95rem;
        }

        .back-button .icon-back {
            width: 16px;
            height: 16px;
            margin-right: 6px;
            vertical-align: middle;
            fill: currentColor;
        }

        @media (max-width:879px) {
            .back-button {
                display: inline-flex;
            }
        }

        /* Small tweaks for readability */
        code,
        pre {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
        }

        strong {
            color: var(--neon-green);
        }