feat: copy-to-clipboard buttons for code blocks (#986)
Add a code block render hook (layouts/_markup/render-codeblock.html) that
wraps highlighted output in a .code-block container with a .code-copy
button, plus the copy behaviour in site-scripts.html and button styles in
_code.css.
Progressive enhancement: buttons are rendered with the hidden attribute
and only revealed once JavaScript runs, so sites without JS show no inert
button and code stays selectable. A single delegated listener handles
every block; copy uses the async Clipboard API with an execCommand
fallback for non-secure contexts. Styling is reduced-motion aware, has
focus-visible reveal for keyboard users, and a touch-device fallback.
Reuses the same class names (.code-block/.code-copy/.is-copied) as the
documentation site's existing override so the two remain drop-in
compatible. Toggle with [ananke] copy_code (default true).
Part of #985
Closes #986
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>