%% The LaTeX package tcolorbox - version 4.22 (2019/11/15)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2019 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{4.22}

\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,outer 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\tcbsegmentstate=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%
    \tcb@specialgeonodes@hook%
  \end{scope}%
}

\def\tcbsettowidthofnode#1#2{%
  \pgfpointanchor{#2}{east}\unskip%
  #1\pgf@x%
  \pgfpointanchor{#2}{west}\unskip%
  \advance #1 by -\pgf@x\relax%
}

\def\tcbsetmacrotowidthofnode#1#2{%
  \tcbsettowidthofnode\pgf@xa{#2}%
  \edef#1{\the\pgf@xa}%
}

\def\tcbsettoheightofnode#1#2{%
  \pgfpointanchor{#2}{north}\unskip%
  #1\pgf@y%
  \pgfpointanchor{#2}{south}\unskip%
  \advance #1 by -\pgf@y\relax%
}

\def\tcbsetmacrotoheightofnode#1#2{%
  \tcbsettoheightofnode\pgf@ya{#2}%
  \edef#1{\the\pgf@ya}%
}

\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@NW}{\tcb@arc@out@NE}{\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@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@out@SE}%
}

\tikzset{%
  tcb fill frame/.style={fill=tcbcolframe,fill opacity=\kvtcb@opacityframe,tcb@spec,frame@style},%
  tcb fill interior/.style={fill=tcbcolback,fill opacity=\kvtcb@opacityback,tcb@spec,interior@style},%
  tcb fill title/.style={fill=tcbcolbacktitle,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@NW}{\tcb@arc@ins@NE}{\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@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}%
}

% 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=tcbcolframe,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=tcbcolframe,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style]
    (segmentation.west)--(segmentation.east);%
  \fi%
}

\def\tcb@draw@pseudo@segmentation#1{%
\begingroup\tcb@shield@externalize\noindent\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-\kvtcb@boxsep-(#1)\relax},0)},right,%
        minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{};
  \tcb@drawlower@path%
\end{tikzpicture}\endgroup}

\def\tcbline@star#1{%
{\parskip\z@\par\nointerlineskip}%
\xleaders\vbox{\tcb@draw@pseudo@segmentation{#1}}\vskip\dimexpr(\kvtcb@middle+\kvtcb@boxsep)*2\relax%
{\parskip\z@\par\nointerlineskip}}

\def\tcbline@#1{%
{\parskip\z@\par\nointerlineskip}%
\tcb@draw@pseudo@segmentation{#1}%
{\parskip\z@\par\nointerlineskip}}

\def\tcbline{%
  \@ifstar{\iftcb@hasLower\tcbline@star{\kvtcb@leftlower}\else\tcbline@star{\kvtcb@leftupper}\fi}%
  {\iftcb@hasLower\tcbline@{\kvtcb@leftlower+\@totalleftmargin}\else\tcbline@{\kvtcb@leftupper+\@totalleftmargin}\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@NW}{\tcb@arc@ins@NE}{\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@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}%
}

\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@NE}{\tcb@arc@ins@SE}%
}

\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@SE}%
}

\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@NE}{\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@SE}%
}

\def\tcb@drawspec@T{%
  \tcb@pathbase{top color=tcbcolframe,bottom color=tcbcolback,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{tcbcolframe}%
  \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{tcbcolback}%
  \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{tcbcolback}%
  \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{tcbcolbacktitle}%
  \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{tcbcolframe}%
  \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 engine/path/.style={frame code=\tcb@drawframe@path},
  frame engine/pathfirst/.style={frame code=\tcb@drawframe@pathfirst},
  frame engine/pathmiddle/.style={frame code=\tcb@drawframe@pathmiddle},
  frame engine/pathlast/.style={frame code=\tcb@drawframe@pathlast},
  frame engine/freelance/.style={frame code=\tcb@drawframe@standard},
  frame engine/spartan/.style={frame code=\tcb@drawframe@spartan},
  frame engine/empty/.style={frame code=},
  %
  interior titled engine/path/.style={interior titled code=\tcb@drawwithtitle@path},
  interior titled engine/pathfirst/.style={interior titled code=\tcb@drawwithtitle@pathfirst},
  interior titled engine/pathmiddle/.style={interior titled code=\tcb@drawwithtitle@pathmiddle},
  interior titled engine/pathlast/.style={interior titled code=\tcb@drawwithtitle@pathlast},
  interior titled engine/freelance/.style={interior titled code=\tcb@drawwithtitle@standard},
  interior titled engine/spartan/.style={interior titled code=\tcb@drawwithtitle@spartan},
  interior titled engine/empty/.style={interior titled code=},
  %
  interior engine/path/.style={interior code=\tcb@drawwithouttitle@path},
  interior engine/pathfirst/.style={interior code=\tcb@drawwithouttitle@pathfirst},
  interior engine/pathmiddle/.style={interior code=\tcb@drawwithouttitle@pathmiddle},
  interior engine/pathlast/.style={interior code=\tcb@drawwithouttitle@pathlast},
  interior engine/freelance/.style={interior code=\tcb@drawwithouttitle@standard},
  interior engine/spartan/.style={interior code=\tcb@drawwithouttitle@spartan},
  interior engine/empty/.style={interior code=},
  %
  segmentation engine/path/.style={segmentation code=\tcb@drawlower@path},
  segmentation engine/freelance/.style={segmentation code=\tcb@drawlower@standard},
  segmentation engine/spartan/.style={segmentation code=\tcb@drawlower@spartan},
  segmentation engine/empty/.style={segmentation code=},
  %
  title engine/path/.style={@title code=\tcb@drawtitle@path},
  title engine/pathfirst/.style={@title code=\tcb@drawtitle@pathfirst},
  title engine/pathmiddle/.style={@title code=\tcb@drawtitle@pathmiddle},
  title engine/pathlast/.style={@title code=\tcb@drawtitle@pathlast},
  title engine/freelance/.style={@title code=\tcb@drawtitle@standard},
  title engine/spartan/.style={@title code=\tcb@drawtitle@spartan},
  title engine/empty/.style={@title code=},
  %
  interior style/.code={\tikzset{interior@style/.style={#1}}},%
  interior hidden/.style={interior style={draw=none,fill=none}},
  segmentation style/.code={\tikzset{segmentation@style/.style={#1}}},%
  segmentation hidden/.style={segmentation style={draw=none,fill=none}},
  @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}},
  titlerule style/.style={%
    underlay={\iftcb@hasTitle%
      \path[draw,line width=\kvtcb@title@rule+1000sp,#1]
        ([yshift=-\kvtcb@title@rule/2]title.south west)--([yshift=-\kvtcb@title@rule/2]title.south east);
    \fi}},%
  colbacklower/.colorlet=tcbcolbacklower,%
  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@comp@arc{%
      \tcbdimto\tcb@shadow@ts{#1\dimexpr\tcb@shadow@ts}%
      \ifdim\dimexpr\tcb@outer@arc>\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax%
        \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax}%
      \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,%
    shape@of@skin=unbroken,%
    set@extensions@preframe={\kvtcb@shadow},%
    set@extensions@postframe={\tcb@draw@border@unbroken\tcb@apply@underlay\tcb@apply@overlay},%
    set@extensions@final={\tcb@apply@finish}%
  },%
  base@first/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathfirst,%
    shape@of@skin=first,%
    set@extensions@preframe={\kvtcb@shadow},%
    set@extensions@postframe={\tcb@draw@border@first\tcb@apply@underlay\tcb@apply@overlay},%
    set@extensions@final={\tcb@apply@finish}%
  },%
  base@middle/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathmiddle,%
    shape@of@skin=middle,%
    set@extensions@preframe={\kvtcb@shadow},%
    set@extensions@postframe={\tcb@draw@border@middle\tcb@apply@underlay\tcb@apply@overlay},%
    set@extensions@final={\tcb@apply@finish}%
  },%
  base@last/.style={%
    clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,%
    set@outerboundary=\tcb@boundaryframe@pathlast,%
    shape@of@skin=last,%
    set@extensions@preframe={\kvtcb@shadow},%
    set@extensions@postframe={\tcb@draw@border@last\tcb@apply@underlay\tcb@apply@overlay},%
    set@extensions@final={\tcb@apply@finish}%
  },%
}

\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,outer arc=0pt,boxsep=0pt,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0pt,%
    bottomtitle=6pt,middle=3pt}}

\tcb@new@skin{empty}{base@unbroken,%
  frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,%
  skin first=emptyfirst,skin middle=emptymiddle,skin last=emptylast}

\tcb@new@skin{emptyfirst}{base@first,%
  frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,%
  skin first=emptyfirst,skin middle=emptymiddle,skin last=emptymiddle}

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

\tcb@new@skin{emptylast}{base@last,%
  frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,%
  skin first=emptymiddle,skin middle=emptymiddle,skin last=emptylast}

\tcbset{empty/.style={skin=empty},%
  blanker/.style={empty,arc=0pt,outer arc=0pt,boxsep=0pt,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0pt,%
    bottomtitle=6pt,middle=3pt},
  blankest/.style={blanker,notitle,
    no shadow,no underlay,no overlay,no finish,no borderline},
  }

\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}%

\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}%

\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}%

\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}%

\tcbset{freelance/.style={skin=freelance},
  % for backward compatibility:
  extend freelance/.style={#1},%
  extend freelancefirst/.style={skin first is subskin of={freelancefirst}{#1}},%
  extend freelancemiddle/.style={skin middle is subskin of={freelancemiddle}{#1}},%
  extend freelancelast/.style={skin last is subskin of={freelancelast}{#1}}}

\tcb@new@skin{bicolor}{base@unbroken,%
  frame engine=path,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=path,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@path}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UT%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithtitle@path}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@path}%
    \fi\tcb@spec{}},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@path}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UR%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithouttitle@path}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@path}%
    \fi\tcb@spec{}},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=tcbcolbacklower}\else%
    \tcb@drawspec@sbs@A{fill=tcbcolbacklower}\fi\else\tcb@drawspec@LR{fill=tcbcolbacklower}\fi\tcb@spec{}},%
  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=empty,interior engine=empty,segmentation engine=empty,title engine=pathfirst,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathfirst}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UT%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithtitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathfirst}%
    \fi\tcb@spec{}},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathfirst}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UR%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithouttitle@pathfirst}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathfirst}%
    \fi\tcb@spec{}},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=tcbcolbacklower}\else%
    \tcb@drawspec@sbs@C{fill=tcbcolbacklower}\fi\else\tcb@drawspec@LS{fill=tcbcolbacklower}\fi\tcb@spec{}},%
  skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolormiddle}

\tcb@new@skin{bicolormiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathmiddle,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathmiddle}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UT%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithtitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathmiddle}%
    \fi\tcb@spec{}},%
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathmiddle}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@US%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithouttitle@pathmiddle}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathmiddle}%
    \fi\tcb@spec{}},
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=tcbcolbacklower}\else%
    \tcb@drawspec@sbs@E{fill=tcbcolbacklower}\fi\else\tcb@drawspec@LS{fill=tcbcolbacklower}\fi\tcb@spec{}},%
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolormiddle}

\tcb@new@skin{bicolorlast}{base@last,%
  frame engine=pathlast,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathlast,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathlast}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@UT%
      \else%
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithtitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithtitle@pathlast}%
    \fi\tcb@spec{}},
  interior code={%
    \iftcb@lowerseparated%
      \ifcase\tcbsegmentstate%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathlast}%
      \or%
      \tcb@spec{fill=tcbcolback}\tcb@drawspec@US%
      \else
      {\tcbset{interior style={fill=tcbcolbacklower,segmentation@style}}\tcb@drawwithouttitle@pathlast}%
      \fi%
    \else%
      {\tcb@spec{fill=tcbcolback}\tcb@drawwithouttitle@pathlast}%
    \fi\tcb@spec{}},%
  segmentation code={\iftcb@sidebyside%
    \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=tcbcolbacklower}\else%
    \tcb@drawspec@sbs@F{fill=tcbcolbacklower}\fi\else\tcb@drawspec@LR{fill=tcbcolbacklower}\fi\tcb@spec{}},%
  skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolorlast}

\tcb@new@skin{tile}{skin@bicolor,frame engine=empty,%
  skin first=tilefirst,skin middle=tilemiddle,skin last=tilelast}

\tcbset{tile/.style={skin=tile,boxrule=0pt,sharp corners,title filled,fonttitle=\bfseries}}

\tcb@new@skin{tilefirst}{skin@bicolorfirst,frame engine=empty,%
  skin first=tilefirst,skin middle=tilemiddle,skin last=tilemiddle}

\tcb@new@skin{tilemiddle}{skin@bicolormiddle,frame engine=empty,%
  skin first=tilemiddle,skin middle=tilemiddle,skin last=tilemiddle}

\tcb@new@skin{tilelast}{skin@bicolorlast,frame engine=empty,%
  skin first=tilemiddle,skin middle=tilemiddle,skin last=tilelast}

\tikzset{beamer@color/.style={fill=none,top color=tcbcolback,bottom color=tcbcolback!85!black}}

\tcb@new@skin{beamer}{base@unbroken,%
  frame engine=path,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=path,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi\tcb@spec{}},%
  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=empty,interior engine=empty,segmentation engine=empty,title engine=pathfirst,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi\tcb@spec{}},%
  skin first=beamerfirst,skin middle=beamermiddle,skin last=beamermiddle}

\tcb@new@skin{beamermiddle}{base@middle,%
  frame engine=pathmiddle,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathmiddle,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi\tcb@spec{}},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamermiddle}

\tcb@new@skin{beamerlast}{base@last,%
  frame engine=pathlast,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathlast,%
  interior titled code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},%
  interior code={%
    \iftcb@lowerseparated%
      \ifnum\tcbsegmentstate=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\tcb@spec{}},
  segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi\tcb@spec{}},%
  skin first=beamermiddle,skin middle=beamermiddle,skin last=beamerlast}

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

\tikzset{widget@color/.style={left color=tcbcolframe!75!white,right color=tcbcolframe!75!white!25!tcbcolback}}

\tcb@new@skin{widget}{base@unbroken,%
  frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=empty,title engine=empty,%
  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=empty,title engine=empty,%
  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=empty,title engine=empty,%
  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=empty,title engine=empty,%
  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=true,shape@of@skin=unbroken,%
  set@extensions@preframe=,set@extensions@postframe={\tcb@apply@underlay},set@extensions@final=,%
  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,shape@of@skin=unbroken,%
  frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=path,title empty,%
  segmentation style={draw=black,dashed},
  set@extensions@postframe=,
  set@extensions@final={\tcb@apply@finish},no finish,%
  colupper=black!50!white,collower=black!50!white,coltitle=black!50!white,
  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\tcbsegmentstate
      \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}
  },
  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%
    \tcb@interiortitled@code%
  \else%
    \tcb@interior@code%
  \fi%
  \endgroup%
}

\def\tcb@clip@title{%
  \begingroup%
  \tcbset{title hidden}%
  \tcb@spec{tcb@forced@clip}%
  \def\tcb@spec##1{}%
    \iftcb@hasTitle%
      \tcb@title@code%
    \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}}

\def\tcb@apply@underlay{\csname tcb@underlay@\tcb@split@state\endcsname}%
\def\tcb@apply@finish{\csname tcb@finish@\tcb@split@state\endcsname}%

\tcbset{%
  underlay unbroken/.code={\appto\tcb@underlay@unbroken{#1}},%
  underlay first/.code={\appto\tcb@underlay@first{#1}},%
  underlay middle/.code={\appto\tcb@underlay@middle{#1}},%
  underlay last/.code={\appto\tcb@underlay@last{#1}},%
  underlay boxed title/.code={\appto\tcb@underlay@boxedtitle{#1}},%
  underlay/.style={underlay unbroken={#1},underlay first={#1},underlay middle={#1},underlay last={#1}},%
  underlay broken/.style={underlay first={#1},underlay middle={#1},underlay last={#1}},%
  underlay unbroken and first/.style={underlay unbroken={#1},underlay first={#1}},%
  underlay unbroken and last/.style={underlay unbroken={#1},underlay last={#1}},%
  underlay middle and last/.style={underlay middle={#1},underlay last={#1}},%
  underlay first and middle/.style={underlay first={#1},underlay middle={#1}},%
  no underlay unbroken/.code={\let\tcb@underlay@unbroken\@empty},%
  no underlay first/.code={\let\tcb@underlay@first\@empty},%
  no underlay middle/.code={\let\tcb@underlay@middle\@empty},%
  no underlay last/.code={\let\tcb@underlay@last\@empty},%
  no underlay boxed title/.code={\let\tcb@underlay@boxedtitle\@empty},%
  no underlay/.style={no underlay unbroken,no underlay first,no underlay middle,no underlay last,no underlay boxed title},%
  finish unbroken/.code={\appto\tcb@finish@unbroken{#1}},%
  finish first/.code={\appto\tcb@finish@first{#1}},%
  finish middle/.code={\appto\tcb@finish@middle{#1}},%
  finish last/.code={\appto\tcb@finish@last{#1}},%
  finish/.style={finish unbroken={#1},finish first={#1},finish middle={#1},finish last={#1}},%
  finish broken/.style={finish first={#1},finish middle={#1},finish last={#1}},%
  finish unbroken and first/.style={finish unbroken={#1},finish first={#1}},%
  finish unbroken and last/.style={finish unbroken={#1},finish last={#1}},%
  finish middle and last/.style={finish middle={#1},finish last={#1}},%
  finish first and middle/.style={finish first={#1},finish middle={#1}},%
  no finish unbroken/.code={\let\tcb@finish@unbroken\@empty},%
  no finish first/.code={\let\tcb@finish@first\@empty},%
  no finish middle/.code={\let\tcb@finish@middle\@empty},%
  no finish last/.code={\let\tcb@finish@last\@empty},%
  no finish/.style={no finish unbroken,no finish first,no finish middle,no finish last},%
}

\def\tcb@trans@set@boxedsize@copy@top{%
  \begingroup\edef\x{\endgroup\noexpand\def\noexpand\tcb@trans@boxedsize{%
    leftrule=\kvtcb@left@rule,rightrule=\kvtcb@right@rule,
    toprule=\kvtcb@top@rule@stand,bottomrule=\kvtcb@title@rule,
    boxsep=\kvtcb@boxsep,leftupper=\kvtcb@lefttitle,rightupper=\kvtcb@righttitle,
    top=\kvtcb@toptitle,bottom=\kvtcb@bottomtitle,arc=\kvtcb@arc,
    sharp corners=south,
  }}\x}%
\def\tcb@trans@set@boxedsize@copy@bottom{%
  \begingroup\edef\x{\endgroup\noexpand\def\noexpand\tcb@trans@boxedsize{%
    leftrule=\kvtcb@left@rule,rightrule=\kvtcb@right@rule,
    toprule=\kvtcb@title@rule,bottomrule=\kvtcb@bottom@rule@stand,
    boxsep=\kvtcb@boxsep,leftupper=\kvtcb@lefttitle,rightupper=\kvtcb@righttitle,
    top=\kvtcb@toptitle,bottom=\kvtcb@bottomtitle,arc=\kvtcb@arc,
    sharp corners=north,
  }}\x}%

\tcbset{%
  boxed title size/.is choice,
  boxed title size/standard/.code={\def\tcb@trans@set@boxedsize##1{\let\tcb@trans@boxedsize\@empty}},
  boxed title size/title/.code={\def\tcb@trans@set@boxedsize##1{\def\tcb@trans@boxedsize{size=title}}},
  boxed title size/copy/.code={\def\tcb@trans@set@boxedsize##1{%
    \ifstrequal{##1}{top}{\tcb@trans@set@boxedsize@copy@top}{\tcb@trans@set@boxedsize@copy@bottom}}},
  before@boxed@title/.store in=\kvtcb@before@boxedtitle,%
  after@boxed@title/.store in=\kvtcb@after@boxedtitle,%
  boxed title style/.code={\appto\kvtcb@style@boxedtitle{,#1}},%
  no boxed title style/.code={\let\kvtcb@style@boxedtitle\@empty},%
  %
  varwidth boxed title/.style={before@boxed@title={\tcbdimto\tcb@w@title{#1}\begin{varwidth}{\tcb@w@title}},after@boxed@title={\end{varwidth}}},%
  varwidth boxed title/.default={\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)},
  varwidth boxed title*/.style={varwidth boxed title={\kvtcb@width+#1}},
  varwidth boxed title*/.default={0pt-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)},
  %
  minipage boxed title/.style={before@boxed@title={\tcbdimto\tcb@w@title{#1}\begin{minipage}{\tcb@w@title}},after@boxed@title={\end{minipage}}},%
  minipage boxed title/.default={\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)},
  minipage boxed title*/.style={minipage boxed title={\kvtcb@width+#1}},
  minipage boxed title*/.default={0pt-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)},
  %
  tikznode boxed title/.style={before@boxed@title={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after@boxed@title={\egroup;\end{tikzpicture}}},%
  hbox boxed title/.style={before@boxed@title=,after@boxed@title=},%
  %
  boxtitle/xshift/.dimstore in=\kvtcb@xshift@boxedtitle,%
  boxtitle/yshift/.dimstore in=\kvtcb@yshift@boxedtitle,%
  boxtitle/yshifttext/.dimstore in=\kvtcb@yinnershift@boxedtitle,%
  %
  boxtitle/yshift*@top/.style={yshift*/.code={%
    \tcbdimto\kvtcb@yshift@boxedtitle{##1}%
    \tcbdimto\kvtcb@yinnershift@boxedtitle{\kvtcb@yshift@boxedtitle+\kvtcb@top@rule@stand}%
    \ifdim\dimexpr\kvtcb@yinnershift@boxedtitle>0pt\relax\let\kvtcb@yinnershift@boxedtitle\tcb@zpt\fi%
  }},
  boxtitle/yshift*@bottom/.style={yshift*/.code={%
    \tcbdimto\kvtcb@yshift@boxedtitle{##1}%
    \tcbdimto\kvtcb@yinnershift@boxedtitle{\kvtcb@yshift@boxedtitle-\kvtcb@bottom@rule@stand}%
    \ifdim\dimexpr\kvtcb@yinnershift@boxedtitle<0pt\relax\let\kvtcb@yinnershift@boxedtitle\tcb@zpt\fi%
  }},
  boxtitle/adapt@top/.code={%
    \ifdim\dimexpr\tcboxedtitleheight+\kvtcb@yshift@boxedtitle>0pt\relax
      \tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand+\tcboxedtitleheight+\kvtcb@yshift@boxedtitle}%
    \fi%
    \tcbdimto\kvtcb@top{\kvtcb@top-\kvtcb@yinnershift@boxedtitle}%
  },
  boxtitle/adapt@bottom/.code={%
    \ifdim\dimexpr\tcboxedtitleheight-\kvtcb@yshift@boxedtitle>0pt\relax
      \tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand+\tcboxedtitleheight-\kvtcb@yshift@boxedtitle}%
    \fi%
    \tcbdimto\kvtcb@bottom{\kvtcb@bottom+\kvtcb@yinnershift@boxedtitle}%
  },
  attach@title@boxed/.style n args={5}{%
    detach title,
    code={\def\tcb@specialtitle@hook{%
      \ifx\tcbtitletext\@empty\else%
      \tcb@trans@set@boxedsize{#2}%
      \colorlet{tcbtranscol@frame}{tcbcolframe}%
      \colorlet{tcbtranscol@back}{tcbcolbacktitle}%
      \let\tcb@trans@skin@current\kvtcb@skin@current%
      \let\tcb@trans@boxedstyle\kvtcb@style@boxedtitle%
      \setbox\tcb@titlebox\color@hbox\bgroup\color{tcbcoltitle}\kvtcb@fonttitle\kvtcb@before@boxedtitle\kvtcb@haligntitle\kvtcb@before@title\tcbtitletext\kvtcb@after@title\kvtcb@after@boxedtitle\egroup\color@endbox%
      \setbox\tcb@titlebox\color@hbox\tcbox[skin=\tcb@trans@skin@current,colframe=tcbtranscol@frame,colback=tcbtranscol@back,%
        code={\pgfkeysalsofrom\tcb@trans@boxedsize\pgfkeysalsofrom\tcb@trans@boxedstyle}]{\box\tcb@titlebox}\color@endbox%
      %
      \tcbdimto\tcboxedtitleheight{\ht\tcb@titlebox+\dp\tcb@titlebox}%
      \tcbdimto\tcboxedtitlewidth{\wd\tcb@titlebox}%
      \tcbset{boxtitle/.cd,xshift=0pt,yshift=0pt,yshifttext=0pt,yshift*@#2,#1,adapt@#2}%
      \let\tcb@specialgeonodes@first\relax%
      \let\tcb@specialgeonodes@middle\relax%
      \let\tcb@specialgeonodes@last\relax%
      \def\tcb@specialgeonodes@unbroken{%
        \node[#4,name=title,at={([xshift=\kvtcb@xshift@boxedtitle,yshift=\kvtcb@yshift@boxedtitle]frame.#5)},
                minimum width=\tcboxedtitlewidth,minimum height=\tcboxedtitleheight]{};}%
      \cslet{tcb@specialgeonodes@#3}{\tcb@specialgeonodes@unbroken}%
      \def\tcb@specialgeonodes@hook{\csname tcb@specialgeonodes@\tcb@split@state\endcsname}%
      \preto\tcb@underlay@unbroken{\tcb@underlay@boxedtitle\pgftext[at={\pgfpointanchor{title}{center}}]{\box\tcb@titlebox}}%
      \cspreto{tcb@underlay@#3}{\tcb@underlay@boxedtitle\pgftext[at={\pgfpointanchor{title}{center}}]{\box\tcb@titlebox}}%
      \fi}}%
    },
  attach@title@boxed@top/.style n args={3}{attach@title@boxed={#1}{top}{first}{#2}{#3}},%
  attach@title@boxed@bottom/.style n args={3}{attach@title@boxed={#1}{bottom}{last}{#2}{#3}},%
  %
  attach boxed title to top left/.style={attach@title@boxed@top={#1}{above right}{north west}},
  attach boxed title to top center/.style={attach@title@boxed@top={#1}{above}{north}},
  attach boxed title to top right/.style={attach@title@boxed@top={#1}{above left}{north east}},
  attach boxed title to bottom left/.style={attach@title@boxed@bottom={#1}{below right}{south west}},
  attach boxed title to bottom center/.style={attach@title@boxed@bottom={#1}{below}{south}},
  attach boxed title to bottom right/.style={attach@title@boxed@bottom={#1}{below left}{south east}},
  reduce@vertical@rules/.code={%
    \ifdim\dimexpr\kvtcb@left@rule<\dimexpr\kvtcb@right@rule\relax%
      \tcbdimto\tcb@temp{\kvtcb@left@rule/2}%
    \else%
      \tcbdimto\tcb@temp{\kvtcb@right@rule/2}%
    \fi%
    \tcbset{leftrule/.expanded=\the\dimexpr\kvtcb@left@rule-\tcb@temp\relax,
      rightrule/.expanded=\the\dimexpr\kvtcb@right@rule-\tcb@temp\relax}%
  },
  attach boxed title to bottom/.style={%
    attach boxed title to bottom center={yshift*=\tcboxedtitleheight,#1},
    minipage boxed title,boxed title size=copy,
  },
  attach boxed title to bottom*/.style={%
    attach boxed title to bottom={#1},
    boxed title style={reduce@vertical@rules},
  },
  attach boxed title to top/.style={%
    attach boxed title to top center={yshift*=-\tcboxedtitleheight,#1},
    minipage boxed title,boxed title size=copy,
  },
  attach boxed title to top*/.style={%
    attach boxed title to top={#1},
    boxed title style={reduce@vertical@rules},
  },
  flip title/.style={attach boxed title to bottom,
    boxed title style={reduce@vertical@rules,#1}},
}


\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=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox%
  \tcb@drawspec@watermark%
}

\def\tcb@drawspec@watermark@graphics#1{%
  \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\includegraphics{#1}}\endpgfinterruptpicture\color@endbox%
  \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={border@line app={%
    \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}%
  \pgfsetstrokeopacity{\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@ppbb@textbox#1{\pgftext[x=\the\dimexpr\pgf@xa+\tcb@ppbb@width/2\relax,y=\pgf@ya+\tcb@ppbb@height/2]{#1}}

\def\tcb@set@waterbox@to@graphics#1{%
  \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture%
    \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}%
    \endpgfinterruptpicture\color@endbox%
}

\def\tcb@set@waterbox@to@picture#1{%
  \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox%
}

\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={%
    \tcb@process@ppbb@wh%
    \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}}%
  }},
  fill plain picture/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@set@waterbox@to@picture{#1}%
    \tcb@ppbb@textbox{\box\tcb@waterbox}%
  }},
  fill stretch image/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\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]}\x{#1}}%
  }},
  fill stretch picture/.style={path picture={%
    \tcb@process@ppbb@wh%
    \tcb@set@waterbox@to@picture{#1}%
    \tcb@comp@waterbox@stretch{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}%
  }},
  fill@overzoom/.style={path picture={%
    \tcb@process@ppbb@wh%
    #1%
    \tcb@comp@waterbox@overzoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}%
  }},
  fill overzoom image/.style={fill@overzoom={\tcb@set@waterbox@to@graphics{#1}}},%
  fill overzoom picture/.style={fill@overzoom={\tcb@set@waterbox@to@picture{#1}}},%
  fill@zoom/.style={path picture={%
    \tcb@process@ppbb@wh%
    #1%
    \tcb@comp@waterbox@zoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}%
  }},
  fill zoom image/.style={fill@zoom={\tcb@set@waterbox@to@graphics{#1}}},%
  fill zoom picture/.style={fill@zoom={\tcb@set@waterbox@to@picture{#1}}},%
  fill@shrink/.style={path picture={%
    \tcb@process@ppbb@wh%
    #1%
    \tcb@comp@waterbox@shrink{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}%
    \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}%
  }},
  fill shrink image/.style={fill@shrink={\tcb@set@waterbox@to@graphics{#1}}},%
  fill shrink picture/.style={fill@shrink={\tcb@set@waterbox@to@picture{#1}}},%
  fill@tile/.style={path picture={%
    \tcb@process@ppbb%
    #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 tile image/.style={fill@tile={\tcb@set@waterbox@to@graphics{#1}}},%
  fill tile picture/.style={fill@tile={\tcb@set@waterbox@to@picture{#1}}},%
  fill tile picture*/.style 2 args={fill@tile={\tcb@set@waterbox@to@picture{#2}%
    \setbox\tcb@waterbox=\color@hbox\scalebox{#1}{\box\tcb@waterbox}\color@endbox}},%
  %
  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=tcbcolframe,bottom color=tcbcolframe,middle color=yellow!75!tcbcolframe},
  title style={left color=tcbcolframe,right color=tcbcolframe,middle color=yellow!75!tcbcolframe},
  watermark tikz={\draw[line width=2mm] circle (1cm) node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont!};},
  watermark zoom=0.75,
}}


\def\tcb@arc@bor{\pgfsetcornersarced{\pgfqpoint{\tcb@border@arc}{\tcb@border@arc}}}%

\def\tcb@arc@bor@NW{\csname tcb@arc@bor@NW@\tcb@corner@mode@NW\endcsname}
\def\tcb@arc@bor@NE{\csname tcb@arc@bor@NE@\tcb@corner@mode@NE\endcsname}
\def\tcb@arc@bor@SW{\csname tcb@arc@bor@SW@\tcb@corner@mode@SW\endcsname}
\def\tcb@arc@bor@SE{\csname tcb@arc@bor@SE@\tcb@corner@mode@SE\endcsname}

\let\tcb@arc@bor@NW@sharp\tcb@arc@zpt
\let\tcb@arc@bor@NE@sharp\tcb@arc@zpt
\let\tcb@arc@bor@SW@sharp\tcb@arc@zpt
\let\tcb@arc@bor@SE@sharp\tcb@arc@zpt

\let\tcb@arc@bor@NW@rounded\tcb@arc@bor
\let\tcb@arc@bor@NE@rounded\tcb@arc@bor
\let\tcb@arc@bor@SW@rounded\tcb@arc@bor
\let\tcb@arc@bor@SE@rounded\tcb@arc@bor

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

\def\tcb@border@unbroken#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \tcb@pathbase{draw,line width=#1,#3}{[xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west}%
    {[xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east}%
    {\tcb@arc@bor@SW}{\tcb@arc@bor@NW}{\tcb@arc@bor@NE}{\tcb@arc@bor@SE}%
}

\def\tcb@border@first#1#2#3{%
  \tcb@border@prepare{#1}{#2}%
  \tcb@pathboundary{draw,line width=#1,#3}{%
    \tcb@gettikzxy{([xshift=\tcb@border@ts]frame.south west)}{\tcb@xa}{\tcb@ya}%
    \tcb@gettikzxy{([xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east)}{\tcb@xb}{\tcb@yb}%
    \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}%
    \tcb@arc@bor@NW\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}%
    \tcb@arc@bor@NE\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}%
    \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}%
  }%
}

\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}%
  \tcb@pathboundary{draw,line width=#1,#3}{%
    \tcb@gettikzxy{([xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west)}{\tcb@xa}{\tcb@ya}%
    \tcb@gettikzxy{([xshift=-\tcb@border@ts]frame.north east)}{\tcb@xb}{\tcb@yb}%
    \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@yb}}%
    \tcb@arc@bor@SW\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}%
    \tcb@arc@bor@SE\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}%
    \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}%
  }%
}

\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%
}

\def\tcb@bordernorth@draw#1#2#3{%
  \tcbdimto\tcb@border@ts{#2+(#1)/2}%
  \draw[line width=#1,#3] ([yshift=-\tcb@border@ts]frame.north west) -- ([yshift=-\tcb@border@ts]frame.north east);%
}

\def\tcb@bordernorth#1#2#3{%
  \ifdefstring{\tcb@split@state}{unbroken}{\tcb@bordernorth@draw{#1}{#2}{#3}}{%
    \ifdefstring{\tcb@split@state}{first}{\tcb@bordernorth@draw{#1}{#2}{#3}}{}}%
}

\def\tcb@bordersouth@draw#1#2#3{%
  \tcbdimto\tcb@border@ts{#2+(#1)/2}%
  \draw[line width=#1,#3] ([yshift=\tcb@border@ts]frame.south west) -- ([yshift=\tcb@border@ts]frame.south east);%
}

\def\tcb@bordersouth#1#2#3{%
  \ifdefstring{\tcb@split@state}{unbroken}{\tcb@bordersouth@draw{#1}{#2}{#3}}{%
    \ifdefstring{\tcb@split@state}{last}{\tcb@bordersouth@draw{#1}{#2}{#3}}{}}%
}

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

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

\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{}},%
  borderline north/.style args={#1#2#3}{border@line app={\tcb@bordernorth{#1}{#2}{#3}}},%
  borderline south/.style args={#1#2#3}{border@line app={\tcb@bordersouth{#1}{#2}{#3}}},%
  borderline west/.style args={#1#2#3}{border@line app={\tcb@borderwest{#1}{#2}{#3}}},%
  borderline east/.style args={#1#2#3}{border@line app={\tcb@bordereast{#1}{#2}{#3}}},%
  borderline horizontal/.style args={#1#2#3}{borderline north={#1}{#2}{#3},borderline south={#1}{#2}{#3}},%
  borderline vertical/.style args={#1#2#3}{borderline west={#1}{#2}{#3},borderline east={#1}{#2}{#3}},%
}


\def\tcb@shadow@comp@ts@smart#1#2{%
  \ifdim#2>0pt\relax\tcbdimto\tcb@shadow@ts{#1-#2/2}%%
  \else\tcbdimto\tcb@shadow@ts{#1+#2/2}\fi%
}

\def\tcb@shadow@comp@ts@copy#1#2{%
  \tcbdimto\tcb@shadow@ts{#1}%
}

\def\tcb@shadow@comp@arc{%
  \ifdim\dimexpr\tcb@outer@arc>\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax%
    \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax}%
  \else%
    \let\tcb@shadow@arc=\tcb@zpt%
  \fi%
}

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

\def\tcb@arc@sha@NW{\csname tcb@arc@sha@NW@\tcb@corner@mode@NW\endcsname}
\def\tcb@arc@sha@NE{\csname tcb@arc@sha@NE@\tcb@corner@mode@NE\endcsname}
\def\tcb@arc@sha@SW{\csname tcb@arc@sha@SW@\tcb@corner@mode@SW\endcsname}
\def\tcb@arc@sha@SE{\csname tcb@arc@sha@SE@\tcb@corner@mode@SE\endcsname}

\let\tcb@arc@sha@NW@sharp\tcb@arc@zpt
\let\tcb@arc@sha@NE@sharp\tcb@arc@zpt
\let\tcb@arc@sha@SW@sharp\tcb@arc@zpt
\let\tcb@arc@sha@SE@sharp\tcb@arc@zpt

\let\tcb@arc@sha@NW@rounded\tcb@arc@sha
\let\tcb@arc@sha@NE@rounded\tcb@arc@sha
\let\tcb@arc@sha@SW@rounded\tcb@arc@sha
\let\tcb@arc@sha@SE@rounded\tcb@arc@sha

\def\tcb@shadow@unbroken#1#2#3#4{%
  \tcb@shadow@comp@ts{#3}{#1}%
  \tcb@shadow@comp@arc%
  \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@SW}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@sha@SE}%
}

\def\tcb@shadow@first#1#2#3#4{%
  \tcb@shadow@comp@ts{#3}{#1}%
  \tcb@shadow@comp@arc%
  \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@NW}{\tcb@arc@sha@NE}{\tcb@arc@zpt}%
}

\def\tcb@shadow@middle#1#2#3#4{%
  \tcb@shadow@comp@ts{#3}{#1}%
  \tcb@shadow@comp@arc%
  \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@comp@ts{#3}{#1}%
  \tcb@shadow@comp@arc%
  \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@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha@SE}%
}


\tcbset{%
  shad@w app/.code={\appto\kvtcb@shadow{#1}},%
  shadow/.style args={#1#2#3#4}{shad@w app={\csuse{tcb@shadow@\tcb@shapeofskin}{#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]%
      \letcs\tcb@shadow{tcb@shadow@\tcb@shapeofskin}%
      \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},%
  %
  smart shadow arc/.is choice,
  smart shadow arc/true/.code={\let\tcb@shadow@comp@ts=\tcb@shadow@comp@ts@smart},
  smart shadow arc/false/.code={\let\tcb@shadow@comp@ts=\tcb@shadow@comp@ts@copy},
  smart shadow arc/.default=true,
}

\def\tcb@boundary@tikzbendedbase#1#2#3#4#5#6#7#8{%
  \tcb@gettikzxy{(#1)}{\tcb@xa}{\tcb@ya}%
  \tcb@gettikzxy{(#2)}{\tcb@xb}{\tcb@yb}%
  \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@yb}}%
  #5\pgfpathquadraticcurveto{\pgfqpoint{\dimexpr0.5\dimexpr\tcb@xa+\tcb@xb\relax}{\dimexpr\tcb@yb+#8}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}%
  #6\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}%
  #3\pgfpathquadraticcurveto{\pgfqpoint{\dimexpr0.5\dimexpr\tcb@xa+\tcb@xb\relax}{\dimexpr\tcb@ya+#7}}{\pgfqpoint{\tcb@xa}{\tcb@ya}}%
  #4\pgfpathclose%
}

\def\tcb@pathbendedbase#1#2#3#4#5#6#7#8#9{\tcb@pathboundary{#1}{\tcb@boundary@tikzbendedbase{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}}

\def\tcb@shadowbended@prepare#1{%
  \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr#1\relax}%
  \ifdim\dimexpr\tcb@shadow@arc<0pt\relax%
    \let\tcb@shadow@arc=\tcb@zpt%
  \fi%
}

\def\tcb@shadowlifted@unbroken#1#2#3#4#5{%
  \tcb@shadowbended@prepare{#3}%
  \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@sha@SW}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@sha@SE}{#4}{0pt}%
}

\def\tcb@shadowlifted@first#1#2#3#4#5{%
  \tcb@shadowbended@prepare{#3}%
  \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@zpt}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@zpt}{#4}{0pt}%
}

\def\tcb@shadowlifted@middle#1#2#3#4#5{%
  \tcb@shadowbended@prepare{#3}%
  \tcb@pathbendedbase{fill,#5}{[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}{#4}{0pt}%
}

\def\tcb@shadowlifted@last#1#2#3#4#5{%
  \tcb@shadowbended@prepare{#3}%
  \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}%
    {\tcb@arc@sha@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha@SE}{#4}{0pt}%
}

\tcbset{
  lifted shadow/.style n args={5}{shad@w app={%
    \begin{scope}[#5]%
      \letcs\tcb@shadowlifted{tcb@shadowlifted@\tcb@shapeofskin}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr-4\dimexpr#4}{#3}{opacity=0.01}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr-3\dimexpr#4}{#3}{opacity=0.02}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr-2\dimexpr#4}{#3}{opacity=0.04}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr-#4}{#3}{opacity=0.07}%
      \tcb@shadowlifted{#1}{#2}{0pt}{#3}{opacity=0.11}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr+#4}{#3}{opacity=0.11}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr+2\dimexpr#4}{#3}{opacity=0.07}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr+3\dimexpr#4}{#3}{opacity=0.04}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr+4\dimexpr#4}{#3}{opacity=0.02}%
      \tcb@shadowlifted{#1}{#2}{\dimexpr+5\dimexpr#4}{#3}{opacity=0.01}%
  \end{scope}}},%
  drop small lifted shadow/.style={lifted shadow={1mm}{-0.75mm}{1.3mm}{0.1mm}{#1}},
  drop small lifted shadow/.default={black!50!white},%
  drop lifted shadow/.style={lifted shadow={1.5mm}{-1.5mm}{2.7mm}{0.12mm}{#1}},
  drop lifted shadow/.default={black!50!white},%
  drop large lifted shadow/.style={lifted shadow={2mm}{-3mm}{5.7mm}{0.16mm}{#1}},
  drop large lifted shadow/.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,%
}


\def\tcb@include@graphics{%
  \let\tcb@graphics@options\kvtcb@graphics@options%
  \ifnum\kvtcb@graphics@orientation>-1\relax%
    \setbox\tcb@waterbox=\color@hbox\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}\x{\imagepath}\color@endbox%
    \ifcase\kvtcb@graphics@orientation\relax%
      \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax%
        \appto\tcb@graphics@options{,angle=90}%
      \fi%
    \or%
      \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax%
        \appto\tcb@graphics@options{,angle=-90}%
      \fi%
    \or%
      \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax%
        \appto\tcb@graphics@options{,angle=90}%
      \fi%
    \or%
      \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax%
        \appto\tcb@graphics@options{,angle=-90}%
      \fi%
    \fi%
  \fi%
  \ifdefstring{\kvtcb@capture}{hbox}{%
    \tcbox{%
      \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}%
      \x{\imagepath}%
    }%
  }{%
    \iftcb@fixedheight%
      \begin{tcolorbox}%
        \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth,height=\tcbtextheight,keepaspectratio]}%
        \x{\imagepath}%
      \end{tcolorbox}%
    \else%
      \ifdefempty\tcb@height@adjust{%
        \begin{tcolorbox}%
          \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth]}%
          \x{\imagepath}%
        \end{tcolorbox}%
      }{% height fill
        \begin{tcolorbox}[underlay={%
          \begin{tcbclipinterior}%
          \path[fill zoom image*={\tcb@graphics@options}{\imagepath}]
            ([xshift=\kvtcb@boxsep+\kvtcb@leftupper,yshift=\kvtcb@boxsep+\kvtcb@bottom]interior.south west) rectangle
            ([xshift=-\kvtcb@boxsep-\kvtcb@rightupper,yshift=-\kvtcb@boxsep-\kvtcb@top]interior.north east);
          \end{tcbclipinterior}%
          }]%
        \end{tcolorbox}%
      }%
    \fi%
  }%
}

\def\tcb@scanfilename#1#2{%
  \begingroup%
    \everyeof{\noexpand}%
    \endlinechar -1%
    \catcode`\_=11%
    \catcode`\~=11%
    \edef\x{\scantokens\expandafter{#2}}%
  \expandafter\endgroup%
  \expandafter\def\expandafter #1\expandafter{\x}%
}%


\def\tcb@include@graphics@preparefile#1{%
  \tcb@scanfilename\tcb@temp{#1}%
  \filename@parse{\tcb@temp}%
  \ifx\filename@ext\relax%
    \let\imagename\filename@base%
  \else%
    \def\imagename{\filename@base\Gin@sepdefault\filename@ext}%
  \fi%
  \ifdefined\grffile@Ginclude@graphics%
    % grffile package loaded
    \ifx\kvtcb@graphics@directory\@empty%
      \def\imagepath{#1}%
    \else%
      \def\imagepath{\kvtcb@graphics@directory/#1}%
    \fi%
  \else%
    \ifx\kvtcb@graphics@directory\@empty%
      \edef\imagepath{#1}%
    \else%
      \edef\imagepath{\kvtcb@graphics@directory/#1}%
    \fi%
  \fi%
}

\newcommand{\tcbincludegraphics}[2][]{%
  \begingroup%
  \tcb@layer@pushup%
  \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}%
  \tcb@include@graphics@preparefile{#2}%
  \edef\imagepage{1}%
  \tcb@include@graphics%
  \endgroup%
}

\def\tcb@set@pdfpages#1#2{%
  \IfFileExists{#2}{%
    \ifdef{\pdfximage}{%
      \pdfximage{#2}%
      \edef#1{\the\pdflastximagepages}%
    }{%
      \ifdef{\XeTeXpdfpagecount}{%
        \edef#1{\the\XeTeXpdfpagecount #2 }%
        \ifnum#1=0 %
          \edef#1{1}%
        \fi%
      }{\tcb@error{For PDF support run pdflatex, xelatex, or lualatex}{%
        Your compiler seems not to support PDF include files.}}%
    }%
  }{\tcb@error{PDF file `#2' not found}{The PDF file `#2' was not found}}%
  \relax%
}

\newcommand{\tcbincludepdf}[2][]{%
  \begingroup%
  \tcb@layer@pushup%
  \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}%
  \appto\kvtcb@graphics@options{,page=\imagepage}%
  \tcb@include@graphics@preparefile{#2}%
  \tcb@set@pdfpages\pdfpages{\imagepath}%
  \foreach \imagepage in \kvtcb@graphics@pages%
  {%
    \tcb@include@graphics%
  }%
  \endgroup%
}

\tcbset{%
  graphics options/.store in=\kvtcb@graphics@options,
  graphics pages/.store in=\kvtcb@graphics@pages,
  graphics directory/.store in=\kvtcb@graphics@directory,
  graphics orientation/.is choice,
  graphics orientation/as-is/.code={\def\kvtcb@graphics@orientation{-1}},
  graphics orientation/landscape/.code={\def\kvtcb@graphics@orientation{0}},
  graphics orientation/landscape*/.code={\def\kvtcb@graphics@orientation{1}},
  graphics orientation/portrait/.code={\def\kvtcb@graphics@orientation{2}},
  graphics orientation/portrait*/.code={\def\kvtcb@graphics@orientation{3}},
}

\newcommand{\tcbhypernode}[2]{\ifdefined\hypersetup\@ifundefined{pgf@sh@ns@#2}{}{%
  \node[inner sep=0pt,outer sep=0pt] at (#2.center){%
    \tcbsetmacrotowidthofnode\tcb@w@hn{#2}%
    \tcbsetmacrotoheightofnode\tcb@h@hn{#2}%
    \hypersetup{pdfborder=0 0 0}%
    #1{\vtop to \dimexpr\tcb@h@hn-2bp\relax{\hbox to \dimexpr\tcb@w@hn-2bp\relax{}\vfil}}%
  };%
}\fi}

\tcbset{%
  hyperref node/.style 2 args={finish={\tcbhypernode{\hyperref[#1]}{#2}}},
  hyperref/.style={hyperref node={#1}{frame}},
  hyperref interior/.style={hyperref node={#1}{interior}},
  hyperref title/.style={hyperref node={#1}{title}},
  hyperlink node/.style 2 args={finish={\tcbhypernode{\hyperlink{#1}}{#2}}},
  hyperlink/.style={hyperlink node={#1}{frame}},
  hyperlink interior/.style={hyperlink node={#1}{interior}},
  hyperlink title/.style={hyperlink node={#1}{title}},
  hyperurl node/.style 2 args={finish={\tcbhypernode{\href{#1}}{#2}}},
  hyperurl/.style={hyperurl node={#1}{frame}},
  hyperurl interior/.style={hyperurl node={#1}{interior}},
  hyperurl title/.style={hyperurl node={#1}{title}},
  hyperurl* node/.style n args={3}{finish={\tcbhypernode{\href[#1]{#2}}{#3}}},
  hyperurl*/.style 2 args={hyperurl* node={#1}{#2}{frame}},
  hyperurl* interior/.style 2 args={hyperurl* node={#1}{#2}{interior}},
  hyperurl* title/.style 2 args={hyperurl* node={#1}{#2}{title}},
  beamer hidden/.style={nirvana},
  beamer alerted/.style={fuzzy halo},
  only/.code args={<#1>#2}{\only<#1>{\tcbset{#2}}},%
  hide/.code args={<#1>}{\only<#1>{\tcbset{beamer hidden}}},%
  alert/.code args={<#1>}{\only<#1>{\tcbset{beamer alerted}}},%
}

\tcbset{%
  reset@skins/.style={%
    frame style=,interior style=,segmentation style=,@title style=,%
    colbacklower=black!15!white,%
    extend freelance=,extend freelancefirst=,extend freelancemiddle=,extend freelancelast=,%
    clear@spec,%
    watermark opacity=1.00,watermark color=tcbcolback!85!tcbcolframe,%
    watermark zoom=0.75,clip watermark,%
    clip title=false,clip upper=false,clip lower=false,%
    no borderline,smart shadow arc,no shadow,no underlay,no finish,tikz reset,at begin tikz reset,at end tikz reset,%
    boxed title size=title,no boxed title style,hbox boxed title,code={\let\tcb@specialgeonodes@hook\relax},%
    graphics options=,graphics pages={1,...,\pdfpages},graphics directory=,graphics orientation=as-is,%
  },
  initialize@reset=reset@skins,
}

\tcbuselibrary{skins@jigsaw}
