{# HyperWeave Phase Segment Component — cognitive phase bar for rhythm strip.
   Renders a single phase-colored bar with optional phase strip below.
   Width encodes duration proportion, height encodes token density.
   Expects: seg_x, seg_y, seg_w, seg_h, seg_tool_class, uid #}

{# Main phase bar #}
<rect x="{{ seg_x }}" y="{{ seg_y }}"
      width="{{ seg_w }}" height="{{ seg_h }}"
      rx="{{ seg_rx | default(1) }}"
      fill="url(#{{ uid }}-{{ seg_tool_class }})"/>

{# Phase color strip (3-4px, below main bar) #}
{% if show_phase_strip | default(true) %}
<rect x="{{ seg_x }}" y="{{ seg_strip_y | default(seg_y) }}"
      width="{{ seg_w }}" height="{{ seg_strip_h | default(3) }}" rx="{{ seg_strip_rx | default(1) }}"
      fill="var(--dna-tool-{{ seg_tool_class }})" opacity="0.4"/>
{% endif %}
