{# Settings drawer — five tabs: Imports / Profile / Density / ETF pairs / About. Each tab is a separate template included below; switching is purely client-side via Alpine. Cross-tab interactions (e.g. profile changes that recompute pages) post to /preferences and rely on HX-Refresh. Open events come from outside this scope via: window.dispatchEvent(new CustomEvent('open-settings-drawer', { detail: { tab: 'density' } })) `tab` is optional; defaults to 'imports' if not set or unknown. #}
{# Backdrop — fades in/out independent of the panel slide so the dim feels like ambient context, not part of the panel's geometry. #} {# Drawer panel — slides from the right edge using --duration-med / --ease-out-soft (matched by Tailwind's duration-300 + ease-out, close enough to our tokens that hand-converting to arbitrary-value utilities would be busy-work). Width is resizable via the left-edge drag handle. The icon that opens this drawer is hidden on mobile, so width binds unconditionally. #}