Lancashire have outside chance of victory after enterprising counterattack