I grew up with everyone keeping shomer negiah but I never learned the actual sources inside, and I have real questions about how it works.

1. Where is the Torah source for negiah? People point to lo sikrevu legalos ervah (Vayikra 18:6). The Rambam in Sefer HaMitzvos (lav 353) counts touching as part of that Torah prohibition, and the Ramban argues on him right there. Then in Issurei Biah 21:1 the Rambam himself gives makas mardus, which sounds derabanan, and the Raavad there says the Torah only forbade the act itself. So what is it actually, Torah or derabanan, and does it depend on the kind of touch?

2. What does the word touch even mean here? A handshake, a tap on the shoulder, brushing past someone on a bus, helping someone up off the floor? Is the line chibah, touching with affection, or pleasure, or any physical contact at all? Where does the halacha actually draw it?

3. What about people who grew up kissing on the cheek their whole lives, family custom or social custom, like kissing your aunt or a cousin at a simcha, or the way Sefardi and Middle Eastern families greet each other? If there is no romance and no pleasure in it, just the custom everyone in the family does, is that inside the prohibition or outside it?

4. When dating, what exactly is allowed and what is not, and why? If the whole point of dating is to build toward marriage, how does the halacha expect two people to know if they are attracted to each other with zero touch at all?

5. What is the point of the issur altogether? Is it a fence for arayos, is it about kedusha and how a person relates to their own body, or is the physical contact itself the problem? The answer changes how every edge case comes out.

6. And relations before marriage, where does that issur come from, Torah or derabanan? And does anything change if the woman goes to the mikveh first?