Chandrasekhar–Kendall–Woltjer–Taylor state in a resistive plasma