It depends on what subset of Notion you use. Nothing (including Notion) is perfect for me. I'd like to build my own eventually, but I'm currently using Obsidian which doesn't hit your "works in the browser" requirement.
One option, which is open source and self hosted, is Trilium[sic], found at https://github.com/zadam/trilium It's open source, so if it's close to what you want, you might be able to adjust it to meet your needs.
Other commercial options include Realm, Tana, and Craft. With varying degrees of "AI".
I really like the UX of Tana for building out graphs of pages with properties, but it's slow to start up, doesn't support math, etc. So it's mainly a UX example for me.
One option, which is open source and self hosted, is Trilium[sic], found at https://github.com/zadam/trilium It's open source, so if it's close to what you want, you might be able to adjust it to meet your needs.
Other commercial options include Realm, Tana, and Craft. With varying degrees of "AI".
I really like the UX of Tana for building out graphs of pages with properties, but it's slow to start up, doesn't support math, etc. So it's mainly a UX example for me.