Render Flow - Collapse toggle via JavaScript
[Load HTML] -> [Parse DOM] -> [Load CSS] -> [Apply styles] -> [Load JS] -> [Attach event listeners] -> [User clicks toggle button] -> [JS toggles collapse class] -> [Browser recalculates layout] -> [Repaint visible changes]
The browser loads the HTML and CSS, then JavaScript attaches a click event to the toggle button. When clicked, JS changes the collapse element's classes, causing the browser to recalculate layout and repaint the visible content to show or hide the collapsible section.
