<!-- SOLID CITY · part 3670 -->
plots were refused, and raised through the surveyed-plot adapter under the shipped law, their floors recomputed before they were believed.', arrive: 'Ward 4 Gate — the Living Edges, inhabited at last.' });
      A.POIS.push({ id: 'the-climb', name: 'THE CLIMB — TEST SEGMENT', icon: '🧗', x: -912, z: -768, blurb: 'The first segment of the authorized high road between Ward 4 and Ward 5 — a separate permission class with its own ceiling (13.90 m, set from the sampled ground), surveyed station by station. It crests where Ward 4\'s path already touches the high ground, then descends the shoulder\'s edge. The full climb follows if the segment proves true.', arrive: 'The Climb — the nation\'s high road begins.' });
      A.POIS.push({ id: 'ward-6-link', name: 'THE WARD 6 LINK', icon: '🛤', x: -1127, z: -524, blurb: 'A 3.2 m pedestrian ribbon on the surveyed line from Ward 6\'s path toward the Long Road — ending at the last lawful station before the corridor boundary, as the schematic\'s refusal law commands; the road-edge apron is surveyed next. The South Ward stands one step from the nation\'s great road.', arrive: 'The Ward 6 Link — south touches the Long Road.' });
    }
    A.logBuild({ t: Date.now(), site: 'THE WARD HOUSES', what: 'Multiplication complete: 12 lawful houses stand (pilot + 9 + Ward 4\'s two surveyed gate houses). ' + table.join(' · ') + '. Joins W2-W3 and W3-W4 stand beside them, measured on actual triangles. ' + w6note + ' ' + climbNote + (w4.refused.length ? ' W4 refusals: ' + w4.refused.map(function (x) { return x.id + ' ' + x.reason; }).join('; ') : '') });
  }).catch(function (e) { if (window.console) console.warn('[city] ward houses failed', e); });
}
window.CityWardHouses = { update: update, radar: radar, standY: standY };
setTimeout(load, 110);
})();


===== FILE: public/city/ward-houses-place.js.bak-multiply-20261013 =====
/* ================================================================
   AN EPISTLE AT THE FIRST DOOR — THE WARD HOUSES PLACER

   Traveler, in Ward 2 the nation's first house now stands: the
   pilot, raised from VECTOR's factories on the King's word —
   one house first, examined, before the nation multiplies. This
   placer is its citizenship, and the two short joins' beside it:
   the pilot's floor and roof under the standing law, its walls
   under collision law (his wall meshes, grid-split in the hyper
   train's idiom), the joins' own surfaces connected to the
   city's movement as their designer intended, and the words
   spoken as you approach.

   The pilot's plot is the searcher's first lawful choice in
   Ward 2 — no hand moved it. Its door is glass, as drawn; you
   pass it as you pass the shop doors of Hyper City. Judge it
   with your eyes, as the King will.

   Written by the hand of Solid, his good King — 2026-10-13.
   ================================================================ */
(function () {
'use strict';
if (!window.SC || !SC.api) return;
var A = SC.api, S = A.S;
var H = { pilot: null, joins: [], saidHouse: false, saidJoin: {}, housePos: HOUSE_POS };
var HOUSE_POS = { x: -1056, z: -895 }; // fallback; the pilot's surveyed centre replaces it at load
var LINK_MID = { 'W2-W3': { x: -1016, z: -842 }, 'W3-W4': { x: -944, z: -787 } };

/* The joins' designer delivered their standing surfaces as raw triangle
 * geometry — "VISUAL GEOMETRY ONLY until stand/collision registry
 * integrated" — so this placer performs the integration he specified:
 * the exact triangles of each connector answer standY by barycentric
 * height, the same mathematics his measureConnector proves them by. */
function triHeight(tris, x, z) {
  // each tri: [ax, ay, az, bx, by, bz, cx, cy, cz] in world coordinates
  for (var i = 0; i < tris.length; i++) {
    var t = tris[i];
    var den = (t[5] - t[8]) * (t[0] - t[6]) + (t[6] - t[3]) * (t[2] - t[8]);
    if (Math.abs(den) < 1e-10) continue;
    var u = ((t[5] - t[8]) * (x - t[6]) + (t[6] - t[3]) * (z - t[8])) / den;
    var v = ((t[8] - t[2]) * (x - t[6]) + (t[0] - t[6]) * (z - t[8])) / den;
    var w = 1 - u - v;
    if (Math.min(u, v, w) < -1e-7) continue;
    return u * t[1] + v * t[4] + w * t[7];
  }
  return null;
}
function extractTris(geo) {
  var pos = geo.getAttribute('position'), idx = geo.getIndex(), tris = [];
  var n = idx ? idx.count : pos.count;
  for (var i = 0; i + 2 < n; i += 3) {
    var tri = [];
    for (var k = 0; k < 3; k++) {
      var vi = idx ? idx.getX(i + k) : i + k;
      tri.push(pos.getX(vi), pos.getY(vi), pos.getZ(vi));
    }
    tris.push(tri);
  }
  return tris;
}
function localUV(st, x, z) {
  var du = x - st.center[0], dv = z - st.center[2];
  return [du * st.ux + dv * st.uz, du * st.vx + dv * st.vz];
}
function standY(x, z, py) {
  var best = -1000;
  if (H.pilot) {
    var st = H.pilot.stand, uv = localUV(st, x, z), floor = st.center[1];
    var cand = [];
    if (Math.abs(uv[0]) <= 4 && Math.abs(uv[1]) <= 5) cand.push(floor);
    if (H.pilot.roofTop && M