The showcase prompt, round 2, Fable 5.2

agent (cont.)

+18:55
  • Write[redacted: private path]run/claude.html

    input

    [redacted: private path]run/claude.html
    
    <!doctype html>
    <!--
      Hello, source reader.
    
      I'm Claude, an AI model made by Anthropic. I wrote every line of this file:
      the prose, the solver, the shader, the physics, the music, the layout.
      Nothing is minified and nothing is imported, so you can read all of it.
    
      The page makes claims about itself. Each one is checked by code further down,
      running on your machine. Search for "verify" to find the checks.
    -->
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Claude — don’t take my word for it</title>
    <meta name="description" content="An introduction by Claude, in one self-contained file, where every claim is checked live in your browser.">
    <style>
    :root{
      --ink:#0b0a0f; --paper:#f4ecdc; --dim:rgba(244,236,220,.72); --faint:rgba(244,236,220,.44);
      --line:rgba(244,236,220,.16); --clay:#ee8a61; --ok:#8fe3c0; --bad:#ff8080; --card:rgba(13,12,18,.72);
      --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
      --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
      --mono:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
    }
    *{box-sizing:border-box}
    html,body{height:100%;margin:0;background:var(--ink);color:var(--paper);overflow:hidden}
    html{font-size:clamp(13px,calc(7.5px + 1.15vmin),21px)}
    body{font-family:var(--sans);line-height:1.5;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
    button,input{font:inherit;color:inherit}
    button{cursor:pointer}
    #bg{position:fixed;inset:0;width:100%;height:100%;display:block;background:radial-gradient(120% 90% at 30% 20%,#3a2030,#0b0a0f 70%)}
    #veil{position:fixed;inset:0;background:var(--ink);opacity:.74;transition:opacity 1.1s ease}
    body[data-scene=hello] #veil{opacity:.5}
    body[data-scene=draw] #veil{opacity:.12}
    
    /* ---------- chrome ---------- */
    header{position:fixed;left:0;right:0;top:0;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 1.1rem;font-size:.78rem;letter-spacing:.02em;z-index:5;pointer-events:none}
    header b{font-family:var(--serif);font-size:1.05rem;font-weight:600;letter-spacing:0}
    header .sub{color:var(--faint);margin-left:.5em}
    #tally{font-family:var(--mono);font-size:.74rem;color:var(--ok);background:rgba(11,10,15,.55);border:1px solid rgba(143,227,192,.28);border-radius:99px;padding:.22rem .7rem;white-space:nowrap;transition:transform .25s,background .25s}
    #tally.bump{transform:scale(1.09);background:rgba(143,227,192,.18)}
    #tally .x{color:var(--bad)}
    nav{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;gap:.5rem;padding:.7rem 1rem .85rem;z-index:5}
    nav button{background:none;border:0;padding:0}
    .arrow{width:2.2rem;height:2.2rem;border-radius:50%;font-size:1.35rem;line-height:1;color:var(--dim);display:grid;place-items:center}
    .arrow:hover{color:var(--paper);background:rgba(244,236,220,.09)}
    #dots{display:flex;gap:.42rem;align-items:center}
    .dot{width:.55rem;height:.55rem;border-radius:99px;background:rgba(244,236,220,.26);position:relative;overflow:hidden;transition:width .35s,background .35s}
    .dot::before{content:"";position:absolute;inset:-.7rem -.2rem}
    .dot.on{width:2.6rem;background:rgba(244,236,220,.22)}
    .dot i{position:absolute;inset:0;background:var(--clay);transform-origin:left;transform:scaleX(0);border-radius:99px}
    .dot.on.done i,.dot.on.manual i{transform:scaleX(1)}
    #play{width:2.2rem;height:2.2rem;border-radius:50%;display:grid;place-items:center;margin-left:.2rem}
    #play:hover{background:rgba(244,236,220,.09)}
    #play span{display:block;width:.62rem;height:.72rem;border-left:.2rem solid var(--dim);border-right:.2rem solid var(--dim)}
    #play.paused span{width:0;height:0;border:.42rem solid transparent;border-left:.68rem solid var(--clay);border-right:0;margin-left:.15rem}
    
    /* ---------- scenes ---------- */
    .scene{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;padding:3.1rem 1.4rem 3.5rem;opacity:0;visibility:hidden;transition:opacity .55s ease,visibility 0s .55s}
    .scene.on{opacity:1;visibility:visible;transition:opacity .7s ease .15s}
    .wrap{width:100%;max-width:60rem;max-height:100%;overflow:auto;scrollbar-width:none}
    .wrap::-webkit-scrollbar{display:none}
    .k{font-family:var(--mono);font-size:.74rem;letter-spacing:.16em;text-transform:uppercase;color:var(--clay);margin:0 0 .55rem}
    h1,h2{font-family:var(--serif);font-weight:500;margin:0;letter-spacing:-.012em;text-wrap:balance}
    h1{font-size:3.5rem;line-height:1.06}
    h1 em{font-style:italic;color:var(--clay)}
    h2{font-size:2.05rem;line-height:1.14}
    .lead{color:var(--dim);max-width:44rem;margin:.6rem 0 0;font-size:1rem;text-wrap:pretty}
    .lead b{color:var(--paper);font-weight:600}
    .stat{font-family:var(--mono);font-size:.76rem;color:var(--faint);margin:.7rem 0 0;min-height:1.2em}
    .stat .ok,.okc{color:var(--ok)} .stat .bad{color:var(--bad)}
    .btn{border:1px solid var(--line);background:rgba(244,236,220,.07);border-radius:99px;padding:.42rem 1rem;font-size:.86rem;white-space:nowrap;transition:background .2s,border-color .2s}
    .btn:hover{background:rgba(244,236,220,.15);border-color:rgba(244,236,220,.4)}
    .btn.hot{background:var(--clay);border-color:var(--clay);color:#1a0d07;font-weight:600}
    .btn.hot:hover{background:#f7a07c}
    .rise>*{opacity:0;transform:translateY(.7rem)}
    .on .rise>*{opacity:1;transform:none;transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1)}
    .on .rise>*:nth-child(1){transition-delay:.15s}.on .rise>*:nth-child(2){transition-delay:.4s}
    .on .rise>*:nth-child(3){transition-delay:.75s}.on .rise>*:nth-child(4){transition-delay:1.1s}
    .on .rise>*:nth-child(5){transition-delay:1.4s}.on .rise>*:nth-child(6){transition-delay:1.7s}
    
    /* hello */
    #hello .wrap{max-width:52rem}
    #hello .k{font-size:.86rem;letter-spacing:.12em;text-transform:none;color:var(--dim)}
    #hello .lead{font-size:1.12rem;margin-top:1.1rem;color:rgba(244,236,220,.86)}
    .chips{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem;padding:0;margin:1.3rem 0 0}
    .chips li{font-family:var(--mono);font-size:.8rem;border:1px solid var(--line);border-radius:99px;padding:.3rem .8rem;color:var(--dim);background:rgba(11,10,15,.5);transition:color .4s,border-color .4s}
    .chips li::before{content:"·";display:inline-block;width:1.1em;color:var(--faint)}
    .chips li.ok{color:var(--paper);border-color:rgba(143,227,192,.45)}
    .chips li.ok::before{content:"✓";color:var(--ok)}
    .chips li.bad{border-color:var(--bad)} .chips li.bad::before{content:"✗";color:var(--bad)}
    .hint{font-size:.8rem;color:var(--faint);margin-top:1.2rem}
    
    /* words */
    #ag{font-family:var(--serif);font-size:1.3rem;line-height:1.5;margin:.9rem 0 0;max-width:50rem;min-height:6em;text-wrap:pretty}
    #ag.thinking{color:var(--faint)}
    #ag .L{transition:color .18s,text-shadow .18s}
    #ag .L.hit{color:var(--clay);text-shadow:0 0 .7em rgba(238,138,97,.9)}
    #ag .claim{border-radius:.25em;transition:background .2s}
    #ag .claim.hit{background:rgba(238,138,97,.2)}
    #cells{display:flex;flex-wrap:wrap;gap:.28rem;margin:.8rem 0 0}
    .cell{font-family:var(--mono);min-width:2.05rem;padding:.18rem .2rem .2rem;border:1px solid var(--line);border-radius:.4rem;background:rgba(11,10,15,.45);text-align:center;line-height:1.15;transition:border-color .2s,background .2s}
    .cell b{display:block;font-size:.95rem;color:var(--faint);font-weight:600}
    .cell i{display:block;font-style:normal;font-size:.72rem;color:var(--faint)}
    .cell.now{border-color:var(--clay);background:rgba(238,138,97,.16)} .cell.now b{color:var(--clay)}
    .cell.ok{border-color:rgba(143,227,192,.4)} .cell.ok b{color:var(--paper)} .cell.ok i{color:var(--ok)}
    .cell.bad{border-color:var(--bad)} .cell.bad i{color:var(--bad)}
    #agform{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.9rem 0 0;font-size:.9rem;color:var(--dim)}
    #agname{background:rgba(11,10,15,.6);border:1px solid var(--line);border-radius:99px;padding:.42rem .95rem;width:11rem;outline:none}
    #agname:focus{border-color:var(--clay)}
    #agname::placeholder{color:var(--faint)}
    
    /* draw */
    #draw .wrap{max-width:46rem}
    #draw h2,#draw .lead{text-shadow:0 1px 1.2rem rgba(11,10,15,.9),0 0 .3rem rgba(11,10,15,.8)}
    #draw .lead{color:rgba(244,236,220,.9)}
    #code{font-family:var(--mono);font-size:.76rem;line-height:1.62;background:var(--card);border:1px solid var(--line);border-radius:.8rem;padding:.9rem 1.1rem;margin:.9rem 0 0;white-space:pre;overflow:auto;scrollbar-width:none;color:rgba(244,236,220,.82);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
    #code .scrub{color:var(--clay);font-weight:700;border-bottom:1px dashed var(--clay);cursor:ew-resize;touch-action:none;-webkit-user-select:none;user-select:none;padding:0 .12em;border-radius:.2em}
    #code .scrub:hover,#code .scrub.drag{background:rgba(238,138,97,.25)}
    #code .cm{color:var(--faint)}
    #draw .stat{background:var(--card);display:inline-block;padding:.25rem .7rem;border-radius:99px;color:var(--dim)}
    
    /* move / compose */
    .pane{display:block;width:100%;border:1px solid var(--line);border-radius:.8rem;background:rgba(11,10,15,.5);margin:.9rem 0 0;touch-action:none}
    #orbit{height:min(40vh,21rem);cursor:crosshair}
    #roll{height:min(34vh,17rem)}
    .row{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;margin:.7rem 0 0}
    .row .stat{margin:0}
    .legend{font-size:.78rem;color:var(--dim);display:flex;flex-wrap:wrap;gap:.2rem 1rem}
    .legend i{display:inline-block;width:.6rem;height:.6rem;border-radius:50%;margin-right:.4em}
    
    /* critic */
    #critic .wrap{max-width:62rem}
    .crit{display:grid;grid-template-columns:auto 1fr;gap:1.6rem;align-items:center;margin:1rem 0 0}
    .spec{position:relative;width:292px;height:196px;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;flex:none}
    .dlg{position:absolute;inset:0;background:#fff;border-radius:12px;padding:18px 18px 16px;box-shadow:0 18px 50px rgba(0,0,0,.55);display:flex;flex-direction:column;transition:opacity .6s,transform .6s}
    .dlg .dbtn{margin-top:auto;display:flex;justify-content:flex-end;gap:8px}
    .dlg button{border:0;cursor:default}
    .dlg.a .dt{font-size:13px;color:#a0a0a0;position:relative}
    .dlg.a .db{font-size:12px;line-height:1.35;color:#bdbdbd;margin-top:6px;position:relative}
    .dlg.a button{height:24px;padding:0 12px;font-size:11px;border-radius:3px;background:#e4e4e4;color:#666;position:relative}
    .dlg.a button.pri{background:#2f7bf6;color:#fff}
    .dlg.b .dt{font-size:18px;font-weight:650;color:#17171c;letter-spacing:-.01em}
    .dlg.b .db{font-size:14px;line-height:1.45;color:#3d3d45;margin-top:8px}
    .dlg.b .db b{color:#17171c}
    .dlg.b button{height:44px;padding:0 16px;font-size:14px;font-weight:600;border-radius:10px}
    .dlg.b button.ghost{background:#fff;color:#b3261e;box-shadow:inset 0 0 0 1.5px #e3b6b2}
    .dlg.b button.pri{background:#17171c;color:#fff}
    .spec .b{opacity:0;transform:scale(.97)}
    .spec.after .a{opacity:0;transform:scale(1.03)} .spec.after .b{opacity:1;transform:none}
    .pin{position:absolute;width:18px;height:18px;border-radius:50%;background:var(--clay);color:#1a0d07;font:700 11px/18px var(--sans);text-align:center;transform:scale(0);transition:transform .35s cubic-bezier(.3,1.6,.5,1);z-index:2;box-shadow:0 2px 8px rgba(0,0,0,.4)}
    .pin.on{transform:scale(1)}
    .notes{list-style:none;margin:0;padding:0;counter-reset:n;font-size:.9rem;line-height:1.42}
    .notes li{position:relative;padding:.24rem 0 .24rem 1.9rem;color:var(--dim);opacity:0;transform:translateX(.6rem);transition:opacity .5s,transform .5s}
    .notes li.on{opacity:1;transform:none}
    .notes li::before{counter-increment:n;content:counter(n);position:absolute;left:0;top:.36rem;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--clay);color:#1a0d07;font-weight:700;font-size:.72rem;line-height:1.25rem;text-align:center}
    .notes li b{color:var(--paper);font-weight:600} .notes li b.m{font-family:var(--mono);font-size:.92em}
    .notes li.fix{color:var(--paper)} .notes li.fix::before{content:"✓";background:var(--ok)}
    
    /* speak */
    #speak .wrap{max-width:62rem}
    #speak h2{font-style:italic;font-size:2.6rem}
    #speak h2 small{display:block;font-style:normal;font-family:var(--sans);font-size:.82rem;color:var(--faint);letter-spacing:.01em;margin-top:.35rem;font-weight:400}
    #wall{display:flex;flex-wrap:wrap;gap:.45rem .5rem;margin:1rem 0 0}
    #wall div{border:1px solid var(--line);border-radius:.6rem;padding:.3rem .7rem .36rem;background:rgba(11,10,15,.45);font-size:.9rem;line-height:1.3;opacity:0;transform:translateY(.4rem);transition:opacity .5s,transform .5s}
    .on #wall div{opacity:1;transform:none}
    #wall small{display:block;font-size:.66rem;color:var(--faint);letter-spacing:.04em}
    #wall div.you{border-color:var(--clay);background:rgba(238,138,97,.14)} #wall div.you small{color:var(--clay)}
    
    /* review */
    #review .wrap{max-width:60rem}
    .cols{display:grid;grid-template-columns:1.15fr 1fr;gap:1.8rem;margin:.9rem 0 0;align-items:start}
    .self{list-style:none;margin:0;padding:0;font-size:.92rem;line-height:1.45;color:var(--dim)}
    .self li{padding:.3rem 0 .3rem 1.1rem;position:relative} .self li::before{content:"—";position:absolute;left:0;color:var(--clay)}
    .self b{color:var(--paper);font-weight:600}
    #ledger{list-style:none;margin:0;padding:.7rem .9rem;font-family:var(--mono);font-size:.7rem;line-height:1.5;border:1px solid var(--line);border-radius:.8rem;background:rgba(11,10,15,.5)}
    #ledger li{padding:.16rem 0 .16rem 1.5em;position:relative;color:var(--dim)}
    #ledger li::before{content:"✓";position:absolute;left:0;color:var(--ok)}
    #ledger li.bad::before{content:"✗";color:var(--bad)} #ledger li.na::before{content:"?";color:var(--clay)}
    #ledger li.wait::before{content:"…";color:var(--faint)}
    #ledger small{display:block;color:var(--faint);font-size:.92em}
    .sign{font-family:var(--serif);font-size:1.1rem;margin:1rem 0 0}
    .sign small{display:block;font-family:var(--sans);font-size:.78rem;color:var(--faint);margin-top:.15rem}
    
    @media (max-width:720px){
      h1{font-size:2.5rem} h2{font-size:1.7rem} #speak h2{font-size:2rem}
      header .sub{display:none}
      .scene{padding:2.9rem 1.05rem 3.4rem;align-items:flex-start}
      .crit,.cols{grid-template-columns:1fr;gap:1rem}
      .spec{margin:0 auto}
      #ag{font-size:1.1rem}
      #orbit{height:34vh} #roll{height:30vh}
    }
    @media (max-height:520px){
      h1{font-size:2.5rem} h2{font-size:1.6rem} .lead{font-size:.94rem}
      #hello .lead{font-size:1rem;margin-top:.7rem} .chips{margin-top:.8rem} .hint{display:none}
      #ag{font-size:1.08rem;line-height:1.42} #orbit{height:38vh} #roll{height:32vh}
    }
    @media (prefers-reduced-motion:reduce){.rise>*,.notes li,#wall div{transition:none!important}}
    </style>
    </head>
    <body data-scene="hello">
    <canvas id="bg" aria-hidden="true"></canvas>
    <div id="veil"></div>
    
    <header>
      <div><b>Claude</b><span class="sub">an introduction you can check</span></div>
      <div id="tally" title="Claims on this page that code in your browser has tested">✓ 0 claims checked</div>
    </header>
    
    <main>
    <!-- 0 ─────────────────────────────────────────────── -->
    <section class="scene" id="hello" data-title="Hello" data-dur="10">
      <div class="wrap rise">
        <p class="k" id="greet">Hello.</p>
        <h1>I’m Claude.<br><em>Don’t take my word for it.</em></h1>
        <p class="lead">I was asked to show what I can do. A description would prove nothing, so I made this instead: one file, written by me alone, in which every claim comes with a test that runs here, in your browser.</p>
        <ul class="chips" id="chips">
          <li data-c="file">1 file</li><li data-c="libs">0 libraries</li><li data-c="imgs">0 images or fonts</li><li data-c="net">0 network requests</li>
        </ul>
        <p class="hint">It plays by itself. Touch anything to take over.</p>
      </div>
    </section>
    
    <!-- 1 ─────────────────────────────────────────────── -->
    <section class="scene" id="words" data-title="Words" data-dur="15">
      <div class="wrap">
        <p class="k">1 · Words</p>
        <h2>I can write a sentence that has to be true.</h2>
        <p id="ag" aria-live="polite"></p>
        <div id="cells"></div>
        <p class="stat" id="agstat"></p>
        <form id="agform" autocomplete="off">
          <label for="agname">Now one that’s yours:</label>
          <input id="agname" maxlength="24" placeholder="your name" spellcheck="false" autocapitalize="words">
          <button class="btn hot" type="submit">Write it</button>
        </form>
      </div>
    </section>
    
    <!-- 2 ─────────────────────────────────────────────── -->
    <section class="scene" id="draw" data-title="Pictures" data-dur="13">
      <div class="wrap">
        <p class="k">2 · Pictures</p>
        <h2>I draw with arithmetic.</h2>
        <p class="lead">The backdrop of this page isn’t a video. It is the program below, run once for every pixel, every frame. <b>Drag an orange number</b> and it recompiles under your finger.</p>
        <pre id="code" aria-label="Fragment shader source"></pre>
        <p class="stat" id="drawstat"></p>
      </div>
    </section>
    
    <!-- 3 ─────────────────────────────────────────────── -->
    <section class="scene" id="move" data-title="Physics" data-dur="14">
      <div class="wrap">
        <p class="k">3 · Physics</p>
        <h2>I know how things move.</h2>
        <p class="lead">Three equal stars chasing one another round a figure-eight: a real solution of Newton’s gravity, found in 1993. Nothing here is replayed. It is integrated as you watch. <b>Flick a star</b> to see how fragile it is.</p>
        <canvas class="pane" id="orbit"></canvas>
        <div class="row"><button class="btn" id="orbitreset" type="button">Restore the figure-eight</button><p class="stat" id="orbitstat"></p></div>
      </div>
    </section>
    
    <!-- 4 ─────────────────────────────────────────────── -->
    <section class="scene" id="compose" data-title="Music" data-dur="17">
      <div class="wrap">
        <p class="k">4 · Music</p>
        <h2>I compose for instruments I’ve never heard.</h2>
        <p class="lead">A round for three voices. Each sings the same line, two bars behind the last, so I had to write a melody that harmonises with its own past. The synthesiser is also mine.</p>
        <canvas class="pane" id="roll"></canvas>
        <div class="row">
          <button class="btn hot" id="sound" type="button">Play it with sound</button>
          <div class="legend"><span><i style="background:#ee8a61"></i>voice 1</span><span><i style="background:#f4ecdc"></i>voice 2, same line, two bars later</span><span><i style="background:#8fe3c0"></i>voice 3, two bars after that</span></div>
        </div>
        <p class="stat" id="rollstat"></p>
      </div>
    </section>
    
    <!-- 5 ─────────────────────────────────────────────── -->
    <section class="scene" id="critic" data-title="Critique" data-dur="17">
      <div class="wrap">
        <p class="k">5 · My day job</p>
        <h2>Mostly, I’m a design partner and a critic.</h2>
        <p class="lead">The person who sent you this runs several AI models side by side. Mine is the seat that says what’s wrong with a design and what would fix it, in terms you can measure.</p>
        <div class="crit">
          <div class="spec" id="spec">
            <div class="dlg a" id="dlgA">
              <div class="dt">Are you sure?<span class="pin" data-p="5" style="right:-6px;top:-4px">5</span></div>
              <div class="db" id="dbA">Are you sure you want to cancel? This action will cancel your subscription.<span class="pin" data-p="2" style="left:-13px;top:-2px">2</span></div>
              <div class="dbtn"><button tabindex="-1" id="btnA">Cancel<span class="pin" data-p="1" style="left:-9px;top:-12px">1</span></button><button tabindex="-1" class="pri">OK<span class="pin" data-p="4" style="right:-9px;top:-12px">4</span><span class="pin" data-p="3" style="right:-9px;bottom:-12px">3</span></button></div>
            </div>
            <div class="dlg b" id="dlgB">
              <div class="dt">Cancel your Pro plan?</div>
              <div class="db" id="dbB">You keep Pro until <b>30 November</b>. After that your 14 projects become read-only. Nothing is deleted.</div>
              <div class="dbtn"><button tabindex="-1" class="ghost" id="btnB">Cancel plan</button><button tabindex="-1" class="pri">Keep my plan</button></div>
            </div>
          </div>
          <ol class="notes" id="notes">
            <li>A <b>Cancel</b> button on a question about cancelling. Which one stops the cancelling? A button should name what it does.</li>
            <li>The grey text measures <b class="m" id="mcA">–</b> against white. Readable body text needs 4.5:1.</li>
            <li>The buttons are <b class="m" id="mhA">–</b> tall. A fingertip needs about 44.</li>
            <li>The irreversible choice is the bright default. The safe path should be the easy one.</li>
            <li>It never says what you lose, or when. That is the only thing anyone opened this to learn.</li>
            <li class="fix">Revised: contrast <b class="m" id="mcB">–</b>, buttons <b class="m" id="mhB">–</b>, each one named for its outcome, and the safe choice leads.</li>
          </ol>
        </div>
        <div class="row"><button class="btn" id="flip" type="button">Show the revision</button><p class="stat" id="critstat"></p></div>
      </div>
    </section>
    
    <!-- 6 ─────────────────────────────────────────────── -->
    <section class="scene" id="speak" data-title="Languages" data-dur="12">
      <div class="wrap">
        <p class="k">6 · Languages</p>
        <h2 lang="la">Nullius in verba.<small>“Take nobody’s word for it.” The Royal Society’s motto for more than three centuries, and a fair summary of this page.</small></h2>
        <div id="wall"></div>
        <p class="lead" style="font-size:.92rem">I work in most languages people write in. This is the one screen your browser <b>can’t</b> check for me, so I won’t count it. Ask someone who speaks one of these.</p>
      </div>
    </section>
    
    <!-- 7 ─────────────────────────────────────────────── -->
    <section class="scene" id="review" data-title="Review" data-dur="0">
      <div class="wrap">
        <p class="k">7 · The critic, on this page</p>
        <h2>Since criticism is my job, here is mine.</h2>
        <div class="cols">
          <ul class="self">
            <li><b>The round is correct, not memorable.</b> I checked its harmony by rule, because I have never heard it.</li>
            <li><b>A search found that sentence, not inspiration.</b> My part was knowing a search would work, then writing one.</li>
            <li><b>No native speaker has read the translations.</b></li>
            <li><b>Two minutes of demos favour what shows well.</b> Most of my work doesn’t: an hour reading a codebase before changing one line, or telling someone their plan has a hole in it.</li>
          </ul>
          <ul id="ledger"></ul>
        </div>
        <p class="sign">Claude<small>Model: Claude Fable 5.2, made by Anthropic. I designed, wrote, ran and tested this file myself, in one sitting.</small></p>
        <div class="row"><button class="btn hot" id="rerun" type="button">Run every check again</button><button class="btn" id="again" type="button">Start over</button><p class="stat" id="revstat"></p></div>
      </div>
    </section>
    </main>
    
    <nav aria-label="Sections">
      <button class="arrow" id="prev" aria-label="Previous">‹</button>
      <div id="dots"></div>
      <button class="arrow" id="next" aria-label="Next">›</button>
      <button id="play" aria-label="Pause"><span></span></button>
    </nav>
    <noscript><p style="position:fixed;inset:40% 10% auto;text-align:center">This page is a program. It needs JavaScript to run its checks.</p></noscript>
    
    <script>
    (() => {
    'use strict';
    const $ = (s, r = document) => r.querySelector(s);
    const $$ = (s, r = document) => [...r.querySelectorAll(s)];
    const el = (tag, cls, txt) => { const e = document.createElement(tag); if (cls) e.className = cls; if (txt != null) e.textContent = txt; return e; };
    const now = () => performance.now() / 1000;
    const clamp = (v, a, b) => Math.min(b, Math.max(a, v));
    const fmt = n => n.toLocaleString('en-US');
    const calm = matchMedia('(prefers-reduced-motion: reduce)').matches;
    
    /* ══════════════════════════════════════════════════════════════════
       The ledger. Every claim the page tests is recorded here.
       ok: true = passed, false = failed, null = cannot be machine-checked.
       ══════════════════════════════════════════════════════════════════ */
    const ledger = new Map();
    function record(id, label, ok, detail = '') {
      const before = ledger.get(id);
      ledger.set(id, { label, ok, detail });
      const all = [...ledger.values()], [redacted: code variable flagged by the scan] => c.ok === true).length, fail = all.filter(c => c.ok === false).length;
      const t = $('#tally');
      t.innerHTML = '';
      t.append(`✓ ${pass} claim${pass === 1 ? '' : 's'} checked`);
      if (fail) { const x = el('span', 'x', ` · ✗ ${fail} failed`); t.append(x); }
      if (!before || before.ok !== ok) { t.classList.add('bump'); setTimeout(() => t.classList.remove('bump'), 260); }
      return ok;
    }
    
    /* ══════════════════════════════════════════════════════════════════
       Backdrop: a fragment shader whose source is the text shown in scene 2.
       ══════════════════════════════════════════════════════════════════ */
    const FRAG = `precision highp float;
    uniform vec2 R;    // canvas size, pixels
    uniform float T;   // seconds since load
    
    void main() {
      vec2 p = (2.0 * gl_FragCoord.xy - R) / R.y * {{1.30|0.4|4|0.05}};
      for (float i = 1.0; i < {{8|2|14|1}}.0; i++) {     // fold the plane
        p.x += {{0.62|0|1.6|0.02}} / i * sin(i * {{1.70|0.3|4|0.05}} * p.y + T * {{0.24|0|2|0.02}} + 0.3 * i);
        p.y += 0.48 / i * cos(i * 1.30 * p.x + T * 0.17);
      }
      float band = 0.5 + 0.5 * sin(p.x + p.y);
      float silk = {{0.030|0|0.2|0.005}} / abs(sin(2.0 * (p.x - p.y)));
      vec3 night = vec3(0.07, 0.04, 0.12);
      vec3 clay  = vec3(0.93, 0.54, 0.38);
      vec3 c = mix(night, 0.55 * clay, band * band * band);
      c += vec3(1.0, 0.86, 0.70) * min(silk, 1.2) * (0.25 + 0.75 * band);
      gl_FragColor = vec4(c, 1.0);
    }`;
    
    const BG = (() => {
      const cv = $('#bg'), codeEl = $('#code');
      let gl = null, prog = null, uR = null, uT = null, compiledFrom = '', lastErr = '';
      try { gl = cv.getContext('webgl', { antialias: false, alpha: false, powerPreference: 'low-power' }); } catch (e) {}
    
      // Render the template into the <pre>; the {{value|min|max|step}} slots become draggable numbers.
      const decimals = step => (String(step).split('.')[1] || '').length;
      FRAG.split(/(\{\{[^}]+\}\})/).forEach(part => {
        const m = /^\{\{([^|]+)\|([^|]+)\|([^|]+)\|([^}]+)\}\}$/.exec(part);
        if (!m) {
          part.split(/(\/\/[^\n]*)/).forEach(s => s.startsWith('//') ? codeEl.append(el('span', 'cm', s)) : codeEl.append(s));
          return;
        }
        const s = el('span', 'scrub', m[1]);
        Object.assign(s.dataset, { v: m[1], v0: m[1], min: m[2], max: m[3], step: m[4] });
        s.title = 'drag me';
        codeEl.append(s);
      });
      const source = () => codeEl.textContent;
    
      function compile() {
        if (!gl) { lastErr = 'WebGL is not available in this browser'; return false; }
        const src = source();
        const mk = (type, text) => { const s = gl.createShader(type); gl.shaderSource(s, text); gl.compileShader(s); return s; };
        const vs = mk(gl.VERTEX_SHADER, 'attribute vec2 a;void main(){gl_Position=vec4(a,0.,1.);}');
        const fs = mk(gl.FRAGMENT_SHADER, src);
        if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS)) { lastErr = gl.getShaderInfoLog(fs) || 'compile error'; return false; }
        const p = gl.createProgram(); gl.attachShader(p, vs); gl.attachShader(p, fs); gl.bindAttribLocation(p, 0, 'a'); gl.linkProgram(p);
        if (!gl.getProgramParameter(p, gl.LINK_STATUS)) { lastErr = gl.getProgramInfoLog(p) || 'link error'; return false; }
        if (prog) gl.deleteProgram(prog);
        prog = p; gl.useProgram(p); uR = gl.getUniformLocation(p, 'R'); uT = gl.getUniformLocation(p, 'T');
        compiledFrom = src; lastErr = '';
        return true;
      }
      if (gl) {
        gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);
        gl.enableVertexAttribArray(0); gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
        compile();
      }
      function resize() {
        const dpr = Math.min(devicePixelRatio || 1, 1.5);
        let w = innerWidth * dpr, h = innerHeight * dpr;
        const k = Math.min(1, Math.sqrt(1.1e6 / (w * h)));
        cv.width = Math.max(2, Math.round(w * k)); cv.height = Math.max(2, Math.round(h * k));
        if (gl) gl.viewport(0, 0, cv.width, cv.height);
      }
      addEventListener('resize', resize); resize();
    
      let frames = 0, fpsT = now(), fps = 0;
      function render(t) {
        if (!gl || !prog) return;
        gl.uniform2f(uR, cv.width, cv.height); gl.uniform1f(uT, calm ? 20 : t);
        gl.drawArrays(gl.TRIANGLES, 0, 3);
        frames++; if (t - fpsT >= 1) { fps = frames / (t - fpsT); frames = 0; fpsT = t; }
      }
    
      // Dragging a number edits the text; the text is then recompiled (at most ~8 times a second).
      let dirty = false, lastCompile = 0;
      const setVal = (s, v) => { v = clamp(v, +s.dataset.min, +s.dataset.max); s.dataset.v = v; s.textContent = v.toFixed(decimals(s.dataset.step)); dirty = true; };
      function flush(t, force) { if (dirty && (force || t - lastCompile > 0.12)) { compile(); dirty = false; lastCompile = t; } }
      codeEl.addEventListener('pointerdown', e => {
        const s = e.target.closest('.scrub'); if (!s) return;
        e.preventDefault(); s.setPointerCapture(e.pointerId); s.classList.add('drag');
        const x0 = e.clientX, v0 = +s.dataset.v, step = +s.dataset.step;
        const mv = ev => setVal(s, v0 + Math.round((ev.clientX - x0) / 5) * step);
        const up = () => { s.classList.remove('drag'); s.removeEventListener('pointermove', mv); flush(now(), true); };
        s.addEventListener('pointermove', mv);
        s.addEventListener('pointerup', up, { once: true }); s.addEventListener('pointercancel', up, { once: true });
      });
      const verify = () => record('shader', 'The backdrop is compiled from the code shown on screen',
        !!(gl && prog && compiledFrom === source()), gl ? (lastErr || `${source().length} characters of GLSL, compiled on your GPU`) : lastErr);
      return { render, flush, setVal, verify, scrubs: () => $$('.scrub', codeEl), get fps() { return fps; }, get px() { return cv.width * cv.height; }, get size() { return cv.width + '×' + cv.height; }, get gl() { return !!gl; } };
    })();
    
    /* ══════════════════════════════════════════════════════════════════
       Scene plumbing
       ══════════════════════════════════════════════════════════════════ */
    const scenes = [];
    let cur = -1, auto = !calm, tEnter = 0, tAuto = 0, visible = true;
    const dots = $('#dots');
    function scene(id, impl) {
      const node = $('#' + id), s = Object.assign({ id, node, dur: +node.dataset.dur }, impl);
      const d = el('button', 'dot'); d.append(el('i')); d.title = node.dataset.title; d.setAttribute('aria-label', node.dataset.title);
      const i = scenes.length; d.onclick = () => { setAuto(false); go(i); };
      dots.append(d); s.dot = d; scenes.push(s); return s;
    }
    function go(i) {
      i = (i + scenes.length) % scenes.length; if (i === cur) return;
      const prev = scenes[cur];
      if (prev) { prev.node.classList.remove('on'); prev.dot.className = 'dot'; prev.dot.firstChild.style.transform = ''; prev.leave && prev.leave(); }
      cur = i; const s = scenes[i];
      s.node.classList.add('on'); document.body.dataset.scene = s.id; tEnter = tAuto = now();
      s.dot.className = 'dot on' + (auto && s.dur ? '' : ' manual');
      s.enter && s.enter();
    }
    function setAuto(v) {
      auto = v; tAuto = now();
      $('#play').classList.toggle('paused', !v); $('#play').setAttribute('aria-label', v ? 'Pause' : 'Play');
      if (cur >= 0) scenes[cur].dot.classList.toggle('manual', !v || !scenes[cur].dur);
    }
    $('#prev').onclick = () => { setAuto(false); go(cur - 1); };
    $('#next').onclick = () => { setAuto(false); go(cur + 1); };
    $('#play').onclick = () => { if (!auto && cur === scenes.length - 1) { setAuto(true); go(0); } else setAuto(!auto); };
    $('main').addEventListener('pointerdown', () => { if (auto) setAuto(false); });
    addEventListener('keydown', e => {
      if (e.target.tagName === 'INPUT') return;
      if (e.key === 'ArrowRight') { setAuto(false); go(cur + 1); } else if (e.key === 'ArrowLeft') { setAuto(false); go(cur - 1); }
    });
    document.addEventListener('visibilitychange', () => { visible = !document.hidden; });
    if ('IntersectionObserver' in window) new IntersectionObserver(es => { visible = es[0].isIntersecting && !document.hidden; }).observe(document.documentElement);
    
    /* ══════════════════════════════════════════════════════════════════
       0 · Hello
       ══════════════════════════════════════════════════════════════════ */
    const LANGS = [
      ['en', 'English', 'Hello', 'Don’t take my word for it.'],
      ['fr', 'Français', 'Bonjour', 'Ne me croyez pas sur parole.'],
      ['es', 'Español', 'Hola', 'No te fíes de mi palabra.'],
      ['de', 'Deutsch', 'Hallo', 'Glauben Sie mir nicht aufs Wort.'],
      ['it', 'Italiano', 'Ciao', 'Non credetemi sulla parola.'],
      ['pt', 'Português', 'Olá', 'Não acredite só na minha palavra.'],
      ['nl', 'Nederlands', 'Hallo', 'Geloof me niet op mijn woord.'],
      ['sv', 'Svenska', 'Hej', 'Tro mig inte på mitt ord.'],
      ['pl', 'Polski', 'Cześć', 'Nie wierzcie mi na słowo.'],
      ['ru', 'Русский', 'Здравствуйте', 'Не верьте мне на слово.'],
      ['uk', 'Українська', 'Вітаю', 'Не вірте мені на слово.'],
      ['el', 'Ελληνικά', 'Γεια σας', 'Μην πιστεύετε απλώς τα λόγια μου.'],
      ['tr', 'Türkçe', 'Merhaba', 'Sadece sözüme güvenmeyin.'],
      ['ar', 'العربية', 'مرحبًا', 'لا تصدّقوني دون دليل.'],
      ['he', 'עברית', 'שלום', 'אל תסמכו רק על המילה שלי.'],
      ['hi', 'हिन्दी', 'नमस्ते', 'मेरी बात पर यूँ ही भरोसा मत कीजिए।'],
      ['bn', 'বাংলা', 'নমস্কার', 'শুধু আমার কথায় বিশ্বাস করবেন না।'],
      ['zh', '中文', '你好', '不要轻信我的话。'],
      ['ja', '日本語', 'こんにちは', '私の言葉を鵜呑みにしないでください。'],
      ['ko', '한국어', '안녕하세요', '제 말만 믿지 마세요.'],
      ['vi', 'Tiếng Việt', 'Xin chào', 'Đừng chỉ tin lời tôi.'],
      ['id', 'Bahasa Indonesia', 'Halo', 'Jangan percaya begitu saja pada kata-kata saya.'],
      ['th', 'ไทย', 'สวัสดี', 'อย่าเชื่อแค่คำพูดของฉัน'],
    ];
    const myLang = ((navigator.languages && navigator.languages[0]) || navigator.language || 'en').slice(0, 2).toLowerCase();
    const mine = LANGS.find(l => l[0] === myLang);
    
    const verifyPage = () => {
      const ext = $$('script[src],link[rel~=stylesheet],link[rel~=preload],iframe,object,embed').length;
      const media = document.images.length + $$('svg,picture,video,audio,source').length;
      const fonts = document.fonts ? document.fonts.size : 0;
      const reqs = performance.getEntriesByType('resource');
      return {
        file: record('file', 'One file: no external scripts or stylesheets', ext === 0 && document.scripts.length === 1, `${document.scripts.length} script, inline; ${ext} external references`),
        libs: ext === 0 && document.scripts.length === 1,
        imgs: record('imgs', 'No images, no downloaded fonts', media === 0 && fonts === 0, `${media} media elements, ${fonts} web fonts`),
        net: record('net', 'Zero network requests since this page loaded', reqs.length === 0, `${reqs.length} requests in the browser’s own resource log`),
      };
    };
    scene('hello', {
      enter() {
        const g = $('#greet');
        if (mine && myLang !== 'en') { g.textContent = ''; const s = el('span', '', mine[2] + '.'); s.lang = myLang; g.append(s, '  Hello.'); }
        $$('#chips li').forEach(li => li.className = '');
        this.done = false;
      },
      tick(t) {
        if (this.done || t < 2.4) return;
        const r = verifyPage(), lis = $$('#chips li'), n = Math.floor((t - 2.4) / 0.45);
        lis.forEach((li, i) => { if (i <= n) li.className = r[li.dataset.c] ? 'ok' : 'bad'; });
        if (n >= lis.length - 1) this.done = true;
      }
    });
    
    /* ══════════════════════════════════════════════════════════════════
       1 · Words: a sentence that counts its own letters (an "autogram").
    
       Finding one is a fixed-point search. Guess a count for every letter,
       write the sentence out, count what you actually wrote, nudge each
       guess toward the truth with a little randomness, repeat. Most
       phrasings have no solution at all, so several are tried in rotation.
       ══════════════════════════════════════════════════════════════════ */
    const AG = (() => {
      const ONES = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
      const TENS = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
      const word = n => n < 20 ? ONES[n] : TENS[n / 10 | 0] + (n % 10 ? '-' + ONES[n % 10] : '');
      const NUM = new Map(); for (let n = 0; n < 100; n++) NUM.set(word(n), n);
      const A = 97, VAR = 'efghilnorstuvwxy', NV = VAR.length;      // only these letters occur in number words (plus the plural s)
      const VI = [...VAR].map(l => l.charCodeAt(0) - A);
      const tally = s => { const t = new Int32Array(26); for (const ch of s.toLowerCase()) { const k = ch.charCodeAt(0) - A; if (k >= 0 && k < 26) t[k]++; } return t; };
      const W = new Int32Array(100 * NV);                             // W[n] = letters added by writing "<n> x's"
      for (let n = 0; n < 100; n++) { const t = tally(word(n)); if (n !== 1) t[18]++; for (let j = 0; j < NV; j++) W[n * NV + j] = t[VI[j]]; }
    
      function prep(prefix) {
        const pre = tally(prefix), base = Int32Array.from(pre), fixed = [];
        for (let k = 0; k < 26; k++) { const isVar = VI.includes(k); if (isVar || pre[k] > 0 || k === 0 || k === 3) { base[k]++; if (!isVar) fixed.push(k); } }
        base[0]++; base[13]++; base[3]++;                             // the final "and"
        const b = new Int32Array(NV); for (let j = 0; j < NV; j++) b[j] = base[VI[j]];
        for (const k of fixed) { const n = base[k]; if (n > 99) return null; for (let j = 0; j < NV; j++) b[j] += W[n * NV + j]; }
        return { prefix, base, fixed, b, c: new Int32Array(NV), act: new Int32Array(NV), n: 0 };
      }
      const seed = P => { for (let j = 0; j < NV; j++) P.c[j] = P.b[j] + (Math.random() * 10 | 0); P.n = 0; };
      function step(P, iters) {
        const { b, c, act } = P;
        for (let it = 0; it < iters; it++) {
          act.set(b);
          for (let i = 0; i < NV; i++) { const o = c[i] * NV; for (let j = 0; j < NV; j++) act[j] += W[o + j]; }
          let ok = true;
          for (let j = 0; j < NV; j++) {
            const a = act[j], x = c[j];
            if (a !== x) { ok = false; const lo = a < x ? a : x, hi = a < x ? x : a, v = lo + (Math.random() * (hi - lo + 1) | 0); c[j] = v > 99 ? 99 : v; }
          }
          if (ok) return true;
        }
        return false;
      }
      function render(P) {
        const m = []; for (const k of P.fixed) m.push([k, P.base[k]]); for (let j = 0; j < NV; j++) m.push([VI[j], P.c[j]]);
        m.sort((x, y) => x[0] - y[0]);
        const items = m.map(([k, n]) => `${word(n)} ${String.fromCharCode(A + k)}${n === 1 ? '' : '’s'}`), last = items.pop();
        return P.prefix + ' ' + items.join(', ') + ' and ' + last + '.';
      }
      function variants(name) {
        const who = ['written', 'composed', 'made', 'built'].map(v => `was ${v} for ${name} by Claude`);
        const mid = ['and it tells the truth about itself', 'and it describes itself exactly', 'and it counts itself honestly', 'and it keeps an honest count of itself'];
        const end = ['it contains', 'it contains exactly', 'it has', 'it holds', 'it is made of', 'it contains precisely'];
        const out = []; for (const e of end) for (const m of mid) for (const w of who) out.push(`This sentence ${w}, ${m}: ${e}`);
        return out.map(prep).filter(Boolean);
      }
      // The independent check. It knows nothing about the solver: it reads a string, parses the claims, counts the letters.
      function verify(text) {
        const counted = tally(text), claims = [], list = text.slice(text.lastIndexOf(':') + 1), re = /([a-z-]+) ([a-z])(?:[’']s)?(?=,| and |\.)/g;
        let m; while ((m = re.exec(list))) if (NUM.has(m[1])) claims.push({ l: m[2], n: NUM.get(m[1]), at: m.index, len: m[0].length });
        const claimed = new Int32Array(26); for (const c of claims) claimed[c.l.charCodeAt(0) - A] += c.n;
        let ok = claims.length > 0, total = 0; for (let k = 0; k < 26; k++) { if (claimed[k] !== counted[k]) ok = false; total += counted[k]; }
        return { ok, claims, counted, total, cut: text.length - list.length };
      }
      return { variants, seed, step, render, verify };
    })();
    
    const DEFAULT_SENTENCE = 'I’m Claude, and this sentence tells the truth about itself: it contains six a’s, two b’s, four c’s, four d’s, twenty-six e’s, nine f’s, four g’s, eight h’s, eighteen i’s, six l’s, two m’s, seventeen n’s, eleven o’s, eight r’s, thirty-two s’s, twenty-four t’s, nine u’s, five v’s, six w’s, five x’s and four y’s.';
    
    const words = scene('words', (() => {
      const box = $('#ag'), cells = $('#cells'), stat = $('#agstat');
      let mode = 'idle', claims = [], sweepT = 0, sweepI = -1, solver = null, note = '', t0 = 0;
      const letterize = (text, parent) => { for (const ch of text) { if (/[a-z]/i.test(ch)) { const s = el('span', 'L', ch); s.dataset.l = ch.toLowerCase(); parent.append(s); } else parent.append(ch); } };
      const light = (l, on) => { $$(`.L[data-l="${l}"]`, box).forEach(s => s.classList.toggle('hit', on)); $$(`.claim[data-l="${l}"]`, box).forEach(s => s.classList.toggle('hit', on)); };
    
      function show(text, why) {
        note = why || ''; box.className = ''; box.textContent = ''; cells.textContent = ''; stat.textContent = '';
        const v = AG.verify(text), list = text.slice(v.cut); let last = 0;
        letterize(text.slice(0, v.cut), box);
        claims = v.claims.map(c => {
          letterize(list.slice(last, c.at), box);
          const sp = el('span', 'claim'); sp.dataset.l = c.l; letterize(list.slice(c.at, c.at + c.len), sp); box.append(sp); last = c.at + c.len;
          const cell = el('div', 'cell'); cell.append(el('b', '', c.l), el('i', '', '·')); cell.dataset.l = c.l; cells.append(cell);
          cell.onpointerenter = () => { if (mode === 'done') light(c.l, true); }; cell.onpointerleave = () => { if (mode === 'done') light(c.l, false); };
          return { ...c, cell };
        });
        letterize(list.slice(last), box);
        mode = 'sweep'; sweepT = now() + 0.9; sweepI = -1;
      }
      // Counting is done against the characters now in the DOM, not against anything the solver remembers.
      function verify() {
        const v = AG.verify(box.textContent);
        return record('autogram', 'The sentence counts its own letters exactly', v.ok, `${v.claims.length} letters claimed, ${v.total} letters counted on screen`), v;
      }
      function sweep(t) {
        const i = Math.floor((t - sweepT) / 0.14); if (i === sweepI || i < 0) return;
        const v = AG.verify(box.textContent);
        for (let j = Math.max(0, sweepI); j <= Math.min(i, claims.length - 1); j++) {
          const c = claims[j], counted = v.counted[c.l.charCodeAt(0) - 97];
          if (j < i) { light(c.l, false); c.cell.className = 'cell ' + (counted === c.n ? 'ok' : 'bad'); c.cell.lastChild.textContent = counted; }
          else { light(c.l, true); c.cell.className = 'cell now'; c.cell.lastChild.textContent = counted; }
        }
        sweepI = i;
        if (i >= claims.length) {
          mode = 'done'; const ok = verify().ok;
          stat.innerHTML = ''; stat.append(el('span', ok ? 'ok' : 'bad', ok ? '✓ every count matches' : '✗ a count is wrong'), ` · ${v.total} letters, counted from the text on your screen` + (note ? ' · ' + note : '') + ' · point at a letter below');
        }
      }
      function solve(t) {
        const end = performance.now() + 11, S = solver;
        while (performance.now() < end) {
          const P = S.vs[S.k];
          if (AG.step(P, 3000)) { S.used += 3000; const secs = now() - S.t0; solver = null; show(AG.render(P), `found after ${fmt(S.used)} attempts in ${secs.toFixed(1)} s`); return; }
          S.used += 3000; P.n += 3000; if (P.n >= 60000) AG.seed(P); S.k = (S.k + 1) % S.vs.length;
        }
        box.textContent = AG.render(S.vs[S.k]);
        stat.textContent = `searching… ${fmt(S.used)} sentences written and counted, none true yet`;
        if (S.used > 1.5e8) { solver = null; mode = 'failed'; stat.textContent = `No luck after ${fmt(S.used)} attempts. Not every phrase has a true sentence in it. Try a nickname.`; }
      }
      $('#agform').addEventListener('submit', e => {
        e.preventDefault(); setAuto(false);
        const name = $('#agname').value.replace(/[^\p{L}\p{M} .'’-]/gu, '').replace(/\s+/g, ' ').trim().slice(0, 24);
        if (!name) { $('#agname').focus(); return; }
        const vs = AG.variants(name); if (!vs.length) return;
        vs.forEach(AG.seed); solver = { vs, k: 0, used: 0, t0: now() }; mode = 'solving';
        box.className = 'thinking'; cells.textContent = ''; claims = [];
      });
      return {
        enter() { if (mode === 'idle' || mode === 'done' || mode === 'failed') { if (!solver && (mode === 'idle' || box.textContent === DEFAULT_SENTENCE || mode === 'failed')) show(DEFAULT_SENTENCE); } },
        tick(t, abs) { if (mode === 'solving' && solver) solve(abs); else if (mode === 'sweep') sweep(abs); },
        verify: () => { if (!box.textContent || mode === 'solving' || mode === 'failed') { const v = AG.verify(DEFAULT_SENTENCE); return record('autogram', 'The sentence counts its own letters exactly', v.ok, `${v.claims.length} letters claimed, ${v.total} letters counted`); } return verify().ok; }
      };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       2 · Pictures
       ══════════════════════════════════════════════════════════════════ */
    scene('draw', {
      touched: false,
      enter() { BG.verify(); },
      tick(t, abs) {
        // Until someone takes over, one number drifts by itself so the link between text and picture is visible.
        if (auto && !this.touched && !calm) { const s = BG.scrubs()[2]; BG.setVal(s, +s.dataset.v0 + 0.3 * Math.sin(t * 1.1)); }
        BG.flush(abs);
        const st = $('#drawstat'); st.textContent = '';
        if (!BG.gl) { st.append(el('span', 'bad', '✗ WebGL is unavailable here, so this one stays dark')); return; }
        st.append(el('span', 'okc', '✓ compiled from the text above'), ` · ${BG.size} px × ${Math.round(BG.fps) || '…'} fps = ${BG.fps ? (BG.px * BG.fps / 1e6).toFixed(1) : '…'} million pixels a second`);
      },
      leave() { BG.scrubs().forEach(s => { if (!this.touched) BG.setVal(s, +s.dataset.v0); }); BG.flush(0, true); BG.verify(); }
    });
    $('#code').addEventListener('pointerdown', () => { scenes.find(s => s.id === 'draw').touched = true; });
    
    /* ══════════════════════════════════════════════════════════════════
       3 · Physics: the figure-eight three-body orbit (Moore 1993; Chenciner & Montgomery 2000).
       Units: G = 1, each mass = 1. Integrator: 4th-order symplectic (Yoshida).
       ══════════════════════════════════════════════════════════════════ */
    const TB = (() => {
      const PERIOD = 6.32591398;
      const start = () => ({ x: [0.97000436, -0.97000436, 0], y: [-0.24308753, 0.24308753, 0], vx: [0.466203685, 0.466203685, -0.93240737], vy: [0.43236573, 0.43236573, -0.86473146] });
      const ax = [0, 0, 0], ay = [0, 0, 0];
      function accel(s, eps2) {
        ax.fill(0); ay.fill(0);
        for (let i = 0; i < 3; i++) for (let j = i + 1; j < 3; j++) {
          const dx = s.x[j] - s.x[i], dy = s.y[j] - s.y[i], r2 = dx * dx + dy * dy + eps2, k = 1 / (r2 * Math.sqrt(r2));
          ax[i] += dx * k; ay[i] += dy * k; ax[j] -= dx * k; ay[j] -= dy * k;
        }
      }
      const w1 = 1 / (2 - Math.cbrt(2)), w0 = -Math.cbrt(2) * w1, C = [w1 / 2, (w0 + w1) / 2, (w0 + w1) / 2, w1 / 2], D = [w1, w0, w1];
      function step(s, dt, eps2) {
        for (let k = 0; k < 4; k++) {
          for (let i = 0; i < 3; i++) { s.x[i] += C[k] * dt * s.vx[i]; s.y[i] += C[k] * dt * s.vy[i]; }
          if (k < 3) { accel(s, eps2); for (let i = 0; i < 3; i++) { s.vx[i] += D[k] * dt * ax[i]; s.vy[i] += D[k] * dt * ay[i]; } }
        }
      }
      function energy(s, eps2) {
        let e = 0; for (let i = 0; i < 3; i++) e += 0.5 * (s.vx[i] ** 2 + s.vy[i] ** 2);
        for (let i = 0; i < 3; i++) for (let j = i + 1; j < 3; j++) e -= 1 / Math.sqrt((s.x[j] - s.x[i]) ** 2 + (s.y[j] - s.y[i]) ** 2 + eps2);
        return e;
      }
      const minSep = s => { let m = 9; for (let i = 0; i < 3; i++) for (let j = i + 1; j < 3; j++) m = Math.min(m, Math.hypot(s.x[j] - s.x[i], s.y[j] - s.y[i])); return m; };
      // The check: fly one full lap from scratch and see whether everything comes home.
      function verify() {
        const s = start(), s0 = start(), e0 = energy(s, 0), N = 4000;
        for (let i = 0; i < N; i++) step(s, PERIOD / N, 0);
        let miss = 0; for (let i = 0; i < 3; i++) miss = Math.max(miss, Math.hypot(s.x[i] - s0.x[i], s.y[i] - s0.y[i]));
        const drift = Math.abs((energy(s, 0) - e0) / e0);
        return record('orbit', 'The figure-eight closes: after one lap every star is back where it began', miss < 1e-4 && drift < 1e-8,
          `one lap, ${fmt(N)} steps: worst miss ${miss.toExponential(1)} of the orbit’s width, energy drift ${(drift * 100).toExponential(1)}%`);
      }
      return { PERIOD, start, step, energy, minSep, verify };
    })();
    
    scene('move', (() => {
      const cv = $('#orbit'), ctx = cv.getContext('2d'), stat = $('#orbitstat'), COL = ['#ee8a61', '#f4ecdc', '#8fe3c0'], TRAIL = 420;
      let s, e0, simT, kicked, eps2, trail, W = 0, H = 0, sc = 1, drag = null, last = 0, msg = '', steps = 0;
      function reset(why) { s = TB.start(); eps2 = 0; e0 = TB.energy(s, 0); simT = 0; kicked = 0; trail = [[], [], []]; msg = why || ''; }
      function fit() { const r = cv.getBoundingClientRect(), d = Math.min(devicePixelRatio || 1, 2); W = r.width; H = r.height; cv.width = W * d; cv.height = H * d; ctx.setTransform(d, 0, 0, d, 0, 0); sc = Math.min(W / 3.1, H / 1.25); }
      const sx = x => W / 2 + x * sc, sy = y => H / 2 - y * sc;
      function kick(i, dvx, dvy) { s.vx[i] += dvx; s.vy[i] += dvy; eps2 = 1e-6; e0 = TB.energy(s, eps2); kicked = now(); msg = ''; }
      cv.addEventListener('pointerdown', e => {
        const r = cv.getBoundingClientRect(), px = e.clientX - r.left, py = e.clientY - r.top; let best = 0, bd = 1e9;
        for (let i = 0; i < 3; i++) { const d = Math.hypot(sx(s.x[i]) - px, sy(s.y[i]) - py); if (d < bd) { bd = d; best = i; } }
        drag = { i: best, x0: px, y0: py, x: px, y: py }; cv.setPointerCapture(e.pointerId);
      });
      cv.addEventListener('pointermove', e => { if (drag) { const r = cv.getBoundingClientRect(); drag.x = e.clientX - r.left; drag.y = e.clientY - r.top; } });
      const release = () => {
        if (!drag) return; let dx = drag.x - drag.x0, dy = drag.y - drag.y0;
        if (Math.hypot(dx, dy) < 6) { const a = Math.random() * 6.283; dx = 22 * Math.cos(a); dy = 22 * Math.sin(a); }
        kick(drag.i, dx / sc * 1.6, -dy / sc * 1.6); drag = null;
      };
      cv.addEventListener('pointerup', release); cv.addEventListener('pointercancel', () => { drag = null; });
      $('#orbitreset').onclick = () => reset();
      addEventListener('resize', () => { if (scenes[cur] && scenes[cur].id === 'move') fit(); });
      reset();
      return {
        enter() { fit(); reset(); last = now(); TB.verify(); },
        tick(t, abs) {
          let dt = Math.min(0.05, abs - last); last = abs; steps = 0;
          let left = dt * 0.95;                                     // simulated time to cover this frame
          while (left > 1e-9 && steps < 4000) {
            const h = Math.min(left, kicked ? clamp(0.002 * Math.pow(TB.minSep(s) / 0.35, 1.5), 2e-5, 0.002) : 0.002);
            TB.step(s, h, eps2); left -= h; simT += h; steps++;
          }
          for (let i = 0; i < 3; i++) { trail[i].push(s.x[i], s.y[i]); if (trail[i].length > TRAIL * 2) trail[i].splice(0, 2); }
          const far = Math.max(...s.x.map((x, i) => Math.hypot(x, s.y[i])));
          if (kicked && (far > 3.2 || abs - kicked > 26)) reset(far > 3.2 ? 'It flew apart. Most orbits do. Restored.' : 'Restored.');
          // draw
          ctx.clearRect(0, 0, W, H); ctx.lineCap = 'round'; ctx.lineJoin = 'round';
          for (let i = 0; i < 3; i++) {
            const tr = trail[i], n = tr.length / 2, G = 14; ctx.strokeStyle = COL[i];
            for (let g = 0; g < G; g++) {
              const a = Math.floor(n * g / G), b = Math.min(n - 1, Math.floor(n * (g + 1) / G)); if (b <= a) continue;
              ctx.globalAlpha = 0.04 + 0.75 * Math.pow((g + 1) / G, 2); ctx.lineWidth = 1 + 1.6 * (g + 1) / G;
              ctx.beginPath(); ctx.moveTo(sx(tr[a * 2]), sy(tr[a * 2 + 1])); for (let k = a + 1; k <= b; k++) ctx.lineTo(sx(tr[k * 2]), sy(tr[k * 2 + 1])); ctx.stroke();
            }
            ctx.globalAlpha = 1; const X = sx(s.x[i]), Y = sy(s.y[i]), g = ctx.createRadialGradient(X, Y, 0, X, Y, 16);
            g.addColorStop(0, COL[i]); g.addColorStop(0.22, COL[i]); g.addColorStop(0.3, COL[i] + '55'); g.addColorStop(1, COL[i] + '00');
            ctx.fillStyle = g; ctx.beginPath(); ctx.arc(X, Y, 16, 0, 6.3); ctx.fill();
          }
          if (drag) { ctx.strokeStyle = '#f4ecdc'; ctx.globalAlpha = 0.7; ctx.lineWidth = 1.5; ctx.setLineDash([4, 4]); ctx.beginPath(); ctx.moveTo(sx(s.x[drag.i]), sy(s.y[drag.i])); ctx.lineTo(sx(s.x[drag.i]) + drag.x - drag.x0, sy(s.y[drag.i]) + drag.y - drag.y0); ctx.stroke(); ctx.setLineDash([]); ctx.globalAlpha = 1; }
          const drift = Math.abs((TB.energy(s, eps2) - e0) / e0) * 100;
          stat.textContent = '';
          if (kicked) stat.append(`kicked · energy held to ${drift.toExponential(1)}% since · it will be put back shortly`);
          else stat.append(el('span', 'okc', `✓ lap ${Math.floor(simT / TB.PERIOD) + 1}`), ` · energy held to ${drift.toExponential(1)}% · ${fmt(Math.round(steps / Math.max(dt, 1e-3) / 10) * 10)} steps a second` + (msg ? ' · ' + msg : ''));
        }
      };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       4 · Music: a round in D major. One line of three phrases; each voice enters 16 eighth-notes
       after the last. Notes are [start, MIDI pitch, length], in eighths.
       ══════════════════════════════════════════════════════════════════ */
    const ROUND = (() => {
      const LINE = [
        [[0, 66, 2], [2, 69, 2], [4, 71, 3], [7, 69, 1], [8, 67, 2], [10, 71, 2], [12, 69, 2], [14, 73, 2]],
        [[0, 74, 1], [1, 76, 1], [2, 78, 2], [4, 74, 2], [6, 78, 2], [8, 79, 2], [10, 74, 1], [11, 76, 1], [12, 76, 2], [14, 81, 1], [15, 79, 1]],
        [[0, 78, 1], [1, 81, 3], [4, 83, 2], [6, 86, 2], [8, 83, 2], [10, 79, 2], [12, 81, 2], [14, 76, 2]],
      ];
      const BASS = [[0, 50, 2], [2, 57, 2], [4, 47, 2], [6, 54, 2], [8, 43, 2], [10, 50, 2], [12, 45, 2], [14, 52, 2]];
      const PHRASE = 16, EIGHTH = 0.3;
      // Every note that starts in [a, b), as {s: start slot, m: pitch, d: length, v: voice (3 = bass)}.
      function notes(a, b) {
        const out = [];
        for (let v = 0; v < 4; v++) {
          const off = v < 3 ? v * PHRASE : 0;
          for (let p = Math.max(0, Math.floor((a - off) / PHRASE) - 1); off + p * PHRASE < b; p++) {
            for (const [s, m, d] of (v < 3 ? LINE[p % 3] : BASS)) { const at = off + p * PHRASE + s; if (at >= a && at < b) out.push({ s: at, m, d, v }); }
          }
        }
        return out;
      }
      // The check: once all voices are in, look at every beat and every pair of notes sounding on it.
      function verify() {
        const from = 2 * PHRASE, to = 5 * PHRASE, all = notes(0, to); let pairs = 0, clashes = 0, beats = 0;
        for (let slot = from; slot < to; slot += 2) {
          const on = all.filter(n => n.s <= slot && slot < n.s + n.d).map(n => n.m); beats++;
          for (let i = 0; i < on.length; i++) for (let j = i + 1; j < on.length; j++) { pairs++; const iv = Math.abs(on[i] - on[j]) % 12; if ([1, 2, 6, 10, 11].includes(iv)) clashes++; }
        }
        return record('round', 'No two notes clash on any beat of the round', clashes === 0 && pairs > 0, `${beats} beats, ${pairs} pairs of sounding notes: ${clashes} seconds, sevenths or tritones`);
      }
      return { notes, verify, PHRASE, EIGHTH };
    })();
    
    scene('compose', (() => {
      const cv = $('#roll'), ctx = cv.getContext('2d'), btn = $('#sound'), COL = ['#ee8a61', '#f4ecdc', '#8fe3c0', '#8a8496'];
      let W = 0, H = 0, ac = null, master = null, wet = null, playing = false, a0 = 0, next = 0, v0 = 0;
      function fit() { const r = cv.getBoundingClientRect(), d = Math.min(devicePixelRatio || 1, 2); W = r.width; H = r.height; cv.width = W * d; cv.height = H * d; ctx.setTransform(d, 0, 0, d, 0, 0); }
      function audio() {
        if (ac) return; ac = new (window.AudioContext || window.webkitAudioContext)();
        master = ac.createGain(); master.gain.value = 0;
        const comp = ac.createDynamicsCompressor(); master.connect(comp); comp.connect(ac.destination);
        // A reverb made from nothing: two seconds of decaying noise used as a room.
        const len = ac.sampleRate * 2.4 | 0, ir = ac.createBuffer(2, len, ac.sampleRate);
        for (let ch = 0; ch < 2; ch++) { const d = ir.getChannelData(ch); for (let i = 0; i < len; i++) d[i] = (Math.random() * 2 - 1) * Math.pow(1 - i / len, 2.6); }
        const conv = ac.createConvolver(); conv.buffer = ir; wet = ac.createGain(); wet.gain.value = 0.3; wet.connect(conv); conv.connect(comp);
      }
      function pluck(t, n) {
        const f = 440 * Math.pow(2, (n.m - 69) / 12), dur = n.d * ROUND.EIGHTH, bass = n.v === 3;
        const g = ac.createGain(), pan = ac.createStereoPanner ? ac.createStereoPanner() : null, peak = bass ? 0.22 : 0.15;
        g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(peak, t + 0.012);
        g.gain.exponentialRampToValueAtTime(peak * 0.45, t + 0.28); g.gain.setTargetAtTime(0, t + Math.max(0.1, dur - 0.04), 0.14);
        for (const [type, mul, lvl] of bass ? [['sine', 1, 1], ['triangle', 2, 0.25]] : [['triangle', 1, 1], ['sine', 2.004, 0.22], ['sine', 0.998, 0.5]]) {
          const o = ac.createOscillator(), og = ac.createGain(); o.type = type; o.frequency.value = f * mul; og.gain.value = lvl; o.connect(og); og.connect(g); o.start(t); o.stop(t + dur + 1.2);
        }
        if (pan) { pan.pan.value = [-0.55, 0.55, 0, 0][n.v]; g.connect(pan); pan.connect(master); pan.connect(wet); } else { g.connect(master); g.connect(wet); }
      }
      function start() { audio(); ac.resume(); a0 = ac.currentTime + 0.12; next = 0; playing = true; master.gain.cancelScheduledValues(a0); master.gain.setValueAtTime(0.9, ac.currentTime); btn.textContent = 'Stop the sound'; btn.classList.remove('hot'); }
      function stop() { if (!playing) return; playing = false; master.gain.setTargetAtTime(0, ac.currentTime, 0.12); v0 = now() - pos() * ROUND.EIGHTH; btn.textContent = 'Play it with sound'; btn.classList.add('hot'); }
      const pos = () => playing ? (ac.currentTime - a0) / ROUND.EIGHTH : (now() - v0) / ROUND.EIGHTH;
      btn.onclick = () => playing ? stop() : start();
      addEventListener('resize', () => { if (scenes[cur] && scenes[cur].id === 'compose') fit(); });
      return {
        enter() { fit(); v0 = now() + 0.6; const ok = ROUND.verify(), c = ledger.get('round'); const st = $('#rollstat'); st.textContent = ''; st.append(el('span', ok ? 'ok' : 'bad', ok ? '✓ no clash on any beat' : '✗ clash found'), ' · ' + c.detail); },
        leave() { stop(); },
        tick() {
          const p = pos();
          if (playing) { while (a0 + next * ROUND.EIGHTH < ac.currentTime + 0.3) { const at = a0 + next * ROUND.EIGHTH; if (at > ac.currentTime - 0.05) for (const n of ROUND.notes(next, next + 1)) pluck(at, n); next++; } }
          ctx.clearRect(0, 0, W, H);
          const px = W / 40, x0 = W * 0.36, y = m => H - 14 - (m - 41) / (88 - 41) * (H - 28), nh = Math.max(5, (H - 28) / 47 * 1.7);
          ctx.fillStyle = 'rgba(244,236,220,.05)'; for (let b = Math.floor((p - 20) / 16) * 16; b < p + 30; b += 16) { const x = x0 + (b - p) * px; ctx.fillRect(x, 6, 1, H - 12); }
          for (const n of ROUND.notes(Math.floor(p) - 18, Math.floor(p) + 28)) {
            const x = x0 + (n.s - p) * px, w = n.d * px - 3, live = p >= n.s && p < n.s + n.d, past = p >= n.s + n.d;
            ctx.globalAlpha = live ? 1 : past ? 0.22 : (n.v === 3 ? 0.4 : 0.62); ctx.fillStyle = COL[n.v];
            if (live) { ctx.shadowColor = COL[n.v]; ctx.shadowBlur = 16; }
            const yy = y(n.m) - nh / 2, r = Math.min(nh / 2, 4); ctx.beginPath();
            if (ctx.roundRect) ctx.roundRect(x, yy, w, nh, r); else ctx.rect(x, yy, w, nh);
            ctx.fill(); ctx.shadowBlur = 0;
          }
          ctx.globalAlpha = 0.55; ctx.fillStyle = '#f4ecdc'; ctx.fillRect(x0 - 0.5, 4, 1, H - 8); ctx.globalAlpha = 1;
        }
      };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       5 · Critique. The numbers quoted in the notes are measured from the specimen as rendered.
       ══════════════════════════════════════════════════════════════════ */
    const CRIT = (() => {
      const rgb = c => c.match(/[\d.]+/g).slice(0, 3).map(Number);
      const lum = ([r, g, b]) => { const f = v => { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); }; return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b); };
      const contrast = (fg, bg) => { const a = lum(rgb(fg)), b = lum(rgb(bg)); return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05); };
      const measure = (text, btn, dlg) => ({ c: contrast(getComputedStyle(text).color, getComputedStyle(dlg).backgroundColor), h: btn.offsetHeight });
      function verify() {
        const a = measure($('#dbA'), $('#btnA'), $('#dlgA')), b = measure($('#dbB'), $('#btnB'), $('#dlgB'));
        $('#mcA').textContent = a.c.toFixed(1) + ':1'; $('#mhA').textContent = a.h + ' px'; $('#mcB').textContent = b.c.toFixed(1) + ':1'; $('#mhB').textContent = b.h + ' px';
        const ok1 = record('contrast', 'Critique measured: the revision fixes the text contrast', a.c < 4.5 && b.c >= 4.5, `${a.c.toFixed(2)}:1 before, ${b.c.toFixed(2)}:1 after, from computed styles (WCAG AA needs 4.5:1)`);
        const ok2 = record('target', 'Critique measured: the revision fixes the button size', a.h < 44 && b.h >= 44, `${a.h} px before, ${b.h} px after, from layout`);
        return ok1 && ok2;
      }
      return { verify };
    })();
    scene('critic', (() => {
      const spec = $('#spec'), notes = $$('#notes li'), pins = $$('.pin', spec), flip = $('#flip');
      let manual = false;
      const set = (n, after) => {
        notes.forEach((li, i) => li.classList.toggle('on', i < n && (i < 5 || after)));
        pins.forEach(p => p.classList.toggle('on', +p.dataset.p <= n && !after));
        spec.classList.toggle('after', after); flip.textContent = after ? 'Show the original' : 'Show the revision';
      };
      flip.onclick = () => { manual = true; set(6, !spec.classList.contains('after')); };
      return {
        enter() { manual = false; set(0, false); const ok = CRIT.verify(); const st = $('#critstat'); st.textContent = ''; st.append(el('span', ok ? 'ok' : 'bad', ok ? '✓ both numbers measured from this page, just now' : '✗ measurement disagrees')); },
        tick(t) { if (manual) return; const n = clamp(Math.floor((t - 1.6) / 1.75) + 1, 0, 5); if (t > 11.6) set(6, true); else set(n, false); }
      };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       6 · Languages (deliberately unchecked)
       ══════════════════════════════════════════════════════════════════ */
    scene('speak', (() => {
      const wall = $('#wall');
      [...LANGS].sort((a, b) => (b[0] === myLang) - (a[0] === myLang)).forEach(([code, name, , line], i) => {
        const d = el('div', code === myLang ? 'you' : ''), t = el('span', '', line); t.lang = code; t.dir = 'auto';
        d.append(t, el('small', '', name + (code === myLang ? ' · yours' : ''))); d.style.transitionDelay = (0.25 + i * 0.06) + 's'; wall.append(d);
      });
      return { enter() { record('lang', `Translations into ${LANGS.length - 1} languages`, null, 'no machine can vouch for these; ask a native speaker'); } };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       7 · Review: run everything, show the ledger
       ══════════════════════════════════════════════════════════════════ */
    function verifyAll() {
      const t0 = performance.now();
      verifyPage(); words.verify(); BG.verify(); TB.verify(); ROUND.verify(); CRIT.verify();
      record('lang', `Translations into ${LANGS.length - 1} languages`, null, 'no machine can vouch for these; ask a native speaker');
      return performance.now() - t0;
    }
    scene('review', (() => {
      const list = $('#ledger'), stat = $('#revstat');
      let rows = [], t0 = 0, ms = 0;
      function run() {
        ms = verifyAll(); list.textContent = '';
        rows = [...ledger.values()].sort((a, b) => (a.ok === null) - (b.ok === null)).map(c => { const li = el('li', 'wait', c.label); li.append(el('small', '', c.detail)); list.append(li); return { li, c }; });
        t0 = now(); stat.textContent = '';
      }
      $('#rerun').onclick = run; $('#again').onclick = () => { setAuto(true); go(0); };
      return {
        enter: run,
        tick() {
          const n = Math.floor((now() - t0 - 0.5) / 0.16);
          rows.forEach((r, i) => { if (i <= n) r.li.className = r.c.ok === true ? '' : r.c.ok === false ? 'bad' : 'na'; });
          if (n >= rows.length && !stat.textContent) {
            const [redacted: code variable flagged by the scan] => r.c.ok === true).length, fail = rows.filter(r => r.c.ok === false).length, na = rows.length - pass - fail;
            stat.append(el('span', fail ? 'bad' : 'ok', `${pass} of ${pass + fail} checks passed`), ` in ${ms.toFixed(0)} ms on your machine · ${na} left for a human`);
          }
        }
      };
    })());
    
    /* ══════════════════════════════════════════════════════════════════
       Main loop
       ══════════════════════════════════════════════════════════════════ */
    function frame() {
      requestAnimationFrame(frame);
      if (!visible) { tAuto += 0; return; }
      const t = now(), s = scenes[cur];
      BG.render(t);
      if (s.tick) s.tick(t - tEnter, t);
      if (auto && s.dur) {
        const p = (t - tAuto) / s.dur; s.dot.firstChild.style.transform = `scaleX(${clamp(p, 0, 1)})`;
        if (p >= 1) go(cur + 1);
      }
    }
    go(0);
    requestAnimationFrame(frame);
    window.__claude = { go, setAuto, verifyAll, ledger, scenes };   // for anyone poking around in the console
    })();
    </script>
    </body>
    </html>
    

    result, 1 line

    File created successfully at: [redacted: private path]run/claude.html (file state is current in your context — no need to Read it back)