This isn't RAW, but I've found it simplifies things greatly. Forget all of the stuff about doubling distances, and just look at illumination levels. If you have low-light vision, you count shadowy illumination as brightly lit. The end.
So, for example, a torch illuminates 20' brightly and up to...