diff --git a/frontend/textbooks/geometry_8_ch4.html b/frontend/textbooks/geometry_8_ch4.html
index 2d89766..6ed40bf 100644
--- a/frontend/textbooks/geometry_8_ch4.html
+++ b/frontend/textbooks/geometry_8_ch4.html
@@ -1690,10 +1690,13 @@ function buildP4(){
-
-
-
-
+
+
+
+
+
+
+
O
A
@@ -1735,8 +1738,9 @@ function buildP4(){
-
-
+
+
+
O
A
@@ -1869,14 +1873,12 @@ function buildP4(){
const ur2x=(T2X-OX)/R, ur2y=(T2Y-OY)/R;
extras+=`T₁`;
extras+=`T₂`;
- /* right-angle markers: ut must point TOWARD A from each tangent point */
- /* T1 is upper (ur1y<0): CCW perp = down-right = toward A ✓ */
- const ut1x=-ur1y, ut1y=ur1x;
+ /* right-angle markers: arms toward O (INSIDE △OTA) and toward A */
+ const ut1x=-ur1y, ut1y=ur1x; // CCW perp = toward A for upper T1
const s=8;
- const rm1=`${(T1X+ur1x*s).toFixed(1)},${(T1Y+ur1y*s).toFixed(1)} ${(T1X+ur1x*s+ut1x*s).toFixed(1)},${(T1Y+ur1y*s+ut1y*s).toFixed(1)} ${(T1X+ut1x*s).toFixed(1)},${(T1Y+ut1y*s).toFixed(1)}`;
- /* T2 is lower (ur2y>0): CW perp = up-right = toward A ✓ */
- const ut2x=ur2y, ut2y=-ur2x;
- const rm2=`${(T2X+ur2x*s).toFixed(1)},${(T2Y+ur2y*s).toFixed(1)} ${(T2X+ur2x*s+ut2x*s).toFixed(1)},${(T2Y+ur2y*s+ut2y*s).toFixed(1)} ${(T2X+ut2x*s).toFixed(1)},${(T2Y+ut2y*s).toFixed(1)}`;
+ const rm1=`${(T1X-ur1x*s).toFixed(1)},${(T1Y-ur1y*s).toFixed(1)} ${(T1X-ur1x*s+ut1x*s).toFixed(1)},${(T1Y-ur1y*s+ut1y*s).toFixed(1)} ${(T1X+ut1x*s).toFixed(1)},${(T1Y+ut1y*s).toFixed(1)}`;
+ const ut2x=ur2y, ut2y=-ur2x; // CW perp = toward A for lower T2
+ const rm2=`${(T2X-ur2x*s).toFixed(1)},${(T2Y-ur2y*s).toFixed(1)} ${(T2X-ur2x*s+ut2x*s).toFixed(1)},${(T2Y-ur2y*s+ut2y*s).toFixed(1)} ${(T2X+ut2x*s).toFixed(1)},${(T2Y+ut2y*s).toFixed(1)}`;
extras+=``;
extras+=``;
}