/* Diagram scene nodes and edges (used by generated lessons) */
.stage .n {
  position: absolute; z-index: 2; box-sizing: border-box;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: 14px;
  background: #fff; border: 1.5px solid var(--line);
  opacity: 0; transform: scale(.9);
  transition: left .8s cubic-bezier(.3,.7,.2,1), top .8s cubic-bezier(.3,.7,.2,1), opacity .5s, transform .5s, background .4s, border-color .4s, box-shadow .4s;
}
.stage .n.vis { opacity: 1; transform: none; }
.stage .n.vis.dim { opacity: .28; }
.n .ic { font-size: 24px; line-height: 1; flex: none; }
.n .tx { min-width: 0; }
.n b { display: block; font-size: 14.5px; line-height: 1.2; font-weight: 700; }
.n small { display: block; font-size: 12px; line-height: 1.25; color: var(--muted); margin-top: 2px; }
.n.col { flex-direction: column; justify-content: center; text-align: center; gap: 4px; padding: 8px 6px; }
.n.col .tx { text-align: center; }
.n.col .ic { font-size: 22px; }
.n.pill { border-radius: 999px; padding: 6px 14px; justify-content: center; }
.n.on { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 6px 16px rgba(37,99,235,.12); }
.n.good { border-color: var(--green); background: var(--green-soft); }
.n.bad { border-color: #e5a24a; background: var(--amber-soft); }

.n.stat { background: transparent; border: 0; box-shadow: none; flex-direction: column; justify-content: center; text-align: center; gap: 0; }
.n.stat big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--blue); }
.n.stat.good big { color: var(--green); }
.n.stat.bad big { color: var(--amber); }
.n.stat b { margin-top: 6px; }

.n.group { z-index: 0; background: rgba(37,99,235,.035); border: 1.5px dashed #b9c2d0; align-items: flex-start; padding: 8px 12px; }
.n.group.on { background: rgba(37,99,235,.07); border-color: var(--blue); box-shadow: none; }
.n.group.good { background: rgba(22,163,74,.06); border-color: var(--green); }
.n.group.bad { background: rgba(217,119,6,.06); border-color: #e5a24a; }
.n .gl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }

.n.bar { flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; }
.n.bar .bt { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.n.bar b { display: inline; }
.n.bar em { font: 700 13px var(--mono); font-style: normal; color: var(--ink); white-space: nowrap; }
.trk { height: 10px; border-radius: 6px; background: #eef0f3; overflow: hidden; }
.trk i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: var(--blue); border-radius: 6px; transition: width .9s cubic-bezier(.3,.7,.2,1), background .4s; }
.n.good .trk i { background: var(--green); }
.n.bad .trk i { background: var(--amber); }

.stage svg.edges { z-index: 1; }
.edge { stroke: var(--blue); stroke-width: 2.2; fill: none; opacity: 0; transition: opacity .45s; }
.edge.vis { opacity: 1; }
.edge.good { stroke: var(--green); }
.edge.bad { stroke: var(--amber); }
.edge.dash { stroke-dasharray: 6 5; }
.el { position: absolute; z-index: 3; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; color: var(--muted); opacity: 0; transition: opacity .45s; white-space: nowrap; pointer-events: none; }
.el.vis { opacity: 1; }

.trend { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 16px 0 0; }
.trend b { display: block; margin-bottom: 4px; }
.trend p { margin: 0 0 10px; font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 110ch; }
.trend a { font-size: 14px; font-weight: 600; }
