/* =========================================
   TOKENS
========================================= */

:root {
    color-scheme: dark;

    /* Alineado con la paleta de Akutangulo (--aku-fondo, --aku-superficie, --aku-texto) */
    --bg: #0d0d10;
    --panel: #15151b;
    --panel-2: #1c1c25;

    --border: rgba(255, 255, 255, 0.1);
    --border-soft: rgba(255, 255, 255, 0.06);

    /* Texto: todos los grises cumplen WCAG AA (≥ 4,5:1) sobre --panel y --panel-2 */
    --text: #f8f8fc;
    --muted: #b0bac8;
    --faint: #8c98aa;

    --accent: #8b5cf6;
    --accent-2: #22d3ee;

    --success: #34d399;
    --danger: #fb7185;

    --pos-rgb: 34, 211, 238;
    --neg-rgb: 251, 113, 133;
    --acc-rgb: 139, 92, 246;

    --radius: 18px;
    --radius-sm: 12px;
    --pill: 999px;

    --glass-1: rgba(255, 255, 255, 0.03);
    --glass-2: rgba(255, 255, 255, 0.07);
    --glass-3: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;

    font-family: Century Gothic, "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;

    color: var(--text);

    background:
        radial-gradient(circle at 15% -5%, rgba(147, 0, 211, 0.2), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(0, 194, 255, 0.09), transparent 30rem),
        var(--bg);

    background-attachment: fixed;
}

button,
select {
    font: inherit;
    color: inherit;
}

canvas {
    display: block;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.t-pos {
    color: var(--accent-2);
}

.t-neg {
    color: var(--danger);
}

/* =========================================
   PÁGINA
========================================= */

.shell {
    /* Como el main del sitio: queda por encima del header, que se solapa con el contenido (si no, se come los clics de las migas y las pestañas) */
    position: relative;

    width: min(1280px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 3vw, 40px) clamp(14px, 3vw, 32px) 56px;
}

/* =========================================
   CABECERA
========================================= */

.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px 40px;

    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 8px;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--accent-2);
}

/*
 * Título con el estilo de Akutangulo.com: morado claro, borde blanco y halo neón que
 * cambia de color (--aku-color-neon y aku-ciclo-neon vienen de header-akutangulo.css).
 */
.hero h1 {
    font-size: clamp(2.3rem, 6vw, 4.1rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: balance;

    color: var(--aku-morado-claro, #b54ade);

    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7);

    text-shadow:
        0 0 5px #000,
        0 0 10px #000,
        0 0 20px var(--aku-color-neon, deeppink),
        0 0 30px var(--aku-color-neon, deeppink);

    animation: aku-ciclo-neon 4s ease-in-out infinite;
}

.hero__lead {
    max-width: 38rem;
    margin-top: 12px;

    color: var(--muted);
    font-size: clamp(0.98rem, 1.6vw, 1.1rem);
}

.hero__meta {
    display: grid;
    gap: 10px;
    justify-items: start;
}

.hero__fact {
    max-width: 17rem;

    font-size: 0.82rem;
    color: var(--faint);
}

.hero__fact b {
    color: var(--muted);
}

.model-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 7px 13px;

    border: 1px solid var(--border);
    border-radius: var(--pill);

    font-size: 0.78rem;
    color: var(--muted);

    background: var(--glass-1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    background: #f5b84a;
    box-shadow: 0 0 0 0 rgba(245, 184, 74, 0.5);

    animation: pulse 1.6s infinite;
}

.model-status.ready .status-dot {
    background: var(--success);
    animation: none;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.model-status.error .status-dot {
    background: var(--danger);
    animation: none;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 8px rgba(245, 184, 74, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 184, 74, 0);
    }
}

/* =========================================
   BOTONES
========================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 0 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    font-weight: 700;
    font-size: 0.92rem;

    cursor: pointer;

    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.button:focus-visible,
.chip-button:focus-visible,
.node:focus-visible,
.crumb:focus-visible,
.seg button:focus-visible,
.chip-face:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.05);
}

.button-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
}

.button-primary {
    border-color: transparent;
    /* Morado de Akutangulo; texto blanco ≥ 6:1 (el degradado anterior daba ~3,3:1) */
    background: linear-gradient(135deg, #9300d3, #5b3fe0);
    box-shadow: 0 8px 24px rgba(var(--acc-rgb), 0.3);
}

.button-play {
    border-color: transparent;
    color: #04121a;

    background: linear-gradient(135deg, #22d3ee, #7ee8ff);
    box-shadow: 0 8px 26px rgba(var(--pos-rgb), 0.28);
}

.button-play.is-on {
    color: var(--text);
    background: rgba(var(--pos-rgb), 0.18);
    border-color: rgba(var(--pos-rgb), 0.5);
    box-shadow: none;
}

.chip-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    min-height: 34px;
    padding: 0 13px;

    border: 1px solid var(--border);
    border-radius: var(--pill);

    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--muted);

    background: rgba(255, 255, 255, 0.035);

    cursor: pointer;

    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip-button:hover {
    color: var(--text);
    background: var(--glass-3);
}

.chip-button.is-on {
    color: var(--text);
    border-color: rgba(var(--pos-rgb), 0.5);
    background: rgba(var(--pos-rgb), 0.12);
}

/* =========================================
   ESCENARIO
========================================= */

.stage {
    display: grid;
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    gap: clamp(16px, 2.4vw, 28px);

    padding: clamp(14px, 2.2vw, 24px);

    border: 1px solid var(--border);
    border-radius: 26px;

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
        var(--panel);

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.stage__label {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;

    font-weight: 700;
    font-size: 0.95rem;
}

.num {
    display: grid;
    place-items: center;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    font-size: 0.72rem;
    font-weight: 800;
    color: #04121a;

    background: var(--accent-2);
}

.drawing-frame {
    position: relative;

    aspect-ratio: 1;

    border: 1px solid var(--border);
    border-radius: 20px;

    overflow: hidden;

    background: #000;

    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.drawing-frame.is-drawing {
    border-color: rgba(var(--pos-rgb), 0.6);
    box-shadow: 0 0 0 4px rgba(var(--pos-rgb), 0.1), 0 0 40px rgba(var(--pos-rgb), 0.18);
}

.drawing-frame canvas {
    width: 100%;
    height: 100%;

    cursor: crosshair;
    touch-action: none;
}

.stage__actions {
    display: flex;
    margin-top: 12px;
}

.stage__actions .button {
    flex: 1;
}

.hint {
    margin-top: 12px;

    font-size: 0.82rem;
    color: var(--faint);

    transition: opacity 0.4s ease;
}

.hint b {
    color: var(--muted);
}

.hint.is-quiet {
    opacity: 0.9;
}

.try {
    margin-top: 22px;
    padding: 14px 16px;

    border: 1px dashed var(--border);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.015);
}

.try h2 {
    margin-bottom: 8px;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--accent-2);
}

.try ul {
    display: grid;
    gap: 8px;

    margin: 0;
    padding: 0 0 0 16px;

    font-size: 0.8rem;
    color: var(--muted);
}

.try li::marker {
    color: var(--faint);
}

.try b {
    color: var(--text);
}

/* =========================================
   RESPUESTA
========================================= */

.stage__net {
    display: grid;
    align-content: start;
    gap: 14px;

    min-width: 0;
}

.verdict {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 28px);

    padding: 6px 4px;
}

.verdict__digit {
    display: grid;
    justify-items: center;

    min-width: 96px;
}

.verdict__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    color: var(--faint);
}

.verdict__digit strong {
    font-size: clamp(3.6rem, 8vw, 5.2rem);
    line-height: 1;
    font-weight: 800;

    color: var(--faint);

    transition: color 0.3s ease;
}

.verdict.has-result .verdict__digit strong {
    background: linear-gradient(135deg, #ffffff, #a8b8ff 45%, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    filter: drop-shadow(0 0 22px rgba(var(--acc-rgb), 0.45));
}

.verdict__side {
    display: grid;
    gap: 12px;

    min-width: 0;
}

.verdict__side>p {
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    color: var(--muted);
}

.verdict__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* =========================================
   LA RED
========================================= */

.netwrap {
    position: relative;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background:
        radial-gradient(ellipse at 50% 0%, rgba(var(--acc-rgb), 0.1), transparent 60%),
        #080c13;

    overflow: hidden;
}

.netwrap>canvas {
    width: 100%;
    touch-action: manipulation;
}

.net-tip {
    position: absolute;
    z-index: 3;

    display: flex;
    align-items: center;
    gap: 10px;

    max-width: 260px;
    padding: 9px 12px 9px 9px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);

    background: rgba(8, 12, 19, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);

    pointer-events: none;
}

.net-tip canvas {
    flex: none;

    width: 54px;
    height: 54px;

    border-radius: 8px;
    border: 1px solid var(--border-soft);
}

.net-tip strong {
    display: block;
    font-size: 0.82rem;
}

.net-tip span {
    display: block;
    margin-top: 2px;

    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--muted);
}

.net-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;

    font-size: 0.76rem;
    color: var(--faint);
}

.net-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.net-legend__tip {
    margin-left: auto;
    color: var(--muted);
}

.dot {
    display: inline-block;

    width: 9px;
    height: 9px;

    border-radius: 50%;
}

.dot--lit {
    background: var(--accent-2);
    box-shadow: 0 0 8px rgba(var(--pos-rgb), 0.8);
}

.dot--pos {
    background: var(--accent-2);
}

.dot--neg {
    background: var(--danger);
}

.line {
    display: inline-block;

    width: 18px;
    height: 2px;

    border-radius: 2px;
}

.line--pos {
    background: var(--accent-2);
}

.line--neg {
    background: var(--danger);
}

/* =========================================
   NARRACIÓN
========================================= */

.story {
    position: sticky;
    bottom: 12px;
    z-index: 20;

    display: grid;
    gap: 12px;

    padding: 14px 16px;

    border: 1px solid rgba(var(--pos-rgb), 0.4);
    border-radius: var(--radius);

    background:
        linear-gradient(180deg, rgba(var(--pos-rgb), 0.09), rgba(var(--pos-rgb), 0.03)),
        rgba(9, 14, 22, 0.95);

    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);

    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);

    animation: rise 0.4s ease both;
}

.story__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
}

.story__ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story__ctrl .button {
    min-height: 36px;
    padding: 0 14px;

    font-size: 0.82rem;
    white-space: nowrap;
}

.story__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.story__step {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 32px;
    padding: 0 12px 0 6px;

    border: 1px solid var(--border);
    border-radius: var(--pill);

    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);

    background: var(--glass-1);

    cursor: pointer;
}

.story__step span {
    display: grid;
    place-items: center;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    font-size: 0.7rem;
    background: var(--border);
}

.story__step.is-done span {
    background: rgba(var(--pos-rgb), 0.35);
}

.story__step.is-on {
    color: #04121a;
    border-color: transparent;
    background: var(--accent-2);
}

.story__step.is-on span {
    color: var(--accent-2);
    background: #04121a;
}

.story__close {
    width: 32px;
    height: 32px;

    border: 1px solid var(--border);
    border-radius: 50%;

    color: var(--muted);
    background: transparent;

    cursor: pointer;
}

.story__close:hover {
    color: var(--text);
    background: var(--glass-3);
}

.story__body {
    display: grid;
    gap: 12px 24px;
    align-items: start;
}

.story__body.has-faces {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
}

.story__text h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;

    margin-bottom: 4px;

    font-size: 1.05rem;
}

.story__text h3 span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.story__text p {
    max-width: 62ch;

    color: #cdd6e4;
    font-size: 0.92rem;
    line-height: 1.45;
}

.story__text b {
    color: #fff;
}

.story__faces {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-face {
    position: relative;

    display: grid;
    justify-items: center;
    gap: 3px;

    width: 56px;
    padding: 4px 4px 6px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);

    background: rgba(0, 0, 0, 0.25);

    cursor: pointer;

    animation: pop 0.45s both;
    animation-delay: calc(var(--i, 0) * 50ms);

    transition: transform 0.15s ease, border-color 0.15s ease;
}

.chip-face:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.35);
}

.chip-face canvas {
    width: 46px;
    height: 46px;

    border-radius: 8px;
}

.chip-face i {
    display: block;

    height: 3px;
    border-radius: 3px;

    background: var(--accent-2);
    justify-self: start;
}

.chip-face--push {
    border-color: rgba(var(--pos-rgb), 0.6);
}

.chip-face--brake {
    border-color: rgba(var(--neg-rgb), 0.6);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* =========================================
   ¿POR QUÉ?
========================================= */

.why {
    margin-top: 22px;
    padding: clamp(16px, 2.4vw, 28px);

    border: 1px solid var(--border);
    border-radius: 26px;

    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        var(--panel);

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);

    animation: rise 0.45s ease both;
}

.why__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 30px;
}

.why__head h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.why__lead {
    max-width: 60ch;
    margin-top: 8px;

    color: var(--muted);
    font-size: 0.95rem;
}

.why__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.select {
    display: grid;
    gap: 4px;

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    color: var(--faint);
}

.select select {
    min-height: 38px;
    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;

    background: var(--panel-2);
    color: var(--text);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;

    margin: 18px 0 14px;
    padding: 0;

    list-style: none;
}

.crumbs li+li::before {
    content: "←";
    margin-right: 4px;
    color: var(--faint);
}

.crumb {
    padding: 4px 11px;

    border: 1px solid var(--border);
    border-radius: var(--pill);

    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);

    background: var(--glass-1);

    cursor: pointer;
}

.crumb.is-on {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--border);
}

.why__body {
    position: relative;

    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr) 310px;
    gap: clamp(26px, 4vw, 64px);
    align-items: start;
}

.why__body[data-cols="1"] {
    grid-template-columns: 200px minmax(0, 1fr) 310px;
}

.why__body[data-cols="0"] {
    grid-template-columns: 200px 310px;
    justify-content: start;
}

.why__links {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;
    overflow: visible;
}

.why-col {
    position: relative;
    z-index: 1;

    display: grid;
    align-content: start;
    gap: 10px;

    min-width: 0;
}

.why-col__head h3 {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--accent-2);
}

.why-col__head p {
    margin-top: 2px;

    font-size: 0.8rem;
    color: var(--muted);
}

.link {
    fill: none;
    stroke-width: 1.3;
    opacity: 0.22;
}

.link--push {
    stroke: var(--accent-2);
}

.link--brake {
    stroke: var(--danger);
}

.link--map {
    stroke: #fff;
    stroke-dasharray: 3 6;
    opacity: 0.35;
}

.link.is-chain {
    stroke-width: 2.4;
    opacity: 0.85;
}

/* ---------- Tarjetas de neurona ---------- */

.node {
    --c: var(--accent-2);
    --c-rgb: var(--pos-rgb);

    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
        "face meta"
        "face bar";
    align-items: center;
    gap: 2px 11px;

    width: 100%;
    padding: 8px 10px 8px 8px;

    border: 1px solid rgba(var(--c-rgb), 0.28);
    border-radius: 13px;

    text-align: left;

    background: rgba(var(--c-rgb), 0.045);

    cursor: pointer;

    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

.node:hover {
    transform: translateX(2px);
    background: rgba(var(--c-rgb), 0.11);
}

.node--brake {
    --c: var(--danger);
    --c-rgb: var(--neg-rgb);
}

.node.is-chain {
    background: rgba(var(--c-rgb), 0.12);
    border-color: rgba(var(--c-rgb), 0.7);
}

.node.is-picked {
    border-color: var(--c);
    box-shadow: 0 0 0 2px rgba(var(--c-rgb), 0.35), 0 0 26px rgba(var(--c-rgb), 0.25);
}

.node__face {
    grid-area: face;

    width: 46px;
    height: 46px;

    border-radius: 9px;
    border: 1px solid var(--border);

    background: #0b1019;
}

.node__meta {
    grid-area: meta;

    display: grid;
    min-width: 0;
}

.node__meta b {
    font-size: 0.84rem;
    line-height: 1.2;
}

.node__meta small {
    font-size: 0.7rem;
    color: var(--muted);
}

.node__bar {
    grid-area: bar;

    display: block;
    height: 4px;

    margin-top: 4px;

    border-radius: 4px;
    background: var(--glass-2);
}

.node__bar i {
    display: block;
    height: 100%;

    border-radius: 4px;
    background: var(--c);
}

.group {
    display: grid;
    gap: 7px;
}

.group+.group {
    margin-top: 6px;
}

.group__label {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.group__label i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.group--push .group__label i {
    background: var(--accent-2);
}

.group--brake .group__label i {
    background: var(--danger);
}

.group__label span {
    margin-left: auto;

    font-weight: 600;
    color: var(--faint);
}

.group__empty {
    font-size: 0.78rem;
    color: var(--faint);
}

/* ---------- Tarjeta raíz ---------- */

.node--root {
    --c: var(--accent);
    --c-rgb: var(--acc-rgb);
}

.node--root.node--digit {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas:
        "face digit"
        "sub sub";
    gap: 8px 12px;

    padding: 12px;
}

.node--digit .node__face {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
}

.node__digit {
    grid-area: digit;

    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;

    background: linear-gradient(135deg, #fff, #b7a6ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.node__sub {
    grid-area: sub;

    font-size: 0.74rem;
    color: var(--muted);
}

.node--hidden {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas: "face meta";
    gap: 12px;

    padding: 10px;
}

.node--hidden .node__face {
    width: 64px;
    height: 64px;
    border-radius: 11px;
}

.node--hidden .node__meta {
    gap: 2px;
    justify-items: start;
    align-content: center;
}

.node--hidden .badge {
    margin-top: 3px;
}

.balance {
    margin-top: 10px;
}

.balance__bar {
    display: flex;

    height: 8px;

    border-radius: 6px;
    overflow: hidden;

    background: var(--glass-2);
}

.balance__pos {
    background: var(--accent-2);
}

.balance__neg {
    background: var(--danger);
}

.balance__legend {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    margin-top: 6px;

    font-size: 0.7rem;
    color: var(--faint);
}

.balance__legend b {
    font-size: 0.78rem;
}

.badge {
    padding: 1px 7px;

    border-radius: var(--pill);

    font-size: 0.66rem;
    font-weight: 700;

    background: var(--glass-3);
}

.badge--high,
.badge--very-high {
    color: var(--accent-2);
    background: rgba(var(--pos-rgb), 0.14);
}

/* ---------- Píxeles ---------- */

.pixel {
    --c: var(--accent-2);
    --c-rgb: var(--pos-rgb);

    display: grid;
    gap: 1px;

    padding: 8px 11px;

    border: 1px solid rgba(var(--c-rgb), 0.25);
    border-radius: var(--radius-sm);

    background: rgba(var(--c-rgb), 0.04);

    transition: background 0.15s ease;
}

.pixel:hover {
    background: rgba(var(--c-rgb), 0.12);
}

.pixel--brake {
    --c: var(--danger);
    --c-rgb: var(--neg-rgb);
}

.pixel b {
    font-size: 0.8rem;
}

.pixel small {
    font-size: 0.7rem;
    color: var(--muted);
}

.pixel .node__bar {
    grid-area: auto;

    margin-top: 5px;
}

/* ---------- Mapa ---------- */

.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;

    padding: 3px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: rgba(0, 0, 0, 0.25);
}

.seg button {
    min-height: 30px;
    padding: 0 8px;

    border: 0;
    border-radius: 8px;

    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);

    background: transparent;

    cursor: pointer;
}

.seg button.is-on {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
}

.why-map {
    aspect-ratio: 1;

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
}

.why-map__canvas {
    width: 100%;
    height: 100%;

    cursor: crosshair;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;

    font-size: 0.74rem;
    color: var(--muted);
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.why-map__readout {
    min-height: 2.8em;

    font-size: 0.76rem;
    color: var(--faint);
}

.why-map__readout b {
    color: var(--text);
}

.why__body.is-entering .node {
    animation: pop 0.45s both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

/* ---------- Números ---------- */

.why__numbers {
    margin-top: 24px;
    padding-top: 16px;

    border-top: 1px solid var(--border-soft);
}

.why__numbers summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);

    cursor: pointer;
}

.why__numbers summary:hover {
    color: var(--text);
}

.why__numbers-body {
    display: grid;
    gap: 14px;

    margin-top: 14px;
}

.why__numbers h4 {
    margin-top: 6px;

    font-size: 0.82rem;
    color: var(--muted);
}

.formula {
    max-width: 74ch;

    font-size: 0.84rem;
    color: var(--muted);
}

.formula b {
    color: var(--text);
}

code {
    padding: 1px 7px;

    border-radius: 6px;

    font-size: 0.82em;
    color: #cbe9ff;

    background: var(--glass-2);
}

.numbers {
    width: 100%;

    border-collapse: collapse;

    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.numbers th,
.numbers td {
    padding: 7px 10px;

    border-bottom: 1px solid var(--border-soft);

    text-align: right;
}

.numbers thead th {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
}

.numbers th:first-child,
.numbers td:first-child {
    text-align: left;
}

.numbers tbody th {
    font-weight: 600;
}

.numbers small {
    margin-left: 6px;
    font-weight: 500;
    color: var(--faint);
}

.numbers td {
    color: var(--muted);
}

.foot {
    margin-top: 28px;

    font-size: 0.8rem;
    color: var(--faint);
    text-align: center;
}

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

@media (max-width: 1100px) {
    .why__body,
    .why__body[data-cols="1"],
    .why__body[data-cols="0"] {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 22px;
    }

    .why__links {
        display: none;
    }

    .why-col--root {
        grid-column: 1 / -1;
    }

    .why-col--map {
        grid-column: 1 / -1;

        max-width: 420px;
    }

    .why-col--root .node {
        max-width: 340px;
    }

    .why-col--root .balance {
        max-width: 340px;
    }
}

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

    .stage__draw {
        display: grid;
        grid-template-columns: minmax(0, 340px);
        justify-content: center;
    }

    .net-legend__tip {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .story__body.has-faces {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .story {
        bottom: 8px;

        padding: 12px;
    }

    .story__top {
        gap: 8px;
    }

    /* En móvil los pasos son solo el número (el activo conserva su nombre). */
    .story__step {
        min-height: 28px;
        padding: 0 5px;

        font-size: 0.72rem;
    }

    .story__step:not(.is-on) {
        font-size: 0;
        gap: 0;
    }

    .story__step:not(.is-on) span {
        font-size: 0.7rem;
    }

    .story__step.is-on {
        padding-right: 11px;
    }

    .story__ctrl .button {
        padding: 0 10px;
    }

    .story__step span {
        width: 18px;
        height: 18px;
    }

    .story__text p {
        font-size: 0.86rem;
    }

    .story__ctrl {
        width: 100%;
    }

    .story__ctrl .button-primary {
        flex: 1;
    }

    .chip-face {
        width: 48px;
    }

    .chip-face canvas {
        width: 38px;
        height: 38px;
    }

    .verdict {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .verdict__digit {
        justify-items: start;
    }

    .why__body,
    .why__body[data-cols="1"],
    .why__body[data-cols="0"] {
        grid-template-columns: minmax(0, 1fr);
    }

    .why-col--map {
        max-width: none;
    }

    .story__top {
        align-items: flex-start;
    }

    .numbers {
        display: block;
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   SELECTOR DE MODO
========================================= */

.modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;

    width: min(620px, 100%);
    margin: 0 0 18px;
    padding: 5px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(0, 0, 0, 0.25);
}

.modes a {
    display: grid;

    text-decoration: none;
    gap: 1px;

    padding: 10px 16px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    text-align: left;
    color: var(--muted);

    background: transparent;

    cursor: pointer;

    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.modes a b {
    font-size: 0.92rem;
}

.modes a span {
    font-size: 0.74rem;
    color: var(--faint);
}

.modes a:hover {
    color: var(--text);
    background: var(--glass-1);
}

.modes a.is-on {
    color: var(--text);
    border-color: rgba(var(--pos-rgb), 0.45);
    background: linear-gradient(180deg, rgba(var(--pos-rgb), 0.14), rgba(var(--pos-rgb), 0.05));
}

.modes a.is-on span {
    color: var(--muted);
}

.modes a:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

/* =========================================
   ENTRENAMIENTO
========================================= */

.trainer {
    display: grid;
    gap: 14px;

    padding: 16px;

    border: 1px solid rgba(var(--acc-rgb), 0.4);
    border-radius: var(--radius);

    background: linear-gradient(180deg, rgba(var(--acc-rgb), 0.1), rgba(var(--acc-rgb), 0.03));

    animation: rise 0.4s ease both;
}

.trainer.is-loading {
    opacity: 0.6;
}

.trainer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.trainer__clock {
    display: grid;
}

.trainer__clock b {
    font-size: 1.05rem;
}

.trainer__clock span {
    font-size: 0.78rem;
    color: var(--muted);
}

.trainer__slider {
    width: 100%;
    margin: 0;

    accent-color: var(--accent-2);
}

.trainer__grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.4fr) minmax(220px, 1.3fr);
    gap: 14px;
    align-items: stretch;
}

.stat,
.chart,
.exam-box {
    display: grid;
    align-content: start;
    gap: 6px;

    padding: 12px 14px;

    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);

    background: rgba(0, 0, 0, 0.22);
}

.stat__label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.stat__label b {
    color: var(--text);
    letter-spacing: 0;
}

.stat strong {
    font-size: 2.1rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat__bar {
    display: block;
    height: 6px;

    border-radius: 6px;
    background: var(--glass-2);

    overflow: hidden;
}

.stat__bar i {
    display: block;
    width: 0;
    height: 100%;

    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));

    transition: width 0.4s ease;
}

.stat__sub {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--faint);
}

.stat__sub b {
    color: var(--muted);
}

.chart {
    position: relative;

    padding: 8px 8px 6px;
}

.chart canvas {
    width: 100%;
    height: 130px;
}

.chart__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 14px;

    font-size: 0.68rem;
    font-weight: 700;
}

.chart__key::before {
    content: "";

    display: inline-block;

    width: 10px;
    height: 3px;
    margin-right: 5px;
    vertical-align: middle;

    border-radius: 2px;
}

.chart__key--loss {
    color: var(--accent-2);
}

.chart__key--loss::before {
    background: var(--accent-2);
}

.chart__key--acc {
    color: #a78bfa;
}

.chart__key--acc::before {
    background: #a78bfa;
}

.trainer__story {
    display: grid;
    gap: 6px;

    padding: 14px 16px;

    border: 1px solid var(--border-soft);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);

    background: rgba(0, 0, 0, 0.22);
}

.trainer__story h2 {
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.trainer__story p {
    max-width: 78ch;

    font-size: 0.97rem;
    line-height: 1.55;
    color: #d4dcea;
}

.trainer__story b {
    color: #fff;
}

.trainer__story .trainer__size {
    margin: 0;

    font-size: 0.74rem;
    color: var(--faint);
}

.stages {
    margin: 0;
    padding: 0;

    list-style: none;
}

/* Imágenes (examen y las usadas en cada etapa) */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
}

.tiles--exam {
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
}

.tile {
    display: grid;
    justify-items: center;
    gap: 2px;

    padding: 3px;

    border: 1px solid var(--border);
    border-radius: 7px;

    font-size: 0.64rem;
    font-weight: 700;
    color: var(--muted);

    background: rgba(0, 0, 0, 0.3);

    cursor: pointer;

    transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.tile:hover {
    transform: translateY(-2px);
}

.tile canvas {
    width: 100%;
    aspect-ratio: 1;

    border-radius: 4px;
}

.tiles--exam .tile {
    padding: 1px;

    border-radius: 4px;
}

.tile.is-ok {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.65);
    background: rgba(52, 211, 153, 0.12);
}

.tile.is-bad {
    color: var(--danger);
    border-color: rgba(var(--neg-rgb), 0.55);
    background: rgba(var(--neg-rgb), 0.1);
}

.tiles-box {
    display: grid;
    gap: 10px;

    padding: 12px 14px;

    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);

    background: rgba(0, 0, 0, 0.22);
}

.tiles-box__head h3 {
    font-size: 0.9rem;
}

.tiles-box__head p {
    margin-top: 2px;

    font-size: 0.76rem;
    color: var(--muted);
}

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

    .chart {
        grid-column: 1 / -1;
        order: 3;
    }
}

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

    .trainer__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   AJUSTE FINO
========================================= */

.modes {
    grid-template-columns: repeat(3, 1fr);

    width: min(900px, 100%);
}

.trainer__text p+p,
.trainer__text .numbers {
    margin-top: 10px;
}

.stat--multi {
    gap: 12px;
}

.metric {
    display: grid;
    gap: 5px;
}

.metric strong {
    font-size: 1.7rem;
}

.stat__bar--violet i {
    background: #a78bfa;
}

.stat__bar--green i {
    background: var(--success);
}

.chart__key--old {
    color: var(--success);
}

.chart__key--old::before {
    background: var(--success);
}

.exam-stack {
    display: grid;
    align-content: start;
    gap: 8px;
}

.summary {
    max-width: 640px;
}

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

.trainer__text {
    max-width: 78ch;

    font-size: 0.97rem;
    line-height: 1.55;
    color: #d4dcea;
}

.trainer__text b {
    color: #fff;
}

/* =========================================
   LÍNEA DE TIEMPO ÚNICA Y AVISOS
========================================= */

.modes {
    grid-template-columns: repeat(4, 1fr);

    width: 100%;
}

.trainer__progress {
    display: flex;
    align-items: center;
    gap: 12px;

    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.trainer__progress-bar {
    flex: 1;

    height: 4px;

    border-radius: 4px;
    background: var(--glass-2);

    overflow: hidden;
}

.trainer__progress-bar i {
    display: block;

    width: 0;
    height: 100%;

    background: var(--accent-2);

    transition: width 0.3s ease;
}

.trainer__hint {
    padding: 10px 14px;

    border: 1px dashed rgba(var(--pos-rgb), 0.45);
    border-radius: var(--radius-sm);

    font-size: 0.88rem;
    color: #cdd6e4;

    background: rgba(var(--pos-rgb), 0.07);
}

.trainer__hint.is-done {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(52, 211, 153, 0.08);
}

.trainer__hint b {
    color: #fff;
}

.button.is-nudge {
    animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
    0%,
    100% {
        box-shadow: 0 8px 24px rgba(var(--acc-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(var(--acc-rgb), 0.28), 0 8px 24px rgba(var(--acc-rgb), 0.45);
    }
}

.timeline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.timeline .chip-button {
    flex: none;

    width: 38px;
    min-height: 38px;

    justify-content: center;

    font-size: 1.2rem;
    line-height: 1;
}

.timeline__track {
    position: relative;

    flex: 1;

    padding-bottom: 30px;
}

.timeline__track .trainer__slider {
    display: block;

    height: 24px;
}

.timeline__marks {
    position: absolute;
    right: 8px;
    bottom: 2px;
    left: 8px;

    height: 24px;
}

.timeline__mark {
    position: absolute;
    left: calc(var(--at) * 100%);

    display: grid;
    place-items: center;

    width: 22px;
    height: 22px;
    margin-left: -11px;

    border: 1px solid var(--border);
    border-radius: 50%;

    font-size: 0.68rem;
    font-weight: 800;
    color: var(--muted);

    background: var(--panel-2);

    cursor: pointer;
}

.timeline__mark.is-on {
    color: #04121a;
    border-color: transparent;
    background: var(--accent-2);
}

.chart__key--ghost {
    color: var(--faint);
}

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

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

/* =========================================
   DISTRIBUCIÓN DE LAS PÁGINAS DE GRABACIONES
========================================= */

/* Porcentajes en fila, debajo de la red */
.meters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.meters .stat {
    gap: 8px;
}

.meters .stat strong {
    font-size: 1.9rem;
}

.meters__note {
    grid-column: 1 / -1;

    margin-top: -4px;

    font-size: 0.72rem;
    color: var(--faint);
}

/* Los exámenes ocupan todo el ancho, uno al lado del otro */
.trainer__grid {
    grid-template-columns: 1fr;
}

.exam-stack {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.exam-stack>.stat__sub {
    grid-column: 1 / -1;
}

.tiles--exam {
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
}

/* Gráfico en la columna izquierda */
.stage__draw .chart {
    margin-top: 16px;
}

.stage__draw .chart canvas {
    height: 200px;
}

.stage__draw .chart__legend {
    margin-top: 4px;
}

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

    .exam-stack {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ACORDEÓN "¿POR QUÉ?"
========================================= */

.why-wrap {
    margin-bottom: 18px;
}

.why-toggle {
    display: flex;
    align-items: center;
    gap: 6px 16px;

    width: 100%;
    min-height: 54px;
    padding: 10px 18px;

    border: 1px solid var(--border);
    border-radius: 16px;

    text-align: left;

    background:
        linear-gradient(180deg, rgba(var(--pos-rgb), 0.06), rgba(var(--pos-rgb), 0.02)),
        var(--panel);

    cursor: pointer;

    transition: border-color 0.2s ease, background 0.2s ease;
}

.why-toggle:hover:not(:disabled) {
    border-color: rgba(var(--pos-rgb), 0.5);
}

.why-toggle:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.why-toggle:disabled {
    cursor: default;
    opacity: 0.85;
}

.why-toggle__title {
    flex: none;

    font-size: 0.95rem;
    font-weight: 800;
}

.why-toggle__summary {
    flex: 1;

    min-width: 0;

    font-size: 0.82rem;
    color: var(--muted);
}

.why-toggle__chevron {
    flex: none;

    font-style: normal;
    font-size: 1.1rem;
    color: var(--accent-2);

    transition: transform 0.25s ease;
}

.why-toggle.is-open .why-toggle__chevron {
    transform: rotate(180deg);
}

.why-wrap .why {
    margin-top: 12px;
}

@media (max-width: 640px) {
    .why-toggle {
        flex-wrap: wrap;
    }

    .why-toggle__summary {
        order: 3;
        flex-basis: 100%;
    }
}

/* =========================================
   INTEGRACIÓN EN AKUTANGULO.COM
   (enlace de salto, migas, texto SEO y cierre)
========================================= */

.skip-link {
    position: absolute;
    left: 12px;
    top: -64px;
    z-index: 100;

    padding: 10px 16px;

    border-radius: var(--radius-sm);

    background: var(--accent-2);
    color: #04121a;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: 12px;

    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Migas de pan: mismo aspecto que las del resto del sitio (bloque .aku-migas de la hoja global),
   con el primer enlace dibujado con las letras de la marca. */
.aku-migas {
    margin-bottom: 18px;

    font-size: 0.875rem;
    line-height: 1.5;
}

.aku-migas ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem 0.5rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.aku-migas li {
    color: #b7b7c4;
}

.aku-migas li + li::before {
    content: "›";
    content: "›" / "";

    margin-right: 0.5rem;

    color: #b54ade;
}

.aku-migas a {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;

    color: #b7b7c4;
    text-decoration: underline;
    text-decoration-color: rgba(181, 74, 222, 0.6);
    text-underline-offset: 0.25em;

    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.aku-migas a:hover {
    color: #f8f8fc;
    text-decoration-color: #00c2ff;
}

.aku-migas [aria-current] {
    color: #f8f8fc;
    font-weight: 600;
}

.aku-migas .marca-tipografica-akutangulo {
    font-family: bauhouse_akutangulo, sans-serif;
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;

    color: #d8b4fe;
    text-decoration: none;
    text-shadow: 0 0 9px rgba(147, 0, 211, 0.55);
}

.aku-migas .marca-tipografica-akutangulo:hover,
.aku-migas .marca-tipografica-akutangulo:focus-visible {
    color: #f8f8fc;
    text-decoration: underline;
    text-decoration-color: #00c2ff;
    text-underline-offset: 0.3em;
}

@media (prefers-reduced-motion: reduce) {
    .aku-migas a {
        transition: none;
    }
}

.aku-migas a:focus-visible,
.seo-article a:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;

    border-radius: 4px;
}

.seo-article {
    width: min(52rem, 100%);
    margin: 56px auto 0;

    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.seo-article h2 {
    margin: 36px 0 10px;

    color: var(--text);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.25;
}

.seo-article h2:first-child {
    margin-top: 0;
}

.seo-article p,
.seo-article ul,
.seo-article ol {
    margin: 0 0 14px;
}

.seo-article ul,
.seo-article ol {
    padding-left: 1.3rem;
}

.seo-article li {
    margin-bottom: 6px;
}

.seo-article strong {
    color: var(--text);
}

.seo-article a:not(.seo-link) {
    color: var(--accent-2);
    text-underline-offset: 3px;
}

.seo-article a:not(.seo-link):hover {
    color: #ffffff;
}

.seo-cta {
    margin-top: 40px;
    padding: 22px 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--glass-1);
}

.seo-cta h2 {
    margin-top: 0;

    font-size: 1.2rem;
}

.seo-cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 16px 0 0;
}

.seo-link {
    display: inline-flex;
    align-items: center;

    min-height: 44px;
    padding: 0 18px;

    border: 1px solid var(--border);
    border-radius: var(--pill);

    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.seo-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.seo-link:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.seo-link-primary {
    border-color: transparent;

    background: linear-gradient(135deg, #9300d3, #5b3fe0);
}

.seo-link-primary:hover {
    background: linear-gradient(135deg, #a410e6, #6a4cf0);
}

.shell:focus {
    outline: none;
}

/* =========================================
   MODO «COBALTO» DEL SITIO
   (lo elige el visitante con el interruptor del header; mismos valores que el sitio)
========================================= */

html[data-atmosphere="cobalto"] {
    --bg: #0b1727;
    --panel: #12253f;
    --panel-2: #17304f;
}

html[data-atmosphere="cobalto"] body {
    background:
        radial-gradient(circle at 15% -5%, rgba(77, 216, 255, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(147, 0, 211, 0.12), transparent 30rem),
        var(--bg);

    background-attachment: fixed;
}
