%% The LaTeX package tcolorbox - version 2.80 (2014/03/31)
%% tcbbreakable.code.tex: Code for breakable colorboxes
%%
%% -------------------------------------------------------------------------------------------
%% 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}

\let\tcb@parboxrestore@true=\tcb@parboxrestore
\def\tcb@parboxrestore@false{\vskip-\parskip\linewidth\hsize}

\def\tcb@vbox#1#2{%
  \edef\reserved@a{%
    \endgroup%
    \setbox#1\vbox{\hsize=#2%
      \begingroup\aftergroup}%
      \def\noexpand\@currenvir{\@currenvir}%
      \def\noexpand\@currenvline{\on@line}}%
  \reserved@a%
  \@endpefalse%
  \color@begingroup%
  \textwidth\hsize%
  \columnwidth\hsize%
  \csname tcb@parboxrestore@\kvtcv@parbox\endcsname%
  \def\@mpfn{mpfootnote}%
  \def\thempfn{\thempfootnote}%
  \c@mpfootnote\z@%
  \let\@footnotetext\@mpfootnotetext%
  \@setminipage\tcb@hyph@fix%
  \ignorespaces%
  \let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone%
  }

\def\endtcb@vbox{%
  \par%
  \unskip%
  \ifvoid\@mpfootins\else%
    \vskip\skip\@mpfootins%
    \normalcolor%
    \footnoterule%
    \unvbox\@mpfootins%
  \fi%
  \@minipagefalse%
  \color@endgroup}

% remaining height
\def\tcb@comp@h@page{%
  \ifx\kvtcb@float\@empty%
    \ifdim\pagegoal=16383.99998pt
      \tcbdimto\tcb@h@page{\textheight-\kvtcb@shrinkbreakgoal}%
    \else
      \tcbdimto\tcb@h@page{\pagegoal-\pagetotal-\pageshrink-\kvtcb@shrinkbreakgoal}%
    \fi%
  \else%
    \tcbdimto\tcb@h@page{\textheight-\kvtcb@shrinkbreakgoal}%
  \fi%
}

\def\tcb@comp@h@total@standalone{%
  \tcbdimto\tcb@h@padding{\kvtcb@bbtop@stand+\kvtcb@bbbottom@stand+\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  \tcbdimto\tcb@h@total{\tcb@h@before+\tcb@h@after+\tcb@h@padding+\tcb@h@padtitle+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower}%
}

\def\tcb@following@title{%
  \ifx\kvtcb@followingtitle\@empty%
    \tcb@hasTitlefalse%
    \let\tcb@h@title=\tcb@zpt%
    \let\tcb@h@padtitle=\tcb@zpt%
  \else%
    \tcb@hasTitletrue%
    \tcbdimto\tcb@w@title{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@lefttitle-\kvtcb@righttitle}%
    \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\color{\kvtcb@coltitle}\kvtcb@fonttitle\kvtcb@followingtitle\end{tcb@savebox}%
    \tcbdimto\tcb@h@title{\ht\tcb@titlebox+\dp\tcb@titlebox}%
    \tcbdimto\tcb@h@padtitle{\kvtcb@title@rule+\kvtcb@boxsep*2+\kvtcb@toptitle+\kvtcb@bottomtitle+\tcb@h@title}%
  \fi%
}

\newbox\tcb@totalupperbox
\newbox\tcb@totallowerbox
\newif\iftcb@break@allowed

\def\tcb@enlbreak@next@final{%
  \ifdim\dimexpr\tcb@enlbreak@dim=0pt\relax
  \else\enlargethispage{\tcb@enlbreak@dim}\fi%
}

\def\tcb@enlbreak@next@scan#1/#2@{%
  \def\temp@a{#2}%
  \tcbdimto\tcb@enlbreak@dim{#1}%
  \ifx\temp@a\@empty%
    \let\tcb@enlbreak@next=\tcb@enlbreak@next@final%
  \else%
     \edef\tcb@enlbreak@seq{\temp@a @}%
  \fi%
  \tcb@enlbreak@next@final%
}

\def\tcb@enlbreak@next@step{%
  \edef\tcb@temp{\noexpand\tcb@enlbreak@next@scan\tcb@enlbreak@seq}%
  \tcb@temp%
}

\def\tcb@enlbreak@init{%
  \edef\tcb@enlbreak@seq{\kvtcb@enlargepage/@}%
  \let\tcb@enlbreak@next=\tcb@enlbreak@next@step%
  \tcb@enlbreak@next%
}

\def\tcb@drawcolorbox@breakable{%
  \ifx\kvtcb@float\@empty%
    {\parskip\z@\par\vskip\z@}\bgroup\@nobreakfalse\addpenalty\z@\egroup% force update vertical list
    \setbox\z@=\vbox{\kvtcb@beforebox}%
    \tcbdimto\tcb@h@before{\ht\z@+\dp\z@+\dimexpr\parskip\relax}%
    \setbox\z@=\vbox{\kvtcb@afterbox}%
    \tcbdimto\tcb@h@after{\ht\z@+\dp\z@}%
    \tcb@break@allowedtrue%
    \tcb@enlbreak@init%
  \else%
    \let\tcb@h@before=\tcb@zpt%
    \let\tcb@h@after=\tcb@zpt%
    \tcb@break@allowedfalse%
  \fi%
  \tcb@split@start%
}

\def\tcb@split@start{%
  \tcb@comp@h@page%
  %
  % height calculation
  \tcb@comp@h@total@standalone%
  %
  \let\tcb@split@next=\relax%
  \ifdim\tcb@h@total<\tcb@h@page\relax% no break
    \tcb@drawcolorbox@standalone%
  \else
    \iftcb@break@allowed%
      \ifdim\dimexpr\tcb@h@page-\tcb@h@before-\tcb@h@padding-\tcb@h@padtitle<\kvtcb@breakminlines\baselineskip\relax%
        \pagebreak\tcb@enlbreak@init\tcb@break@allowedfalse%
        \tcb@comp@h@page%
        \ifdim\tcb@h@total<\tcb@h@page\relax% no break!
          \tcb@drawcolorbox@standalone%
        \else
          \let\tcb@split@next=\tcb@split@first%
        \fi
      \else%
        \let\tcb@split@next=\tcb@split@first%
      \fi
    \else%
      \let\tcb@split@next=\tcb@split@first%
    \fi%
  \fi
  \tcb@split@next%
}


\def\tcb@setbox@upper#1#2{%
  \setbox\tcb@upperbox=\vbox{\color@begingroup\color{\kvtcb@colupper}\unvbox#2\color@endgroup}%
  \ifdim\dimexpr\ht\tcb@upperbox+\dp\tcb@upperbox>#1\relax%
    \setbox\tcb@upperbox=\vbox to\the\dimexpr#1-\dp\tcb@upperbox\relax {\color@begingroup\unvbox\tcb@upperbox\color@endgroup}%
  \fi%
  \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}%
}

\def\tcb@split@upper@box{%
  \vfuzz=\maxdimen\vbadness=10000%
  \setbox\tcb@upperbox=\vsplit\tcb@totalupperbox to\tcb@split@dim%
  \tcb@setbox@upper{\tcb@split@dim}{\tcb@upperbox}%
  \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz%
}

\def\tcb@setbox@lower#1#2{%
  \setbox\tcb@lowerbox=\vbox{\color@begingroup\color{\kvtcb@collower}\unvbox#2\color@endgroup}%
  \ifdim\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox>#1\relax%
    \setbox\tcb@lowerbox=\vbox to\the\dimexpr#1-\dp\tcb@lowerbox\relax {\color@begingroup\unvbox\tcb@lowerbox\color@endgroup}%
  \fi%
  \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
}

\def\tcb@split@lower@box{%
  \vfuzz=\maxdimen\vbadness=10000%
  \setbox\tcb@lowerbox=\vsplit\tcb@totallowerbox to\tcb@split@dim%
  \tcb@setbox@lower{\tcb@split@dim}{\tcb@lowerbox}%
  \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz%
}

\def\tcb@split@setstate@first{%
  \edef\tcb@split@state{first}%
  \let\kvtcb@top@rule=\kvtcb@top@rule@stand%
  \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@break%
  \let\kvtcb@bbtop=\kvtcb@bbtop@stand%
  \let\kvtcb@bbbottom=\kvtcb@bbbottom@break%
  \let\tcb@break@topsep=\tcb@zpt%
  \let\tcb@break@bottomsep=\kvtcb@bottomsep%
}

\def\tcb@split@setstate@middle{%
  \edef\tcb@split@state{middle}%
  \let\kvtcb@top@rule=\kvtcb@top@rule@break%
  \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@break%
  \let\kvtcb@bbtop=\kvtcb@bbtop@break%
  \let\kvtcb@bbbottom=\kvtcb@bbbottom@break%
  \let\tcb@break@topsep=\kvtcb@topsep%
  \let\tcb@break@bottomsep=\kvtcb@bottomsep%
}

\def\tcb@split@setstate@last{%
  \edef\tcb@split@state{last}%
  \let\kvtcb@top@rule=\kvtcb@top@rule@break%
  \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@stand%
  \let\kvtcb@bbtop=\kvtcb@bbtop@break%
  \let\kvtcb@bbbottom=\kvtcb@bbbottom@stand%
  \let\tcb@break@topsep=\kvtcb@topsep%
  \let\tcb@break@bottomsep=\tcb@zpt%
}


\def\tcb@split@force@standalone{%
  \tcb@comp@h@total@standalone%
  \ifdim\tcb@h@total>\tcb@h@page%
    \tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand+\tcb@h@page-\tcb@h@total}%
  \fi%
}


\def\tcb@split@first{%
  \setcounter{tcbbreakpart}{1}%
  \ifx\kvtcb@float\@empty%
    \def\tcb@before@first{\nointerlineskip\kvtcb@beforebox}%
    \def\tcb@before@middle{\nointerlineskip\noindent}%
    \let\tcb@before@last=\tcb@before@middle%
    \long\def\tcb@after@first{\parskip\z@\par\pagebreak\nointerlineskip{\topskip\z@\null}\tcb@enlbreak@next}%
    \let\tcb@after@middle=\tcb@after@first%
    \let\tcb@after@last=\kvtcb@afterbox%
  \else%
    \edef\tcb@float@env@start{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]}%
    \let\tcb@before@first=\tcb@float@env@start%
    \let\tcb@before@middle=\tcb@float@env@start%
    \let\tcb@before@last=\tcb@float@env@start%
    \let\tcb@after@first=\tcb@float@env@end%
    \let\tcb@after@middle=\tcb@float@env@end%
    \let\tcb@after@last=\tcb@float@env@end%
  \fi%
  %
  \edef\kvtcb@skin@@first{\kvtcb@skin@first}%
  \edef\kvtcb@skin@@middle{\kvtcb@skin@middle}%
  \edef\kvtcb@skin@@last{\kvtcb@skin@last}%
  %
  \let\tcb@h@breaksep@first=\kvtcb@bottomsep%
  \tcbdimto\tcb@h@breaksep@middle{\kvtcb@bottomsep+\kvtcb@topsep}%
  \let\tcb@h@breaksep@last=\kvtcb@topsep%
  \tcbdimto\tcb@h@padding@first{\kvtcb@bbtop@stand+\kvtcb@bbbottom@break+\kvtcb@top@rule@stand+\kvtcb@bottom@rule@break+\tcb@h@breaksep@first+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  \tcbdimto\tcb@h@padding@middle{\kvtcb@bbtop@break+\kvtcb@bbbottom@break+\kvtcb@top@rule@break+\kvtcb@bottom@rule@break+\tcb@h@breaksep@middle+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  \tcbdimto\tcb@h@padding@last{\kvtcb@bbtop@break+\kvtcb@bbbottom@stand+\kvtcb@top@rule@break+\kvtcb@bottom@rule@stand+\tcb@h@breaksep@last+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
  %
  \tcb@split@setstate@first%
  %
  \splittopskip=0pt%
  \splitmaxdepth=0pt%
  \edef\tcb@thevfuzz{\the\vfuzz}%
  \edef\tcb@thevbadness{\the\vbadness}%
  %
  \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}%
  \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}%
  %
  \let\tcb@split@next=\relax%
  \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@before-\tcb@h@padding@first-\tcb@h@padtitle}%
  \ifdim\tcb@split@dim<\tcb@h@upper\relax%
    \tcb@split@upper@box%
    \ifdim\wd\tcb@totalupperbox=0pt\relax%
      \iftcb@lowerspace%
        \tcb@sdraw@U%
        \let\tcb@split@next=\tcb@split@SL%
      \else%
        \tcb@split@force@standalone%
        \tcb@drawcolorbox@standalone%
      \fi%
    \else%
      \ifdim\dimexpr\tcb@h@upper=0pt\relax%
        \iftcb@break@allowed
          \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}%
          \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}%
          \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}%
          \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
          \pagebreak\tcb@enlbreak@init\tcb@break@allowedfalse%
          \let\tcb@split@next=\tcb@split@start%
        \else%
          \tcb@sdraw@U%
          \let\tcb@split@next=\tcb@split@USL%
        \fi%
      \else%
        \tcb@sdraw@U%
        \let\tcb@split@next=\tcb@split@USL%
      \fi%
    \fi%
  \else%
    \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}%
    \tcbdimto\tcb@split@dim{\tcb@split@dim-\tcb@h@upper-\tcb@h@segment}
    \ifdim\tcb@split@dim<\kvtcb@breakminlines\baselineskip\relax%
      \tcb@sdraw@U%
      \iftcb@lowerspace%
      \let\tcb@split@next=\tcb@split@SL%
      \else%
      \let\tcb@split@next=\tcb@split@USL%
      \fi%
    \else
      \tcb@split@lower@box%
      \ifdim\wd\tcb@totallowerbox=0pt\relax%
        \tcb@split@force@standalone%
        \tcb@drawcolorbox@standalone%
      \else%
        \tcb@sdraw@USL%
        \let\tcb@split@next=\tcb@split@L%
      \fi%
    \fi%
  \fi%
  \tcb@split@next%
}


\def\tcb@split@force@last{%
  \tcb@split@setstate@last%
  \ifdim\tcb@h@total>\tcb@h@page%
    \tcbdimto\kvtcb@bbbottom{\kvtcb@bbbottom+\tcb@h@page-\tcb@h@total}%
  \fi%
}


\def\tcb@split@USL{%
  \stepcounter{tcbbreakpart}%
  \tcb@following@title%
  \tcb@comp@h@page%
  \tcbdimto\tcb@h@upper{\ht\tcb@totalupperbox+\dp\tcb@totalupperbox}%
  \tcbdimto\tcb@h@total{\tcb@h@after+\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower}%
  %
  \let\tcb@split@next=\relax%
  \ifdim\tcb@h@total<\tcb@h@page\relax% no break
    \tcb@split@setstate@last%
    \tcb@setbox@upper{\tcb@h@upper}{\tcb@totalupperbox}%
    \iftcb@lowerspace%
      \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}%
      \tcb@sdraw@USL%
    \else
      \tcb@sdraw@U%
    \fi%
  \else
    \tcb@split@setstate@middle%
    \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle-\tcb@h@padtitle}%
    \ifdim\tcb@split@dim<\tcb@h@upper\relax%
      \tcb@split@upper@box%
      \ifdim\wd\tcb@totalupperbox=0pt\relax%
        \iftcb@lowerspace%
          \tcb@sdraw@U%
          \let\tcb@split@next=\tcb@split@SL%
        \else%
          \tcb@split@force@last%
          \tcb@sdraw@U%
        \fi%
      \else%
        \tcb@sdraw@U%
        \let\tcb@split@next=\tcb@split@USL%
      \fi%
    \else%
      \tcb@setbox@upper{\tcb@h@upper}{\tcb@totalupperbox}%
      \iftcb@lowerspace%
        \tcbdimto\tcb@split@dim{\tcb@split@dim-\tcb@h@upper-\tcb@h@segment}
        \ifdim\tcb@split@dim<\kvtcb@breakminlines\baselineskip\relax%
          \tcb@sdraw@U%
          \let\tcb@split@next=\tcb@split@SL%
        \else
          \tcb@split@lower@box%
          \ifdim\wd\tcb@totallowerbox=0pt\relax%
            \tcb@split@force@last%
            \tcb@sdraw@USL%
          \else%
            \tcb@sdraw@USL%
            \let\tcb@split@next=\tcb@split@L%
          \fi%
        \fi%
      \else%
        \tcb@split@force@last%
        \tcb@sdraw@U%
      \fi%
    \fi%
  \fi%
  \tcb@split@next%
}


\def\tcb@split@SL{%
  \stepcounter{tcbbreakpart}%
  \tcb@following@title%
  \tcb@comp@h@page%
  \let\tcb@h@upper=\tcb@zpt%
  \tcbdimto\tcb@h@lower{\ht\tcb@totallowerbox+\dp\tcb@totallowerbox}%
  \tcbdimto\tcb@h@total{\tcb@h@after+\tcb@h@padding@last-\kvtcb@top-\kvtcb@boxsep+\tcb@h@padtitle+\tcb@h@segment+\tcb@h@lower}%
  %
  \let\tcb@split@next=\relax%
  \ifdim\tcb@h@total<\tcb@h@page\relax% no break
    \tcb@split@setstate@last%
    \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}%
    \tcb@sdraw@SL%
  \else
    \tcb@split@setstate@middle%
    \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle+\kvtcb@top+\kvtcb@boxsep-\tcb@h@padtitle-\tcb@h@segment}%
    \tcb@split@lower@box%
    \ifdim\wd\tcb@totallowerbox=0pt\relax%
      \tcb@split@force@last%
      \tcb@sdraw@SL%
    \else
      \tcb@sdraw@SL%
      \let\tcb@split@next=\tcb@split@L%
    \fi%
  \fi%
  \tcb@split@next%
}


\def\tcb@split@L{%
  \stepcounter{tcbbreakpart}%
  \tcb@following@title%
  \tcb@comp@h@page%
  \let\tcb@h@upper=\tcb@zpt%
  \tcbdimto\tcb@h@lower{\ht\tcb@totallowerbox+\dp\tcb@totallowerbox}%
  \tcbdimto\tcb@h@total{\tcb@h@after+\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@lower}%
  %
  \let\tcb@split@next=\relax%
  \ifdim\tcb@h@total<\tcb@h@page\relax% no break
    \tcb@split@setstate@last%
    \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}%
    \tcb@sdraw@L%
  \else
    \tcb@split@setstate@middle%
    \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle-\tcb@h@padtitle}%
    \tcb@split@lower@box%
    \ifdim\wd\tcb@totallowerbox=0pt\relax%
      \tcb@split@force@last%
      \tcb@sdraw@L%
    \else
      \tcb@sdraw@L%
      \let\tcb@split@next=\tcb@split@L%
    \fi%
  \fi%
  \tcb@split@next%
}


\def\tcb@sdraw@USL{%
  \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}\tcb@afteroptions@hook%
  \def\tcb@segment@state{1}%
  \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower+\csname tcb@h@breaksep@\tcb@split@state\endcsname}%
  \tcb@ch@natural%
  \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}%
  \csname tcb@before@\tcb@split@state\endcsname%
  \begin{\kvtcb@graphenv}%
    \tcb@bbdraw%
    \tcb@extensions@preframe%
     % draw frame and interior
    \tcb@adraw@frame%
    \tcb@adraw@interior%
    \iftcb@lowerseparated%
      \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname%
    \fi%
    \tcb@adraw@title%
    \tcb@extensions@postframe%
    % draw text boxes
    \tcb@tdraw@title%
    \tcb@tdraw@upper%
    \tcb@tdraw@lower%
  \end{\kvtcb@graphenv}%
  \csname tcb@after@\tcb@split@state\endcsname%
}


\def\tcb@sdraw@U{%
  \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}\tcb@afteroptions@hook%
  \def\tcb@segment@state{0}%
  \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper+\csname tcb@h@breaksep@\tcb@split@state\endcsname}%
  \tcb@ch@natural%
  \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}%
  \csname tcb@before@\tcb@split@state\endcsname%
  \begin{\kvtcb@graphenv}%
    \tcb@bbdraw%
    \tcb@extensions@preframe%
    % draw frame and interior
    \tcb@adraw@frame%
    \tcb@adraw@interior%
    \tcb@adraw@title%
    \tcb@extensions@postframe%
    % draw text boxes
    \tcb@tdraw@title%
    \tcb@tdraw@upper%
  \end{\kvtcb@graphenv}%
  \csname tcb@after@\tcb@split@state\endcsname%
}


\def\tcb@sdraw@SL{%
  \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}\tcb@afteroptions@hook%
  \def\tcb@segment@state{1}%
  \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@bottom+\kvtcb@boxsep+\tcb@h@segment+\tcb@h@lower+\csname tcb@h@breaksep@\tcb@split@state\endcsname}%
  \tcb@ch@natural%
  \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}%
  \csname tcb@before@\tcb@split@state\endcsname%
  \begin{\kvtcb@graphenv}%
    \tcb@bbdraw%
    \tcb@extensions@preframe%
    % draw frame and interior
    \tcb@adraw@frame%
    \tcb@adraw@interior%
    \iftcb@lowerseparated%
      \csname tcb@drawlower@\kvtcb@engine@segmentation\endcsname%
    \fi%
    \tcb@adraw@title%
    \tcb@extensions@postframe%
    % draw text boxes
    \tcb@tdraw@title%
    \tcb@tdraw@lower%
  \end{\kvtcb@graphenv}%
  \csname tcb@after@\tcb@split@state\endcsname%
}


\def\tcb@sdraw@L{%
  \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}\tcb@afteroptions@hook%
  \def\tcb@segment@state{2}%
  \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\ht\tcb@lowerbox+\dp\tcb@lowerbox+\csname tcb@h@breaksep@\tcb@split@state\endcsname}%
  \tcb@ch@natural%
  \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}%
  \csname tcb@before@\tcb@split@state\endcsname%
  \begin{\kvtcb@graphenv}%
    \tcb@bbdraw%
    \tcb@extensions@preframe%
    % draw frame and interior
    \tcb@adraw@frame%
    \tcb@adraw@interior%
    \tcb@adraw@title%
    \tcb@extensions@postframe%
    % draw text boxes
    \tcb@tdraw@title%
    \tcb@tdraw@lower%
  \end{\kvtcb@graphenv}%
  \csname tcb@after@\tcb@split@state\endcsname%
}



\tcbset{%
  breakable@true/.code={%
    \let\tcb@savebox=\tcb@vbox%
    \let\endtcb@savebox=\endtcb@vbox%
    \let\tcb@drawcolorbox=\tcb@drawcolorbox@breakable},
  breakable/.style={breakable@#1},
  breakable/.default=true,%
  unbreakable/.style={breakable=false},%
  title after break/.store in=\kvtcb@followingtitle,%
  notitle after break/.style={title after break=},%
  adjusted title after break/.style={title after break={#1\vphantom{\kvtcb@adjusttext}}},%
  lines before break/.store in=\kvtcb@breakminlines,%
  shrink break goal/.store in=\kvtcb@shrinkbreakgoal,%
%
  toprule at break/.store in=\kvtcb@top@rule@break,
  bottomrule at break/.store in=\kvtcb@bottom@rule@break,
  enlarge top at break by/.store in=\kvtcb@bbtop@break,
  enlarge bottom at break by/.store in=\kvtcb@bbbottom@break,
%
  topsep at break/.store in=\kvtcb@topsep,%
  bottomsep at break/.store in=\kvtcb@bottomsep,%
  pad before break/.code={\let\kvtcb@bottom@rule@break=\tcb@zpt%
    \tcbdimto\kvtcb@bottomsep{#1-\kvtcb@bottom-\kvtcb@boxsep}},%
  pad after break/.code={\let\kvtcb@top@rule@break=\tcb@zpt%
    \tcbdimto\kvtcb@topsep{#1-\kvtcb@top-\kvtcb@boxsep}},%
  pad at break/.style={pad before break={#1},pad after break={#1}},%
  enlargepage/.store in=\kvtcb@enlargepage,
}


\tcbset{%
  reset@breakable/.style={%
    unbreakable,notitle after break,
    shrink break goal=0pt,
    lines before break=2,
    topsep at break=0pt,
    bottomsep at break=0pt,
    enlargepage=0pt,
  },
  initialize@reset=reset@breakable,
}

