html:has(body.ehco-happs-page), body.ehco-happs-page {
    overflow: clip;
    scrollbar-gutter: auto;
}
.ehco-happs-page .main-page-wrapper > .wd-content-layout.container:has(> :is(.happs-ecosystem, .happs-stage)) {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.happs-ecosystem {
    --board-green: #b6f881;
    width: 100%;
    margin: 0 auto;
    padding: 0;

    color: #eaf3e9;
}
.happs-board-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}
.happs-board {
    position: relative;
    height: calc(100dvh - 68px);
    isolation: isolate;
    border: 0;
    overflow: clip;
    background-color: #0b130f;
    background-image: radial-gradient(ellipse, #6bd74b20, transparent 70%),
        linear-gradient(#81d97612 1px, transparent 1px),
        linear-gradient(90deg, #81d97612 1px, transparent 1px);
    background-size: auto, 24px 24px, 24px 24px;
}
.happs-board .happs-piece {
    --accent: #9fceff;
    --piece-width: min(88px, 6.1%);
    --piece-height: 52px;
    --initial-x: var(--desktop-x);
    --initial-y: 32px;
    position: absolute !important;
    z-index: 1;
    left: clamp(var(--piece-width) / 2, var(--x, var(--initial-x)), 100% - var(--piece-width) / 2);
    top: clamp(var(--piece-height) / 2, var(--y, var(--initial-y)), 100% - var(--piece-height) / 2);
    translate: -50% -50%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 4px;
    color: #eaf3e9;
    font: 600 clamp(9px, .78vw, 12px)/1.1 system-ui, sans-serif;
    text-transform: none;
    white-space: nowrap;
    width: var(--piece-width);
    min-width: 0;
    max-width: none;
    margin: 0;
    height: var(--piece-height);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.happs-piece > svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.happs-board .happs-piece--nucleo, .happs-board .happs-piece--principal { --accent: var(--board-green); }
.happs-board .happs-piece--ia { --accent: #d7b7ff; }
.happs-board .happs-piece--prevista { --accent: #ffcc8b; }
.happs-piece:hover svg, .happs-piece:focus-visible svg { filter: drop-shadow(0 0 5px var(--accent)); }
.happs-piece:focus-visible { z-index: 2; outline: 2px solid var(--accent); outline-offset: 3px; }
.happs-piece.is-dragging { z-index: 3 !important; cursor: grabbing; }


.happs-core {
    position: absolute;
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    width: clamp(110px, 17vw, 250px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid #9dea70;
    border-radius: 50%;
    box-shadow: 0 0 0 8px #8bea451a, 0 0 55px #79e55244;
    pointer-events: none;
}
.happs-core img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.happs-core .happs-green, .happs-core .happs-blue { opacity: 0; animation: 12s ease-in-out infinite; }
.happs-core .happs-green { animation-name: happs-show-green; }
.happs-core .happs-blue { animation-name: happs-show-blue; }
@keyframes happs-show-green { 0%,20%,76%,100% { opacity: 0; } 30%,65% { opacity: 1; } }
@keyframes happs-show-blue { 0%,50%,96%,100% { opacity: 0; } 60%,86% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .happs-core .happs-green, .happs-core .happs-blue { animation: none; }
}
@media (max-width: 1050px) {
    .happs-board .happs-piece {
        --initial-x: var(--mobile-x);
        --initial-y: var(--mobile-y);
        --piece-width: min(82px, 12%);
        --piece-height: 48px;

    }
    .happs-piece > svg { width: 26px; height: 26px; }
    .happs-piece small { font-size: 8px; }
}
@media (max-height: 520px) and (max-width: 1050px) {
    .happs-core { width: 95px; top: 72%; }
}


.happs-stage {
    position: relative;
    isolation: isolate;
    overflow: clip;
    width: 100%;
    height: calc(100dvh - 68px);
    background: radial-gradient(ellipse, #132413 0%, #090e0b 35%, #050706 72%);
}
.happs-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(#9bff8520 1px, transparent 1px), linear-gradient(90deg, #9bff8520 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse, #0009, transparent 83%);
}
.happs-traces {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #579038;
    stroke-width: 1.1;
    opacity: .74;
}
.happs-traces .pulse { stroke: #beff85; stroke-width: 2; stroke-dasharray: 14 986; animation: happs-current 4s linear infinite; }
@keyframes happs-current { to { stroke-dashoffset: -1000; } }
@media (prefers-reduced-motion: reduce) { .happs-traces .pulse { animation: none; } }
.happs-stage .happs-core { top: 50%; }
.happs-board-link {
    position: absolute;
    bottom: clamp(16px, 6vh, 48px);
    left: 50%;
    translate: -50% 0;
    padding: 9px 17px;
    border: 1px solid #7aba4b;
    border-radius: 6px;
    background: #0c150e;
    color: #d8ffa4;
    white-space: nowrap;
}
.happs-board-link:hover, .happs-board-link:focus-visible { color: #fff; }


@media (max-width: 600px) {
    .happs-board .happs-piece {
        --initial-x: var(--narrow-x);
        --initial-y: var(--narrow-y);
        --piece-width: min(76px, 19.5%);
    }
}
