(defcomp
  ()
  (div
    (~tw :tokens "space-y-3")
    (button
      :sx-get "/sx/(geography.(hypermedia.(reference.(api.time))))"
      :sx-target "#ref-evt-ar-result"
      :sx-swap "innerHTML"
      :sx-on:sx:afterRequest "document.getElementById('ref-evt-ar-log').textContent = 'Response status: ' + (event.detail ? event.detail.status : '?')"
      (~tw :tokens "px-4 py-2 bg-violet-600 text-white rounded hover:bg-violet-700 transition-colors text-sm")
      "Load (logs after response)")
    (div
      :id "ref-evt-ar-log"
      (~tw :tokens "p-2 rounded bg-emerald-50 text-emerald-700 text-sm")
      "Event log will appear here.")
    (div
      :id "ref-evt-ar-result"
      (~tw :tokens "p-3 rounded bg-stone-100 text-stone-400 text-sm")
      "Click to load — afterRequest fires before the swap.")))
