(defcomp
  ()
  (~docs/page
    :title "Bootstrappers"
    (div
      (~tw :tokens "space-y-6")
      (p
        (~tw :tokens "text-lg text-stone-600")
        "A bootstrapper reads the canonical "
        (code (~tw :tokens "text-violet-700 text-sm") ".sx")
        " specification files and emits a native implementation for a specific target. "
        "The spec files are the single source of truth — bootstrappers are the bridge from specification to runnable code.")
      (p
        (~tw :tokens "text-stone-600")
        "Each bootstrapper is a compiler that understands the restricted SX subset used in the spec files "
        "(roughly 20 special forms and 80 primitives) and translates it into idiomatic target code. "
        "Platform-specific operations (DOM access, HTTP, timers) are emitted as native implementations "
        "rather than translated from SX.")
      (div
        (~tw :tokens "overflow-x-auto rounded border border-stone-200")
        (table
          (~tw :tokens "w-full text-left text-sm")
          (thead
            (tr
              (~tw :tokens "border-b border-stone-200 bg-stone-100")
              (th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Target")
              (th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Bootstrapper")
              (th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Output")
              (th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Status")))
          (tbody
            (tr
              (~tw :tokens "border-b border-stone-100")
              (td (~tw :tokens "px-3 py-2 text-stone-700") "JavaScript")
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-violet-700")
                (a
                  :href "/sx/(language.(bootstrapper.javascript))"
                  (~tw :tokens "hover:underline")
                  "bootstrap_js.py"))
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-stone-500")
                "sx-browser.js")
              (td (~tw :tokens "px-3 py-2 text-green-600") "Live"))
            (tr
              (~tw :tokens "border-b border-stone-100")
              (td (~tw :tokens "px-3 py-2 text-stone-700") "Python")
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-violet-700")
                (a
                  :href "/sx/(language.(bootstrapper.python))"
                  (~tw :tokens "hover:underline")
                  "bootstrap_py.py"))
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-stone-500")
                "sx_ref.py")
              (td (~tw :tokens "px-3 py-2 text-green-600") "Live"))
            (tr
              (~tw :tokens "border-b border-stone-100 bg-green-50")
              (td (~tw :tokens "px-3 py-2 text-stone-700") "Python (self-hosting)")
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-violet-700")
                (a
                  :href "/sx/(language.(bootstrapper.self-hosting))"
                  (~tw :tokens "hover:underline")
                  "py.sx"))
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-stone-500")
                "sx_ref.py")
              (td (~tw :tokens "px-3 py-2 text-green-600") "G0 == G1"))
            (tr
              (~tw :tokens "border-b border-stone-100")
              (td (~tw :tokens "px-3 py-2 text-stone-700") "Rust")
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-stone-400")
                "bootstrap_rs.py")
              (td
                (~tw :tokens "px-3 py-2 font-mono text-sm text-stone-400")
                "sx-native")
              (td (~tw :tokens "px-3 py-2 text-stone-400") "Planned"))))))))
