<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="noindex">
  <title>SpiritOS — face proof</title>
  <style>
    body { font: 16px/1.45 system-ui, sans-serif; color: #111;
      max-width: 34rem; margin: 10vh auto; padding: 0 1.5rem; }
    h1 { font-weight: 600; font-size: 1.4rem; }
    #answer { border: 1px solid #ddd; padding: 0.75rem 1rem; white-space: pre-wrap; }
    footer { margin-top: 2rem; font-size: 12px; opacity: 0.75; }
  </style>
</head>
<body>
  <h1>Hello from an app server</h1>

  <!-- THE LAST LEG'S PROOF (public-app-server/G17). This page came from
       the browser through Caddy and the face on the VPS, across the relay
       to its owner's box, and from there over a pipe to this app's own
       server process. The box below is one POST the same way. -->
  <p>This page was served by an app server on its owner's own box, reached
  through the face. The box below is a verb, asked the same way.</p>

  <div id="answer">asking…</div>

  <footer>Nothing about you is written anywhere.</footer>

<script type="module">
import { ask } from './ask.js';
const s = await ask('app.state');
document.getElementById('answer').textContent = (s && s.ok === false)
  ? 'refused: ' + (s.code || s.error || 'unknown')
  : 'the app server answered: app "' + ((s && s.appName) || '?') + '"';
</script>
</body>
</html>
