Mode analysis of plasmonic waveguides in planarly layered media