% -------------------------------------------------------------------------
% Encoding, fonts, layout
% -------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{microtype}
%\usepackage{float}
\usepackage{booktabs}

% ---------------------------
% Better float behavior
% ---------------------------
%\setcounter{topnumber}{5}
%\setcounter{bottomnumber}{5}
%\setcounter{totalnumber}{10}
%\renewcommand{\topfraction}{0.9}
%\renewcommand{\bottomfraction}{0.85}
%\renewcommand{\textfraction}{0.08}
%\renewcommand{\floatpagefraction}{0.8}

% -------------------------------------------------------------------------
% Math
% -------------------------------------------------------------------------
\usepackage{amsmath,amssymb,bm,mathtools}

\newcommand{\R}{\mathbb{R}}
\DeclareMathOperator{\logit}{logit}

% -------------------------------------------------------------------------
% Numbers
% -------------------------------------------------------------------------
\usepackage{siunitx}
\sisetup{
  detect-all,
  round-mode      = places,
  round-precision = 3,
  round-pad       = true
}

% -------------------------------------------------------------------------
% Graphics
% -------------------------------------------------------------------------
\usepackage{graphicx}
\usepackage[space]{grffile}
\graphicspath{{./}{./figs/}{./Figures/}}

% Figure width macros
\newcommand{\figWfull}{\linewidth}
\newcommand{\figWmed}{0.85\linewidth}
\newcommand{\figWsmall}{0.70\linewidth}
\newcommand{\figWwide}{0.90\linewidth}

% -------------------------------------------------------------------------
% Tables
% -------------------------------------------------------------------------
\usepackage[table]{xcolor}
\usepackage{array,booktabs,adjustbox,tabularx,makecell,colortbl,multirow}
%\setlength{\tabcolsep}{4pt}

\definecolor{headerblue}{RGB}{52,73,94}
\definecolor{lightgray}{RGB}{242,242,242}
\rowcolors{2}{lightgray!25}{white}

% -------------------------------------------------------------------------
% Comments
% -------------------------------------------------------------------------
\newcommand{\mycomment}[1]{\textcolor{red}{{#1}}}

% -------------------------------------------------------------------------
% Captions/subfigures / lists/floats
% -------------------------------------------------------------------------
%\usepackage{caption}
%\usepackage{subcaption}
\usepackage{enumitem}
\usepackage{placeins}

%\captionsetup[figure]{font=small,labelfont=bf}
%\captionsetup[table]{font=small,labelfont=bf}

% -------------------------------------------------------------------------
% Bibliography
% -------------------------------------------------------------------------
\usepackage[authoryear, round]{natbib} 

% -------------------------------------------------------------------------
% Custom macros
% -------------------------------------------------------------------------
\newcommand{\NCgrp}{\mathrm{NC}}
\newcommand{\AEgrp}{\mathrm{AE}}
\newcommand{\SUV}{\mathrm{SUV}}
\newcommand{\sigmoid}{\sigma}
\newcommand{\CB}{\mathrm{CB}}

\DeclareMathOperator*{\argmax}{arg\,max} 
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator{\softplus}{softplus}
\DeclareMathOperator{\expit}{expit}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Expect}{E}

\newcommand{\Prob}{P}

\newcommand{\bTheta}{\boldsymbol{\Theta}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\bphi}{\boldsymbol{\phi}}
\newcommand{\bSigma}{\boldsymbol{\Sigma}}

\newcommand{\comment}[2]{{\bfseries\color{red} #1: #2}}
\newcommand{\commentX}[3]{{\bfseries\color{#1} #2: #3}}


% -------------------------------------------------------------------------
% IOP related macros
% -------------------------------------------------------------------------
\newcommand{\iopheader}[4]{%
    % #1 = Journal Name, #2 = Received Date, #3 = Revised Date, #4 = Article Type
    {\vspace*{-8mm}\noindent \Large \sf #1}

    \vspace*{8mm} \noindent\reversemarginpar
    \marginpar{\vspace{-3mm} {\color{gray}\hrule} \ \\ Crossmark\\ {\color{gray}\hrule} \ \\ 
        \tiny {\sf RECEIVED} {\small \\ #2}\\ \\ 
        {\sf REVISED} {\small \\ #3}
    }
    {\scriptsize \sf{\bfseries \MakeUppercase{#4}}}
}

\makeatletter
\newcommand{\justifying}{%
  \rightskip\z@skip
  \leftskip\z@skip
  \spaceskip\z@
  \xspaceskip\z@
  \parindent 1.5em % Or your preferred indentation
}
\makeatother

\justifying

\renewenvironment{abstract}{%
      \vspace{16pt plus3pt minus3pt}
      {\color{gray}\hrule} \ \\
      \noindent \fontsize{11}{12}\selectfont {\bfseries Abstract}\\
	  \rm\ignorespaces }{\vspace{3mm} {\color{gray}\hrule}}