Technically, the line is at the second to last opponent in the direction of attack.
The usual case is that the goalkeeper is the last opponent, so the line is at the last defender.
If the keeper comes forward past some of the defenders, then the line would be at the second last defender.
The attacker also has to be ahead of the ball to be offside, which doesn’t seem to be mentioned in the link. You could have two attackers, both in offside positions, but if the one with the ball passes to the second attacker and the second is behind the ball when the pass is made, then it is not offside.
More or less. It’s just that rather than the rearmost defender setting the location of offsides it’s a blue line that indicates where the “offensive zone” starts.
You can't just hang out in the opponent's end and wait for someone to pass you the puck. The puck needs to be carried in, or dumped in and then chased after it crosses the line.