<!-- SOLID CITY · part 3677 -->
mbankment: its surface at x -1135.3 is 10.214 while the terrain beneath is 9.79,
    // so a terrain-following ribbon would lip 0.4 m at the edge. The apron is therefore built on a surveyed
    // ground blend rising to the road's own height, under the tie-in permission (the corridor opens only
    // inside the surveyed strip) — VECTOR's rule: a corridor edge is not a road edge; survey the road.
    function gndApron(x, z) {
      var g = gnd(x, z);
      var fx = Math.max(0, Math.min(1, (3.4 - Math.abs(x + 1135.3)) / 1.8));
      if (!fx) return g;
      var t = Math.max(0, Math.min(1, (z + 508.6) / 5.6)); t = t * t * (3 - 2 * t);
      return g + (10.139 - g) * t * fx;
    }
    function isAllowedTieIn(x, z) {
      if (!Number.isFinite(x) || !Number.isFinite(z)) return false;
      var g = gnd(x, z); if (g < 0.5 || g > 11.5) return false;
      if (x >= -1512 && x <= -1088 && z >= -1380 && z <= -620) return false;
      if (x >= -1445 && x <= -1155 && z >= -625 && z <= -443) return false;
      return (x >= -1137.6 && x <= -1133.0 && z >= -509.6 && z <= -502.6);
    }
    var apron = r[1].createWardConnector({ THREE: A.THREE, groundAt: gndApron, isAllowed: isAllowedTieIn, name: 'W6 Apron — Road Tie-In', line: [[-1135.3, -508.3], [-1135.3, -503.0]] });
    var apronNote = 'W6 apron REFUSED: ' + (apron.check && apron.check.reasons ? apron.check.reasons.join('; ') : (apron.check && apron.check.reason) || 'check');
    if (apron.accepted) { A.scene.add(apron.group); var at = extractTris(apron.standSurface.geometry); H.joins.push(at); H.joinIx.push(indexTris(at)); regAudit('W6 APRON — ROAD TIE-IN', new (A.THREE || A.T).Mesh(apron.standSurface.geometry), ribbonStand(at), 'ribbon'); apronNote = 'W6 APRON BUILT: the tie-in ribbon climbs the road embankment on a surveyed ground blend to meet the carriageway flush at 10.214 (its last 1.5 m overlaps the road surface at equal height) — Ward 6 now JOINS the Long Road; the 1.3 m gap is closed.'; }
    w6note += ' ' + apronNote;
    // THE CLIMB — COMPLETE (2026-10-13, the fix commission). The test segment proved true at the desk;
    // its eight stations are this line's first eight. The full line runs under the same permission class
    // (the schematic's SS3): KING_AUTHORIZED_CLIMB_W4_W5 — corridor-bound at 2.6 m, ceiling 13.90 set
    // from the full corridor's sampled max (13.72). Re-surveyed 2026-10-13: 18 stations, 247.9 m, worst
    // grade 4.0%, worst crossfall 3.7%. CLASSIFICATION, answered honestly: 3.7% crossfall exceeds the
    // 1:48 ramp limit, so this is a CLIMBING PATH — named a climb, never a ramp. Three resting turns
    // widen it, each a level stone shelf cut at path height on the uphill side, with a bench and a lamp.
    var CLIMB_LINE = [[-880, -728], [-888, -736], [-896, -744], [-904, -752], [-912, -760], [-912, -768], [-912, -776], [-912, -784], [-912, -800], [-908, -824], [-900, -848], [-892, -868], [-884, -884], [-872, -896], [-860, -904], [-848, -910], [-836, -914], [-820, -916]];
    function distToClimb(x, z) { var best = 1e9; for (var i = 0; i + 1 < CLIMB_LINE.length; i++) { var ax = CLIMB_LINE[i][0], az = CLIMB_LINE[i][1], bx = CLIMB_LINE[i + 1][0], bz = CLIMB_LINE[i + 1][1], dx = bx - ax, dz = bz - az, L2 = dx * dx + dz * dz, t = L2 ? ((x - ax) * dx + (z - az) * dz) / L2 : 0; t = Math.max(0, Math.min(1, t)); var d = Math.hypot(x - (ax + dx * t), z - (az + dz * t)); if (d < best) best = d; } return best; }
    function isAllowedClimb(x, z) { if (!Number.isFinite(x) || !Number.isFinite(z)) return false; var g = gnd(x, z); if (g < 0.5 || g > 13.9) return false; if (x >= -1512 && x <= -1088 && z >= -1380 && z <= -620) return false; if (x >= -1445 && x <= -1155 && z >= -625 && z <= -443) return false; if (x >= -1160 && x <= -656 && z >= -507 && z <= -489) return false; return distToClimb(x, z) <= 2.6; }
    var climb = r[1].createWardConnector({ THREE: A.THREE, groundAt: gnd, isAllowed: isAllowedClimb, name: 'W4-W5 Climb — The High Road', line: CLIMB_LINE, maxY: 13.9 });
    var climbNote = 'The Climb REFUSED: ' + (climb.check && climb.check.reasons ? climb.check.reasons.join('; ') : 'check');
    if (climb.accepted) { A.scene.add(climb.group); var ct = extractTris(climb.standSurface.geometry); H.joins.push(ct); H.joinIx.push(indexTris(ct)); regAudit('THE CLIMB — FULL (W4-W5)', new (A.THREE || A.T).Mesh(climb.standSurface.geometry), ribbonStand(ct), 'ribbon'); var cm = climb.measure(); climbNote = 'THE CLIMB COMPLETE under KING_AUTHORIZED_CLIMB_W4_W5 (ceiling 13.90 from the full corridor sampled max 13.72): 18 stations, 247.9 m from W4\'s crest (13.71) down the shoulder\'s edge (worst grade 4.0%) to the low shelf (9.50) and up into W5\'s line end (10.28); deviation from lift max ' + cm.maxAbsErrorFromLift.toFixed(4) + ' m, ' + cm.upFacingTriangles + ' up / ' + cm.downFacingTriangles + ' down. A climbing path by classification (worst crossfall 3.7% — beyond the 1:48 ramp limit, honestly named, never a ra