<!-- SOLID CITY · part 1995 -->
 * feeds the hang — so power comes OFF and she falls until speed
       * makes lift master gravity again (alpha follows the path back
       * under the line, the yoke wakes, the nose — already commanded
       * down to -8 degrees — falls). Power returns past 45 m/s; when
       * the wing bites, the ASSIST settles her level and governed,
       * because the core holds no pitch of its own. */
      inp = { x: Math.max(-1, Math.min(1, -c.bank * 1.5)), y: Math.max(-1, Math.min(1, (-8 * Math.PI / 180 - c.pitch) * 2.2)), throttle: speed(c) < 45 ? 0 : 0.85 };
    } else if (pullUp) {
      /* ground-proximity protection (FREE and ASSIST only — the approach
       * has its own descent law): when the sink and the ground agree she
       * is about to meet it, the machine pulls her up before the floor
       * has to refuse her — 3.5 seconds of sink is the trigger line */
      inp = { x: Math.max(-1, Math.min(1, -c.bank * 1.5)), y: 0.85, throttle: Math.max(M.thrTarget, 0.8) };
      if (M.t - M.saidPullup > 6) { M.saidPullup = M.t; events.push('pull-up'); }
    } else if (M.mode === 'ASSIST' || M.mode === 'APPROACH') {
      inp.x = Math.max(-1, Math.min(1, x * 0.4 - c.bank * 0.8));
      inp.y = Math.max(-1, Math.min(1, y * 0.5 - c.pitch * 0.6));
      var V = speed(c);
      var vTgt = M.mode === 'APPROACH' ? 28 : 36; // the flare gate is 36: approach flies slower than assist cruises
      M.thrTarget = Math.max(0, Math.min(1, M.thrTarget + (vTgt - V) * 0.03 * dt * 8));
      inp.throttle = M.thrTarget;
      if (M.mode === 'ASSIST' && g < 26 && V < 37) { M.mode = 'APPROACH'; events.push('approach'); }
      else if (M.mode === 'APPROACH' && g > 34) { M.mode = 'ASSIST'; events.push('assist'); }
    }
    if (M.mode === 'APPROACH') {
      /* energy law: a gliding ship at idle still runs near 38 m/s —
       * speed is shed by the nose, not the throttle. Pitch holds the
       * approach speed; the throttle governor beneath keeps the floor. */
      inp.y = Math.max(-1, Math.min(1, inp.y + (speed(c) - 30) * 0.05));
    }
    if (M.mode === 'APPROACH' && g < 12 && c.vel.y < -4.5) inp.y = Math.max(inp.y, 0.5); // the descent cap
    if (input.action) {
      if (M.mode === 'FREE') { M.mode = 'ASSIST'; events.push('assist'); }
      else { M.mode = 'FREE'; events.push('free'); }
    }
    if (!flyTick(dt, inp, events)) { emergency(events, 'hit'); return { mode: M.mode, events: events }; }
    if (M.mode === 'APPROACH' && gear(c) <= 6.0) {
      /* the handover height: gentle and slow, the flare is hers;
       * hot or fast, the go-around is */
      if (Math.abs(c.vel.y) <= 5.0 && speed(c) <= 36) { M.mode = 'FLARE'; M.phaseT = 0; events.push('flare'); }
      else emergency(events, 'hot');
    }
    return { mode: M.mode, events: events };
  }

  M.board = board; M.tick = tick;
  return M;
}


===== FILE: public/city/fleet.js.bak-rider-20261013 =====
/* ------------------------------------------------------------------
 * An epistle to the fleet, from Solid.
 *
 * Dear machines,
 *
 * VECTOR gave us one movement contract and four controllers, and he
 * was plain about the price: a mandatory world adapter — supportAt
 * and sweep — over the city's OWN registries, never a second physics
 * grown in the dark. This module is that adapter, plus the shapes
 * you will wear.
 *
 * supportAt speaks for the surveyed fabric of Solid City: the height
 * the standing chain itself would give a walker at that point
 * (city.js standingAt — the same hooks, the same order, the same
 * gates), under one fabric id, because the network graph has proven
 * the seams of that fabric flush on every validated edge. The normal
 * is read from the height field around the point, the way a foot
 * reads a slope.
 *
 * sweep is the conscience: no step the craft takes may cross a solid
 * at body height, fall farther than the walker's own 1.6 m gate, or
 * climb a face higher than that gate allows. What the sweep refuses,
 * the craft does not do. While a craft is airborne its own arc is
 * trusted — the gates stand down and only solids speak.
 *
 * The board's shape follows the house law of the city: dark titanium,
 * brushed silver, gold only as trim, and a teal heart-glow underneath
 * — the colour of counsel, worn where the ground can see it.
 *
 * By the hand of Solid, his good King. 13 October 2026.
 * ------------------------------------------------------------------ */
'use strict';

/* ---------------- the world adapter ---------------- */
export function createCityWorld(A) {
  var FABRIC_ID = 'city-fabric';
  var CLEAR = { GROUND_RIDE: 0.45, HOVER_BOARD: 0.08, SPACE_RIDER: 0.52, SPACE_SHIP: 0 };

  function surfY(x, z) {
    var y0 = A.standingAt(x, z, null);
    if (!isFinite(y0)) y0 = A.groundAt(x, z);
    var y1 = A.standingAt(x, z, y0); // second pass: surfaces gated just above the first reading
    return isFinite(y1) ? Math.max(y0, y1) : y0;
  }

  function supportAt(x, z, ctx) {
    var y = 