@keyframes graph-bg-breathe {
    0%, 100% { box-shadow: inset 0 0 60px rgba(234, 88, 12, 0.04); }
    50% { box-shadow: inset 0 0 90px rgba(234, 88, 12, 0.09); }
}

@keyframes hub-pulse {
    0%, 100% { box-shadow: 0 0 32px rgba(234, 88, 12, 0.18), inset 0 0 20px rgba(234, 88, 12, 0.06); }
    50% { box-shadow: 0 0 48px rgba(234, 88, 12, 0.32), inset 0 0 28px rgba(234, 88, 12, 0.1); }
}

@keyframes edge-flow-in {
    to { stroke-dashoffset: 20; }
}

@keyframes ring-spin {
    to { transform: rotate(360deg); }
}

/* ── Mix section ── */
.mix-section {
    max-width: 920px;
    margin: 0 auto 48px;
    padding: 0 4px;
}

.mix-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 920 / 620;
    background: radial-gradient(ellipse at 50% 45%, rgba(234, 88, 12, 0.08) 0%, transparent 55%), #0d0a09;
    border-radius: 20px;
    border: 1px solid rgba(234, 88, 12, 0.18);
    overflow: hidden;
    animation: graph-bg-breathe 8s ease-in-out infinite;
}

.mix-wrap svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.mix-ring {
    fill: none;
    stroke-width: 1;
    transform-box: fill-box;
    transform-origin: center;
}

.mix-ring--outer {
    stroke: rgba(251, 146, 60, 0.14);
    stroke-dasharray: 6 10;
    animation: ring-spin 64s linear infinite;
}

.mix-ring--inner {
    stroke: rgba(251, 146, 60, 0.1);
    stroke-dasharray: 4 8;
    animation: ring-spin 48s linear infinite reverse;
}

.mix-wrap svg line {
    stroke: rgba(180, 90, 50, 0.18);
    stroke-width: 1;
    stroke-dasharray: 3 7;
    animation: edge-flow-in 4.5s linear infinite;
    transition: stroke 0.2s, stroke-width 0.2s;
}

.mix-wrap svg line.is-lit {
    stroke: rgba(251, 146, 60, 0.55);
    stroke-width: 1.25;
    animation-duration: 2.2s;
}

.mix-pulse-dot {
    fill: rgba(251, 146, 60, 0.85);
    filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.6));
    opacity: 0.75;
}

.mix-nodes {
    position: absolute;
    inset: 0;
}

.mix-node {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
    background: rgba(15, 10, 8, 0.82);
    cursor: default;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
    user-select: none;
    z-index: 2;
}

.mix-node--hub {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    letter-spacing: -0.01em;
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.55);
    background: rgba(20, 12, 8, 0.94);
    box-shadow: 0 0 32px rgba(234, 88, 12, 0.22), inset 0 0 20px rgba(234, 88, 12, 0.06);
    z-index: 4;
    cursor: pointer;
    animation: hub-pulse 3.5s ease-in-out infinite;
}

.mix-node--periphery {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.4);
    font-size: 0.75rem;
    z-index: 3;
}

.mix-node--accent {
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.35);
    font-size: 0.8125rem;
    z-index: 3;
}

.mix-node--primary {
    color: #f5f5f4;
    border-color: rgba(255, 255, 255, 0.16);
    font-size: 0.75rem;
    z-index: 2;
}

.mix-node:hover,
.mix-node.is-active {
    border-color: rgba(251, 146, 60, 0.7);
    box-shadow: 0 0 16px rgba(234, 88, 12, 0.2);
    color: #fdba74;
}

/* ── Badge base + color tokens ── */
.mix-badge {
    --badge-accent: #fb923c;
    --badge-accent-rgb: 251, 146, 60;
    --badge-surface: rgba(18, 14, 12, 0.94);
    --badge-border: rgba(var(--badge-accent-rgb), 0.28);
    --badge-glow: rgba(var(--badge-accent-rgb), 0.45);

    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    min-width: 72px;
    min-height: 72px;
    border: 1px solid var(--badge-border);
    border-radius: 16px;
    background: var(--badge-surface);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    z-index: 1;
    transition: border-color 0.2s, box-shadow 0.25s, background 0.2s, transform 0.2s;
}

.mix-badge--role {
    z-index: 2;
    min-width: 68px;
    min-height: 68px;
    padding: 10px 12px;
}

.mix-badge--role .mix-badge__icon {
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.mix-badge--role .mix-badge__icon img {
    border-radius: 0;
}

.mix-badge__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 13px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mix-badge__icon img {
    display: block;
    object-fit: contain;
    border-radius: inherit;
}

/* ── Фон внутри PNG (белый → другой) ── */

.mix-badge__icon--white {
    background: #ffffff;
}

.mix-badge__icon--white img {
    mix-blend-mode: normal;
}

.mix-badge__icon--cream {
    background: linear-gradient(155deg, #fff9f2 0%, #f3e8d8 100%);
    box-shadow: inset 0 0 0 1px rgba(180, 140, 90, 0.12);
}

.mix-badge__icon--cream img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--cool {
    background: linear-gradient(155deg, #f1f5f9 0%, #e2e8f0 100%);
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.12);
}

.mix-badge__icon--cool img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--sky {
    background: linear-gradient(155deg, #e0f2fe 0%, #bae6fd 100%);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.mix-badge__icon--sky img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--mint {
    background: linear-gradient(155deg, #ecfdf5 0%, #a7f3d0 100%);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.22);
}

.mix-badge__icon--mint img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--gold {
    background: linear-gradient(155deg, #fffbeb 0%, #fde68a 100%);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.25);
}

.mix-badge__icon--gold img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--rose {
    background: linear-gradient(155deg, #fff1f2 0%, #fecdd3 100%);
    box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.22);
}

.mix-badge__icon--rose img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--lavender {
    background: linear-gradient(155deg, #f5f3ff 0%, #ddd6fe 100%);
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22);
}

.mix-badge__icon--lavender img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--peach {
    background: linear-gradient(155deg, #fff7ed 0%, #fed7aa 100%);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.22);
}

.mix-badge__icon--peach img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--brand {
    background: linear-gradient(
        155deg,
        rgba(var(--badge-accent-rgb), 0.22) 0%,
        rgba(var(--badge-accent-rgb), 0.38) 100%
    );
    box-shadow: inset 0 0 0 1px rgba(var(--badge-accent-rgb), 0.28);
}

.mix-badge__icon--brand img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--brandDeep {
    background: linear-gradient(
        155deg,
        rgba(var(--badge-accent-rgb), 0.45) 0%,
        rgba(var(--badge-accent-rgb), 0.72) 100%
    );
    box-shadow: inset 0 0 0 1px rgba(var(--badge-accent-rgb), 0.35);
}

.mix-badge__icon--brandDeep img {
    mix-blend-mode: multiply;
    filter: contrast(1.06) saturate(1.08);
}

.mix-badge__icon--dark {
    background: linear-gradient(155deg, #1e2430 0%, #0f1218 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mix-badge__icon--dark img {
    mix-blend-mode: screen;
    filter: contrast(1.12) brightness(1.05);
}

.mix-badge__icon--charcoal {
    background: linear-gradient(155deg, #27272a 0%, #09090b 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mix-badge__icon--charcoal img {
    mix-blend-mode: lighten;
    filter: contrast(1.08);
}

.mix-badge__icon--night {
    background: linear-gradient(155deg, #0f172a 0%, #1e1b4b 100%);
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.18);
}

.mix-badge__icon--night img {
    mix-blend-mode: screen;
    filter: saturate(1.1);
}

.mix-badge__icon--glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.mix-badge__icon--glass img {
    mix-blend-mode: multiply;
    opacity: 0.94;
}

.mix-badge__icon--gradient {
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 45%, #dbeafe 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.mix-badge__icon--gradient img {
    mix-blend-mode: multiply;
}

.mix-badge__icon--knockout {
    background: var(--badge-accent);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.mix-badge__icon--knockout img {
    mix-blend-mode: multiply;
    filter: contrast(1.05);
}

.mix-badge__icon--fade {
    background: transparent;
    box-shadow: none;
}

.mix-badge__icon--fade img {
    mix-blend-mode: multiply;
    opacity: 0.92;
}

.mix-badge img {
    display: block;
    object-fit: contain;
    pointer-events: none;
    width: auto;
    height: auto;
}

.mix-badge--system img {
    max-height: 56px;
    max-width: 80px;
}

.mix-badge--role img {
    max-height: 50px;
    max-width: 76px;
}

.mix-badge:hover,
.mix-badge.is-mix-active {
    border-color: rgba(var(--badge-accent-rgb), 0.65);
    box-shadow: 0 8px 26px var(--badge-glow), 0 0 0 1px rgba(var(--badge-accent-rgb), 0.12);
}

/* ── Visual formats: форма + фирменный цвет формата ── */

.mix-badge--vis-card {
    --badge-accent: #fb923c;
    --badge-accent-rgb: 251, 146, 60;
    --badge-surface: linear-gradient(145deg, rgba(32,18,10,0.96) 0%, rgba(18,14,12,0.94) 100%);
    background: var(--badge-surface);
    box-shadow: 0 8px 22px rgba(0,0,0,0.32), inset 0 1px 0 rgba(var(--badge-accent-rgb), 0.12);
}

.mix-badge--vis-pill {
    --badge-accent: #34d399;
    --badge-accent-rgb: 52, 211, 153;
    --badge-surface: rgba(8, 32, 24, 0.92);
    border-radius: 999px;
    min-width: 88px;
    min-height: 52px;
    padding: 8px 18px;
    background: linear-gradient(90deg, rgba(var(--badge-accent-rgb), 0.14) 0%, var(--badge-surface) 55%);
}

.mix-badge--vis-circle {
    --badge-accent: #38bdf8;
    --badge-accent-rgb: 56, 189, 248;
    --badge-surface: radial-gradient(circle at 35% 30%, rgba(var(--badge-accent-rgb), 0.18) 0%, rgba(8,18,28,0.92) 65%);
    border-radius: 50%;
    min-width: 64px;
    min-height: 64px;
    padding: 10px;
    box-shadow: 0 0 0 2px rgba(var(--badge-accent-rgb), 0.15), 0 8px 22px rgba(0,0,0,0.3);
}

.mix-badge--vis-glass {
    --badge-accent: #bae6fd;
    --badge-accent-rgb: 186, 230, 253;
    --badge-surface: rgba(12, 24, 40, 0.45);
    background: linear-gradient(135deg, rgba(var(--badge-accent-rgb), 0.12) 0%, rgba(255,255,255, 0.04) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(var(--badge-accent-rgb), 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(var(--badge-accent-rgb), 0.2);
}

.mix-badge--vis-gradient {
    --badge-accent: #fb923c;
    --badge-accent-rgb: 251, 146, 60;
    border: none;
    background: rgba(18, 14, 12, 0.94);
    isolation: isolate;
}

.mix-badge--vis-gradient::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #fb923c 0%, #f472b6 48%, #a78bfa 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

.mix-badge--vis-glow {
    --badge-accent: #fbbf24;
    --badge-accent-rgb: 251, 191, 36;
    --badge-surface: rgba(24, 18, 6, 0.9);
    background: var(--badge-surface);
    border-color: rgba(var(--badge-accent-rgb), 0.4);
    box-shadow:
        0 0 22px rgba(var(--badge-accent-rgb), 0.55),
        0 0 44px rgba(var(--badge-accent-rgb), 0.22),
        inset 0 0 18px rgba(var(--badge-accent-rgb), 0.08);
    animation: badge-glow-pulse 3s ease-in-out infinite;
}

@keyframes badge-glow-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(var(--badge-accent-rgb), 0.45), 0 0 36px rgba(var(--badge-accent-rgb), 0.18), inset 0 0 14px rgba(var(--badge-accent-rgb), 0.06); }
    50% { box-shadow: 0 0 28px rgba(var(--badge-accent-rgb), 0.65), 0 0 52px rgba(var(--badge-accent-rgb), 0.28), inset 0 0 22px rgba(var(--badge-accent-rgb), 0.12); }
}

.mix-badge--vis-outline {
    --badge-accent: #fb7185;
    --badge-accent-rgb: 251, 113, 133;
    background: rgba(var(--badge-accent-rgb), 0.06);
    border: 2px solid rgba(var(--badge-accent-rgb), 0.55);
    box-shadow: none;
}

.mix-badge--vis-minimal {
    --badge-accent: #a78bfa;
    --badge-accent-rgb: 167, 139, 250;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: auto;
    min-height: auto;
    padding: 6px;
}

.mix-badge--vis-minimal img {
    filter: drop-shadow(0 4px 14px rgba(var(--badge-accent-rgb), 0.55));
}

.mix-badge--vis-soft {
    --badge-accent: #c4b5fd;
    --badge-accent-rgb: 196, 181, 253;
    --badge-surface: rgba(248, 246, 255, 0.96);
    background: var(--badge-surface);
    border-color: rgba(var(--badge-accent-rgb), 0.55);
    box-shadow: 0 4px 18px rgba(var(--badge-accent-rgb), 0.2);
}

.mix-badge--vis-neon {
    --badge-accent: #22d3ee;
    --badge-accent-rgb: 34, 211, 238;
    --badge-neon2-rgb: 244, 114, 182;
    background: rgba(8, 6, 16, 0.92);
    border: 1px solid rgba(var(--badge-accent-rgb), 0.7);
    box-shadow:
        0 0 6px rgba(var(--badge-accent-rgb), 0.75),
        0 0 16px rgba(var(--badge-neon2-rgb), 0.45),
        inset 0 0 14px rgba(var(--badge-accent-rgb), 0.06);
}

.mix-badge--vis-hex {
    --badge-accent: #2dd4bf;
    --badge-accent-rgb: 45, 212, 191;
    --badge-surface: linear-gradient(160deg, rgba(var(--badge-accent-rgb), 0.2) 0%, rgba(6,24,22,0.92) 100%);
    background: var(--badge-surface);
    border-color: rgba(var(--badge-accent-rgb), 0.45);
    border-radius: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    min-width: 70px;
    min-height: 78px;
    padding: 12px 10px;
}

.mix-badge--vis-float {
    --badge-accent: #818cf8;
    --badge-accent-rgb: 129, 140, 248;
    --badge-surface: rgba(12, 14, 32, 0.92);
    background: var(--badge-surface);
    border-color: rgba(var(--badge-accent-rgb), 0.3);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.48),
        0 8px 20px rgba(var(--badge-accent-rgb), 0.22);
}

.mix-badge--vis-dot {
    --badge-accent: #f472b6;
    --badge-accent-rgb: 244, 114, 182;
    --badge-surface: rgba(24, 10, 20, 0.92);
    background: var(--badge-surface);
}

.mix-badge--vis-dot::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--badge-accent);
    box-shadow: 0 0 12px rgba(var(--badge-accent-rgb), 0.9);
}

.mix-badge--vis-mono {
    --badge-accent: #94a3b8;
    --badge-accent-rgb: 148, 163, 184;
    --badge-hover-rgb: 110, 231, 183;
    background: rgba(14, 16, 22, 0.75);
    border-color: rgba(var(--badge-accent-rgb), 0.25);
}

.mix-badge--vis-mono img {
    filter: grayscale(1) brightness(1.1);
    transition: filter 0.25s;
}

.mix-badge--vis-mono:hover,
.mix-badge--vis-mono.is-mix-active {
    border-color: rgba(110, 231, 183, 0.5);
    box-shadow: 0 8px 26px rgba(110, 231, 183, 0.35);
}

.mix-badge--vis-mono:hover img,
.mix-badge--vis-mono.is-mix-active img {
    filter: none;
}

.mix-badge--vis-stamp {
    --badge-accent: #e11d48;
    --badge-accent-rgb: 225, 29, 72;
    --badge-surface: rgba(20, 6, 10, 0.88);
    background: var(--badge-surface);
    border-radius: 6px;
    border-style: dashed;
    border-color: rgba(var(--badge-accent-rgb), 0.55);
}

.mix-badge--vis-stamp .mix-badge__icon {
    transform: rotate(-4deg);
}

.mix-badge--vis-ring {
    --badge-accent: #c084fc;
    --badge-accent-rgb: 192, 132, 252;
    --badge-surface: rgba(18, 10, 28, 0.92);
    background: var(--badge-surface);
    box-shadow:
        0 0 0 3px var(--badge-surface),
        0 0 0 5px rgba(var(--badge-accent-rgb), 0.45),
        0 8px 22px rgba(0, 0, 0, 0.32);
}

.mix-badge--vis-wide {
    --badge-accent: #a3e635;
    --badge-accent-rgb: 163, 230, 53;
    --badge-surface: rgba(14, 20, 6, 0.92);
    background: linear-gradient(90deg, rgba(var(--badge-accent-rgb), 0.1) 0%, var(--badge-surface) 60%);
    border-color: rgba(var(--badge-accent-rgb), 0.4);
    border-radius: 14px;
    min-width: 96px;
    min-height: 58px;
    padding: 8px 14px;
}

.mix-caption code {
    font-size: 0.75em;
    color: #fb923c;
    background: rgba(251, 146, 60, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.mix-section--knockout {
    margin-top: 8px;
}

.mix-section__title {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 600;
    color: #f4f4f5;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.mix-section__title span {
    background: linear-gradient(135deg, #f2c811 0%, #fbbf24 50%, #fde68a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mix-section__sub {
    text-align: center;
    font-size: 0.875rem;
    color: #a1a1aa;
    max-width: 560px;
    margin: 0 auto 24px;
}

.mix-wrap--knockout svg line {
    stroke: rgba(251, 146, 60, 0.55);
    stroke-width: 1.25;
    animation-duration: 2.2s;
}

.mix-wrap--knockout svg line.is-lit {
    stroke: rgba(251, 146, 60, 0.85);
    stroke-width: 1.5;
    animation-duration: 1.6s;
}

.mix-wrap--knockout .mix-pulse-dot {
    fill: rgba(251, 146, 60, 0.95);
    opacity: 0.9;
}

.mix-wrap--knockout .mix-badge--vis-minimal {
    z-index: 2;
}

.mix-wrap--knockout .mix-badge__icon--knockout {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(var(--badge-accent-rgb), 0.35);
}

.mix-wrap--knockout .mix-badge__icon--knockout img {
    filter: contrast(1.06) saturate(1.05);
}

.mix-caption {
    text-align: center;

/* Главная: схема внутри светлой секции */
.ecosystem-diagram-wrap {
    padding: 12px 8px 16px;
}
.ecosystem-diagram-wrap .mix-wrap {
    margin: 0 auto;
}
.ecosystem-diagram-wrap .mix-wrap svg {
    max-height: min(72vh, 640px);
}
@media (max-width: 640px) {
    .ecosystem-diagram-wrap .mix-wrap { aspect-ratio: 4 / 5; }
}
