<!-- SOLID CITY · part 2742 -->
 + cars
    box(solid, w, 0.14, 5, 0, 0.03, d / 2 + 5.2, C.road);
    var carCols = [0xb8bcc2, 0x7a2e2e, 0x2e4a6a, 0xd8d3c3];
    for (var ci = 0; ci < 4; ci++) {
      BASE = M4(x, baseY, z, ry, 0, 0);
      var cp = wpt(-w / 2 + 4 + ci * 6.4, d / 2 + 5.2);
      BASE = M4(cp[0], groundAt(cp[0], cp[1]) + 0.12, cp[1], ry + (ci % 2 ? 0.06 : -0.04), 0, 0);
      car(carCols[ci]);
    }
    clearHome();
    var rec = { x: x, z: z, y: baseY, ry: ry, style: 'apartment', w: w, d: d, units: floors * 2 };
    homes.push(rec);
    return rec;
  }

  /* ================= ROADS (the ancestors' road network) ================= */
  var ROAD_DEFS = [
    // A: the south plain road — past the Gate, from the base flats to the shore flats
    [[640, -1005], [430, -1065], [190, -1040], [30, -1022], [-180, -1045], [-420, -1100], [-650, -1155]],
    // B: the east climb — up the green benches toward the Overlook, then the high bench
    [[430, -1065], [560, -1180], [700, -1330], [820, -1470], [900, -1620], [1010, -1700], [1150, -1720], [1250, -1620]],
    // C: the north road — from the east climb up to the colosseum-road homes
    [[860, -1560], [845, -1800], [800, -2030], [720, -2240], [580, -2340], [460, -2385]]
  ];
  var roadPts = [];
  var ROAD_SEGS = [];
  ROAD_DEFS.forEach(function (line) { for (var i = 0; i < line.length - 1; i++) ROAD_SEGS.push([line[i], line[i + 1]]); });
  function roadClear(x, z, lotR) {
    // THE ROAD'S VERGE (2026-10-13, on the King's report): no lot may reach
    // the carriageway — a home is sited only when its whole lot circle
    // clears every road segment by the road's half-width plus a verge.
    for (var i = 0; i < ROAD_SEGS.length; i++) {
      var a = ROAD_SEGS[i][0], b = ROAD_SEGS[i][1];
      var dx = b[0] - a[0], dz = b[1] - a[1], L2 = dx * dx + dz * dz;
      var t = L2 ? ((x - a[0]) * dx + (z - a[1]) * dz) / L2 : 0;
      t = Math.max(0, Math.min(1, t));
      if (Math.hypot(x - (a[0] + dx * t), z - (a[1] + dz * t)) < lotR + 4.6) return false;
    }
    return true;
  }
  // fractions along a span where the road must touch the land: the ends
  // always; a midpoint joins wherever the straight run between its
  // neighbours would drift more than tol from the terrain.
  function touchFractions(sx, sz, ex, ez, tol, maxDepth) {
    var pts = [0, 1];
    (function split(f0, f1, depth) {
      if (depth > maxDepth) return;
      var fm = (f0 + f1) / 2;
      var g0 = groundAt(sx + (ex - sx) * f0, sz + (ez - sz) * f0);
      var g1 = groundAt(sx + (ex - sx) * f1, sz + (ez - sz) * f1);
      var gm = groundAt(sx + (ex - sx) * fm, sz + (ez - sz) * fm);
      if (Math.abs((g0 + g1) / 2 - gm) > tol) { pts.push(fm); split(f0, fm, depth + 1); split(fm, f1, depth + 1); }
    })(0, 1, 0);
    return pts.sort(function (a, b) { return a - b; });
  }
  function buildRoads() {
    ROAD_DEFS.forEach(function (line) {
      for (var i = 0; i < line.length - 1; i++) {
        var ax = line[i][0], az = line[i][1], bx = line[i + 1][0], bz = line[i + 1][1];
        var len = Math.hypot(bx - ax, bz - az), n = Math.ceil(len / 7), ang = Math.atan2(bx - ax, bz - az);
        for (var j = 0; j < n; j++) {
          var t = (j + 0.5) / n, px = ax + (bx - ax) * t, pz = az + (bz - az) * t;
          roadPts.push([px, pz]);
          // THE ONE ROAD (2026-10-12): each slab is pitched between the
          // ground heights at its own two ends — the very points its
          // neighbours sample — so the surface runs continuous at every
          // joint. And per VECTOR's midpoint measure, a slab whose straight
          // run would drift more than 0.3 m from the land at its midpoint
          // is SPLIT there and pitched again: the road touches the land at
          // its midpoints too, and no ridge is sliced unseen.
          var sx = ax + (bx - ax) * (j / n), sz = az + (bz - az) * (j / n);
          var ex = ax + (bx - ax) * ((j + 1) / n), ez = az + (bz - az) * ((j + 1) / n);
          var fr = touchFractions(sx, sz, ex, ez, 0.3, 3);
          for (var s2 = 0; s2 < fr.length - 1; s2++) {
            var gx0 = sx + (ex - sx) * fr[s2], gz0 = sz + (ez - sz) * fr[s2];
            var gx1 = sx + (ex - sx) * fr[s2 + 1], gz1 = sz + (ez - sz) * fr[s2 + 1];
            var ga = groundAt(gx0, gz0), gb = groundAt(gx1, gz1), run = Math.hypot(gx1 - gx0, gz1 - gz0);
            // PITCH TRUTH (2026-10-13): atan2, as the village roads already
            // pitch. asin(rise/run) overstated every grade — worst on the
            // steep benches, where slab ends lifted metres off the heights
            // they were sampled from. atan2 passes the surface exactly
            // through both sampled ends: every joint flush by construction.
            var rx = -Math.atan2(gb - ga, run);
            BASE = M4((gx0 + gx1) / 2, (ga + gb) / 2 + 0.1, (gz0 + gz1) / 2, ang, rx, 0);
            box(solid, 7.6, 0.22, run + 1.6, 0, 0, 0, C.road);
            standQuad((gx0 + gx1) / 2, (ga + gb) / 2 