\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{detectorpub}[2026/07/17 Detector public research notes]

\RequirePackage[margin=0.82in,top=0.78in,bottom=0.8in]{geometry}
\RequirePackage[T1]{fontenc}
\RequirePackage{helvet}
\RequirePackage{microtype}
\RequirePackage{booktabs}
\RequirePackage{tabularx}
\RequirePackage{array}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{float}
\RequirePackage{needspace}
\RequirePackage{enumitem}
\RequirePackage{xcolor}
\RequirePackage{hyperref}
\RequirePackage{fancyhdr}
\RequirePackage{titlesec}
\RequirePackage{lastpage}

\renewcommand{\familydefault}{\sfdefault}
\setlength{\parindent}{0pt}
\setlength{\parskip}{7pt}
\setlist[itemize]{leftmargin=18pt,itemsep=3pt,topsep=4pt}
\setlist[enumerate]{leftmargin=21pt,itemsep=4pt,topsep=4pt}

\definecolor{detink}{HTML}{131A2A}
\definecolor{detmuted}{HTML}{596273}
\definecolor{detblue}{HTML}{3156D8}
\definecolor{detviolet}{HTML}{7654D6}
\definecolor{detsoft}{HTML}{EEF2FF}
\definecolor{detrule}{HTML}{CDD3DF}
\color{detink}

\hypersetup{
  colorlinks=true,
  linkcolor=detblue,
  urlcolor=detblue,
  citecolor=detviolet,
  pdfborder={0 0 0}
}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\small\color{detmuted}Detector public research}
\fancyhead[R]{\small\color{detmuted}\DocShortTitle}
\fancyfoot[L]{\small\color{detmuted}Sonny Fullerton}
\fancyfoot[R]{\small\color{detmuted}\thepage\ / \pageref*{LastPage}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}

\titleformat{\section}{\Large\bfseries\color{detink}}{\thesection}{0.7em}{}
\titleformat{\subsection}{\large\bfseries\color{detink}}{\thesubsection}{0.65em}{}
\titlespacing*{\section}{0pt}{22pt}{8pt}
\titlespacing*{\subsection}{0pt}{16pt}{5pt}

\newcommand{\kicker}[1]{\textcolor{detblue}{\bfseries #1}}
\newcommand{\metric}[2]{\begin{minipage}[t]{0.47\linewidth}\colorbox{detsoft}{\parbox{0.92\linewidth}{\vspace{6pt}\centering{\LARGE\bfseries\color{detblue}#1}\\[3pt]{\small\color{detmuted}#2}\vspace{6pt}}}\end{minipage}}
\newcommand{\disclosure}{%
  \vspace{5pt}\noindent\colorbox{detsoft}{\parbox{0.95\linewidth}{\small\textbf{Disclosure boundary.} This publication documents the evaluation framework and aggregate reference results. It does not disclose proprietary features, model topology, training recipe, weights, source code, or private data lineage.}}\vspace{5pt}}

\newcommand{\doctitle}[5]{%
  \thispagestyle{empty}
  \vspace*{-0.18in}
  {\color{detblue}\rule{\linewidth}{5pt}}\\[19pt]
  {\small\bfseries\color{detblue}Detector public research}\par
  \vspace{14pt}
  {\fontsize{27}{30}\selectfont\bfseries #1}\par
  \vspace{11pt}
  {\Large\color{detmuted}#2}\par
  \vspace{26pt}
  \begin{tabularx}{\linewidth}{@{}>{\bfseries}l X@{}}
  Author & Sonny Fullerton \\
  Version & #3 \\
  Source & Public repository at commit \texttt{4143b39} \\
  Date & July 2026 \\
  Status & #4 \\
  \end{tabularx}
  \vspace{22pt}
  \colorbox{detsoft}{\parbox{0.95\linewidth}{\small #5}}
  \vfill
  {\small\color{detmuted}\url{https://github.com/sonnyfully/AI-Music-Detection}}\par
  \newpage
}

\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
\newcommand{\sourcefoot}{\footnotesize\color{detmuted}All benchmark values in this document are reproduced from the public repository at commit \texttt{4143b39}.}
