\startenvironment env_ms_NunsBook

\setuppapersize[A5]

\setuplayout[backspace=10mm,
	width=130mm,
	topspace=10mm, top=0mm,
	header=0mm, footer=0mm,
	height=190mm]

\setupheader[state=stop]

\definetypeface[mainface][rm][specserif]  [Lucida Blackletter OT][default][features=default]%[rscale=3]
\definetypeface[mainface][cg][calligraphy][lucidaot]             [default][features=default]
\definetypeface[mainface][mm][math][lucidaot][default]

%\setupbodyfont[lucidaot,cg,10pt]
\setupbodyfont[mainface,cg,12pt]
\definecharacterkerning [narrow] [factor=-.1]
\setcharacterkerning [narrow]

\definebodyfontenvironment[default][em=rm]


\setupwhitespace[none]
\setupinterlinespace[2ex]

\definecolor[almostblack][s=.95]
\definecolor[darkgray][s=.9]


\startuniqueMPgraphic{CgLines}
	picture longline;
	longline := image (
	path p ; p := (0cm,0cm) -- (13.5cm,0cm) -- (13.3cm,.1cm) -- (-0.5cm,.2cm) -- (0cm,0cm) -- cycle ;
%	fill p withshading("linear",llcorner p,urcorner p) withcolor black shadedinto darkgray
	fill p withshading("linear",llcorner p,urcorner p) withcolor darkred shadedinto darkgray
	) ;

%	draw (-1cm,0cm) -- (14cm,0cm) -- (14cm,1.5cm) -- (-1cm,1.5cm) -- (-1cm,0cm) -- cycle withcolor red; 	
	draw longline shifted (0,0.2cm) ;
	draw longline shifted (0,1.3cm) ;
%	draw (0cm,0cm) -- (13.5cm,0cm) -- (13.5cm,1.8cm) -- (0cm,1.8cm) -- (0cm,0cm) -- cycle withcolor red; 	
	
 	
\stopuniqueMPgraphic

\startuniqueMPgraphic{CgLine}
	draw (0.5cm,0cm) -- (12.5cm,0cm) -- (12.5cm,0.6cm) -- (0.5cm,0.6cm) -- (0.5cm,0cm) -- cycle withcolor white; 	
 	path p ; p := (-0.2cm,0cm) -- (12.5cm,0cm) -- (12.3cm,0.05cm) -- (-0.4cm,0.1cm) -- (-0.2cm,0cm) -- cycle ;
	fill p 
	withshading("linear",llcorner p,urcorner p) 
	withcolor black shadedinto darkgray ;
\stopuniqueMPgraphic


\setuphead[title][command=\MsTitle,style=\tfb,page=no,after={\setupwhitespace[small]},before={\setupwhitespace[medium]},color=darkred]
\defineoverlay[HeaderLines][\uniqueMPgraphic{CgLines}]

\def\MsTitle#1#2{
    \framedtext
        [width=\textwidth,
        background={foreground,HeaderLines},
		offset=none,
		toffset=3mm,
		boffset=3mm,
        strut=no,
        frame=off,
		backgroundoffset=0.2cm,
        align={middle,right},]
		{#1 #2}}

% \setuphead[subject][style=\tfa,before={\blank[0.5cm]}]

\setuphead[subject][command=\MsSubject,style=\tfa,before={\setupwhitespace[small]},after=\nowhitespace]
\defineoverlay[HeaderLine][\uniqueMPgraphic{CgLine}]

		\def\MsSubject#1#2{
		    \framedtext
		        [width=\textwidth,
		        background={foreground,HeaderLine},
		        offset=none,
				toffset=0mm,
				boffset=0.5mm,
%				backgroundoffset=-0.3cm,
		        strut=no,
		        frame=off,
		        align={middle,right}]
				{#1 #2}}



\stopenvironment