/* how-it-works.css */
.how-it-works {
    background: var(--bg-primary);
}

.hiw-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

/* Stepper */
.hiw-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hiw-step {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    cursor: pointer;
    border-left: 2px solid var(--border);
    padding-left: 28px;
    position: relative;
    transition: border-color var(--transition);
}

.hiw-step::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 28px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-primary);
    transition: background var(--transition), box-shadow var(--transition);
}

.hiw-step.active {
    border-left-color: var(--accent-blue);
}

.hiw-step.active::before {
    background: var(--accent-blue);
    box-shadow: 0 0 12px rgba(59, 139, 255, 0.6);
}

.hiw-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}

.hiw-step.active .hiw-step-num {
    background: rgba(59, 139, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.hiw-step-content {
    flex: 1;
}

.hiw-step-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: color var(--transition);
}

.hiw-step.active .hiw-step-title {
    color: var(--text-primary);
}

.hiw-step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    transition: color var(--transition);
    display: none;
}

.hiw-step.active .hiw-step-desc {
    display: block;
    color: var(--text-secondary);
}

/* Right panel — diagram */
.hiw-panel {
    position: sticky;
    top: 100px;
}

.hiw-diagram {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Progress bar under diagram  */
.hiw-progress {
    height: 2px;
    background: var(--border);
    margin-top: 20px;
    border-radius: 1px;
    overflow: hidden;
}

.hiw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 1px;
    transition: width 3s linear;
}

@media (max-width: 900px) {
    .hiw-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hiw-panel {
        position: static;
    }
}