High-Q optical states in subwavelength resonators