Use this chart to get the info you need to do it right.
From what you are describing,
40 feet @ 3/4" only carries 171,000 BTU load so you will have to add up EVERYTHING on that line for BTU calculation. Otherwise count on having to upsize that line to 1" and THEN do branch offs. You should be fine with that setup.
You'll starve that stove of gas if you pull from the water heater. GOOD LUCK