{# Cross-user contamination guard. localStorage is browser-wide; if User A uploads a portfolio and User B logs in on the same browser, the stale `cassandra.pie` would otherwise render as User B's holdings. We stamp the logged-in user's id in localStorage on every authenticated page load and wipe per-user keys if the id changed since last time. Theme stays — it's cosmetic. #} {# Apply saved theme before stylesheet renders to avoid a flash. #}
{# Left group keeps brand + BETA chip pinned together as a single layout cell so the chip can't drift away from the wordmark when the header grows or shrinks. #}
{{ BRAND_NAME }} {% if BETA_MODE %}BETA{% endif %}
{# Mobile hamburger — shown only at ≤480px via CSS. #} {# Wrapper: display:contents on desktop (zero layout effect), fixed slide-out panel on mobile. Holds nav + header-right widgets. #}
{# The "Pro" label maps to the NOVICE tone server-side — kept that way to avoid touching every stored user preference and API contract. The mode itself (glossary tooltips + plainer framing) is unchanged; only the display label changes. #}
{% set cu = request.state.current_user if request.state and request.state.current_user is defined else None %} {% if cu and cu.user %}
{% endif %} {% if cu and (cu.user or cu.is_admin) %}
{% endif %} v0.1 · UTC
{# Drawer backdrop. Hidden by default; CSS shows it when body.drawer-open is set. Click closes the drawer. #}
{% block main %}{% endblock %}
{# Shared glossary tooltip (Novice mode). Single floating element positioned by JS to escape sticky-bar stacking and viewport edges. #}