% Embed cover page (if any) as first page while keeping named destinations intact
\usepackage{pdfpages}

% Disable auto-generated LaTeX title page so external cover is page 1
\AtBeginDocument{\let\maketitle\relax}

% Underline hyperlinks (deferred so hyperref is already loaded)
\AtBeginDocument{%
  \hypersetup{
    colorlinks=false,
    pdfborderstyle={/S/U/W 0.5},
    allbordercolors={0 0 0}
  }%
}

% Make \paragraph (h5) and \subparagraph (h6) block-level headings
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
  {1.5ex \@plus 0.5ex \@minus .2ex}%
  {0.5ex}%
  {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
  {1.25ex \@plus 0.5ex \@minus .2ex}%
  {0.4ex}%
  {\normalfont\normalsize\itshape}}
\makeatother
