/** * Copy text to the clipboard, with a fallback for insecure contexts (plain http://). * * The async Clipboard API (`navigator.clipboard`) is only exposed in a secure * context — `https://` or `localhost`. On a plain `http://` origin it is * `undefined`, so `navigator.clipboard.writeText` throws and the copy silently * fails (the symptom behind self-hosted-over-http bug reports). When the secure * API is unavailable we fall back to a hidden `