/* AI Collab diagram kit (ac-dg-*). Inline SVG, ambient loops only.
   Rules: transform / opacity / stroke-dashoffset animation only, no blur filters, no scroll reveals.
   Reduced motion shows one still, finished frame. Loops pause off-screen (diagrams.js).
   Import after components.css. */
.ac-dg{position:relative;padding:var(--card-pad);}
.ac-dg svg{display:block;width:100%;height:auto;overflow:visible;}
.ac-dg .dg-m{display:none;}
.ac-dg__title{margin:0 0 16px;color:var(--ac-primary);font-family:var(--ac-font-mono);font-size:var(--fs-2xs);font-weight:600;letter-spacing:.12em;text-transform:uppercase;}
.ac-dg__note{margin:16px 0 0;color:rgba(255,255,255,.9);font-size:var(--fs-sm);line-height:1.45;}
.ac-dg--wide{padding:var(--panel-pad);}

/* drawing parts */
.dg-line{fill:none;stroke:var(--ac-primary);stroke-opacity:.55;stroke-width:1.6;stroke-linecap:round;}
.dg-axis{fill:none;stroke:rgba(255,255,255,.3);stroke-width:1.2;}
.dg-grid{fill:none;stroke:rgba(255,255,255,.14);stroke-width:1;stroke-dasharray:3 6;}
.dg-quad{fill:rgba(55,214,206,.07);}
.dg-quad--lead{fill:rgba(55,214,206,.14);}
.dg-node{fill:rgba(55,214,206,.2);stroke:var(--ac-primary);stroke-width:1.5;}
.dg-node--goal{fill:var(--ac-action);stroke:var(--ac-action);}
.dg-bar{fill:rgba(55,214,206,.14);stroke:rgba(55,214,206,.55);stroke-width:1.2;}
.dg-bar--lead{fill:rgba(55,214,206,.3);}
.dg-chip{fill:rgba(255,255,255,.05);stroke:rgba(255,255,255,.2);stroke-width:1;}
.dg-chip--aqua{fill:rgba(55,214,206,.1);stroke:rgba(55,214,206,.5);}
.dg-num{fill:#fff;font-family:var(--ac-font-display);font-size:12px;font-weight:800;text-anchor:middle;dominant-baseline:central;}
.dg-num--dark{fill:var(--ac-canvas);}
.dg-label{fill:var(--ac-primary);font-family:var(--ac-font-mono);font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;}
.dg-label--aqua{fill:var(--ac-primary);}
.dg-label--mid{text-anchor:middle;}
.dg-label--end{text-anchor:end;}
.dg-text{fill:#fff;font-family:var(--ac-font-body);font-size:13px;font-weight:600;}
.dg-text--mid{text-anchor:middle;}
.dg-text--dark{fill:var(--ac-canvas);}
.dg-text--small{fill:rgba(255,255,255,.9);font-size:12px;font-weight:500;}
.dg-price{fill:var(--ac-primary);font-family:var(--ac-font-display);font-size:26px;font-weight:800;letter-spacing:-.02em;text-anchor:middle;}
.dg-price--end{text-anchor:end;}

/* ambient motion: dash flow 2.4s, node pulse 2.6s, glow 6s */
@keyframes dgFlow{to{stroke-dashoffset:-20;}}
@keyframes dgPulse{0%,100%{transform:scale(.9);}50%{transform:scale(1.14);}}
@keyframes dgGlow{0%,100%{opacity:.5;}50%{opacity:.92;}}
.dg-flow{stroke-dasharray:3 7;animation:dgFlow 2.4s linear infinite;}
.dg-pulse{transform-box:fill-box;transform-origin:center;animation:dgPulse 2.6s ease-in-out infinite;}
.dg-pulse.dg-d1{animation-delay:.4s;}
.dg-pulse.dg-d2{animation-delay:.9s;}
.dg-pulse.dg-d3{animation-delay:1.4s;}
.dg-pulse.dg-d4{animation-delay:1.9s;}
.dg-glow{animation:dgGlow 6s ease-in-out infinite;}
.ac-dg.is-paused *{animation-play-state:paused!important;}

@media(max-width:760px){
  .ac-dg .dg-d{display:none;}
  .ac-dg .dg-m{display:block;}
  .ac-dg--wide{padding:var(--panel-pad);}
}
@media(prefers-reduced-motion:reduce){
  .ac-dg *{animation:none!important;}
}
