nav.py parses nav into a tree of pages, sections, and links. Each page title comes from the nav entry. If the entry has no title, the title comes from the page's front matter title, then its first H1, then its filename. When nav is absent, the tree is derived from the files the same way MkDocs derives it: index.md or README.md first, then files, then subdirectories as sections. A nav entry that points to a missing file is shown with a strike-through and is not a link.
render.py renders the tree with the same row views as the filesystem tree, so bookmarks, pins, and the active-row highlight work in the same way.
navigation.tabs: each top-level nav item becomes a tab below the navbar. A section tab links to the section's first page. On wide screens the sidebar shows only the active tab's pages. mkdocs.js updates the active tab after each htmx navigation.
navigation.sections: second-level sections (first-level without tabs) render as labels that stay open.
navigation.expand: every section starts open.
navigation.indexes: a section whose first page is index.md links to that page. The page is removed from the section's children.
Prev/next links follow nav order. A page that is not in the nav gets no prev/next links, as in MkDocs.