Marketing›Hero

marketing

Hero

Full-width intro sections for landing pages with background support and action buttons

Composition

Install

  1. Add the package: npm install @refrakt-md/marketing
  2. Add it to the plugins array in refrakt.config.json: "plugins": ["@refrakt-md/marketing"]

About the plugin and its runes

Source

---
tag: div
description: Full-width introductory section for landing pages, composed over `section` and `actions`
attributes:
  align:          { type: string, matches: [start, center, end], default: center, description: "Alignment of the header and the actions" }
  media-position: { type: string, matches: [top, bottom, start, end, cover], default: bottom, description: "Where the media sits relative to the content" }
  media-ratio:    { type: string, description: "The media's share of the row, beside the content" }
  valign:         { type: string, matches: [top, center, bottom, stretch], description: "Cross-axis alignment, beside the content" }
  collapse:       { type: string, matches: [sm, md, lg, never], description: "When a side-by-side split stacks" }
  content-place:  { type: string, description: 'Cover overlay anchor: "<block> <inline>" (e.g. "end start") or "auto"' }
  height:         { type: string, matches: [sm, md, lg, xl], description: "Intrinsic band height (named scale) for cover mode" }
  aspect:         { type: string, description: 'Intrinsic aspect ratio (e.g. "21/9") for cover mode' }
defaults:
  width: full
  elevation: flush
  prominence: marquee
content:
  type: delimited
  delimiter: hr
  zones:
    - name: media
      fields:
        media: { match: any, optional: true, greedy: true }
    - name: content
      primary: true
      fields:
        eyebrow:  { match: paragraph, optional: true }
        headline: { match: heading }
        blurb:    { match: paragraph, optional: true }
        body:     { match: heading|paragraph, optional: true, greedy: true }
        actions:  { match: list|fence, optional: true, greedy: true }
---

{% section align=$attrs.align media-position=$attrs["media-position"] media-ratio=$attrs["media-ratio"] valign=$attrs.valign collapse=$attrs.collapse content-place=$attrs["content-place"] height=$attrs.height aspect=$attrs.aspect media="hero" guest-fit="bleed" %}
	{% slot name="media" /%}

	---

	{% slot name="eyebrow" /%}

	{% slot name="headline" /%}

	{% slot name="blurb" /%}

	{% slot name="body" /%}

	{% actions %}
		{% slot name="actions" /%}
	{% /actions %}
{% /section %}

View plugins/marketing/runes/hero.md on GitHub

A full-width opening band for the top of a page: a headline, a short pitch, and the buttons or install command that start the reader off. For a smaller action block that can appear anywhere, use cta.

Basic usage

A centered hero section with headline, description, and action buttons.

{% hero %}

Whats new [Version 1.0](#)

# Build with refrakt.md

A content framework that turns Markdown into rich, semantic pages. Write standard Markdown — runes decide how it's interpreted.

- [Get started](/docs/getting-started)
- [View on GitHub](https://github.com/refrakt-md/refrakt)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;bottom&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;bottom&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-name="content">
      <header>
        <p data-slot="eyebrow" data-name="eyebrow">
          Whats new
          <a href="#">Version 1.0</a>
        </p>
        <h1 data-slot="headline" id="build-with-refraktmd" data-name="headline">Build with refrakt.md</h1>
        <p data-slot="blurb" data-name="blurb">A content framework that turns Markdown into rich, semantic pages. Write standard Markdown — runes decide how it's interpreted.</p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/getting-started">
                <span>Get started</span>
              </a>
            </li>
            <li data-rank="secondary" data-name="action">
              <a href="https://github.com/refrakt-md/refrakt">
                <span>View on GitHub</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Whats new Version 1.0

Build with refrakt.md

A content framework that turns Markdown into rich, semantic pages. Write standard Markdown — runes decide how it's interpreted.

<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--center" data-align="center" data-media-position="bottom" data-elevation="flush" data-prominence="marquee" data-rune="section" data-density="full">
    <div data-name="content" class="rf-section__content">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <p data-slot="eyebrow" data-name="eyebrow" class="rf-section__eyebrow" data-section="eyebrow">
          Whats new 
          <a href="#">Version 1.0</a>
        </p>
        <h1 data-slot="headline" id="build-with-refraktmd" data-name="headline" class="rf-section__headline" data-section="title">Build with refrakt.md</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">A content framework that turns Markdown into rich, semantic pages. Write standard Markdown — runes decide how it's interpreted.</p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/getting-started">
                <span>Get started</span>
              </a>
            </li>
            <li data-rank="secondary" data-name="action" class="rf-actions__action">
              <a href="https://github.com/refrakt-md/refrakt">
                <span>View on GitHub</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

How Markdown is read

You writeIt becomes
A short paragraph, then a heading and a paragraphThe eyebrow, headline and blurb (Page sections)
More headings and paragraphsFurther copy under the blurb
A list of linksA row of buttons; the first link is the primary action
A code fenceA copyable command line beside the buttons
An image or other media, then ---, before the restThe hero's media (Place the media)

Add an install command

A code fence in a hero becomes a copyable command line beside the buttons.

{% hero %}
# Get started in seconds

Scaffold a project and start writing.

```shell
npx create-refrakt
```

- [Documentation](/docs/getting-started)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;bottom&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;bottom&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-name="content">
      <header>
        <h1 data-slot="headline" id="get-started-in-seconds" data-name="headline">Get started in seconds</h1>
        <p data-slot="blurb" data-name="blurb">Scaffold a project and start writing.</p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <div data-name="command">
            <div class="rf-codeblock" data-slot="actions">
              <pre data-language="shell" data-slot="actions">
                <code data-language="shell" data-slot="actions">npx create-refrakt
</code>
              </pre>
            </div>
          </div>
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/getting-started">
                <span>Documentation</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Get started in seconds

Scaffold a project and start writing.

npx create-refrakt
<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--center" data-align="center" data-media-position="bottom" data-elevation="flush" data-prominence="marquee" data-rune="section" data-density="full">
    <div data-name="content" class="rf-section__content">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <h1 data-slot="headline" id="get-started-in-seconds" data-name="headline" class="rf-section__headline" data-section="title">Get started in seconds</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Scaffold a project and start writing.</p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <div data-name="command" class="rf-actions__command">
            <div class="rf-codeblock" data-slot="actions">
              <pre data-language="shell" data-slot="actions"><code data-language="shell" data-slot="actions">npx create-refrakt
</code></pre>
            </div>
          </div>
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/getting-started">
                <span>Documentation</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Align the text to the start

align="start" gives the hero a more editorial feel. align takes start, center (the default) or end.

{% hero align="start" %}
# Documentation that writes itself

Semantic runes transform your Markdown into structured, accessible content.

- [Quick start](/docs/getting-started)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;start&quot;,&quot;media-position&quot;:&quot;bottom&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;start&quot;,&quot;media-position&quot;:&quot;bottom&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-name="content">
      <header>
        <h1 data-slot="headline" id="documentation-that-writes-itself" data-name="headline">Documentation that writes itself</h1>
        <p data-slot="blurb" data-name="blurb">Semantic runes transform your Markdown into structured, accessible content.</p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/getting-started">
                <span>Quick start</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Documentation that writes itself

Semantic runes transform your Markdown into structured, accessible content.

<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--start" data-align="start" data-media-position="bottom" data-elevation="flush" data-prominence="marquee" data-rune="section" data-density="full">
    <div data-name="content" class="rf-section__content">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <h1 data-slot="headline" id="documentation-that-writes-itself" data-name="headline" class="rf-section__headline" data-section="title">Documentation that writes itself</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Semantic runes transform your Markdown into structured, accessible content.</p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/getting-started">
                <span>Quick start</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Place the media

Put an image or other media first, then ---, then the hero's copy. media-position="end" puts the media on the right, the usual place for a product screenshot; start puts it on the left, and top or bottom stack it. media-ratio, valign and collapse tune the side-by-side split, as on card.

Put the text over a backdrop

media-position="cover" makes the media a full-bleed backdrop, with the headline, blurb and buttons over it. The media is darkened behind the text so it stays readable.

{% hero media-position="cover" %}
![Mountain valley at dusk](https://assets.refrakt.md/media-text-valley.jpg)

---

# Documentation that reads like it was designed

Semantic runes turn plain Markdown into structured pages.

- [Get started](/docs/getting-started)
- [Explore the runes](/runes/rune-catalog)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;cover&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;cover&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-media="hero" data-name="media">
      <img src="https://assets.refrakt.md/media-text-valley.jpg" alt="Mountain valley at dusk">
    </div>
    <div data-name="content">
      <header>
        <h1 data-slot="headline" id="documentation-that-reads-like-it-was-designed" data-name="headline">Documentation that reads like it was designed</h1>
        <p data-slot="blurb" data-name="blurb">Semantic runes turn plain Markdown into structured pages.</p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/getting-started">
                <span>Get started</span>
              </a>
            </li>
            <li data-rank="secondary" data-name="action">
              <a href="/runes/rune-catalog">
                <span>Explore the runes</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>
Mountain valley at dusk

Documentation that reads like it was designed

Semantic runes turn plain Markdown into structured pages.

<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--center rf-section--cover" data-align="center" data-media-position="cover" data-elevation="flush" data-prominence="marquee" data-rune="section" data-density="full" data-cover-scope="full">
    <div data-media="hero" data-name="media" class="rf-section__media" data-section="media" data-guest-fit="bleed" data-guest-posture="presentational">
      <img src="https://assets.refrakt.md/media-text-valley.jpg" alt="Mountain valley at dusk" />
    </div>
    <div data-name="content" class="rf-section__content" data-color-scheme="dark">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <h1 data-slot="headline" id="documentation-that-reads-like-it-was-designed" data-name="headline" class="rf-section__headline" data-section="title">Documentation that reads like it was designed</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Semantic runes turn plain Markdown into structured pages.</p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/getting-started">
                <span>Get started</span>
              </a>
            </li>
            <li data-rank="secondary" data-name="action" class="rf-actions__action">
              <a href="/runes/rune-catalog">
                <span>Explore the runes</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Set the band's height with height (sm to xl) or aspect; without either it takes a wide default. content-place moves the text, and scrim, scrim-type="frost" and scrim-blur change how the backdrop is darkened, as in a cover card.

Animate the backdrop

The backdrop can be a running sandbox instead of an image. Here a three.js wireframe terrain rolls in slow swells behind the text, in the site's own niwaki accent colors:

{% hero media-position="cover" height="lg" %}
	{% sandbox src="wireframe-waves" /%}

	---

	# Markdown in, meaning out

	Plain text becomes structured, semantic pages.

	- [See how it works](/docs/getting-started)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;cover&quot;,&quot;height&quot;:&quot;lg&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;cover&quot;,&quot;height&quot;:&quot;lg&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-media="hero" data-name="media">
      <rf-sandbox data-rune="sandbox" data-source-content="&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;" data-height="auto" data-source-origins="HTML	wireframe-waves/index.html" data-security-mode="trusted" data-allow-js="true" data-slot="media">
        <template data-content="fallback">
          <pre data-language="html">
            <code data-language="html">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</code>
          </pre>
        </template>
        <template data-content="source">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</template>
      </rf-sandbox>
    </div>
    <div data-name="content">
      <header>
        <h1 data-slot="headline" id="markdown-in-meaning-out" data-name="headline">Markdown in, meaning out</h1>
        <p data-slot="blurb" data-name="blurb">Plain text becomes structured, semantic pages.</p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/getting-started">
                <span>See how it works</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

Markdown in, meaning out

Plain text becomes structured, semantic pages.

<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--center rf-section--cover" data-align="center" data-media-position="cover" data-height="lg" data-elevation="flush" data-prominence="marquee" data-rune="section" data-density="full" data-cover-scope="full">
    <div data-media="hero" data-name="media" class="rf-section__media" data-section="media" data-guest-fit="bleed" data-guest-posture="presentational">
      <rf-sandbox class="rf-sandbox" data-source-content="&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;" data-height="fill" data-source-origins="HTML	wireframe-waves/index.html" data-security-mode="trusted" data-allow-js="true" data-slot="media" data-rune="sandbox" data-density="compact">
        <template data-content="fallback">
          <pre data-language="html"><code data-language="html">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</code></pre>
        </template>
        <template data-content="source">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</template>
      </rf-sandbox>
    </div>
    <div data-name="content" class="rf-section__content" data-color-scheme="dark">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <h1 data-slot="headline" id="markdown-in-meaning-out" data-name="headline" class="rf-section__headline" data-section="title">Markdown in, meaning out</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">Plain text becomes structured, semantic pages.</p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/getting-started">
                <span>See how it works</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

The sandbox fills the band and takes no clicks or focus. To keep it working well:

  • Load it eagerly. activation="visible" or "click" would put a Run control under the text, out of reach; the build warns.
  • Keep it dim. The scene sits under the scrim, so darker than looks right on its own is right.
  • Respect reduced motion. Show a still frame when the reader asks for less motion, as the waves scene does.
  • Keep it light. It loads with the page. Cap the pixel ratio, pause when the tab is hidden, and show a still fallback where WebGL is missing; the three.js scene in Media guests does all three.

Animate the background and keep the media

Cover mode uses the media zone for the backdrop. To have an animated backdrop and a screenshot or code sample beside the text, put the sandbox in a bg instead, and leave the media zone for the subject:

{% hero media-position="end" tint-mode="dark" collapse="lg" %}
	{% bg overlay="dark" overlay-opacity="0.4" %}
		{% sandbox src="wireframe-waves" /%}
	{% /bg %}
	{% codegroup %}
	```shell
	npx create-refrakt
	```
	```js
	import { defineConfig } from '@refrakt-md/sveltekit';

	export default defineConfig({
	  plugins: ['@refrakt-md/marketing'],
	});
	```
	{% /codegroup %}

	---

	# Backdrop and subject, at once

	The wireframe terrain is a `bg` sandbox; the install snippet is the positioned media guest. One surface, two media intents.

	- [How surfaces compose](/docs/concepts/surfaces)
{% /hero %}
<div data-rune="hero" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;end&quot;,&quot;collapse&quot;:&quot;lg&quot;}">
  <section data-rune="section" data-rune-fields="{&quot;align&quot;:&quot;center&quot;,&quot;media-position&quot;:&quot;end&quot;,&quot;collapse&quot;:&quot;lg&quot;,&quot;guest-fit&quot;:&quot;bleed&quot;}" elevation="flush" prominence="marquee">
    <div data-media="hero" data-name="media">
      <section data-rune="code-group" data-slot="media">
        <div role="tablist" data-name="tabs">
          <button data-name="tab" role="tab">
            <span>Shell</span>
          </button>
          <button data-name="tab" role="tab">
            <span>JavaScript</span>
          </button>
        </div>
        <div data-name="panels">
          <div role="tabpanel" data-name="panel">
            <div class="rf-codeblock">
              <pre data-language="shell">
                <code data-language="shell">npx create-refrakt
</code>
              </pre>
            </div>
          </div>
          <div role="tabpanel" data-name="panel">
            <div class="rf-codeblock">
              <pre data-language="js">
                <code data-language="js">import { defineConfig } from '@refrakt-md/sveltekit';

export default defineConfig({
  plugins: ['@refrakt-md/marketing'],
});
</code>
              </pre>
            </div>
          </div>
        </div>
      </section>
    </div>
    <div data-name="content">
      <header>
        <h1 data-slot="headline" id="backdrop-and-subject-at-once" data-name="headline">Backdrop and subject, at once</h1>
        <p data-slot="blurb" data-name="blurb">
          The wireframe terrain is a
          <code>bg</code>
          sandbox; the install snippet is the positioned media guest. One surface, two media intents.
        </p>
      </header>
      <div data-name="body">
        <div data-rune="actions">
          <ul data-slot="actions" data-name="list">
            <li data-rank="primary" data-name="action">
              <a href="/docs/concepts/surfaces">
                <span>How surfaces compose</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <meta data-field="tint-mode" content="dark">
    <meta data-field="bg-overlay" content="dark">
    <meta data-field="bg-overlay-opacity" content="0.4">
    <rf-sandbox data-rune="sandbox" data-source-content="&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;" data-height="fill" data-source-origins="HTML	wireframe-waves/index.html" data-security-mode="trusted" data-allow-js="true" data-bg-guest="" data-guest-posture="backdrop" data-activation="eager">
      <template data-content="fallback">
        <pre data-language="html">
          <code data-language="html">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</code>
        </pre>
      </template>
      <template data-content="source">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</template>
    </rf-sandbox>
  </section>
</div>
npx create-refrakt
import { defineConfig } from '@refrakt-md/sveltekit';

export default defineConfig({
  plugins: ['@refrakt-md/marketing'],
});

Backdrop and subject, at once

The wireframe terrain is a bg sandbox; the install snippet is the positioned media guest. One surface, two media intents.

<div data-width="full" data-rune="hero" data-density="full">
  <section class="rf-section rf-section--center rf-section--has-bg" data-align="center" data-media-position="end" data-collapse="lg" data-elevation="flush" data-prominence="marquee" data-color-scheme="dark" data-bg="" data-rune="section" data-density="full">
    <div data-name="bg" class="rf-section__bg">
      <rf-sandbox class="rf-sandbox" data-source-content="&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;" data-height="fill" data-source-origins="HTML	wireframe-waves/index.html" data-security-mode="trusted" data-allow-js="true" data-bg-guest="" data-guest-posture="backdrop" data-activation="eager" data-rune="sandbox" data-density="compact">
        <template data-content="fallback">
          <pre data-language="html"><code data-language="html">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</code></pre>
        </template>
        <template data-content="source">&lt;div data-source=&quot;HTML&quot;&gt;
&lt;style&gt;
  html, body { height: 100%; margin: 0; overflow: hidden; }
  /* Boot backdrop — the scene fades in over this, so the first paint looks
     designed even before three.js arrives (and remains if it never does). */
  body { background: linear-gradient(rgb(247 246 242) 0%, rgb(236 234 227) 100%); }
  html.dark body, body.dark { background: linear-gradient(rgb(20 20 23) 0%, rgb(13 13 16) 100%); }
  /* Pinned to the iframe viewport, NOT height: 100% — directory-mode sandbox
     content ships inside a plain wrapper div (auto height), which breaks a
     percentage-height chain: the canvas would collapse to its attribute
     height and render as a fixed-size strip at the top of the band. */
  #scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
  #scene.on { opacity: 1; }
  /* No-JS / no-WebGL / blocked-CDN fallback: a few soft horizon lines keep
     the wave suggestion without competing with overlaid hero content. */
  #fallback { display: none; position: fixed; inset: 0; overflow: hidden; }
  #fallback.on { display: block; }
  #fallback i {
    position: absolute; left: -5%; right: -5%; height: 2px; display: block;
    background: linear-gradient(90deg, transparent, var(--c), transparent);
    border-radius: 2px;
  }
&lt;/style&gt;

&lt;canvas id=&quot;scene&quot;&gt;&lt;/canvas&gt;
&lt;div id=&quot;fallback&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.30); top: 58%&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.22); top: 66%; transform: scaleX(0.92)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(61 107 61 / 0.20); top: 74%; transform: scaleX(0.96)&quot;&gt;&lt;/i&gt;
  &lt;i style=&quot;--c:rgb(138 133 125 / 0.16); top: 82%&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;script type=&quot;module&quot;&gt;
  // ── Wireframe waves (SPEC-101 / WORK-401) ──────────────────────────────
  // The hero backdrop: a vertex-displaced wireframe plane rolling in slow
  // swells — karesansui by way of a vector terrain. Crests pick up a niwaki
  // accent over the stone base. Ambient by contract: the cover posture
  // demotion blocks pointer events, so the scene carries itself with no
  // interaction.

  // Palette of record: packages/lumina/src/presets/niwaki.ts (light/dark pairs).
  // Base = ishi (stone); crest accent = matsu (light) / wakaba (dark).
  const NIWAKI = {
    light: { base: 0x8a857d, crest: 0x3d6b3d, fog: 0xeceae3, opacity: 0.5 },
    dark:  { base: 0x7d7062, crest: 0xb3d475, fog: 0x101013, opacity: 0.55 },
  };

  const dark =
    document.documentElement.classList.contains('dark') ||
    document.body.classList.contains('dark');
  const P = dark ? NIWAKI.dark : NIWAKI.light;
  const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const canvas = document.getElementById('scene');
  const showFallback = () =&gt; {
    canvas.style.display = 'none';
    document.getElementById('fallback').classList.add('on');
  };

  try {
    // Version-pinned for reproducibility.
    const THREE = await import('https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js');

    const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
    // Backdrop budget: cap the pixel ratio — the scrim sits over us anyway.
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 1.5));

    const scene = new THREE.Scene();
    // Fog fades the far edge into the CSS backdrop, so the grid has a horizon
    // instead of a hard geometric edge.
    scene.fog = new THREE.Fog(P.fog, 9, 26);
    const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
    camera.position.set(0, 2.4, 9.5);
    camera.lookAt(0, 0.2, 0);

    // ── The displaced plane ──
    const SEG_X = 88, SEG_Y = 46;
    const geo = new THREE.PlaneGeometry(38, 22, SEG_X, SEG_Y);
    geo.rotateX(-Math.PI / 2);
    const count = geo.attributes.position.count;
    const colors = new Float32Array(count * 3);
    geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
    const base = new THREE.Color(P.base);
    const crest = new THREE.Color(P.crest);
    const tmp = new THREE.Color();

    const mat = new THREE.MeshBasicMaterial({
      wireframe: true, vertexColors: true,
      transparent: true, opacity: P.opacity,
      fog: true, depthWrite: false,
    });
    const mesh = new THREE.Mesh(geo, mat);
    mesh.position.y = -0.6;
    scene.add(mesh);

    // Swell: a few travelling sines at different scales — cheap, organic, no
    // noise library. Amplitude stays modest; this is a ground, not a storm.
    const AMP = 0.9;
    function heightAt(x, z, t) {
      return AMP * (
        0.45 * Math.sin(x * 0.32 + t * 0.50) * Math.cos(z * 0.28 + t * 0.32)
        + 0.30 * Math.sin((x + z) * 0.18 - t * 0.40)
        + 0.15 * Math.sin(x * 0.85 + t * 0.90) * Math.sin(z * 0.55 - t * 0.55)
      );
    }
    function displace(t) {
      const pos = geo.attributes.position;
      for (let i = 0; i &lt; count; i++) {
        const x = pos.getX(i), z = pos.getZ(i);
        const h = heightAt(x, z, t);
        pos.setY(i, h);
        // Crest tint: 0 at the troughs, accent at the peaks.
        const k = Math.min(Math.max((h / AMP + 1) / 2, 0), 1);
        tmp.copy(base).lerp(crest, k * k); // square biases the accent to true crests
        colors[i * 3] = tmp.r;
        colors[i * 3 + 1] = tmp.g;
        colors[i * 3 + 2] = tmp.b;
      }
      pos.needsUpdate = true;
      geo.attributes.color.needsUpdate = true;
    }

    function resize() {
      const w = canvas.clientWidth, h = canvas.clientHeight;
      if (!w || !h) return;
      renderer.setSize(w, h, false);
      camera.aspect = w / h;
      camera.updateProjectionMatrix();
    }
    resize();
    window.addEventListener('resize', resize);

    canvas.classList.add('on');

    if (reduce) {
      // Reduced motion: one composed static frame — a mid-swell moment.
      displace(2.4);
      renderer.render(scene, camera);
    } else {
      // The RAF loop pauses with the tab — a backdrop must not drain a
      // backgrounded battery.
      let raf = 0;
      let t = 0;
      let last = performance.now();
      function loop(now) {
        const dt = Math.min((now - last) / 1000, 0.05);
        last = now;
        t += dt;
        displace(t);
        renderer.render(scene, camera);
        raf = requestAnimationFrame(loop);
      }
      raf = requestAnimationFrame(loop);
      document.addEventListener('visibilitychange', () =&gt; {
        if (document.hidden) {
          cancelAnimationFrame(raf);
          raf = 0;
        } else if (!raf) {
          last = performance.now();
          raf = requestAnimationFrame(loop);
        }
      });
    }
  } catch (err) {
    // CDN unreachable / WebGL unavailable → the quiet CSS horizon.
    showFallback();
  }
&lt;/script&gt;

&lt;/div&gt;</template>
      </rf-sandbox>
      <div data-name="bg-overlay" data-bg-overlay="dark" style="opacity: 0.4" class="rf-section__bg-overlay"></div>
    </div>
    <div data-media="hero" data-name="media" class="rf-section__media" data-section="media" data-guest-fit="bleed">
      <section class="rf-codegroup rf-codegroup--scroll" data-slot="media" data-overflow="scroll" data-elevation="flat" data-rune="code-group" data-density="compact" data-code-host="true">
        <div role="tablist" data-name="tabs" class="rf-codegroup__tabs">
          <button data-name="tab" role="tab" class="rf-codegroup__tab">
            <span>Shell</span>
          </button>
          <button data-name="tab" role="tab" class="rf-codegroup__tab">
            <span>JavaScript</span>
          </button>
        </div>
        <div data-name="panels" class="rf-codegroup__panels">
          <div role="tabpanel" data-name="panel" class="rf-codegroup__panel">
            <div class="rf-codeblock">
              <pre data-language="shell"><code data-language="shell">npx create-refrakt
</code></pre>
            </div>
          </div>
          <div role="tabpanel" data-name="panel" class="rf-codegroup__panel">
            <div class="rf-codeblock">
              <pre data-language="js"><code data-language="js">import { defineConfig } from '@refrakt-md/sveltekit';

export default defineConfig({
  plugins: ['@refrakt-md/marketing'],
});
</code></pre>
            </div>
          </div>
        </div>
      </section>
    </div>
    <div data-name="content" class="rf-section__content">
      <header data-name="preamble" class="rf-section__preamble" data-section="preamble">
        <h1 data-slot="headline" id="backdrop-and-subject-at-once" data-name="headline" class="rf-section__headline" data-section="title">Backdrop and subject, at once</h1>
        <p data-slot="blurb" data-name="blurb" class="rf-section__blurb" data-section="description">
          The wireframe terrain is a 
          <code>bg</code>
           sandbox; the install snippet is the positioned media guest. One surface, two media intents.
        </p>
      </header>
      <div data-name="body" class="rf-section__body" data-section="body">
        <div class="rf-actions" data-rune="actions" data-density="full">
          <ul data-slot="actions" data-name="list" class="rf-actions__list">
            <li data-rank="primary" data-name="action" class="rf-actions__action">
              <a href="/docs/concepts/surfaces">
                <span>How surfaces compose</span>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </section>
</div>

The background scene fills the hero behind everything and takes no clicks. It stays still for readers who ask for reduced motion and pauses when scrolled out of view, while the media beside the text is what search engines and link previews use.

Attributes

AttributeTypeRequiredDescription
align"start" | "center" | "end"—Alignment of the header and the actions
media-position"top" | "bottom" | "start" | "end" | "cover"—Where the media sits relative to the content
media-ratiostring—The media's share of the row, beside the content
valign"top" | "center" | "bottom" | "stretch"—Cross-axis alignment, beside the content
collapse"sm" | "md" | "lg" | "never"—When a side-by-side split stacks
content-placestring—Cover overlay anchor: "<block> <inline>" (e.g. "end start") or "auto"
height"sm" | "md" | "lg" | "xl"—Intrinsic band height (named scale) for cover mode
aspectstring—Intrinsic aspect ratio (e.g. "21/9") for cover mode

Universal attributes

bg

The background layer: image, video, gradient, flat overlay wash and legibility scrim, in a single injected layer behind the rune's content.

AttributeTypeRequiredDescription
bgstring—Background preset applied to this block
bg-fromstring—Gradient start colour — a semantic token name (→ var(--rf-color-*))
bg-gradient"to-t" | "to-b" | "to-l" | "to-r" | "to-tr" | "to-br" | "to-bl" | "to-tl"—Gradient direction (bounded named set)
bg-gradient-type"linear" | "radial" | "conic"—Gradient type
bg-tostring—Gradient end colour — a semantic token name
bg-viastring—Optional middle gradient stop — a semantic token name
scrim"top" | "bottom" | "left" | "right" | "none"—Scrim direction (heaviest edge); presence turns the scrim on, "none" opts out of the default cover scrim
scrim-blur"none" | "sm" | "md" | "lg"—Frost scrim blur amount
scrim-strength"sm" | "md" | "lg"—Gradient scrim strength
scrim-tone"dark" | "light"—Whether the scrim darkens (for light text) or lightens (for dark text)
scrim-type"gradient" | "frost"—Scrim treatment: gradient (default) or frost (backdrop blur)
dropcap

Per-instance drop-cap opt-in.

AttributeTypeRequiredDescription
dropcapboolean—Style the opening letter of a prose body as a drop cap. Honoured only when the body reads as prose; ignored otherwise.
elevation

How far the rune sits off the page, from sunken to overlay. The theme decides what each step looks like.

AttributeTypeRequiredDescription
elevation"sunken" | "flush" | "flat" | "raised" | "floating" | "overlay" | "none" | "sm" | "md" | "lg"—Surface depth, from sunken to overlay. Deprecated: none, sm, md and lg (read as flat, raised, raised and floating)
frame

Surface chrome: a named preset from the theme registry with inline `frame-*` overrides layered on top.

AttributeTypeRequiredDescription
framestring—Named frame preset presenting this block's media surface
frame-anchorstring—Crop focal point when the guest is cut (object-position)
frame-aspectstring—Aspect ratio of the framed media, e.g. "16/9"
frame-displace"top" | "bottom" | "end" | "bottom-end" | "top-end" | "both"—Edge/corner the framed guest moves toward
frame-displace-mode"peek" | "bleed"—How displacement renders: `peek` (default) translates the guest visually inside its frame target; `bleed` uses negative margin on the media zone so following layout pulls up — extends past a section like a hero without leaving a gap above
frame-offset"none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"—Displacement distance (non-linear named scale: sm…xl ride the block-spacing tokens, 2xl/3xl/4xl step up to section-spacing for bleed-mode displacements that clear a section edge)
frame-overflow"clip" | "bleed"—How the frame handles a guest whose content is wider than it: `clip` (default) keeps it inside the rounded frame; `bleed` runs an overflowing guest out to the layout edge on a narrow viewport so it reads as cropped by the screen (a bleed host only — hero/feature)
frame-oversizestring—How far the guest exceeds its slot (scale factor)
frame-placestring—Guest-box alignment in the slot (e.g. "left top")
frame-shadow"none" | "sm" | "md" | "lg"—Silhouette drop-shadow strength for the framed media
inset

Internal padding override.

AttributeTypeRequiredDescription
inset"flush" | "tight" | "default" | "loose" | "breathe"—Inner padding of this block
motion

Scroll-reveal entrance. You choose its character; the theme decides how it moves.

AttributeTypeRequiredDescription
reveal"none" | "fade" | "slide" | "scale" | "blur"—Scroll-reveal entrance character (none|fade|slide|scale|blur); the theme owns the choreography
staggerboolean—Cascade this block's items in as it reveals (no-op on single-child runes)
prominence

Header emphasis. Scales a rune's header, or its featured quotation; the theme decides the type size for each step.

AttributeTypeRequiredDescription
prominence"quiet" | "normal" | "prominent" | "display" | "marquee"—Emphasis of a page-section header or a featured quotation (only on runes that have one)
reading

Editorial register for body text. You pick the register; the theme decides how it looks.

AttributeTypeRequiredDescription
reading"fine" | "ui" | "prose"—Reading register for this block’s body: fine | ui | prose. The theme sets how each one looks.
spacing

Block-level rhythm override.

AttributeTypeRequiredDescription
spacing"flush" | "tight" | "default" | "loose" | "breathe"—Vertical spacing above and below this block
substrate

Generated pattern fills behind the content, drawn by the theme.

AttributeTypeRequiredDescription
substrate"dots" | "grid" | "lines" | "cross" | "checker" | "none"—Generated surface pattern
substrate-fill"inherit" | "inset"—Surface fill the pattern sits on (full colour stays with tint)
substrate-opacity"sm" | "md" | "lg"—Pattern ink strength
substrate-size"sm" | "md" | "lg"—Pattern cell size
substrate-target"self" | "media"—Which surface the pattern fills (overrides the rune/theme default)
tint

Per-rune colour override: a named tint from the theme registry, with inline per-token overrides layered on top.

AttributeTypeRequiredDescription
tintstring—Color tint preset applied to this block
tint-mode"auto" | "dark" | "light"—Whether the tint adapts to auto, dark, or light mode
width

The track a block rune occupies.

AttributeTypeRequiredDescription
width"compact" | "narrow" | "content" | "wide" | "full"—Maximum width constraint for this block