{# Border motion: dual-orbit — two runners in phase-locked orbit, offset by half perimeter.
   Context: uid, w, h, rx, perim, vis, gap, half #}
{% set defs %}{% endset %}
{% set overlay %}
<rect x="{{ border_rect_x }}" y="{{ border_rect_y }}" width="{{ border_rect_w }}" height="{{ border_rect_h }}" rx="{{ rx }}"
      fill="none" stroke="var(--dna-signal)" stroke-width="2"
      stroke-dasharray="{{ vis }} {{ gap }}">
  <animate attributeName="stroke-dashoffset"
           values="0;-{{ perim }}" dur="3s" repeatCount="indefinite"/>
</rect>
<rect x="{{ border_rect_x }}" y="{{ border_rect_y }}" width="{{ border_rect_w }}" height="{{ border_rect_h }}" rx="{{ rx }}"
      fill="none" stroke="var(--dna-signal)" stroke-width="2"
      opacity="0.6" stroke-dasharray="{{ vis }} {{ gap }}"
      stroke-dashoffset="{{ half }}">
  <animate attributeName="stroke-dashoffset"
           values="{{ half }};{{ half_minus_perim }}" dur="3s"
           repeatCount="indefinite"/>
</rect>
{% endset %}
