{# What these hits are for. It rides inside `#hits`, which is what htmx replaces, so every swap restates it; `searching.js` compares it with the form to decide whether the page is up to date. A marker outside the swapped region would keep saying whatever it said when the page was first drawn. An id rather than a class because it carries no styling, and every class a template uses has to be styled - a test says so. #} {% if problem %}

{{ problem }}

{% if resolution is for_the_window %}

{{ resolution }}

{% endif %}
{% elif question and not groups %}

{{ nothing }}

{% endif %} {# The sweep ran but not the way it was asked to: there are results, and they are lexical ones (#381). One notice for every collection it applies to, and the step that would change it. #} {% if keywords_only %}

{{ icon("info") }}{{ keywords_only.sentence }} {{ keywords_only.label }}

{% endif %} {% for skip in skips %}

{{ skip.names }}{{ skip.resolution }}

{% endfor %} {# The scale, once, ahead of every group (#408). A `
`, so it opens without a script. The ramp is the five strength colours, one cell each, and the same cells the bars below are drawn from. #} {# How many and for what, with the order beside it: the mockup's head. The order is links, so it works without a script. #} {% if summary %}

{{ summary }}

{% if orders %} {% endif %}
{% endif %} {% if key %}
{{ icon("info") }}{{ key_summary }} {{ key_low }}{% for step in range(1, 6) %}{% endfor %}{{ key_high }} {% if key.models %}

{{ key_models(key.models) }}

{% endif %}

{{ key_order }}

{% endif %} {# The limit, when it describes the page: a reorder acts on the hits the search returned (#406). #} {% if orders and order %}

{{ order_limit }}

{% endif %} {% for group in groups %}

{{ icon(group.icon) }}{{ group.name }}{{ group.count }}

    {% for hit in group.hits %}
  1. {# The card's head (Brian, 2026-10-12): the document and the section, then how well it matched and its handle, in a band over the passage it quotes. Title first, so a card says what it is before how well it matched (the visual review, F4). #}

    {{ hit.title }} {{ icon("arrow-up-right") }}

    {# Which section the passage is from; the title is the document's alone. Marked, so `safe`. #} {% if hit.passage.heading %}

    {{ icon("hash") }}{{ hit.passage.heading | safe }}

    {% endif %} {# The handle ends the row, where the mockup puts the citekey. #}

    {% for measure in hit.measures %} {# The colour is the level's, on every filled cell; the count of filled cells and the word say the same without colour (#421). #} {{ icon(measure.icon) }}{{ measure.label }}{% for cell in range(1, 6) %}{% endfor %}{{ measure.level }} {% endfor %} {% if hit.version %}{{ hit.version }}{% endif %} {{ hit.handle }}

    {# One rendering of the chunk, parted where the reader's words first occur (#454). Closed, the part from the match, faded where it is cut; opened, the part before it grows in above and the fade goes. `
    ` holds only the control, so its `open` is what the stylesheet reads, `name` closes the others, and no script is involved. `safe`: `passage_html` escaped the corpus's text and emitted only the tags it chose. #}
    {% if hit.passage.lead %}
    {{ hit.passage.lead | safe }}
    {% endif %}
    {{ hit.passage.body | safe }}
    {% if hit.opens %} {# A chevron alone on the card's edge; its words are for a screen reader. The title's arrow is the one way to the document. #}
    {{ show_passage }}{{ hide_passage }}{{ icon("chevron-down") }}
    {% endif %}
  2. {% endfor %}
{% if more[group.collection] is defined %}

{{ icon("chevron-down") }}{{ more_from(group.collection) }}

{% endif %} {% endfor %}