The viewport is the currently visible area of the game, with a fullscreen in browser setting other than off, letterbox scale, integer letterbox scale, the aspect ratio of the game will match the aspect ratio of the browser window.
The windowwidth and windowheight expression I never actually understood, so I cannot be of help, but te viewport expressions should be enough to get you started into supporting multiple screen size.
The project proprieties window size is the unscaled size of your gamescreen in pixels, due to how C2 works with most of his screen scaling settings, the aspect ratio of it is more important, so I suggest never go over 800 px in size since some websites would have problem with it otherwize, keep in mind that a lower window size won t affect the graphic quality of your game normally, as long as the project propriety quality setting is set to high quality (which is by default).
Hope that helps.