Final answer:
In the given statement, 'it' refers to the fact that the situation or actions being considered by the individuals is lunacy.
Step-by-step explanation:
The pronoun 'it' in the statement "Both of them knew that it was lunacy" refers to option 2: The fact that it was lunacy. The 'it' stands for the idea or the act that both individuals are aware of and deem to be insane. The subsequent sentence supports this interpretation by reflecting on the consequences of their actions, suggesting a deliberate choice towards danger, thereby reinforcing what 'it' means contextually.