{% if not query %}
{# Empty-state placeholder: the top-bar form submits to /search even
with no input, so this page must render cleanly with no query. #}
Enter a query to search memories across all chats.
{% elif not results %}
No matches for “{{ query }}”.
{% else %}
{% for r in results %}
{# T111.2: deep-link to the originating turn via the
``id="turn-{event_id}"`` anchor stamped by Phase 3.5 T86.
``event_id`` may be NULL for memory rows projected before the
0014 migration ran (T109 did not backfill historical rows); in
that case fall back to a chat-level link with no anchor so we
never emit ``#turn-None``. #}