<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 260" font-family="Consolas, 'Courier New', monospace">
  <defs>
    <marker id="ah" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0 0L10 5L0 10z" fill="#888"/>
    </marker>
    <marker id="ahr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0 0L10 5L0 10z" fill="#e06c75"/>
    </marker>
  </defs>

  <!-- BEFORE -->
  <text x="20" y="22" fill="#d4d4d4" font-size="12" font-weight="bold">Before</text>
  <text x="85" y="22" fill="#666" font-size="10">last element removed from Y</text>

  <rect x="50" y="38" width="115" height="46" rx="4" fill="#2a3a4a" stroke="#5a7a9a" stroke-width="1.2"/>
  <text x="107" y="58" fill="#d4d4d4" font-size="10" text-anchor="middle">Cluster X</text>
  <text x="107" y="74" fill="#888" font-size="9" text-anchor="middle">42 / 128</text>

  <line x1="165" y1="61" x2="198" y2="61" stroke="#888" stroke-width="1" marker-end="url(#ah)"/>

  <rect x="200" y="38" width="115" height="46" rx="4" fill="#4a2020" stroke="#e06c75" stroke-width="1.5"/>
  <text x="257" y="58" fill="#d4d4d4" font-size="10" text-anchor="middle">Cluster Y</text>
  <text x="257" y="74" fill="#e06c75" font-size="9" text-anchor="middle">0 / 128</text>

  <line x1="315" y1="61" x2="348" y2="61" stroke="#888" stroke-width="1" marker-end="url(#ah)"/>

  <rect x="350" y="38" width="115" height="46" rx="4" fill="#2a3a4a" stroke="#5a7a9a" stroke-width="1.2"/>
  <text x="407" y="58" fill="#d4d4d4" font-size="10" text-anchor="middle">Cluster Z</text>
  <text x="407" y="74" fill="#888" font-size="9" text-anchor="middle">91 / 128</text>

  <!-- Separator -->
  <line x1="20" y1="108" x2="600" y2="108" stroke="#444" stroke-width="0.6" stroke-dasharray="4"/>
  <text x="310" y="126" fill="#e06c75" font-size="10" text-anchor="middle">Y is empty — unlink from both chains, return to free pool</text>

  <!-- AFTER -->
  <text x="20" y="158" fill="#d4d4d4" font-size="12" font-weight="bold">After</text>

  <rect x="50" y="170" width="115" height="46" rx="4" fill="#2a3a4a" stroke="#5a7a9a" stroke-width="1.2"/>
  <text x="107" y="190" fill="#d4d4d4" font-size="10" text-anchor="middle">Cluster X</text>
  <text x="107" y="206" fill="#888" font-size="9" text-anchor="middle">42 / 128</text>

  <line x1="165" y1="193" x2="228" y2="193" stroke="#888" stroke-width="1" marker-end="url(#ah)"/>

  <rect x="230" y="170" width="115" height="46" rx="4" fill="#2a3a4a" stroke="#5a7a9a" stroke-width="1.2"/>
  <text x="287" y="190" fill="#d4d4d4" font-size="10" text-anchor="middle">Cluster Z</text>
  <text x="287" y="206" fill="#888" font-size="9" text-anchor="middle">91 / 128</text>

  <!-- Free pool box -->
  <rect x="430" y="170" width="150" height="46" rx="4" fill="#1a1a1a" stroke="#555" stroke-width="1" stroke-dasharray="4"/>
  <text x="505" y="190" fill="#888" font-size="10" text-anchor="middle">Free Pool</text>
  <text x="505" y="206" fill="#555" font-size="9" text-anchor="middle">generation++</text>

  <!-- Arrow from Y to free pool -->
  <path d="M257 84 Q257 145 380 175 L428 183" stroke="#e06c75" stroke-width="1.2" fill="none" stroke-dasharray="3" marker-end="url(#ahr)"/>

  <!-- Annotation -->
  <text x="310" y="245" fill="#888" font-size="9" text-anchor="middle">Stale handles are invalidated by the generation increment</text>
</svg>
