%% The LaTeX package tcolorbox - version 2.80 (2014/03/31)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README
%%
\tcb@set@library@version{2.80}

\RequirePackage{tikz}[2010/10/13]

\newenvironment{tikzpicture@tcb@hooked}{%
  \edef\tcb@tikzpicture@begin{\noexpand\tikzpicture[\expandonce\tcb@tikz@option@hook]}%
  \tcb@tikzpicture@begin\tcb@tikz@begin@hook}{\tcb@tikz@end@hook\endtikzpicture}

\def\tcb@creategeonodes@true{%
  \begin{scope}[every node/.style={line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle}]
    \node[name=frame,at={(0,0)},above right,minimum width=\tcb@width,minimum height=\tcb@height]{};
    \node[name=interior,at={({\kvtcb@left@rule},{\kvtcb@bottom@rule})},above right,minimum width=\tcb@innerwidth,minimum height=\tcb@innerheight]{};
    \ifnum\tcb@segment@state=1%
    \node[name=segmentation,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@bottom+\tcb@height@lower\relax})},above right,
       minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{};
    \else\iftcb@sidebyside%
    \node[name=segmentation,at={({\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper\relax},{\the\dimexpr\kvtcb@bottom@rule\relax})},above right,
       minimum width=\the\dimexpr\kvtcb@sbs@gap\relax,minimum height=\tcb@innerheight]{};
    \fi\fi%
    \iftcb@hasTitle%
    \node[name=title,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule\relax})},above right,
       minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\tcb@h@title+\kvtcb@toptitle+\kvtcb@bottomtitle+\kvtcb@boxsep*2\relax]{};
    \fi%
  \end{scope}%
}

\def\tcb@spec#1{\tikzset{tcb@spec/.style={#1}}}

\def\tcb@gettikzxy#1#2#3{%
  \tikz@scan@one@point\pgfutil@firstofone#1\relax%
  \edef#2{\the\pgf@x}%
  \edef#3{\the\pgf@y}%
}

\def\tcb@boundary@tikzbase#1#2#3#4#5#6{%
  \tcb@gettikzxy{(#1)}{\tcb@xa}{\tcb@ya}%
  \tcb@gettikzxy{(#2)}{\tcb@xb}{\tcb@yb}%
  \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}%
  #4\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}%
  #5\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}%
  #6\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}%
  #3\pgfpathclose%
}

\def\tcb@pathboundary#1#2{\path[#1]\pgfextra{#2};}

\def\tcb@pathbase#1#2#3#4#5#6#7{\tcb@pathboundary{#1}{\tcb@boundary@tikzbase{#2}{#3}{#4}{#5}{#6}{#7}}}

\def\tcb@boundaryframe@pathfirst{%
  \tcb@boundary@base{0pt}{0pt}%
    {\tcb@width}{\tcb@height}%
    {\tcb@arc@zpt}{\tcb@arc@out}{\tcb@arc@out}{\tcb@arc@zpt}%
}

\def\tcb@boundaryframe@pathmiddle{%
  \tcb@boundary@base{0pt}{0pt}%
    {\tcb@width}{\tcb@height}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@boundaryframe@pathlast{%
  \tcb@boundary@base{0pt}{0pt}%
    {\tcb@width}{\tcb@height}%
    {\tcb@arc@out}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@out}%
}

\tikzset{%
  tcb@fill@frame/.style={fill=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,tcb@spec,frame@style},%
  tcb@fill@interior/.style={fill=\kvtcb@colback,fill opacity=\kvtcb@opacityback,tcb@spec,interior@style},%
  tcb@fill@title/.style={fill=\kvtcb@colbacktitle,fill opacity=\kvtcb@opacitybacktitle,tcb@spec,title@style},%
}

% fill frame
\def\tcb@drawframe@path{\tcb@pathboundary{tcb@fill@frame}{\tcb@outerboundary}}
\let\tcb@drawframe@pathfirst=\tcb@drawframe@path
\let\tcb@drawframe@pathmiddle=\tcb@drawframe@path
\let\tcb@drawframe@pathlast=\tcb@drawframe@path


% fill inner box with title
\def\tcb@drawwithtitle@path{\tcb@pathboundary{tcb@fill@interior}{\tcb@boundaryinterior@title@standard}}

\def\tcb@drawwithtitle@pathfirst{%
  \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\let\tcb@drawwithtitle@pathmiddle=\tcb@drawwithtitle@pathfirst

\let\tcb@drawwithtitle@pathlast=\tcb@drawwithtitle@path

% fill inner box without title
\def\tcb@drawwithouttitle@path{\tcb@pathboundary{tcb@fill@interior}{\tcb@boundaryinterior@notitle@standard}}

\def\tcb@drawwithouttitle@pathfirst{%
  \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}%
}

\def\tcb@drawwithouttitle@pathmiddle{%
  \tcb@pathbase{tcb@fill@interior}{interior.west|-frame.south}{interior.east|-frame.north}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawwithouttitle@pathlast{%
  \tcb@pathbase{tcb@fill@interior}{interior.south west}{interior.east|-frame.north}%
    {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}%
}

% draw title box
\def\tcb@drawtitle@path{\tcb@pathboundary{tcb@fill@title}{\tcb@boundarytitle@standard}}

\let\tcb@drawtitle@pathfirst=\tcb@drawtitle@path

\def\tcb@drawtitle@pathmiddle{%
  \tcb@pathbase{tcb@fill@title}{title.south west}{title.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\let\tcb@drawtitle@pathlast=\tcb@drawtitle@pathmiddle

% draw segmentation line
\def\tcb@drawlower@path{%
  \iftcb@sidebyside%
    \path[draw=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style]
    (segmentation.north)--(segmentation.south);%
  \else%
    \path[draw=\kvtcb@colframe,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style]
    (segmentation.west)--(segmentation.east);%
  \fi%
}

\long\def\tcb@pseudo@segmentation#1{%
{\parskip\z@\par\nointerlineskip\hfilneg\kern-\@totalleftmargin}\begingroup%
\tcb@shield@externalize\begin{tikzpicture}%
  \path[use as bounding box] (0,{\the\dimexpr-\kvtcb@middle-\kvtcb@boxsep\relax})
     rectangle (\linewidth,{\the\dimexpr\kvtcb@middle+\kvtcb@boxsep\relax});
  \node[line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle,
        name=segmentation,at={({\the\dimexpr-#1-\kvtcb@boxsep\relax},0)},right,%
        minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{};
  \tcb@drawlower@path%
\end{tikzpicture}%
\endgroup{\parskip\z@\par\nointerlineskip}%
}

\def\tcbline{\iftcb@hasLower\tcb@pseudo@segmentation{\kvtcb@leftlower}%
  \else\tcb@pseudo@segmentation{\kvtcb@leftupper}\fi}


% draw special versions
\def\tcb@drawspec@UT{%
  \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@UR{%
  \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@US{%
  \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.east|-frame.north}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@LR#1{%
  \tcb@pathbase{#1,segmentation@style}{interior.south west}{[yshift=0.1mm]segmentation.east}%
    {\tcb@arc@ins}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}%
}

\def\tcb@drawspec@LS#1{%
  \tcb@pathbase{#1,segmentation@style}{interior.west|-frame.south}{[yshift=0.1mm]segmentation.east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@sbs@A#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}%
}

\def\tcb@drawspec@sbs@B#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}%
}

\def\tcb@drawspec@sbs@C#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@sbs@D#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@sbs@E#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.east|-frame.north}%
  {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawspec@sbs@F#1{%
  \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.east|-frame.north}%
  {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins}%
}

\def\tcb@drawspec@T{%
  \tcb@pathbase{top color=\kvtcb@colframe,bottom color=\kvtcb@colback,fill opacity=\kvtcb@opacitybacktitle}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}%
  {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@drawframe@freelance{\tcb@frame@code}
\def\tcb@drawwithtitle@freelance{\tcb@interiortitled@code}
\def\tcb@drawwithouttitle@freelance{\tcb@interior@code}
\def\tcb@drawlower@freelance{\tcb@segmentation@code}
\def\tcb@drawtitle@freelance{\tcb@title@code}


\def\tcb@drawframe@spartan{%
  \begin{pgfscope}%
  \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{\tcb@width}{\tcb@height}}%
  \pgfsetfillcolor{\kvtcb@colframe}%
  \pgfsetfillopacity{\kvtcb@opacityframe}%
  \pgfusepath{fill}%
  \end{pgfscope}%
}

\def\tcb@drawwithtitle@spartan{%
  \begin{pgfscope}%
  \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}%
   {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}%
  \pgfsetfillcolor{\kvtcb@colback}%
  \pgfsetfillopacity{\kvtcb@opacityback}%
  \pgfusepath{fill}%
  \end{pgfscope}%
}

\def\tcb@drawwithouttitle@spartan{%
  \begin{pgfscope}%
  \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}%
   {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\tcb@height-\kvtcb@top@rule\relax}}%
  \pgfsetfillcolor{\kvtcb@colback}%
  \pgfsetfillopacity{\kvtcb@opacityback}%
  \pgfusepath{fill}%
  \end{pgfscope}%
}

\def\tcb@drawtitle@spartan{%
  \begin{pgfscope}%
  \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule\relax}}%
   {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\tcb@height-\kvtcb@top@rule\relax}}%
  \pgfsetfillcolor{\kvtcb@colbacktitle}%
  \pgfsetfillopacity{\kvtcb@opacitybacktitle}%
  \pgfusepath{fill}%
  \end{pgfscope}%
}

\def\tcb@drawlower@spartan{%
  \begin{pgfscope}%
  \iftcb@sidebyside%
  \tcbdimto\tcb@seg@pos{\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper+\kvtcb@sbs@gap/2}%
  \pgfpathmoveto{\pgfqpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}%
  \pgfpathlineto{\pgfqpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}%
  \else%
  \tcbdimto\tcb@seg@pos{\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}%
  \pgfpathmoveto{\pgfqpoint{\kvtcb@left@rule}{\tcb@seg@pos}}%
  \pgfpathlineto{\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}%
  \fi%
  \pgfsetcolor{\kvtcb@colframe}%
  \pgfsetstrokeopacity{\kvtcb@opacityframe}%
  \pgfusepath{stroke}%
  \end{pgfscope}%
}


\tcbset{%
  frame style/.code={\tikzset{frame@style/.style={#1}}},%
  frame hidden/.style={frame style={draw=none,fill=none}},
  frame code/.code={\def\tcb@frame@code{#1}},%
  frame code/.default=\tcb@drawframe@standard,%
  interior style/.code={\tikzset{interior@style/.style={#1}}},%
  interior hidden/.style={interior style={draw=none,fill=none}},
  interior titled code/.code={\def\tcb@interiortitled@code{#1}},%
  interior titled code/.default=\tcb@drawwithtitle@standard,%
  interior code/.code={\def\tcb@interior@code{#1}},%
  interior code/.default=\tcb@drawwithouttitle@standard,%
  segmentation style/.code={\tikzset{segmentation@style/.style={#1}}},%
  segmentation hidden/.style={segmentation style={draw=none,fill=none}},
  segmentation code/.code={\def\tcb@segmentation@code{#1}},%
  segmentation code/.default=\tcb@drawlower@standard,%
  @title style/.code={\tikzset{title@style/.style={#1}}},%
  title style/.style={title filled,@title style={#1}},
  title hidden/.style={title style={draw=none,fill=none}},
  @title code/.code={\def\tcb@title@code{#1}},%
  @title code/.default=\tcb@drawtitle@standard,%
  title code/.style={title filled,@title code={#1}},%
  title code/.default=\tcb@drawtitle@standard,%
  colbacklower/.store in=\kvtcb@colbacklower,%
  clear@spec/.code={\tcb@spec{}},%
  tikz/.code={\appto\tcb@tikz@option@hook{,#1}},%
  tikz reset/.code={\let\tcb@tikz@option@hook\@empty},%
  at begin tikz/.code={\appto\tcb@tikz@begin@hook{#1}},%
  at begin tikz reset/.code={\let\tcb@tikz@begin@hook\@empty},%
  at end tikz/.code={\appto\tcb@tikz@end@hook{#1}},%
  at end tikz reset/.code={\let\tcb@tikz@end@hook\@empty},%
  rotate/.style={tikz={rotate=#1,transform shape}},%
  scale/.style={tikz={scale=#1,transform shape},%
    at begin tikz={%
    \tcbdimto\kvtcb@arc{#1\dimexpr\kvtcb@arc}%
    \tcbdimto\tcb@outer@arc{#1\dimexpr\tcb@outer@arc}%
    \def\tcb@shadow@prepare##1##2{%
      \ifdim##2>0pt\relax\tcbdimto\tcb@shadow@ts{##1-##2/2}%%
      \else\tcbdimto\tcb@shadow@ts{##1+##2/2}\fi%
      \tcbdimto\tcb@shadow@ts{#1\dimexpr\tcb@shadow@ts}%
      \ifdim\dimexpr\tcb@outer@arc>\tcb@shadow@ts\relax%
        \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@shadow@ts}%
      \else%
        \let\tcb@shadow@arc=\tcb@zpt%
      \fi%
    }}},%
  remember/.style={tikz={remember picture}},%
  remember as/.style={tikz={remember picture},at end tikz={\pgfnodealias{#1}{frame}}},%
}

\tcbset{%
  base@unbroken/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@standard,%
    set@extensions@preframe={\tcb@draw@shadow@unbroken},%
    set@extensions@postframe={\tcb@draw@border@unbroken\tcb@apply@overlay},%
  },%
  base@first/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathfirst,%
    set@extensions@preframe={\tcb@draw@shadow@first},%
    set@extensions@postframe={\tcb@draw@border@first\tcb@apply@overlay},%
  },%
  base@middle/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathmiddle,%
    set@extensions@preframe={\tcb@draw@shadow@middle},%
    set@extensions@postframe={\tcb@draw@border@middle\tcb@apply@overlay},%
  },%
  base@last/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathlast,%
    set@extensions@preframe={\tcb@draw@shadow@last},%
    set@extensions@postframe={\tcb@draw@border@last\tcb@apply@overlay},%
  },%
}

\tcb@new@skin{enhanced}{base@unbroken,%
  frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=path,title engine=path,%
  skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedlast}

\tcb@new@skin{enhancedfirst}{base@first,%
  frame engine=pathfirst,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=path,title engine=pathfirst,%
  skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedmiddle}

\tcb@new@skin{enhancedmiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=path,title engine=pathmiddle,%
  skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedmiddle}

\tcb@new@skin{enhancedlast}{base@last,%
  frame engine=pathlast,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=path,title engine=pathlast,%
  skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedlast}

\tcbset{enhanced/.style={skin=enhanced},%
  enhanced standard/.style={skin=enhanced,
    skin first=enhanced,skin middle=enhanced,skin last=enhanced},%
  blank/.style={enhanced,frame hidden,interior hidden,segmentation hidden,%
    arc=0pt,boxsep=0pt,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0pt,%
    bottomtitle=6pt,middle=3pt}}

\tcb@new@skin{freelance}{base@unbroken,%
  frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,%
  skin first=freelancefirst,skin middle=freelancemiddle,skin last=freelancelast,freelance@extension}

\tcb@new@skin{freelancefirst}{base@first,%
  frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,%
  skin first=freelancefirst,skin middle=freelancemiddle,skin last=freelancemiddle,freelancefirst@extension}

\tcb@new@skin{freelancemiddle}{base@middle,%
  frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,%
  skin first=freelancemiddle,skin middle=freelancemiddle,skin last=freelancemiddle,freelancemiddle@extension}

\tcb@new@skin{freelancelast}{base@last,%
  frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,%
  skin first=freelancemiddle,skin middle=freelancemiddle,skin last=freelancelast,freelancelast@extension}

\tcbset{freelance/.style={skin=freelance},%
  extend freelance/.code={\tcbset{freelance@extension/.style={#1}}},%
  extend freelancefirst/.code={\tcbset{freelancefirst@extension/.style={#1}}},%
  extend freelancemiddle/.code={\tcbset{freelancemiddle@extension/.style={#1}}},%
  extend freelancelast/.code={\tcbset{freelancelast@extension/.style={#1}}}}

\tcb@new@skin{bicolor}{base@unbroken,%
  frame engine=path,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=path,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@path}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@path}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@path}%
    \fi},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@path}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UR%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@path}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@path}%
    \fi},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=\kvtcb@colbacklower}\else%
    \tcb@drawspec@sbs@A{fill=\kvtcb@colbacklower}\fi\else\tcb@drawspec@LR{fill=\kvtcb@colbacklower}\fi},%
  skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolorlast}

\tcbset{bicolor/.style={skin=bicolor}}

\tcb@new@skin{bicolorfirst}{base@first,%
  frame engine=pathfirst,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathfirst,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathfirst}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathfirst}%
    \fi},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathfirst}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UR%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathfirst}%
    \fi},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=\kvtcb@colbacklower}\else%
    \tcb@drawspec@sbs@C{fill=\kvtcb@colbacklower}\fi\else\tcb@drawspec@LS{fill=\kvtcb@colbacklower}\fi},%
  skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolormiddle}

\tcb@new@skin{bicolormiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathmiddle,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathmiddle}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathmiddle}%
    \fi},%
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathmiddle}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@US%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathmiddle}%
    \fi},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=\kvtcb@colbacklower}\else%
    \tcb@drawspec@sbs@E{fill=\kvtcb@colbacklower}\fi\else\tcb@drawspec@LS{fill=\kvtcb@colbacklower}\fi},%
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolormiddle}

\tcb@new@skin{bicolorlast}{base@last,%
  frame engine=pathlast,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathlast,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathlast}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathlast}%
    \fi},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcb@segment@state%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathlast}%
      \or%
      \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@US%
      \else
      {\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathlast}%
    \fi},%
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=\kvtcb@colbacklower}\else%
    \tcb@drawspec@sbs@F{fill=\kvtcb@colbacklower}\fi\else\tcb@drawspec@LR{fill=\kvtcb@colbacklower}\fi},%
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolorlast}


\tikzset{beamer@color/.style={top color=\kvtcb@colback,bottom color=\kvtcb@colback!85!black}}

\tcb@new@skin{beamer}{base@unbroken,%
  frame engine=path,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=path,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1%
      \tcb@spec{beamer@color}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@path}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@path}%
    \fi%
    \tcb@drawspec@T},
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1
      \tcb@spec{beamer@color}\tcb@drawspec@UR%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}%
    \fi},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi},%
  skin first=beamerfirst,skin middle=beamermiddle,skin last=beamerlast}

\tcbset{beamer/.style={skin=beamer,boxrule=0mm,titlerule=1mm,toptitle=0.5mm,arc=2mm,fonttitle=\bfseries,drop fuzzy shadow}}

\tcb@new@skin{beamerfirst}{base@first,%
  frame engine=pathfirst,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathfirst,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1%
      \tcb@spec{beamer@color}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}%
    \fi%
    \tcb@drawspec@T},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1
      \tcb@spec{beamer@color}\tcb@drawspec@UR%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}%
    \fi},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi},%
  skin first=beamerfirst,skin middle=beamermiddle,skin last=beamermiddle}

\tcb@new@skin{beamermiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathmiddle,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1%
      \tcb@spec{beamer@color}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}%
    \fi%
    \tcb@drawspec@T},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1
      \tcb@spec{beamer@color}\tcb@drawspec@US%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}%
    \fi},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamermiddle}

\tcb@new@skin{beamerlast}{base@last,%
  frame engine=pathlast,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=pathlast,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1%
      \tcb@spec{beamer@color}\tcb@drawspec@UT%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}%
    \fi%
    \tcb@drawspec@T},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcb@segment@state=1
      \tcb@spec{beamer@color}\tcb@drawspec@US%
      \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}%
    \fi},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamerlast}

\def\tcb@drawspec@widgetsegment{%
  \iftcb@sidebyside%
  \tcb@drawlower@path%
  \else%
  \path[left color=\kvtcb@colframe!75!white,right color=\kvtcb@colframe!75!white!25!\kvtcb@colback,segmentation@style]
    ([yshift={-\kvtcb@middle/4}]segmentation.west) rectangle ([yshift={\kvtcb@middle/4}]segmentation.east);
  \fi%
}

\tikzset{widget@color/.style={left color=\kvtcb@colframe!75!white,right color=\kvtcb@colframe!75!white!25!\kvtcb@colback}}

\tcb@new@skin{widget}{base@unbroken,%
  frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=freelance,title engine=freelance,%
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@path}},
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetlast}

\tcbset{widget/.style={skin=widget,arc=0.5mm,fonttitle=\bfseries,titlerule=0mm,toprule at break=0mm}}

\tcb@new@skin{widgetfirst}{base@first,%
  frame engine=pathfirst,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=freelance,title engine=freelance,%
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathfirst}},%
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetmiddle}

\tcb@new@skin{widgetmiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=freelance,title engine=freelance,%
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathmiddle}},%
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetmiddle}

\tcb@new@skin{widgetlast}{base@last,%
  frame engine=pathlast,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=freelance,title engine=freelance,%
  title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathlast}},
  segmentation code={\tcb@drawspec@widgetsegment},%
  skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetlast}

\tcb@new@skin{spartan}{graphical environment=tikzpicture@tcb@hooked,geometry nodes=false,
  set@extensions@preframe=,set@extensions@postframe=,
  frame engine=spartan,interior titled engine=spartan,interior engine=spartan,title engine=spartan,segmentation engine=spartan,%
  set@outerboundary=\tcb@boundaryframe@standard,%
  skin first=spartan,skin middle=spartan,skin last=spartan}

\tcbset{spartan/.style={skin=spartan}}

\tcb@new@skin{draft}{clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
  frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=path,title engine=path,%
  interior style=,frame style=,segmentation style={draw=black,dashed},
  colupper=black!50!white,collower=black!50!white,coltitle=black!50!white,
  title hidden,%
  frame code={%
    \path[draw=blue!10!white,double,line width=1pt,dashed] (current bounding box.south west) rectangle (current bounding box.north east);
    {\tcb@spec{fill=black!15!white,draw=black}\tcb@drawframe@path}%
    \iftcb@hasTitle%
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle
        (interior.north east);
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([yshift={\kvtcb@title@rule}]interior.north west) rectangle
        ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east);
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]title.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]title.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@lefttitle},yshift={\kvtcb@boxsep+\kvtcb@bottomtitle}]title.south west)
         rectangle node[font=\scriptsize] {title: w=\tcb@w@title, h=\tcb@h@title}
        +(\tcb@w@title,\tcb@h@title);
      \path[draw=red,opacity=0.5] (title.south west) rectangle (title.north east);
    \else%
      \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc]
        ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle
        ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east);
    \fi%
    \ifcase\tcb@segment@state
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper}
        +(\tcb@w@upper,\tcb@height@upper);
      \iftcb@sidebyside%
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]segmentation.south east)
        rectangle node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@upper}
        +(\tcb@w@lower,\tcb@height@upper);
      \fi%
    \or%
      \ifdim\wd\tcb@upperbox=0pt\relax
        \path[fill=white,draw,dotted]
          ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
          ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \else
        \path[fill=white,draw,dotted]
          ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
          ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]segmentation.east);
        \path[fill=white,draw,dotted]
           ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]segmentation.west)
           rectangle ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
        \path[fill=green!20!white,draw=green!75!black,dashed]
          ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep}]segmentation.north west)
           rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper}
           +(\tcb@w@upper,\tcb@height@upper);
      \fi%
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle  node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@lower}
        +(\tcb@w@lower,\tcb@height@lower);
      \path[draw=red,opacity=0.5] (segmentation.south west) rectangle (segmentation.north east);
    \else
      \path[fill=white,draw,dotted]
        ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle
        ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east);
      \path[fill=green!20!white,draw=green!75!black,dashed]
        ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west)
        rectangle  node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@lower}
        +(\tcb@w@lower,\tcb@height@lower);
    \fi%
    \path[draw=red,opacity=0.5] (interior.south west) rectangle (interior.north east);
    \path[draw=red,opacity=0.5] (frame.south west) rectangle (frame.north east);
    \node[above,font=\scriptsize,red!50!black] at (interior.south) {interior: w=\tcb@innerwidth, h=\tcb@innerheight};
    \node[above,font=\scriptsize,red!50!black] at (frame.north) {frame: w=\the\dimexpr\tcb@width\relax, h=\tcb@height};
    \path[draw=blue!10!white,double,line width=1pt,dashed,opacity=0.3] (current bounding box.south west) rectangle (current bounding box.north east);
    \pgfsetfillopacity{0.3}
  },
  set@extensions@postframe={},%
  interior titled code=,interior code=,
  skin first=draft,skin middle=draft,skin last=draft}

\tcbset{draft/.style={skin=draft}}

\tikzset{%
  tcb@forced@clip/.code={\tikz@addmode{\tikz@mode@cliptrue}\let\tikz@options=\pgfutil@empty},%
  tcb@invclip/.style={clip,insert path={{[reset cm]\pgfextra{%
    \pgfpathmoveto{\pgfqpoint{-16383.99999pt}{-16383.99999pt}}%
    \pgfpathlineto{\pgfqpoint{16383.99999pt}{-16383.99999pt}}%
    \pgfpathlineto{\pgfqpoint{16383.99999pt}{16383.99999pt}}%
    \pgfpathlineto{\pgfqpoint{-16383.99999pt}{16383.99999pt}}%
    \pgfpathclose}}}}%
}%

\def\tcb@clip@frame{\tcb@pathboundary{clip}{\tcb@outerboundary}}

\def\tcb@invclip@frame{\tcb@pathboundary{tcb@invclip}{\tcb@outerboundary}}

\def\tcb@clip@interior{%
  \begingroup%
  \tcbset{interior hidden}%
  \tcb@spec{tcb@forced@clip}%
  \def\tcb@spec##1{}%
  \iftcb@hasTitle%
    \csname tcb@drawwithtitle@\kvtcb@engine@interiortitled\endcsname%
  \else%
    \csname tcb@drawwithouttitle@\kvtcb@engine@interior\endcsname%
  \fi%
  \endgroup%
}

\def\tcb@clip@title{%
  \begingroup%
  \tcbset{title hidden}%
  \tcb@spec{tcb@forced@clip}%
  \def\tcb@spec##1{}%
    \iftcb@hasTitle%
      \csname tcb@drawtitle@\kvtcb@engine@title\endcsname%
    \fi%
  \endgroup%
}

\newenvironment{tcbclipframe}{\begin{scope}\tcb@clip@frame}{\end{scope}}
\newenvironment{tcbinvclipframe}{\begin{scope}\tcb@invclip@frame}{\end{scope}}
\newenvironment{tcbclipinterior}{\begin{scope}\tcb@clip@interior}{\end{scope}}
\newenvironment{tcbcliptitle}{\begin{scope}\tcb@clip@title}{\end{scope}}

\newbox\tcb@waterbox

\def\tcb@setratio#1#2#3{\edef#1{\strip@pt\dimexpr\number\numexpr\number\dimexpr#2\relax*65536/\number\dimexpr#3\relax\relax sp\relax}}

\def\tcb@setratiorobust#1#2#3{\ifdim\dimexpr#3<1pt\tcb@setratio#1{#2}{1pt}\else\tcb@setratio#1{#2}{#3}\fi}

\def\tcb@comp@waterbox@stretch#1#2#3{%
  \tcb@setratiorobust\tcb@scale@x{#1\dimexpr#2}{\wd\tcb@waterbox}%
  \tcb@setratiorobust\tcb@scale@y{#1\dimexpr#3}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
}

\def\tcb@comp@waterbox@zoom#1#2#3{%
  \tcb@comp@waterbox@stretch{#1}{#2}{#3}%
  \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
}

\def\tcb@comp@waterbox@overzoom#1#2#3{%
  \tcb@comp@waterbox@stretch{#1}{#2}{#3}%
  \ifdim\dimexpr\tcb@scale@x pt\relax>\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
}

\def\tcb@comp@waterbox@shrink#1#2#3{%
  \tcb@comp@waterbox@zoom{#1}{#2}{#3}%
  \ifdim\dimexpr\tcb@scale@x pt\relax>1pt\relax%
    \edef\tcb@scale@x{1}\edef\tcb@scale@y{1}%
  \fi%
}

\def\tcb@box@scaled@waterbox{\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}}

\def\tcb@drawspec@watermark@@noclip{%
  \tcb@comp@wm%
  \node[opacity=\kvtcb@watermark@opacity,anchor=center] at (interior) {\tcb@box@scaled@waterbox};%
}

\def\tcb@drawspec@watermark@@clip{%
  \begin{tcbclipinterior}%
  \tcb@drawspec@watermark@@noclip%
  \end{tcbclipinterior}%
}

\def\tcb@drawspec@watermark@tikz#1{%
  \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture}%
  \tcb@drawspec@watermark%
}

\def\tcb@drawspec@watermark@graphics#1{%
  \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\includegraphics{#1}}\endpgfinterruptpicture}%
  \tcb@drawspec@watermark%
}

\def\tcb@drawspec@watermark@text#1{%
  \tcb@drawspec@watermark@tikz{\node[inner sep=0pt,align=flush center]{#1};}%
}


\tcbset{%
  watermark opacity/.store in=\kvtcb@watermark@opacity,%
  watermark color/.store in=\kvtcb@watermark@color,%
%
  watermark stretch/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@stretch{#1}{\tcb@innerwidth}{\tcb@innerheight}}},%
  watermark zoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@zoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},%
  watermark overzoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@overzoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},%
  watermark shrink/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@shrink{#1}{\tcb@innerwidth}{\tcb@innerheight}}},%
%
  watermark tikz/.style={overlay={\tcb@drawspec@watermark@tikz{#1}}},
  watermark tikz on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@tikz{#2}}},%
  watermark graphics/.style={overlay={\tcb@drawspec@watermark@graphics{#1}}},
  watermark graphics on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@graphics{#2}}},
  watermark text/.style={overlay={\tcb@drawspec@watermark@text{#1}}},
  watermark text on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@text{#2}}},
  no watermark/.style={no overlay},
  clip watermark/.is choice,
  clip watermark/true/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@clip},
  clip watermark/false/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@noclip},
  clip watermark/.default=true,
  show bounding box/.style={overlay={%
    \path[preaction={draw,line width=0.1pt,#1},draw,double=white,line width=1pt,dashed,opacity=0.5,#1]
    (current bounding box.south west) rectangle (current bounding box.north east);}},%
  show bounding box/.default={red},%
}

\def\tcb@tdraw@title@clip{%
  \begin{tcbcliptitle}%
  \tcb@tdraw@title@core%
  \end{tcbcliptitle}%
}

\def\tcb@tdraw@upper@clip{%
  \begin{tcbclipinterior}%
  \tcb@tdraw@upper@core%
  \end{tcbclipinterior}%
}

\def\tcb@tdraw@lower@clip{%
  \begin{tcbclipinterior}%
  \tcb@tdraw@lower@core%
  \end{tcbclipinterior}%
}


\def\tcb@process@ppbb{%
  \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}%
  \pgf@xa\pgf@x\pgf@ya\pgf@y%
  \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}%
  \pgf@xb\pgf@x\pgf@yb\pgf@y%
  \pgfsetfillopacity{\tcb@tikz@fill@graphics@opacity}%
}

\def\tcb@process@ppbb@wh{%
  \tcb@process@ppbb%
  \tcbdimto\tcb@ppbb@width{\pgf@xb-\pgf@xa}%
  \tcbdimto\tcb@ppbb@height{\pgf@yb-\pgf@ya}%
}

\def\tcb@set@waterbox@to@graphics#1{%
  \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options]{#1}}\endpgfinterruptpicture}%
}

\tikzset{%
  fill image opacity/.store in=\tcb@tikz@fill@graphics@opacity,%
  fill image opacity=1,%
  fill image scale/.store in=\tcb@tikz@fill@graphics@scale,%
  fill image scale=1,%
  fill image options/.store in=\tcb@tikz@fill@graphics@options,%
  fill image options=,%
  fill plain image/.style={path picture={%
    \node at (path picture bounding box.center) {\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options]{#1}};
  }},
  fill stretch image/.style={path picture={%
    \tcb@process@ppbb@wh%
    \node at (path picture bounding box.center) {\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options,%
      width=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@width\relax,%
      height=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@height\relax]{#1}};
  }},
  fill overzoom image/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@set@waterbox@to@graphics{#1}%
    \tcb@comp@waterbox@overzoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \node at (path picture bounding box.center) {\tcb@box@scaled@waterbox};%
  }},
  fill zoom image/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@set@waterbox@to@graphics{#1}%
    \tcb@comp@waterbox@zoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \node at (path picture bounding box.center) {\tcb@box@scaled@waterbox};%
  }},
  fill shrink image/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@set@waterbox@to@graphics{#1}%
    \tcb@comp@waterbox@shrink{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \node at (path picture bounding box.center) {\tcb@box@scaled@waterbox};%
  }},
  fill tile image/.style={path picture={%
    \tcb@process@ppbb%
    \tcb@set@waterbox@to@graphics{#1}%
    \tcbdimto\tcb@ppbb@tilew{\wd\tcb@waterbox}%
    \tcbdimto\tcb@ppbb@tileh{\ht\tcb@waterbox+\dp\tcb@waterbox}%
    \pgf@xc\pgf@xa\pgf@yc\pgf@yb%
    \pgfutil@loop%
      \pgfutil@loop%
        \pgftext[x=\pgf@xc,y=\pgf@yc,left,top]{\copy\tcb@waterbox}%
        \ifdim\pgf@xc<\pgf@xb%
        \advance\pgf@xc\tcb@ppbb@tilew%
      \pgfutil@repeat%
      \ifdim\pgf@yc>\pgf@ya%
      \advance\pgf@yc-\tcb@ppbb@tileh%
      \pgf@xc\pgf@xa%
    \pgfutil@repeat%
  }},%
  fill plain image*/.style 2 args={fill image options={#1},fill plain image={#2}},%
  fill stretch image*/.style 2 args={fill image options={#1},fill stretch image={#2}},%
  fill overzoom image*/.style 2 args={fill image options={#1},fill overzoom image={#2}},%
  fill zoom image*/.style 2 args={fill image options={#1},fill zoom image={#2}},%
  fill shrink image*/.style 2 args={fill image options={#1},fill shrink image={#2}},%
  fill tile image*/.style 2 args={fill image options={#1},fill tile image={#2}},%
}

\tcbset{%
  frame style image/.style={frame style={fill=none,fill stretch image={#1}}},
  frame style tile/.style 2 args={frame style={fill=none,fill tile image*={#1}{#2}}},
  interior style image/.style={interior style={fill=none,fill stretch image={#1}}},
  interior style tile/.style 2 args={interior style={fill=none,fill tile image*={#1}{#2}}},
  title style image/.style={title style={fill=none,fill stretch image={#1}}},
  title style tile/.style 2 args={title style={fill=none,fill tile image*={#1}{#2}}},
}

\tcbset{%
  clip title/.is choice,
  clip title/true/.code={\let\tcb@tdraw@title=\tcb@tdraw@title@clip},
  clip title/false/.code={\let\tcb@tdraw@title=\tcb@tdraw@title@core},
  clip title/.default=true,
  clip upper/.is choice,
  clip upper/true/.code={\let\tcb@tdraw@upper=\tcb@tdraw@upper@clip},
  clip upper/false/.code={\let\tcb@tdraw@upper=\tcb@tdraw@upper@core},
  clip upper/.default=true,
  clip lower/.is choice,
  clip lower/true/.code={\let\tcb@tdraw@lower=\tcb@tdraw@lower@clip},
  clip lower/false/.code={\let\tcb@tdraw@lower=\tcb@tdraw@lower@core},
  clip lower/.default=true,
}


\tcbset{marker/.style={%
  skin=enhancedmiddle jigsaw,
  breakable,parbox=false,
  boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm,
  left=3mm,right=3mm,top=1mm,bottom=1mm,
  toptitle=1mm,bottomtitle=1mm,fonttitle=\bfseries,
  arc=0mm,outer arc=0mm,
  colback=yellow!10!white,colframe=red,
  watermark color=yellow!75!red!25!white,
  enlarge left by=-8mm,
  enlarge right by=-8mm,
  enlarge top by=0mm,
  enlarge bottom by=0mm,
  width=\the\dimexpr\linewidth+1.6cm\relax,
  frame style={top color=\kvtcb@colframe,bottom color=\kvtcb@colframe,middle color=yellow!75!\kvtcb@colframe},
  title style={left color=\kvtcb@colframe,right color=\kvtcb@colframe,middle color=yellow!75!\kvtcb@colframe},
  watermark tikz={\draw[line width=2mm] circle (1cm) node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont!};},
  watermark zoom=0.75,
}}


\def\tcb@border@prepare#1#2{%
  \tcbdimto\tcb@border@ts{#2+(#1)/2}%
  \ifdim\dimexpr\tcb@outer@arc>\tcb@border@ts\relax%
    \tcbdimto\tcb@border@arc{\tcb@outer@arc-\tcb@border@ts}%
  \else%
    \let\tcb@border@arc=\tcb@zpt%
  \fi%
}

\def\tcb@border@unbroken#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \draw[line width=#1,rounded corners=\tcb@border@arc,#3]
    ([xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west)%
      rectangle ([xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east);%
}

\def\tcb@border@first#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \draw[line width=#1,rounded corners=\tcb@border@arc,#3]
    ([xshift=\tcb@border@ts]frame.south west) --
    ([xshift=\tcb@border@ts,yshift=-\tcb@border@ts]frame.north west) --
    ([xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east) --
    ([xshift=-\tcb@border@ts]frame.south east);%
}

\def\tcb@border@middle#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \draw[line width=#1,#3]
    ([xshift=\tcb@border@ts]frame.north west) -- ([xshift=\tcb@border@ts]frame.south west);%
  \draw[line width=#1,#3]
    ([xshift=-\tcb@border@ts]frame.north east) -- ([xshift=-\tcb@border@ts]frame.south east);%
}

\def\tcb@border@last#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \draw[line width=#1,rounded corners=\tcb@border@arc,#3]
    ([xshift=\tcb@border@ts]frame.north west) --
    ([xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west) --
    ([xshift=-\tcb@border@ts,yshift=\tcb@border@ts]frame.south east) --
    ([xshift=-\tcb@border@ts]frame.north east);%
}


\def\tcb@draw@border@unbroken{%
  \let\tcb@border=\tcb@border@unbroken%
  \kvtcb@borderline%
}

\def\tcb@draw@border@first{%
  \let\tcb@border=\tcb@border@first%
  \kvtcb@borderline%
}

\def\tcb@draw@border@middle{%
  \let\tcb@border=\tcb@border@middle%
  \kvtcb@borderline%
}

\def\tcb@draw@border@last{%
  \let\tcb@border=\tcb@border@last%
  \kvtcb@borderline%
}

\tcbset{%
  border@line app/.code={\appto\kvtcb@borderline{#1}},%
  borderline/.style args={#1#2#3}{border@line app={\tcb@border{#1}{#2}{#3}}},%
  no borderline/.code={\def\kvtcb@borderline{}},%
}

\def\tcb@shadow@prepare#1#2{%
  \ifdim#2>0pt\relax\tcbdimto\tcb@shadow@ts{#1-#2/2}%%
  \else\tcbdimto\tcb@shadow@ts{#1+#2/2}\fi%
  \ifdim\dimexpr\tcb@outer@arc>\tcb@shadow@ts\relax%
    \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@shadow@ts}%
  \else%
    \let\tcb@shadow@arc=\tcb@zpt%
  \fi%
}

\def\tcb@arc@sha{\pgfsetcornersarced{\pgfqpoint{\tcb@shadow@arc}{\tcb@shadow@arc}}}%

\def\tcb@shadow@unbroken#1#2#3#4{%
  \tcb@shadow@prepare{#3}{#1}%
  \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@sha}%
}

\def\tcb@shadow@first#1#2#3#4{%
  \tcb@shadow@prepare{#3}{#1}%
  \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@zpt}{\tcb@arc@sha}{\tcb@arc@sha}{\tcb@arc@zpt}%
}

\def\tcb@shadow@middle#1#2#3#4{%
  \tcb@shadow@prepare{#3}{#1}%
  \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}

\def\tcb@shadow@last#1#2#3#4{%
  \tcb@shadow@prepare{#3}{#1}%
  \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@sha}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha}%
}

\def\tcb@draw@shadow@unbroken{%
  \let\tcb@shadow=\tcb@shadow@unbroken%
  \kvtcb@shadow%
}

\def\tcb@draw@shadow@first{%
  \let\tcb@shadow=\tcb@shadow@first%
  \kvtcb@shadow%
}

\def\tcb@draw@shadow@middle{%
  \let\tcb@shadow=\tcb@shadow@middle%
  \kvtcb@shadow%
}

\def\tcb@draw@shadow@last{%
  \let\tcb@shadow=\tcb@shadow@last%
  \kvtcb@shadow%
}

\tcbset{%
  shad@w app/.code={\appto\kvtcb@shadow{#1}},%
  shadow/.style args={#1#2#3#4}{shad@w app={\tcb@shadow{#1}{#2}{#3}{#4}}},%
  no shadow/.code={\def\kvtcb@shadow{}},%
  fuzzy shadow/.style args={#1#2#3#4#5}{shad@w app={%
    \begin{scope}[#5]%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3-4\dimexpr#4\relax}{opacity=0.01}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3-3\dimexpr#4\relax}{opacity=0.02}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3-2\dimexpr#4\relax}{opacity=0.04}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3-#4\relax}{opacity=0.07}%
      \tcb@shadow{#1}{#2}{#3}{opacity=0.11}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3+#4\relax}{opacity=0.11}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3+2\dimexpr#4\relax}{opacity=0.07}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3+3\dimexpr#4\relax}{opacity=0.04}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3+4\dimexpr#4\relax}{opacity=0.02}%
      \tcb@shadow{#1}{#2}{\the\dimexpr#3+5\dimexpr#4\relax}{opacity=0.01}%
  \end{scope}}},%
  %
  drop shadow/.style={shadow={0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},
  drop shadow/.default={black!50!white},%
  drop midday shadow/.style={shadow={0mm}{-0.8mm}{-0.4mm}{opacity=0.5,#1}},
  drop midday shadow/.default={black!50!white},%
  halo/.style args={#1 with #2}{shadow={0mm}{0mm}{-#1}{opacity=0.5,#2}},
  halo/.default={0.9mm with yellow},%
  drop fuzzy shadow/.style={fuzzy shadow={1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}},
  drop fuzzy shadow/.default={black!50!white},%
  drop fuzzy midday shadow/.style={fuzzy shadow={0mm}{-1.0mm}{-0.5mm}{0.12mm}{#1}},
  drop fuzzy midday shadow/.default={black!50!white},%
  fuzzy halo/.style args={#1 with #2}{fuzzy shadow={0mm}{0mm}{-#1}{0.12mm}{#2}},
  fuzzy halo/.default={1.0mm with yellow},%
  %
  drop shadow southeast/.style={shadow={0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},%
  drop shadow southeast/.default={black!50!white},%
  drop shadow south/.style={shadow={0mm}{-0.8mm}{-0.4mm}{opacity=0.5,#1}},%
  drop shadow south/.default={black!50!white},%
  drop shadow southwest/.style={shadow={-0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},%
  drop shadow southwest/.default={black!50!white},%
  drop shadow west/.style={shadow={-0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},%
  drop shadow west/.default={black!50!white},%
  drop shadow northwest/.style={shadow={-0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},%
  drop shadow northwest/.default={black!50!white},%
  drop shadow north/.style={shadow={0mm}{0.8mm}{-0.4mm}{opacity=0.5,#1}},%
  drop shadow north/.default={black!50!white},%
  drop shadow northeast/.style={shadow={0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},%
  drop shadow northeast/.default={black!50!white},%
  drop shadow east/.style={shadow={0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},%
  drop shadow east/.default={black!50!white},%
  drop fuzzy shadow southeast/.style={fuzzy shadow={1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}},
  drop fuzzy shadow southeast/.default={black!50!white},%
  drop fuzzy shadow south/.style={fuzzy shadow={0mm}{-1.0mm}{-0.5mm}{0.12mm}{#1}},
  drop fuzzy shadow south/.default={black!50!white},%
  drop fuzzy shadow southwest/.style={fuzzy shadow={-1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}},
  drop fuzzy shadow southwest/.default={black!50!white},%
  drop fuzzy shadow west/.style={fuzzy shadow={-1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}},
  drop fuzzy shadow west/.default={black!50!white},%
  drop fuzzy shadow northwest/.style={fuzzy shadow={-1.0mm}{1.0mm}{0mm}{0.12mm}{#1}},
  drop fuzzy shadow northwest/.default={black!50!white},%
  drop fuzzy shadow north/.style={fuzzy shadow={0mm}{1.0mm}{-0.5mm}{0.12mm}{#1}},
  drop fuzzy shadow north/.default={black!50!white},%
  drop fuzzy shadow northeast/.style={fuzzy shadow={1.0mm}{1.0mm}{0mm}{0.12mm}{#1}},
  drop fuzzy shadow northeast/.default={black!50!white},%
  drop fuzzy shadow east/.style={fuzzy shadow={1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}},
  drop fuzzy shadow east/.default={black!50!white},%
}


\newif\iftcb@isindraft
\def\tcb@draftmode{\tcbset{spartan,spartan@fit}}
\def\tcbstartdraftmode{\let\tcb@afteroptions@hook=\tcb@draftmode\tcb@isindrafttrue}
\def\tcbstopdraftmode{\let\tcb@afteroptions@hook=\@empty\tcb@isindraftfalse}

\def\tcbinterruptdraftmode{%
  \iftcb@isindraft%
    \tcbstopdraftmode%
    \let\tcbcontinuedraftmode=\tcbstartdraftmode%
  \else%
    \let\tcbcontinuedraftmode=\@empty%
  \fi}

\tcbset{%
  draftmode/.is choice,%
  draftmode/.default=true,%
  draftmode/true/.code=\tcbstartdraftmode,%
  draftmode/false/.code=\tcbstopdraftmode,%
}

\tcbset{%
  reset@skins/.style={%
    frame style=,interior style=,segmentation style=,@title style=,%
    frame code,interior titled code,interior code,segmentation code,%
    @title code,colbacklower=black!15!white,%
    extend freelance=,extend freelancefirst=,extend freelancemiddle=,extend freelancelast=,%
    clear@spec,%
    watermark opacity=1.00,watermark color=\kvtcb@colback!85!\kvtcb@colframe,%
    watermark zoom=0.75,clip watermark,%
    clip title=false,clip upper=false,clip lower=false,%
    no borderline,no shadow,tikz reset,at begin tikz reset,at end tikz reset%
  },
  initialize@reset=reset@skins,
}

\tcbuselibrary{skins@jigsaw}

