% ============================================================
% pdfLaTeX-ready preamble (publishable)
% ============================================================

% ---- Encoding & fonts (pdfLaTeX)
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{lmodern}
\RequirePackage{microtype}

% ---- Math
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{mathtools}
\RequirePackage{stmaryrd}
\SetSymbolFont{stmry}{bold}{U}{stmry}{m}{n}
\RequirePackage{bbm}
\RequirePackage{extarrows}

% ---- Graphics / Color
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{wrapfig}
\RequirePackage{overpic}
\RequirePackage{adjustbox}

% ---- Subfigures (replace deprecated subfigure)
\RequirePackage{subcaption}

% ---- Tables
\RequirePackage{booktabs}
\RequirePackage{longtable}
\RequirePackage{multirow}
\RequirePackage{makecell}
\RequirePackage{colortbl}
\RequirePackage{diagbox}
\RequirePackage{supertabular}
\RequirePackage{nicematrix}
\RequirePackage{arydshln}
\setlength{\LTcapwidth}{5.4in}

% ---- Lists
\RequirePackage{enumitem}
\RequirePackage{outlines}
\setlist{nosep}

% ---- Algorithms
\RequirePackage[linesnumbered,ruled]{algorithm2e}

% ---- Layout / floats (use only if your template allows)
\RequirePackage{float}
\RequirePackage{multicol}
\RequirePackage{fancyhdr}
\RequirePackage{titlesec}

% ---- Appendix / ToC helper
\RequirePackage[toc,page,header]{appendix}
\newcommand{\tableofappendix}{%
  \setcounter{tocdepth}{0}
  \renewcommand{\contentsname}{Contents of Appendix}%
  \newpage\tableofcontents%
  \addtocontents{toc}{\protect\setcounter{tocdepth}{3}}%
  \clearpage%
}

% ---- Misc
\RequirePackage{latexsym}
\RequirePackage{pifont}
\RequirePackage{boxedminipage}

% ---- Hyperref (load late)
\RequirePackage{hyperref}
\RequirePackage{bookmark}
\definecolor{mydarkblue}{rgb}{0,0.08,0.45}
\hypersetup{
  colorlinks=true,
  linkcolor=mydarkblue,
  citecolor=mydarkblue,
  filecolor=mydarkblue,
  urlcolor=mydarkblue,
  pdfborder={0 0 0},
}

% ---- Minted (optional; requires -shell-escape)
% If your venue forbids shell-escape, comment these two lines and use listings instead.
\RequirePackage{minted}

% ---- Keep these unchanged
\RequirePackage{utils/mathcommand}
\RequirePackage{utils/mathenv}
\RequirePackage{utils/mytikz}

% ---- Your hook (kept)
\makeatletter
\newcommand{\qualification}[1]{\ifthmt@thisistheone#1\fi}
\makeatother
\RequirePackage[most]{tcolorbox}
% \tcbuselibrary{listings, breakable}
\newtcblisting{prompt}{breakable, colback=gray!3, colupper=black, colframe=gray, listing only,listing options={style=tcblatex, breaklines=true,language=TeX}}