/* Multi-Level Group Consolidation — visuals animate once on view, then a gentle loop */
.ml-hero{position:relative}
.ml-win{background:#fff;border:1.5px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:0 24px 60px -24px rgba(13,115,119,.35)}
.ml-bar{display:flex;align-items:center;gap:6px;padding:10px 14px;background:#0f2a2b;color:#cfe3e1;font-size:12px;font-weight:600}
.ml-bar i{width:9px;height:9px;border-radius:50%;background:#ff5f57}.ml-bar i:nth-child(2){background:#febc2e}.ml-bar i:nth-child(3){background:#28c840;margin-right:8px}
.ml-tree{padding:16px}
.ml-n{position:relative;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1.5px solid var(--border);border-radius:10px;padding:8px 11px;background:#fff;opacity:0;transform:translateY(6px)}
.ml-n b{font-size:13px;color:var(--dark)}.ml-n small{font-size:11px;color:var(--muted)}
.ml-n em{margin-left:auto;font-style:normal;font-size:10.5px;font-weight:700;color:var(--teal);background:var(--teal-pale);border-radius:99px;padding:2px 9px}
.ml-top{background:var(--teal);border-color:var(--teal)}.ml-top b{color:#fff}.ml-top small{color:rgba(255,255,255,.75)}.ml-top em{background:#fff;color:var(--teal)}
.ml-sub{border-color:var(--teal)}
.ml-kids{position:relative;margin:8px 0 0 16px;padding-left:14px;display:flex;flex-direction:column;gap:8px;border-left:2px solid var(--teal-light)}
.ml-kids>.ml-n::before,.ml-kids>.ml-br>.ml-n::before{content:'';position:absolute;left:-15px;top:50%;width:14px;border-top:2px solid var(--teal-light)}
.ml-br{display:flex;flex-direction:column}
.ml-hero.in .ml-n{animation:mlIn .35s cubic-bezier(.2,.7,.2,1) calc(var(--i)*.2s) both}
.ml-hero.in .ml-n em{animation:mlPulse 4.2s ease-in-out calc(2.2s + var(--i)*.7s) infinite}
@keyframes mlPulse{0%,30%,100%{box-shadow:0 0 0 0 rgba(42,138,126,0)}15%{box-shadow:0 0 0 4px rgba(42,138,126,.2)}}
/* every level consolidated */
.ml-lv{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px}
.ml-lv-c{background:#fff;border:1.5px solid var(--border);border-radius:14px;padding:14px;opacity:0;transform:translateY(8px)}
.ml-lv-g{border-color:var(--teal)}
.ml-lv-h b{display:block;font-size:15px;color:var(--dark)}.ml-lv-h small{font-size:11.5px;color:var(--muted)}
.ml-lv-l{display:flex;flex-direction:column;gap:6px;margin:12px 0}
.ml-lv-l span{font-size:12.5px;font-weight:600;color:var(--dark);background:var(--off);border:1px solid var(--border);border-radius:8px;padding:6px 9px}
.ml-lv-f{font-size:11.5px;color:var(--teal);font-weight:600}
.ml-lv-arr{font-size:22px;color:var(--teal);opacity:0}
.ml-lv.in .ml-lv-c{animation:mlIn .4s cubic-bezier(.2,.7,.2,1) calc(var(--i)*.6s) both}
.ml-lv.in .ml-lv-arr{animation:mlFade .3s ease .4s both,mlNudge 2.4s ease-in-out 1.6s infinite}
.ml-lv.in .ml-lv-g{animation:mlIn .4s cubic-bezier(.2,.7,.2,1) .6s both,mlGlow 3.6s ease-in-out 2s infinite}
@keyframes mlNudge{0%,100%{transform:none}50%{transform:translateX(4px)}}
@keyframes mlGlow{0%,100%{box-shadow:0 0 0 0 rgba(42,138,126,0)}50%{box-shadow:0 0 0 5px rgba(42,138,126,.12)}}
/* adjustments carry up */
.ml-cu{background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:18px}
.ml-cu-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border:1.5px solid var(--border);border-radius:11px;padding:10px 12px;opacity:0}
.ml-cu-row b{font-size:13.5px;color:var(--dark);min-width:54px}
.ml-cu-top{border-color:var(--teal)}
.ml-chip{font-size:11px;font-weight:600;color:var(--teal);background:var(--teal-pale);border:1px dashed var(--teal);border-radius:8px;padding:4px 8px}
.ml-chip-g{color:#166534;background:#dcfce7;border-color:#86efac}
.ml-chip-x{color:#94a3b8;background:#f8fafc;border-color:#e2e8f0;text-decoration:line-through}
.ml-chip-o{color:var(--mid);background:var(--off);border-style:solid;border-color:var(--border)}
.ml-cu-up{position:relative;display:flex;align-items:center;gap:6px;height:28px;margin-left:28px;font-size:10.5px;font-weight:600;color:var(--muted);opacity:0}
.ml-cu-up::before{content:'';width:2px;height:100%;background:linear-gradient(to top,var(--teal-light),var(--teal));border-radius:2px}
.ml-cu-up i{position:absolute;left:-2px;bottom:0;width:6px;height:6px;border-radius:50%;background:var(--teal);opacity:0}
.ml-cu.in .ml-cu-row{animation:mlFade .35s ease calc(var(--i)*.45s) both}
.ml-cu.in .ml-cu-up{animation:mlFade .3s ease .3s both}
.ml-cu.in .ml-cu-up2{animation-delay:.75s}
.ml-cu.in .ml-cu-up i{animation:mlDot 2.8s ease-in-out 2s infinite}
@keyframes mlDot{0%{bottom:0;opacity:0}15%{opacity:1}75%{bottom:calc(100% - 6px);opacity:1}90%,100%{bottom:calc(100% - 6px);opacity:0}}
/* intercompany */
.ml-ic{display:flex;flex-direction:column;gap:10px}
.ml-ic-r{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1.5px solid var(--border);border-radius:12px;padding:12px 14px;opacity:0;transform:translateX(-8px)}
.ml-pair{font-size:13.5px;font-weight:700;color:var(--dark)}
.ml-where{font-size:12px;color:var(--muted)}.ml-where b{color:var(--teal)}
.ml-ic.in .ml-ic-r{animation:mlIn .4s cubic-bezier(.2,.7,.2,1) calc(var(--i)*.3s) both,mlGlow 4.5s ease-in-out calc(1.8s + var(--i)*1.5s) infinite}
/* nci */
.ml-nci{background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:18px}
.ml-nci-chain{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.ml-cn{font-size:13px;font-weight:700;color:var(--dark);border:1.5px solid var(--teal);border-radius:10px;padding:8px 12px;opacity:0}
.ml-nci-chain em{font-style:normal;font-size:12px;font-weight:700;color:var(--teal);opacity:0}
.ml-nci-chain em::before{content:'→ '}
.ml-nci-r{display:flex;justify-content:space-between;gap:10px;padding:9px 4px;border-top:1px solid #eef4f3;font-size:13px;color:var(--mid);opacity:0}
.ml-nci-r b{color:var(--dark);font-variant-numeric:tabular-nums}
.ml-nci-tot{border-top:1.5px solid var(--dark)}.ml-nci-tot span,.ml-nci-tot b{font-weight:700;color:var(--teal)}
.ml-nci.in .ml-cn,.ml-nci.in .ml-nci-chain em,.ml-nci.in .ml-nci-r{animation:mlFade .3s ease calc(var(--i)*.18s) both}
.ml-nci.in .ml-nci-tot b{display:inline-block;animation:mlGlowT 3.6s ease-in-out 2.4s infinite}
@keyframes mlGlowT{0%,100%{text-shadow:none}50%{text-shadow:0 0 10px rgba(42,138,126,.45)}}
/* virtual groups */
.ml-vg{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:24px 28px}
.ml-vg>div{max-width:640px}
@keyframes mlIn{to{opacity:1;transform:none}}
@keyframes mlFade{to{opacity:1}}
@media(max-width:900px){.ml-lv{grid-template-columns:1fr}.ml-lv-arr{transform:rotate(90deg);justify-self:center}.ml-lv.in .ml-lv-arr{animation:mlFade .3s ease .4s both}}
@media(prefers-reduced-motion:reduce){.ml-n,.ml-lv-c,.ml-lv-arr,.ml-cu-row,.ml-cu-up,.ml-ic-r,.ml-cn,.ml-nci-chain em,.ml-nci-r{opacity:1!important;transform:none!important;animation:none!important}.ml-cu-up i{display:none}}
