[Tex/LaTex] Tikz box size adjustment

tikz-pgfwidth

I am facing a problem with the box size. Is there a possibility to shorten the Box called "shorter" such that it is 2/3 of the full size. Furthermore, the anchor point of the arrow should be in the middle. I hope you can understand the problem. Here is the toy example:

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning}
\tikzset{
    box/.style={rectangle, text centered, minimum height=3em},
    narrowbox/.style={box,text width=4cm,draw,thick},
    line/.style={draw, thick, -Stealth}
}
\begin{document}
    \begin{tikzpicture}[auto]
        \node [box]                                     (inv)      {};
        \node [box, below=0.5cm of inv]                 (deter)    {};
        \coordinate [below=0.5cm of deter]              (vuoto1);
        \node [narrowbox, below=0.5cm of vuoto1]        (meth2)    {};
        \node [narrowbox, left=0.5cm of meth2]          (meth1)    {};
        \node [narrowbox, right=0.5cm of meth2]         (meth3)    {};
        \node [narrowbox, below=0.5cm of meth3]         (select1)  {};  
        \node [narrowbox, below=0.5cm of meth1]         (select)   {};
        \node [narrowbox, below=0.5cm of select]        (select2)  {}; 
        \node [box, below=4.5cm of meth2]               (decide)   {Shorter};
        \node [box, below=0.5cm of decide]              (inter)    {};

        \path [line] (inv)      --    (deter);
        \path [line] (deter)    --    (meth2);
        \path [line] (vuoto1)   -|    (meth1);
        \path [line] (vuoto1)   -|    (meth3);
        \path [line] (meth1)    --    (select);
        \path [line] (select)   --    (select2);
        \path [line] (select2)  --    (select.south |- decide.north);
        \path [line] (meth2)    --    (decide);
        \path [line] (meth3)    --    (select1);
        \path [line] (select1)  --    (meth3.south |- inter.north);
        \path [line] (decide)   --    (inter);

        % draw rectangles around top and bottom nodes
        \foreach \N in {inv,deter,decide,inter}
        \draw [thick] (\N.north -| meth1.west) rectangle (\N.south -| meth3.east);
    \end{tikzpicture}
\end{document}

I tried to draw some lines in the following picture to make it easier to understand. The goal is to get the position of the red arrow and shorten the box width as the blue line.

enter image description here

Best Answer

It would be simpler to do this using one of the provided frameworks such as chains or even a tree. However, making minimal changes:

\documentclass[border=10pt,multi,tikz]{standalone}
\usetikzlibrary{arrows.meta,positioning}
\tikzset{
    box/.style={rectangle, text centered, minimum height=3em,text width=130mm,draw},
    narrowbox/.style={box,text width=4cm,draw,thick},
    line/.style={draw, thick, -Stealth}
}
\begin{document}
\begin{tikzpicture}[auto]
  \node [box]                                     (inv)      {i};
  \node [box, below=0.5cm of inv]                 (deter)    {d};
  \coordinate [below=0.5cm of deter]              (vuoto1);
  \node [narrowbox, below=0.5cm of vuoto1]        (meth2)    {m2};
  \node [narrowbox, anchor=west]          (meth1) at (meth2 -| deter.west)    {m1};
  \node [narrowbox, anchor=east]         (meth3) at (meth2 -| deter.east)    {m3};
  \node [narrowbox, below=0.5cm of meth3]         (select1)  {s1};
  \node [narrowbox, below=0.5cm of meth1]         (select)   {s};
  \node [narrowbox, below=0.5cm of select]        (select2)  {s2};
  \node [box, text width={(2/3)*130mm}, below=4.5cm of meth1.south west, anchor=north west]               (decide)   {Shorter};
  \node [box, below=0.5cm of decide.south west, anchor=north west]              (inter)    {it};

  \path [line] (inv)      --    (deter);
  \path [line] (deter)    --    (meth2);
  \path [line] (vuoto1)   -|    (meth1);
  \path [line] (vuoto1)   -|    (meth3);
  \path [line] (meth1)    --    (select);
  \path [line] (select)   --    (select2);
  \path [line] (select2)  --    (select.south |- decide.north);
  \path [line] (meth2)    --    (decide.north -| meth2);
  \path [line] (meth3)    --    (select1);
  \path [line] (select1)  --    (meth3.south |- inter.north);
  \path [line] (decide.south)   --    (inter.north -| decide.south);

\end{tikzpicture}
\end{document}

adjusted things