<svg viewBox="0 0 700 680" xmlns="http://www.w3.org/2000/svg">
  <!-- Title -->
  <text x="350" y="22" text-anchor="middle" font-family="'Space Mono', monospace" font-size="13" fill="#6366f1">Stall case: server response exceeds the 3600-byte budget</text>

  <!-- Lifeline labels -->
  <text x="150" y="58" text-anchor="middle" font-family="'Space Mono', monospace" font-size="12" fill="#6366f1">Server</text>
  <text x="550" y="58" text-anchor="middle" font-family="'Space Mono', monospace" font-size="12" fill="#6366f1">Client</text>

  <!-- Lifelines -->
  <line x1="150" y1="70" x2="150" y2="655" stroke="#888" stroke-width="1" stroke-dasharray="4 3"/>
  <line x1="550" y1="70" x2="550" y2="655" stroke="#888" stroke-width="1" stroke-dasharray="4 3"/>

  <!-- Arrowhead defs -->
  <defs>
    <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#6366f1"/>
    </marker>
  </defs>

  <!-- Message 1: Client -> Server: ClientHello -->
  <line x1="550" y1="102" x2="156" y2="110" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="96" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">ClientHello</text>
  <text x="350" y="124" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#888">1200 bytes (padded)</text>

  <!-- Message 2: Server -> Client: ServerHello + part of Cert, stalls mid-Cert -->
  <line x1="150" y1="180" x2="544" y2="188" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="160" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">ServerHello + part of Cert</text>
  <text x="350" y="206" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#d97706">ServerHello + Cert exceeds 3600 bytes — budget exhausted</text>

  <!-- Stall region (server side, left) -->
  <rect x="110" y="240" width="80" height="60" rx="3" fill="none" stroke="#d97706" stroke-width="1.5" stroke-dasharray="3 3"/>
  <text x="150" y="264" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#d97706">server</text>
  <text x="150" y="280" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#d97706">stalled</text>
  <text x="150" y="296" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#d97706">⏸</text>

  <!-- Annotation: extra RTT cost -->
  <text x="638" y="274" text-anchor="end" font-family="'Space Mono', monospace" font-size="10" fill="#d97706">+1 RTT</text>
  <text x="638" y="288" text-anchor="end" font-family="'Space Mono', monospace" font-size="10" fill="#d97706">wasted</text>

  <!-- Message 3: Client -> Server: any Handshake-protected packet -->
  <line x1="550" y1="342" x2="156" y2="350" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="336" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">Handshake-protected packet</text>
  <text x="350" y="364" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#888">client has handshake keys after ServerHello</text>

  <!-- Annotation: address validated -->
  <text x="62" y="350" font-family="'Space Mono', monospace" font-size="10" fill="#d97706">address validated</text>
  <text x="62" y="364" font-family="'Space Mono', monospace" font-size="10" fill="#d97706">3x cap lifted</text>

  <!-- Message 4: Server -> Client: rest of handshake -->
  <line x1="150" y1="412" x2="544" y2="420" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="398" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">rest of Cert, CertVerify, Finished</text>
  <text x="350" y="438" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#888">free to send, no cap</text>

  <!-- Message 5: Client -> Server: client Finished + 1-RTT request -->
  <line x1="550" y1="482" x2="156" y2="490" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="476" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">client Finished + 1-RTT request</text>
  <text x="350" y="504" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#888">handshake complete</text>

  <!-- Message 6: Server -> Client: 1-RTT response (app data) -->
  <line x1="150" y1="552" x2="544" y2="560" stroke="#6366f1" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="350" y="546" text-anchor="middle" font-family="'Space Mono', monospace" font-size="11" fill="#6366f1">1-RTT response (application data)</text>
  <text x="350" y="574" text-anchor="middle" font-family="'Space Mono', monospace" font-size="10" fill="#888">client finally has the data</text>

</svg>
