/* Exact styles for the interactive system demo, sourced from the approved reference. */
#how-it-works {
    min-height: 100vh;
    padding: 100px 0 60px;
    scroll-margin-top: 0;
}

        .s2-header {
            text-align: center;
            margin-bottom: 48px;
        }

        .s2-title {
            font-size: clamp(2.2rem, 4vw, 3rem);
            font-weight: 900;
            color: var(--text-primary);
            line-height: 1.1;
            letter-spacing: -0.03em;
            transition: color 0.4s;
        }

        .s2-subtitle {
            font-size: 1.1rem;
            color: var(--text-secondary);
            margin-top: 16px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.6;
            transition: color 0.4s;
        }

        .s2-simulator-grid {
            display: grid;
            grid-template-columns: 0.90fr 1.2fr 0.90fr;
            gap: 24px;
            align-items: stretch;
        }

        .s2-panel {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.005) 100%);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 20px;
            padding: 24px;
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.3), 
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
            display: flex;
            flex-direction: column;
            gap: 20px;
            transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease, background 0.4s;
            min-height: 520px;
            position: relative;
            overflow: hidden;
        }

        body.light-theme .s2-panel {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.45) 100%);
            border: 1px solid rgba(0, 0, 0, 0.08);
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.05), 
                inset 0 1px 1px rgba(255, 255, 255, 0.7);
        }

        .s2-panel:hover {
            border-color: rgba(87, 243, 87, 0.45);
            box-shadow: 
                0 0 40px rgba(87, 243, 87, 0.1),
                0 24px 50px rgba(0, 0, 0, 0.5), 
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
        }

        body.light-theme .s2-panel:hover {
            border-color: rgba(20, 170, 20, 0.45);
            box-shadow: 
                0 0 30px rgba(20, 170, 20, 0.08),
                0 18px 45px rgba(0, 0, 0, 0.1), 
                inset 0 1px 1px rgba(255, 255, 255, 0.85);
            transform: translateY(-2px);
        }

        .s2-panel__tag {
            font-family: var(--font-mono);
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--accent-light);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            padding-bottom: 12px;
            margin-bottom: 4px;
            transition: color 0.4s;
        }

        body.light-theme .s2-panel__tag {
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            color: var(--accent-dark);
        }

        /* --- PLAYER PANEL --- */
        .s2-panel--player {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        @keyframes play-pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(87, 243, 87, 0.5), 0 0 20px var(--accent-glow);
            }
            70% {
                box-shadow: 0 0 0 12px rgba(87, 243, 87, 0), 0 0 25px var(--accent-glow);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(87, 243, 87, 0), 0 0 20px var(--accent-glow);
            }
        }

        .s2-audio-widget {
            display: flex;
            align-items: center;
            gap: 16px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.04);
            padding: 16px;
            border-radius: 14px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
            transition: background 0.4s, border-color 0.4s;
        }

        body.light-theme .s2-audio-widget {
            background: rgba(0, 0, 0, 0.02);
            border-color: rgba(0, 0, 0, 0.04);
        }

        .s2-play-btn {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--gradient-main);
            color: #000000;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 20px var(--accent-glow);
            transition: all 0.3s var(--ease-out-expo);
            flex-shrink: 0;
            animation: play-pulse 2s infinite ease-in-out;
        }

        .s2-play-btn:hover {
            transform: scale(1.08);
            box-shadow: 0 0 25px rgba(87, 243, 87, 0.6);
        }

        .s2-play-icon { width: 20px; height: 20px; transition: transform 0.2s ease; }
        .s2-audio-meta { flex: 1; min-width: 0; }
        
        .s2-audio-title {
            display: block;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: color 0.4s;
        }

        .s2-audio-time {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 4px;
            transition: color 0.4s;
        }

        .s2-waveform {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 120px;
            gap: 3px;
            padding: 20px 10px;
            background: rgba(255,255,255,0.015);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.03);
            transition: background 0.4s, border-color 0.4s;
        }

        body.light-theme .s2-waveform {
            background: rgba(0, 0, 0, 0.015);
            border-color: rgba(0, 0, 0, 0.03);
        }

        .s2-wave-bar {
            flex: 1;
            height: 30%;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 99px;
            transition: height 0.15s ease, background 0.3s;
        }

        body.light-theme .s2-wave-bar {
            background: rgba(0, 0, 0, 0.1);
        }

        .s2-panel--playing .s2-wave-bar {
            background: var(--accent-light);
        }

        body.light-theme .s2-panel--playing .s2-wave-bar {
            background: var(--accent-dark);
        }

        /* Зададим начальные высоты */
        .s2-wave-bar:nth-child(2n) { height: 45%; }
        .s2-wave-bar:nth-child(3n) { height: 60%; }
        .s2-wave-bar:nth-child(4n) { height: 25%; }
        .s2-wave-bar:nth-child(5n) { height: 75%; }

        .s2-audio-instruction {
            font-size: 0.8rem;
            color: var(--text-secondary);
            text-align: center;
            transition: color 0.4s;
        }

        /* --- TRANSCRIPT PANEL --- */
        .s2-chat-area {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: auto;
            flex: 1;
            padding-right: 0;
            max-height: 420px;
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }

        .s2-chat-area::-webkit-scrollbar {
            display: none; /* Hide scrollbar for Chrome, Safari and Opera */
        }

        .s2-bubble {
            padding: 10px 14px;
            border-radius: 14px;
            font-size: 0.85rem;
            line-height: 1.4;
            display: flex;
            flex-direction: column;
            gap: 4px;
            max-width: 90%;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s var(--ease-out-expo);
        }

        .s2-bubble.s2-reveal {
            opacity: 1;
            transform: translateY(0);
        }

        .s2-bubble--customer {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.04);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
        }

        .s2-bubble--symbolic {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.01) !important;
            border: 1px dashed rgba(255, 255, 255, 0.08) !important;
            gap: 16px;
            width: 100%;
            max-width: 100%;
        }

        .s2-bubble__symbolic-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            gap: 12px;
        }

        .s2-bubble__left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .s2-bubble__right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .s2-bubble__role-symbolic {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .s2-bubble__symbolic-wave {
            display: flex;
            align-items: center;
            gap: 2.5px;
            height: 12px;
        }

        .s2-bubble__symbolic-wave span {
            width: 1.5px;
            height: 6px;
            background: var(--text-muted);
            opacity: 0.4;
            border-radius: 1px;
        }

        /* Animate the tiny symbolic wave when s2-reveal is active */
        .s2-bubble.s2-reveal .s2-bubble__symbolic-wave span {
            animation: s2-symbolic-bounce 0.8s ease-in-out infinite alternate;
        }

        .s2-bubble.s2-reveal .s2-bubble__symbolic-wave span:nth-child(1) { animation-delay: 0.1s; height: 10px; }
        .s2-bubble.s2-reveal .s2-bubble__symbolic-wave span:nth-child(2) { animation-delay: 0.3s; height: 14px; }
        .s2-bubble.s2-reveal .s2-bubble__symbolic-wave span:nth-child(3) { animation-delay: 0.2s; height: 8px; }
        .s2-bubble.s2-reveal .s2-bubble__symbolic-wave span:nth-child(4) { animation-delay: 0.4s; height: 11px; }

        @keyframes s2-symbolic-bounce {
            0% { transform: scaleY(0.4); }
            100% { transform: scaleY(1.2); }
        }

        .s2-bubble__privacy-badge {
            font-size: 0.7rem;
            color: var(--text-muted);
            background: rgba(255, 255, 255, 0.03);
            padding: 2px 6px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 4px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }

        body.light-theme .s2-bubble--customer {
            background: rgba(0, 0, 0, 0.02);
            border-color: rgba(0, 0, 0, 0.04);
        }

        body.light-theme .s2-bubble--symbolic {
            background: rgba(0, 0, 0, 0.005) !important;
            border-color: rgba(0, 0, 0, 0.05) !important;
        }

        body.light-theme .s2-bubble__privacy-badge {
            background: rgba(0, 0, 0, 0.02);
            border-color: rgba(0, 0, 0, 0.03);
        }

        .s2-bubble--cashier {
            background: rgba(14, 123, 93, 0.08);
            border: 1px solid rgba(52, 214, 154, 0.08);
            align-self: flex-end;
            border-bottom-right-radius: 4px;
            color: #e2fdf5;
        }

        body.light-theme .s2-bubble--cashier {
            background: rgba(14, 123, 93, 0.06);
            border-color: rgba(14, 123, 93, 0.12);
            color: #0e7b5d;
        }

        .s2-bubble__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .s2-bubble__role {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        body.light-theme .s2-bubble__role { color: #1a1a2e; }

        .s2-bubble__time {
            font-family: var(--font-mono);
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        .s2-bubble__text {
            position: relative;
        }

        .s2-highlight-phrase {
            color: var(--accent-light);
            font-weight: 700;
            background: rgba(87, 243, 87, 0.1);
            padding: 1px 4px;
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        body.light-theme .s2-highlight-phrase {
            color: var(--accent-dark);
            background: rgba(20, 170, 20, 0.08);
        }

        .s2-ai-tag {
            display: inline-flex;
            margin-top: 6px;
            background: var(--accent-subtle);
            border: 1px solid var(--accent-border);
            color: var(--accent-light);
            font-family: var(--font-mono);
            font-size: 0.68rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 6px;
            opacity: 0;
            transform: scale(0.9) translateY(4px);
            transition: all 0.4s var(--ease-out-expo);
        }

        body.light-theme .s2-ai-tag {
            color: var(--accent-dark);
            background: rgba(20, 170, 20, 0.04);
            border-color: rgba(20, 170, 20, 0.15);
        }

        .s2-ai-tag.s2-tag-active {
            opacity: 1;
            transform: scale(1) translateY(0);
            animation: s2-pop 0.3s var(--ease-out-expo);
        }

        @keyframes s2-pop {
            0% { transform: scale(0.9); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        /* --- POS PANEL --- */
        .s2-panel--pos {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 20px;
        }

        .s2-receipt-container {
            background: #ffffff;
            color: #121214;
            padding: 20px;
            border-radius: 12px 12px 0 0;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            font-family: var(--font-sans);
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
        }

        body.light-theme .s2-receipt-container {
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(0, 0, 0, 0.04);
        }

        .s2-receipt-container::after {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 0;
            width: 100%;
            height: 6px;
            background: radial-gradient(circle, transparent, transparent 50%, #ffffff 50%, #ffffff) 0 0/8px 12px repeat-x;
        }

        .s2-receipt-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 2px dashed #e2e2e8;
            padding-bottom: 10px;
        }

        .s2-receipt-logo {
            font-weight: 900;
            font-size: 1.1rem;
            letter-spacing: -0.01em;
            color: #e91c1c;
        }

        .s2-receipt-title {
            font-family: var(--font-mono);
            font-size: 0.72rem;
            font-weight: 700;
            color: #888890;
        }

        .s2-receipt-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-height: 52px;
        }

        .s2-receipt-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .s2-receipt-item--pending {
            opacity: 0;
            transform: scale(0.95);
            max-height: 0;
            overflow: hidden;
            margin: 0;
            padding: 0;
            transition: all 0.5s var(--ease-out-expo);
            color: #14AA14;
        }

        .s2-receipt-item--added {
            opacity: 1;
            max-height: 24px;
            margin-top: 4px;
            transform: scale(1);
            animation: s2-receipt-flash 1s ease;
        }

        @keyframes s2-receipt-flash {
            0% { background: rgba(87, 243, 87, 0.2); }
            100% { background: transparent; }
        }

        .s2-receipt-divider {
            border-bottom: 1px dashed #e2e2e8;
        }

        .s2-receipt-total {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 800;
            font-size: 0.95rem;
        }

        .s2-motivation-widget {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 14px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            transition: background 0.4s, border-color 0.4s;
        }

        body.light-theme .s2-motivation-widget {
            background: rgba(0, 0, 0, 0.015);
            border-color: rgba(0, 0, 0, 0.05);
        }

        .s2-motivation-header {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .s2-cashier-avatar {
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            border: 1px solid rgba(255,255,255,0.08);
            transition: background 0.4s, border-color 0.4s;
        }

        body.light-theme .s2-cashier-avatar {
            background: rgba(0, 0, 0, 0.03);
            border-color: rgba(0, 0, 0, 0.06);
        }

        .s2-cashier-name {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-primary);
            transition: color 0.4s;
        }

        .s2-cashier-level {
            font-size: 0.7rem;
            color: var(--accent-light);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-top: 1px;
            transition: color 0.4s;
        }

        body.light-theme .s2-cashier-level { color: var(--accent-dark); }

        .s2-motivation-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.04);
            padding-top: 10px;
        }

        body.light-theme .s2-motivation-stats {
            border-top: 1px solid rgba(0, 0, 0, 0.04);
        }

        .s2-mot-label {
            font-size: 0.72rem;
            color: var(--text-secondary);
            transition: color 0.4s;
        }

        .s2-mot-val {
            font-size: 1.15rem;
            font-weight: 800;
            color: #ffffff;
            margin-top: 2px;
            transition: all 0.3s ease;
        }

        body.light-theme .s2-mot-val { color: #1a1a2e; }

        #s2MotBonus.s2-bonus-highlight {
            color: var(--accent-light);
            transform: scale(1.1);
            text-shadow: 0 0 10px rgba(87, 243, 87, 0.3);
        }

        body.light-theme #s2MotBonus.s2-bonus-highlight {
            color: var(--accent-dark);
            text-shadow: none;
        }

        .s2-xp-bar-container {
            height: 6px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 99px;
            overflow: hidden;
            margin-top: 4px;
            transition: background 0.4s;
        }

        body.light-theme .s2-xp-bar-container { background: rgba(0, 0, 0, 0.05); }

        .s2-xp-bar {
            height: 100%;
            background: var(--gradient-main);
            border-radius: 99px;
            transition: width 0.8s var(--ease-out-expo);
        }

        .s2-xp-badge {
            font-size: 0.75rem;
            text-align: center;
            font-weight: 600;
            color: var(--text-secondary);
            padding: 6px;
            background: rgba(255,255,255,0.01);
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        body.light-theme .s2-xp-badge { background: rgba(0, 0, 0, 0.01); }

        .s2-xp-badge.s2-alert-active {
            color: #ffffff;
            background: rgba(87, 243, 87, 0.1);
            border: 1px solid rgba(87, 243, 87, 0.2);
            animation: s2-badge-pulse 1s infinite alternate;
        }

        body.light-theme .s2-xp-badge.s2-alert-active {
            color: var(--accent-dark);
            background: var(--accent-subtle);
            border-color: var(--accent-border);
            animation: none;
        }

        @keyframes s2-badge-pulse {
            from { box-shadow: 0 0 5px rgba(87, 243, 87, 0.1); }
            to { box-shadow: 0 0 15px rgba(87, 243, 87, 0.3); }
        }

        @keyframes s2-always-scan {
            0% {
                top: -150px;
                opacity: 0;
            }
            5% {
                opacity: 1;
            }
            95% {
                opacity: 1;
            }
            100% {
                top: 100%;
                opacity: 0;
            }
        }

        /* --- Световой ИИ-Сканер на панели расшифровки (ВСЕГДА АКТИВНЫЙ) --- */
        .s2-scanner {
            position: absolute;
            top: -150px;
            left: 0;
            width: 100%;
            height: 150px;
            background: linear-gradient(180deg, transparent 0%, rgba(87, 243, 87, 0.02) 70%, rgba(87, 243, 87, 0.1) 100%);
            border-bottom: 1.5px solid rgba(87, 243, 87, 0.4);
            box-shadow: 0 4px 15px rgba(87, 243, 87, 0.1);
            pointer-events: none;
            z-index: 3;
            animation: s2-always-scan 5s linear infinite;
        }

        body.light-theme .s2-scanner {
            background: linear-gradient(180deg, transparent 0%, rgba(20, 170, 20, 0.01) 70%, rgba(20, 170, 20, 0.05) 100%);
            border-bottom: 1.5px solid rgba(20, 170, 20, 0.3);
            box-shadow: 0 4px 15px rgba(20, 170, 20, 0.04);
        }
@media (max-width: 1024px) {
    .s2-simulator-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .s2-panel {
        min-height: auto;
        height: auto;
    }

    .s2-chat-area {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .s2-waveform {
        display: none;
    }

    .s2-simulator-grid {
        gap: 20px;
    }

    .s2-panel {
        padding: 20px;
    }
}
/* Operations: /home/roman/agents-mdm/projects/4sell-site.md */
