/* ═══════════════════════════════════════════════════════════════════════════
   nn_towers.css —— 3D 神经网塔的容器样式
   ═══════════════════════════════════════════════════════════════════════════
   从 chapter1.html 的内联 <style> 抽出来：这套样式属于 nn_towers.js 的运行时
   （.ng-wrap / .ng-hud / .ng-ctrl / .ng-legend），不属于任何一章的正文。
   留在 chapter1 里，第二个用塔的页面就得复制一份——然后两边各自腐烂。
   全部规则以 .nn-tower 作用域限定，多个塔实例可以共存一页。
   ═══════════════════════════════════════════════════════════════════════════ */
.nn-tower .ng-wrap { position: relative; width: 100%; height: 520px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: radial-gradient(ellipse 120% 90% at 50% 34%, #1b2138 0%, #12162a 46%, #090b12 100%); }
.nn-tower .ng-wrap canvas { display: block; }
/* 阶段说明放在画布外：叠加在画布上会吃掉顶部约 18% 的视口，
   而塔顶的 logits / 预测字恰恰是每段推导的落点，不能被压住。 */
.nn-tower .ng-hud { pointer-events: none; font-size: 13px; line-height: 1.7; margin-top: 10px; background: rgba(9,11,18,.5); border: 1px solid rgba(148,163,184,.18); border-radius: 8px; padding: 8px 12px; min-height: 74px; }
.nn-tower .ng-hud b { color: var(--yellow); font-size: 15px; }
.nn-tower .ng-hud .ng-op { color: #a5b4fc; font-family: Consolas, monospace; font-size: 12.5px; margin-top: 2px; }
.nn-tower .ng-hud .ng-math { font-family: Consolas, monospace; font-size: 12px; color: #9ca3af; white-space: pre-wrap; margin-top: 2px; }
/* 算式行：逐格推导时把"这一格的 8 对乘积 + 求和"完整写在这里，
   画布里的格子只代结论；人类要看的是过程，过程得用文字摆开。 */
.nn-tower .ng-hud .ng-step { font-family: Consolas, monospace; font-size: 12.5px; color: #fbbf24; white-space: pre-wrap; margin-top: 5px; padding-top: 5px; border-top: 1px dashed rgba(148,163,184,.22); min-height: 19px; }
.nn-tower .ng-ctrl { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.nn-tower .ng-state { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.nn-tower .ng-err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--text-dim); font-size: 14px; line-height: 2; }
.nn-tower .ng-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--text); }
.nn-tower .ng-legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.nn-tower .ng-legend i { width: 13px; height: 13px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.nn-tower .ng-legend em { color: var(--text-dim); font-style: normal; font-weight: 400; font-size: 12px; margin-left: auto; }
