Production and financial linkages in inter-firm networks: structural variety, risk-sharing and resilience