{# Server-rendered guided-tutorial banner (issue #3, slice 6; remapped #158). Rendered in base.html ABOVE {% block body %} — i.e. OUTSIDE every page's content area — so island renders never clobber it. It appears only when the API layer put a `tutorial` dict in the context, which it does exclusively for the real tutorial run on the step's bound page. The banner is data-driven: the resolver sets whichever action fields this step needs (a next-link, a claim form, or the export + finish controls). #}

{% if tutorial.n %}Guided tutorial · step {{ tutorial.n }} of {{ tutorial.total }} {% else %}Guided tutorial{% endif %}

{{ tutorial.title }}

{{ tutorial.body }}

{% if tutorial.claim_run_id and shell.can_write %} {# REVIEW step (and later steps with no live claim): claim the tutorial run via the editor endpoint. The editor claim returns JSON, so the form must target the editor claim path (not the retired legacy claim). #}
{% endif %} {% if tutorial.export_href %} {# EXPORT step: open the plaintext transcript in a new tab (the claim token is never placed in its URL), then finish the tutorial via an explicit POST. #} Export transcript ↗ {% if shell.can_write %}
{% endif %} {% endif %} {% if tutorial.next_href %} {{ tutorial.next_label }} {% endif %}