Texturing top of cylinder vs flat disc
You're using Object coordinates, which, (assuming your object is not scaled in Object Mode,) are measured in Blender units, from the object's origin, along the object's own axes.
If your disc has a radius of 1, then you can simplify your tree as follows:

Since the answer you refer to, there's a Vector Math &gt; Length node, so you don't have to do your own Pythagoras any more, and you could use alpha in your color-ramp colors to get rid of the shader-mix? It depends on the exact shading you want.
If the radius of your circle is not 1, then you could introduce a Vector Math &gt; Multiply before the Length, to bring the radius lengths into the 0-1 range for the color-ramp to handle.. multiplying X and Y by whatever is needed, and Z by 0 to get rid of it.
However, you want the texture to be more general, and occupy the same proportions of a disc, no matter what size it is, you could use Generated coordinates, which are always measured 0-1 from the minimum to the maximum of an object's bounding-box in all directions, no matter what size the object is.
In that case, you would have to shift 0 back to the middle of the circle, and multiply by 2 to get the radius mapped back to 0-1 again:...