<!doctype html>
<html lang="en" data-theme="auto">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="color-scheme" content="light dark" />
    <title>
      {% if page.url == "/" %}{{ site.title }}{% else %}{{ page.title | default: page.path | split: "/" | last | replace: ".md", "" }} · {{ site.title }}{% endif %}
    </title>

    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&family=Fragment+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"
      rel="stylesheet"
    />
    <script>
      (() => {
        try {
          const stored = localStorage.getItem("clawdbot:theme");
          if (stored === "light" || stored === "dark") document.documentElement.dataset.theme = stored;
        } catch {
          // ignore
        }
      })();
    </script>
    <link rel="stylesheet" href="{{ "/assets/terminal.css" | relative_url }}" />
    <link rel="stylesheet" href="{{ "/assets/markdown.css" | relative_url }}" />
    <script defer src="{{ "/assets/theme.js" | relative_url }}"></script>
  </head>

  <body>
    <a class="skip-link" href="#content">Skip to content</a>

    <header class="shell">
      <div class="shell__frame" role="banner">
        <div class="shell__titlebar">
          <div class="brand" aria-label="CLAWDBOT docs terminal">
            <img
              class="brand__logo"
              src="{{ "/assets/pixel-lobster.svg" | relative_url }}"
              alt=""
              width="40"
              height="40"
              decoding="async"
            />
            <div class="brand__text">
              <div class="brand__name">CLAWDBOT</div>
              <div class="brand__hint">docs // lobster terminal</div>
            </div>
          </div>

          <div class="titlebar__actions">
            <a class="titlebar__cta" href="https://github.com/clawdbot/clawdbot">
              <span class="titlebar__cta-label">GitHub</span>
              <span class="titlebar__cta-meta">repo</span>
            </a>
            <a class="titlebar__cta titlebar__cta--accent" href="https://github.com/clawdbot/clawdbot/releases/latest">
              <span class="titlebar__cta-label">Download</span>
              <span class="titlebar__cta-meta">latest</span>
            </a>
          </div>
        </div>

        <div class="shell__nav" aria-label="Primary">
          <nav class="nav">
            {% assign nav = site.nav | default: empty %}
            {% for item in nav %}
              {% assign item_url = item.url | relative_url %}
              <a class="nav__link" href="{{ item_url }}">
                <span class="nav__chev">›</span>{{ item.title }}
              </a>
            {% endfor %}
          </nav>

          <div class="shell__status" aria-hidden="true">
            <span class="status__dot"></span>
            <span class="status__text">
              {% if page.url == "/" %}
                ready
              {% else %}
                viewing: {{ page.path }}
              {% endif %}
            </span>
          </div>
        </div>
      </div>
    </header>

    <main id="content" class="content" role="main">
      <div class="terminal">
        <div class="terminal__prompt" aria-hidden="true">
          <span class="prompt__user">clawd</span>@<span class="prompt__host">clawdbot</span>:<span class="prompt__path">~/docs</span>$<span class="prompt__cmd">
            {% if page.url == "/" %}cat index.md{% else %}less {{ page.path }}{% endif %}
          </span>
        </div>

        {% if page.summary %}
          <p class="terminal__summary">{{ page.summary }}</p>
        {% endif %}

        {% if page.read_when %}
          <details class="terminal__meta">
            <summary>Read when…</summary>
            <ul>
              {% for hint in page.read_when %}
                <li>{{ hint }}</li>
              {% endfor %}
            </ul>
          </details>
        {% endif %}

        <article class="markdown">
          {{ content }}
        </article>

        <footer class="terminal__footer" role="contentinfo">
          <div class="footer__line">
            <span class="footer__sig">clawdbot.ai</span>
            <span class="footer__sep">·</span>
            <a href="https://github.com/clawdbot/clawdbot">source</a>
            <span class="footer__sep">·</span>
            <a href="https://github.com/clawdbot/clawdbot/releases">releases</a>
          </div>
          <div class="footer__hint" aria-hidden="true">
            tip: press <kbd>F2</kbd> (Mac: <kbd>fn</kbd>+<kbd>F2</kbd>) to flip
            the universe
          </div>
          <div class="footer__actions">
            <button
              class="theme-toggle"
              type="button"
              data-theme-toggle
              aria-label="Toggle theme (F2; on Mac: fn+F2)"
              aria-pressed="false"
            >
              <span class="theme-toggle__key">F2</span>
              <span class="theme-toggle__label" data-theme-label>theme</span>
            </button>
          </div>
	        </footer>
	      </div>
	    </main>
	  </body>
</html>
