%
\usemodule[visual]
\setuplayout[
    location=doublesided,
    width=12cm,
    rightmargindistance=0.5cm,
    rightmargin=5cm]

\setuppagenumbering[alternative=doublesided]

\setupmargindata[inmargin][location=outer,stack=continue,align=flushright]
\setupmargindata[inouter][location=outer,stack=continue,align=flushright,style={\ss\tfx}]

\def\FNVOffset{0} % Negative vertical offset of footnotes [lines]

\define\PlaceFootnote
  {\inmargin[voffset=\dimexpr-\FNVOffset\lineheight\relax]{%
  \vtop{\placelocalnotes[footnote][before=,after=]}}}
\def\FNo#1{{\ss\tfx #1}}

\setupnote[footnote]
  [location=text,
   bodyfont=,
   indenting=no,
   before={\noindent},
   next=\PlaceFootnote]
\setupnotation[footnote][
	way=bychapter,
	align=flushleft,
    style={\ss\tfx},
    indenting=no,
    location=serried,
    alternative=serried,
    width=broad,
    numbercommand=\FNo,
]
\setuptexttexts[margin][]
    [{\framed[
      align={flushright,bottom},
      frame=off,
      height=\textheight,
      width=\rightmarginwidth]{%
      \strut\vfill\placenotes[footnote]}}]

% different approach:
\definecounter[Mnote][way=bychapter,prefix=no]
\def\mnote#1{%
  \incrementcounter[Mnote]%
  \high{\color[mnotemark]{\convertedcounter[Mnote]}}%
  \inouter{{%
    \ss\tfx%
    \color[mnotemark]{\convertedcounter[Mnote]}\crlf #1\blank[yes]}}%
}

\starttext

\dorecurse{2}{
  \startchapter[title={C \fakewords{2}{10}}]

    \dorecurse{10}{
    \startsection[title={\fakewords{1}{10} S\recurselevel\footnote{\fakewords{3}{20}}}]
      \fakewords{10}{100})\footnote{\fakewords{3}{50}FN}
      \fakewords{10}{100}\footnote{\fakewords{3}{50}FN}

      \startplacefigure[location=here,
      title={\fakewords{2}{10}\footnote{\color[red]{\fakewords{3}{50}CN}}}]
      \fakeimage{3cm}{8cm}{5cm}{20cm}
      %\fakeimage{0.5\textwidth}{\textwidth}{5\lineheight}{20\lineheight}
      \stopplacefigure

      \fakewords{10}{100}

    \stopsection}

  \stopchapter}

\stoptext
