/* Open Library Theme — 2026-08-29 v62
 * Canonical frontend shell width.
 * Keeps portal, journal, Login, Register and Reset Password aligned to one width.
 */
:root{
  --ol62-shell:1240px;
}

/* One horizontal shell for header, content and footer. */
html body .openlib_shell,
html body .pkp_structure_content{
  box-sizing:border-box!important;
  width:min(var(--ol62-shell),calc(100% - 48px))!important;
  max-width:var(--ol62-shell)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Auth pages previously had separate 760px/1120px widths. Remove that split. */
html body.pkp_page_login .pkp_structure_content,
html body.pkp_page_user.pkp_op_register .pkp_structure_content,
html body.pkp_page_login.pkp_op_lostPassword .pkp_structure_content,
html body.pkp_page_login.pkp_op_requestResetPassword .pkp_structure_content,
html body.openlib-site-page.pkp_page_login .pkp_structure_content,
html body.openlib-site-page.pkp_page_user.pkp_op_register .pkp_structure_content,
html body.openlib-journal-page.pkp_page_login .pkp_structure_content,
html body.openlib-journal-page.pkp_page_user.pkp_op_register .pkp_structure_content{
  width:min(var(--ol62-shell),calc(100% - 48px))!important;
  max-width:var(--ol62-shell)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Cards fill the same main-column width consistently. */
html body.pkp_page_login .page_login,
html body.pkp_page_user.pkp_op_register .page_register,
html body.pkp_page_login.pkp_op_lostPassword .page_lost_password,
html body.pkp_page_login.pkp_op_requestResetPassword .page_lost_password,
html body.pkp_page_login.pkp_op_lostPassword .page_reset_password,
html body.pkp_page_login.pkp_op_requestResetPassword .page_reset_password{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Journal pages keep the same outer shell even when a sidebar exists. */
html body.openlib-journal-page .pkp_structure_content,
html body.openlib-journal-page .pkp_structure_content.has_sidebar,
html body.openlib-site-page .pkp_structure_content,
html body.openlib-site-page .pkp_structure_content.has_sidebar{
  width:min(var(--ol62-shell),calc(100% - 48px))!important;
  max-width:var(--ol62-shell)!important;
}

@media (max-width:1024px){
  html body .openlib_shell,
  html body .pkp_structure_content,
  html body.pkp_page_login .pkp_structure_content,
  html body.pkp_page_user.pkp_op_register .pkp_structure_content,
  html body.pkp_page_login.pkp_op_lostPassword .pkp_structure_content,
  html body.pkp_page_login.pkp_op_requestResetPassword .pkp_structure_content{
    width:calc(100% - 32px)!important;
  }
}

@media (max-width:767px){
  html body .openlib_shell,
  html body .pkp_structure_content,
  html body.pkp_page_login .pkp_structure_content,
  html body.pkp_page_user.pkp_op_register .pkp_structure_content,
  html body.pkp_page_login.pkp_op_lostPassword .pkp_structure_content,
  html body.pkp_page_login.pkp_op_requestResetPassword .pkp_structure_content{
    width:calc(100% - 24px)!important;
  }
}
