{% if theme.dark_mode.enabled %} {% else %} {% endif %} {# System pages (/_hcms/mem/* login/register/reset, error pages) render OUTSIDE the normal theme context: every {{ theme.* }} AND get_asset_url('../../…') comes back empty here, so external s load nothing and the page is unstyled. Two consequences handled below: 1. The token bake is GUARDED — an empty `--color-primary: ;` would defeat the `var(--color-primary, #fallback)` fallbacks in system-pages.css, so we only emit a token when the theme value is actually present (works on error pages that DO carry context; falls back cleanly on membership pages that don't). 2. The stylesheet is INLINED via {% include %} (compile-time template composition — the same mechanism that makes {% extends %} work here — which is unaffected by the missing theme context). system-pages.css is fully self-contained: it defines its own --system-* tokens and every --color-* reference carries a hex fallback. We deliberately do NOT pull in modern.css (it bundles forms.css, which double-styles HubSpot's membership widgets, and its brand tokens can't bake here anyway). #} {# Additional CSS blocks #} {% block additional_css %}{% endblock %} {{ standard_header_includes }}
{# Brand / Logo #} {% block brand %}
{% if brand_settings.primaryLogo.src %} {% elif site_settings.company_name %} {{ site_settings.company_name }} {% endif %}
{% endblock %} {# Icon Block #} {% block icon %}
{% block icon_content %} {% endblock %}
{% endblock %} {# Status/Code Block (for error pages) #} {% block status_code %}{% endblock %} {# Title #}

{% block page_title %}System Page{% endblock %}

{# Status Message (if applicable) #} {% block status_message %}{% endblock %} {# Main Message — div wrapper so templates can safely include block-level elements #}
{% block page_message %}{% endblock %}
{# Main Content Area #} {% block main_content %}{% endblock %} {# Actions/Buttons #} {% block actions %}
{% block action_buttons %} Go to Homepage {% endblock %}
{% endblock %} {# Additional Content #} {% block additional_content %}{% endblock %} {# Footer/Contact Info #} {% block footer_info %}{% endblock %}
{# Scripts #} {% block scripts %}{% endblock %} {{ standard_footer_includes }}